Compare commits
No commits in common. "master" and "v1" have entirely different histories.
|
@ -1,23 +0,0 @@
|
|||
*~
|
||||
.*.sw?
|
||||
autom4te.cache/*
|
||||
Makefile.in
|
||||
Makefile
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
depcomp
|
||||
stamp-h1
|
||||
install-sh
|
||||
configure
|
||||
missing
|
||||
po/Makevars.template
|
||||
po/stamp-po
|
||||
src/.deps/*
|
||||
po/POTFILES
|
||||
*.o
|
||||
src/botcommander
|
||||
aclocal.m4
|
||||
/po/.pot
|
||||
/po/remove-potcdate.sed
|
674
COPYING
674
COPYING
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -1,7 +1,4 @@
|
|||
2010-10-07 gettextize <bug-gnu-gettext@gnu.org>
|
||||
2007-04-09 19:41 Gergely Polonkai <polesz@botcommander.hu>
|
||||
|
||||
* Makefile.am (SUBDIRS): Add po.
|
||||
(ACLOCAL_AMFLAGS): New variable.
|
||||
(EXTRA_DIST): New variable.
|
||||
* configure.ac (AC_OUTPUT): Add po/Makefile.in.
|
||||
* Added this ChangeLog file.
|
||||
|
||||
|
|
321
INSTALL
321
INSTALL
|
@ -1,80 +1,48 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
The file `configure.ac' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.ac' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
documentation.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
|
@ -83,119 +51,62 @@ of `autoconf'.
|
|||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
|
@ -208,75 +119,25 @@ find the X include and library files automatically, but if it doesn't,
|
|||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
need to know the host type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
@ -289,55 +150,19 @@ default values for variables like `CC', `cache_file', and `prefix'.
|
|||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
|
@ -350,16 +175,8 @@ operates.
|
|||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
ACLOCAL_AMFLAGS = -I m4
|
||||
SUBDIRS = po src
|
|
@ -0,0 +1,51 @@
|
|||
include rules
|
||||
subdirs = src doc pixmaps po data
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
all:
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) all) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
|
||||
install:
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) install) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
|
||||
clean:
|
||||
/bin/rm -f *~
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) clean) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
|
||||
distclean:
|
||||
@for dir in ${subdirs}; do \
|
||||
(cd $$dir && $(MAKE) distclean) \
|
||||
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
/bin/rm -f Makefile config.h config.status config.cache config.log intltool-extract intltool-merge intltool-update rules configure aclocal.m4
|
||||
/bin/rm -rf autom4te.cache/
|
||||
|
||||
# automatic re-running of configure if the configure.in file has changed
|
||||
${srcdir}/configure: configure.in aclocal.m4
|
||||
cd ${srcdir} && autoconf
|
||||
|
||||
# autoheader might not change config.h.in, so touch a stamp file
|
||||
${srcdir}/config.h.in: stamp-h.in
|
||||
${srcdir}/stamp-h.in: configure.in aclocal.m4
|
||||
cd ${srcdir} && autoheader
|
||||
echo timestamp > ${srcdir}/stamp-h.in
|
||||
|
||||
config.h: stamp-h
|
||||
stamp-h: config.h.in config.status
|
||||
./config.status
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
91
README
91
README
|
@ -0,0 +1,91 @@
|
|||
This short document is originally based on eggdrop's README file.
|
||||
|
||||
Contents
|
||||
|
||||
0. Important notice
|
||||
1. What is BotCommander
|
||||
2. How do I get BotCommander?
|
||||
3. Quick startup
|
||||
4. Frequently Asked Questions
|
||||
5. Legal stuff
|
||||
6. Documentation
|
||||
7. Obtaining help
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(0) NOTICE
|
||||
|
||||
Please read this document, and the original BotCommander documentation
|
||||
before asking for help! These files contain almost everything possible, and
|
||||
are always growing, as people ask me more and more questions.
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(1) WHAT IS BOTCOMMANDER?
|
||||
|
||||
BotCommander is a customisable telnet client, heavily specialized with the
|
||||
usage with Eggdrop IRC bots. Currently it possesses only the planned basic
|
||||
functionality, but I have many-many plans, such as module-writing,
|
||||
scripting and such.
|
||||
|
||||
BotCommander is continously updated: bugs are getting fixed, and new
|
||||
features are being added, which sometimes can cause new bugs. Currently
|
||||
there is a so called "stable" version out there, but there are still known
|
||||
bugs.
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(2) HOW DO I GET BOTCOMMANDER?
|
||||
|
||||
Before you can install/compile BotCommander, you will need several other
|
||||
software installed on your machine.
|
||||
|
||||
As BotCommander currently depends heavily on GTK+ 2 and Gnome 2, you will
|
||||
need these. If you are planning (or must) install BotCommander from
|
||||
sources, you will also need the development libraries of them. These
|
||||
software comes with most of the Linux/Unix distributions, so the only thing
|
||||
you may have to do is to install them.
|
||||
|
||||
The current stable version (as of writing) is 1.0; you can download it
|
||||
(amongst many other files) from http://www.botcommander.hu/.
|
||||
|
||||
Optionally, you can get the latest SVN version from
|
||||
http://www.botcommander.hu/files/botcommander-svn.tar.bz2. BUT BEWARE! This
|
||||
version may contain code snippets which will never compile on any machine!
|
||||
This is because I'm a nasty developer, and sometimes upload this kind of
|
||||
code, so I can continue coding on my other machine after an svn update. I'm
|
||||
also planning to add anonymous SVN access, but currently I don't have
|
||||
enough knowledge about SVN to do such thing.
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(3) QUICK STARTUP
|
||||
|
||||
About installation quick-start you should read the INSTALL file; about
|
||||
usage, you should go and read the original BotCommander documentation. The
|
||||
latter is written in DocBook XML, and is compiled into a PDF document upon
|
||||
a successful installation. It can be found in the doc/ directory.
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(4) FREQUENTLY ASKED QUESTIONS
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(5) LEGAL STUFF
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(6) DOCUMENTATION
|
||||
|
||||
_________________________________________________________________
|
||||
|
||||
|
||||
(7) OBTAINING HELP
|
|
@ -0,0 +1,23 @@
|
|||
* Preferences
|
||||
- Save recalled command at the end of history?
|
||||
- Save command to history which is already there somewhere?
|
||||
|
||||
* Bot list
|
||||
- Edit Save in conf backend
|
||||
|
||||
* Command completion
|
||||
|
||||
* If there is a command which can be abbreviated and one
|
||||
which can not, get_command_from_abbrev() should return the former.
|
||||
|
||||
* User should be able to set local vhost to use.
|
||||
|
||||
* (Channel and Handle list) hideable.
|
||||
|
||||
* Create a status icon.
|
||||
|
||||
* BotCommander SWITCH command. This will act like the CONNECT command, but it will connect in a new tab. If the specified bot is already connected in one of the tabs, BotCommander will switch to that tab instead of opening a new one.
|
||||
|
||||
* Contents of aclocal.m4 can be splitted somehow. But where to?
|
||||
|
||||
* http://www.botcommander.hu/files/botcommander-latest.tar.bz2 <= http://www.botcommander.hu/latest
|
10
autogen.sh
10
autogen.sh
|
@ -1,10 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
mkdir m4 &> /dev/null
|
||||
autoheader || exit 1
|
||||
aclocal || exit 1
|
||||
automake --add-missing --copy || exit 1
|
||||
autoconf || exit 1
|
||||
|
||||
exit 0
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,165 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* config.h.in
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* This file holds some default settings.
|
||||
}}} */
|
||||
|
||||
/* This is the GConf path where BC stores it's settings. You should leave this
|
||||
* as the default */
|
||||
#define GCONF2_ROOT "/apps/botcommander"
|
||||
|
||||
/* {{{ Default settings */
|
||||
#define DEFAULT_SCROLL_ON_OUTPUT TRUE
|
||||
#define DEFAULT_CHANGE_TO_MESSAGE TRUE
|
||||
#define DEFAULT_DEBUG FALSE
|
||||
#define DEFAULT_TRANSPARENT_BACKGROUND FALSE
|
||||
#define DEFAULT_BACKGROUND_SATURATION 1.0
|
||||
#define DEFAULT_DEFAULT_MODE "B"
|
||||
#define DEFAULT_VTE_FONT "Courier 10 Pitch 12"
|
||||
#define DEFAULT_CHANGE_TO_NEW_TAB FALSE
|
||||
#define DEFAULT_HISTORY_LENGTH 100
|
||||
/* }}} */
|
||||
|
||||
/* Eggdrop itself uses ISO-8859-1 when using the default english language. You
|
||||
* only have to change this if you use a different language file (e.g hungarian
|
||||
* is usually in ISO-8859-2), or you use a script or module which sends out
|
||||
* characters in a different character set. */
|
||||
#define BOT_CHARSET "ISO-8859-1"
|
||||
|
||||
#define MAX_READ_LINE_LEN 1024
|
||||
|
||||
/* config.h.in. Most of this file is generated from configure.in by
|
||||
* autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* GETTEXT package name */
|
||||
#undef GETTEXT_PACKAGE
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <libintl.h> header file. */
|
||||
#undef HAVE_LIBINTL_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strtol' function. */
|
||||
#undef HAVE_STRTOL
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* Package pixmaps directory */
|
||||
#undef PACKAGE_PIXMAPS_DIR
|
||||
|
||||
/* Package local directory */
|
||||
#undef PACKAGE_LOCALE_DIR
|
||||
|
672
config.rpath
672
config.rpath
|
@ -1,672 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2010 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||
|
||||
for cc_temp in $CC""; do
|
||||
case $cc_temp in
|
||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||
\-*) ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
case $cc_basename in
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
icc* | ifort*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# Set some defaults for GNU ld with shared library support. These
|
||||
# are reset later if shared libraries are not supported. Putting them
|
||||
# here allows them to be overridden if necessary.
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
case "$host_os" in
|
||||
aix[3-9]*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
interix[3-9]*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
gnu* | linux* | k*bsd*-gnu)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
||||
case `$LD -v 2>&1` in
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = no; then
|
||||
hardcode_libdir_flag_spec=
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix[4-9]*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
:
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
fi
|
||||
;;
|
||||
hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
*)
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6*)
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||
hardcode_libdir_separator=':'
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
||||
# only about the one the linker finds when passed -lNAME. This is the last
|
||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
||||
# linker has special search rules.
|
||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
aix[4-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
amigaos*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
beos*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
bsdi[45]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.dll.a $libname.lib'
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
dgux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
case "$host_os" in
|
||||
freebsd[123]*)
|
||||
library_names_spec='$libname$shrext$versuffix' ;;
|
||||
*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
esac
|
||||
;;
|
||||
gnu*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
interix[3-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
netbsd*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
newsos6)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
nto-qnx*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
openbsd*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sunos4*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
sysv4 | sysv4.3*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
uts4*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Format of library name prefix.
|
||||
libname_spec="$escaped_libname_spec"
|
||||
|
||||
# Library names that the linker finds when passed -lNAME.
|
||||
library_names_spec="$escaped_library_names_spec"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
File diff suppressed because it is too large
Load Diff
24
configure.ac
24
configure.ac
|
@ -1,24 +0,0 @@
|
|||
PACKAGE=botcommander
|
||||
VERSION=0.1.0
|
||||
|
||||
AC_INIT([botcommander], [0.1.0])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
||||
AC_SUBST(PACKAGE)
|
||||
AC_SUBST(VERSION)
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
PKG_CHECK_MODULES(GTK, gtk+-3.0)
|
||||
|
||||
AC_SUBST(BCREQ_CFLAGS)
|
||||
AC_SUBST(BCREQ_LIBS)
|
||||
|
||||
AC_PROG_CC
|
||||
|
||||
AC_OUTPUT([Makefile src/Makefile po/Makefile.in])
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
AC_PREREQ(2.60)
|
||||
AC_INIT(BotCommander, 1.0, polesz@botcommander.hu)
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
PACKAGE=botcommander
|
||||
BOTCOMMANDER_VERSION=1.0
|
||||
ALL_LINGUAS=hu
|
||||
GETTEXT_PACKAGE=botcommander
|
||||
|
||||
GLIB_REQUIRED=2.0.6
|
||||
GDK_PIXBUF_REQUIRED=2.0.0
|
||||
GTK_REQUIRED=2.2.0
|
||||
GNOME_REQUIRED=2.0.2
|
||||
GNOME_UI_REQUIRED=2.0.2
|
||||
VTE_REQUIRED=0.9.0
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AM_GNU_GETTEXT
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
AC_SUBST(GLIB_REQUIRED)
|
||||
AC_SUBST(GDK_PIXBUF_REQUIRED)
|
||||
AC_SUBST(GTK_REQUIRED)
|
||||
AC_SUBST(GNOME_REQUIRED)
|
||||
AC_SUBST(GNOME_UI_REQUIRED)
|
||||
AC_SUBST(VTE_REQUIRED)
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_SUBST(PACKAGE)
|
||||
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
|
||||
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
packageprefix=${ac_default_prefix}
|
||||
else
|
||||
packageprefix=${prefix}
|
||||
fi
|
||||
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Package local directory])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale", [Package local directory])
|
||||
fi
|
||||
|
||||
packagepixmapsdir=share/pixmaps/${PACKAGE}
|
||||
|
||||
PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}"
|
||||
AC_SUBST(PACKAGE_PIXMAPS_DIR)
|
||||
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}", [Package pixmaps directory])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug Enable debug mode], CFLAGS="$CFLAGS -DDEBUG -g -Wall")
|
||||
|
||||
dnl Check for required programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
IT_PROG_INTLTOOL
|
||||
AC_CHECK_PROGS([TEXI2PDF], [texi2pdf])
|
||||
|
||||
dnl Check for extensions
|
||||
AC_OBJEXT
|
||||
AC_EXEEXT
|
||||
|
||||
dnl Check for math library
|
||||
AC_CHECK_LIB([m], [exp10])
|
||||
AC_ISC_POSIX
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h libintl.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SSIZE_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([gethostbyname memset setlocale socket strchr strerror strtol])
|
||||
|
||||
PKG_PROG_PKG_CONFIG([0.9.0])
|
||||
|
||||
if test x$PKG_CONFIG = xno; then
|
||||
AC_MSG_ERROR(Please install the pkg-config package!);
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(BOTCOMMANDER, glib-2.0 >= $GLIB_REQUIRED gtk+-2.0 >= $GTK_REQUIRED libgnome-2.0 >= $GNOME_REQUIRED libgnomeui-2.0 >= $GNOME_REQUIRED vte >= $VTE_REQUIRED gconf-2.0)
|
||||
|
||||
AC_SUBST(BOTCOMMANDER_CFLAGS)
|
||||
AC_SUBST(BOTCOMMANDER_LIBS)
|
||||
|
||||
AM_GCONF_SOURCE_2
|
||||
|
||||
AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
|
||||
if test "x$GCONFTOOL" = "xno"; then
|
||||
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([rules
|
||||
Makefile
|
||||
data/Makefile
|
||||
doc/Makefile
|
||||
src/Makefile
|
||||
pixmaps/Makefile
|
||||
po/Makefile.in
|
||||
data/botcommander.desktop.in
|
||||
data/botcommander.schemas])
|
||||
AC_OUTPUT
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/sh
|
||||
|
||||
MAIN_DIR=source_html
|
||||
C2HTML=`which c2html`
|
||||
|
||||
if [ x$C2HTML = x ]
|
||||
then
|
||||
echo "c2html not found. Please install that first!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf $MAIN_DIR
|
||||
mkdir -p $MAIN_DIR
|
||||
|
||||
echo "<html>
|
||||
<head>
|
||||
<title>BotCommander sources in HTML</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>BotCommander sources in HTML</h1>" >> $MAIN_DIR/index.html
|
||||
|
||||
for FILE in `find -name \*.[ch]`
|
||||
do
|
||||
DIR=`dirname $FILE`
|
||||
mkdir -p $MAIN_DIR/$DIR
|
||||
cat $FILE | c2html > $MAIN_DIR/$FILE.html
|
||||
echo " <a href=\"$FILE.html\">$FILE</a><br />" >> $MAIN_DIR/index.html
|
||||
done
|
||||
|
||||
echo " </body>
|
||||
</html>" >> $MAIN_DIR/index.html
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,46 @@
|
|||
include ../rules
|
||||
|
||||
GCONFTOOL = @GCONFTOOL@
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
sysconfdir = @sysconfdir@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
|
||||
INTLTOOL_MERGE = @INTLTOOL_MERGE@
|
||||
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
|
||||
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
|
||||
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
|
||||
GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@
|
||||
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
|
||||
|
||||
gnomemenudir = $(datadir)/applications
|
||||
gnomemenu_premerge_file = botcommander.desktop.in
|
||||
gnomemenu_DATA = $(gnomemenu_premerge_file:.desktop.in=.desktop)
|
||||
|
||||
schema_in_files = botcommander.schemas.in
|
||||
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
all: $(gnomemenu_DATA)
|
||||
clean:
|
||||
|
||||
install: $(gnomemenu_DATA)
|
||||
@GCONF_SCHEMAS_INSTALL_TRUE@ if test -z "$(DESTDIR)" ; then \
|
||||
@GCONF_SCHEMAS_INSTALL_TRUE@ for p in $(schema_DATA) ; do \
|
||||
@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/$$p >&1 > /dev/null; \
|
||||
@GCONF_SCHEMAS_INSTALL_TRUE@ done \
|
||||
@GCONF_SCHEMAS_INSTALL_TRUE@ fi
|
||||
$(top_srcdir)/mkinstalldirs $(gnomemenudir)
|
||||
$(top_srcdir)/mkinstalldirs $(schemadir)
|
||||
$(INSTALL) -m 0644 $(gnomemenu_DATA) $(gnomemenudir)
|
||||
$(INSTALL) -m 0644 $(schema_DATA) $(schemadir)
|
||||
|
||||
distclean:
|
||||
rm -f botcommander.desktop botcommander.desktop.in botcommander.schemas Makefile
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
_Name=BotCommander
|
||||
_Comment=BotCommander eggdrop client
|
||||
Exec=botcommander
|
||||
Icon=@PACKAGE_PIXMAPS_DIR@/bc48_trans.png
|
||||
Terminal=false
|
||||
X-MultipleArgs=false
|
||||
Type=Application
|
||||
Categories=Application;Network;
|
||||
Encoding=UTF-8
|
||||
StartupNotify=true
|
|
@ -0,0 +1,154 @@
|
|||
<gconfschemafile>
|
||||
<schemalist>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/background_saturation</key>
|
||||
<applyto>/apps/botcommander/background_saturation</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>float</type>
|
||||
<default>0.0</default>
|
||||
<locale name="C">
|
||||
<short>Background is not opaque by default</short>
|
||||
<long>background_saturation only has effect when transparent_background is true. If so, this value gives the opacity of the VTE</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>A háttér alapértelmezés szerint nem áttetsző</short>
|
||||
<long>A background_saturation értékét csak akkor veszi figyelembe a program, ha a transparent_background értéke true. Ha így van, ez az érték adja meg a VTE áttetszőségének mértékét.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/change_to_message</key>
|
||||
<applyto>/apps/botcommander/change_to_message</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>By default, BotCommander will change to Message mode after connecting to a bot</short>
|
||||
<long>When this option is true, BotCommander will set Message mode after connecting to a bot</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a BotCommander átvált Üzenet módba miután csatlakozott egy bothoz</short>
|
||||
<long>Ha ez az opció true, a BotCommander átvált Üzenet módba, miután csatlakozott egy bothoz</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/change_to_new_tab</key>
|
||||
<applyto>/apps/botcommander/change_to_new_tab</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>BotCommander changes to the newly created tab by default</short>
|
||||
<long>When this value is true, BotCommander will change to the newly opened tab. Otherwise, the new tab won't be activated</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>A BotCommander alapértelmezés szerint átvált az újonnan létrehozott fülre</short>
|
||||
<long>Ha ez az érték true, a BotCommander automatikusan átvált az újonnan megnyitott fülre. Ha nem, a fül nem lesz aktiválva</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/debug</key>
|
||||
<applyto>/apps/botcommander/debug</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>By default, BotCommander won't print out debug messages</short>
|
||||
<long>If this option is true, and the code is compiled with the DEBUG flag, BotCommander will print debug messages</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a BotCommander nem fogja kiírni a hibakereső üzeneteket</short>
|
||||
<long>Ha ez az opció be van kapcsolva, és a kód a DEBUG opcióval lett fordítva, a BotCommander folyamatosan kiírja a hibakereső üzeneteket</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/default_mode</key>
|
||||
<applyto>/apps/botcommander/default_mode</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>string</type>
|
||||
<default>B</default>
|
||||
<locale name="C">
|
||||
<short>By default, BotCommander will use BotCommander command mode</short>
|
||||
<long>When you open a new tab, BotCommander will use this mod as the initial mode of the tab</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a BotCommander Botcommander Parancs-módot használ</short>
|
||||
<long>Mikor megnyitsz egy új fület, a BotCommander ezt a módot állítja be rajta</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/history_length</key>
|
||||
<applyto>/apps/botcommander/history_length</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>int</type>
|
||||
<default>300</default>
|
||||
<locale name="C">
|
||||
<short>The default scrollback-size for the VTEs is 300 lines</short>
|
||||
<long>The VTEs scrollback is set to this value</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>A VTE-k memóritára alapértelmezésben 300 sor</short>
|
||||
<long>A VTE-k memóriatárának mérete ennyi sorra van állítva</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/sanity</key>
|
||||
<applyto>/apps/botcommander/sanity</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>string</type>
|
||||
<default>Needed for gconf sanity check, please don't remove!</default>
|
||||
<locale name="C">
|
||||
<short>NEVER CHANGE THIS VALUE!</short>
|
||||
<long>NEVER CHANGE THIS VALUE! This is for sanity check. Maybe I'll remove it soon. NEVER CHANGE THIS VALUE!</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>SOHA NE VÁLTOZTASD MEG EZT AZ ÉRTÉKET!</short>
|
||||
<long>SOHA NE VÁLTOZTASD MEG EZT AZ ÉRTÉKET! Ez a gconf ellenőrzésére szolgál. Valószínűleg hamarosan törlöm. SOHA NE VÁLTOZTAST MEG EZT AZ ÉRTÉKET!</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/scroll_on_output</key>
|
||||
<applyto>/apps/botcommander/scroll_on_output</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>By default, BotCommander will scroll the contents of the VTE when new data arrives from the bot</short>
|
||||
<long>When this option is true, BotCommander will automatically scroll to the bottom of the window when a new line arrives from the bot</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a BotCommander a VTE aljára görget, ha új adat érkezik a bottól</short>
|
||||
<long>Ha ez az opció true, a BotCommander automatikusan a VTE aljára görget, ha új adat érkezik a bottól</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/transparent_background</key>
|
||||
<applyto>/apps/botcommander/transparent_background</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>By default, the VTEs' background is not transparent</short>
|
||||
<long>If you set this option to true, and background_saturation to a number greater then 0, the VTEs' background will be opaque</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a VTE-k háttere nem áttetsző</short>
|
||||
<long>Ha ezt az értéket true-ra állítod, a background_saturation értékét pedig 0-nál nagyobbra, a VTE-k háttere áttetsző lesz</long>
|
||||
</locale>
|
||||
</schema>
|
||||
<schema>
|
||||
<key>/schemas/apps/botcommander/vte_font</key>
|
||||
<applyto>/apps/botcommander/vte_font</applyto>
|
||||
<owner>botcommander</owner>
|
||||
<type>string</type>
|
||||
<default>Courier 10 Pitch 12</default>
|
||||
<locale name="C">
|
||||
<short>By default, the VTEs use the Courier 10 Pitch font with a 12pt size</short>
|
||||
<long>The VTEs' font will set to this value</long>
|
||||
</locale>
|
||||
<locale name="hu">
|
||||
<short>Alapértelmezés szerint a VTE-k a Courier 10 Pitch font 12pt méretű változatát használják</short>
|
||||
<long>Ez az érték lesz megadva, mint a VTE-k betűkészlete</long>
|
||||
</locale>
|
||||
</schema>
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
|
@ -0,0 +1,6 @@
|
|||
botcommander for Debian
|
||||
-----------------------
|
||||
|
||||
<possible notes regarding this package - if none, delete this file>
|
||||
|
||||
-- Gergely POLONKAI <polesz@botcommander.hu>, Mon, 11 Sep 2006 07:31:20 +0200
|
|
@ -0,0 +1,10 @@
|
|||
# Defaults for botcommander initscript
|
||||
# sourced by /etc/init.d/botcommander
|
||||
# installed at /etc/default/botcommander by the maintainer scripts
|
||||
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
# Additional options that are passed to the Daemon.
|
||||
DAEMON_OPTS=""
|
|
@ -0,0 +1,22 @@
|
|||
Document: botcommander
|
||||
Title: Debian botcommander Manual
|
||||
Author: Gergely POLONKAI (polesz@botcommander.hu)
|
||||
Abstract: This manual describes what botcommander is
|
||||
and how it can be used to
|
||||
manage online manuals on Debian systems.
|
||||
Section: utils
|
||||
|
||||
Format: debiandoc-sgml
|
||||
Files: /usr/share/doc/botcommander/botcommander.sgml.gz
|
||||
|
||||
Format: postscript
|
||||
Files: /usr/share/doc/botcommander/botcommander.ps.gz
|
||||
|
||||
Format: text
|
||||
Files: /usr/share/doc/botcommander/botcommander.text.gz
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/botcommander/html/index.html
|
||||
Files: /usr/share/doc/botcommander/html/*.html
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
botcommander (1.0-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
|
||||
|
||||
-- POLONKAI Gergely <polesz@botcommander.hu> Mon, 11 Sep 2006 07:41:46 +0200
|
||||
|
|
@ -0,0 +1 @@
|
|||
5
|
|
@ -0,0 +1,14 @@
|
|||
Source: botcommander
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Gergely POLONKAI <polesz@botcommander.hu>
|
||||
Build-Depends: debhelper (>= 5), autotools-dev, libgnomeui-0, libvte4, libgtk2.0-0, libgconf2-4
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: botcommander
|
||||
Architecture: i386
|
||||
Depends: ${shlibs:Depends}
|
||||
Description: BotCommander is a graphical eggdrop client for UN*X sytems
|
||||
BotCommander is a graphical eggdrop client written for UN*X systems. This is
|
||||
still a work-in-progress, as it already functional. There are still many plans
|
||||
which are not implemented yet.
|
|
@ -0,0 +1,14 @@
|
|||
This package was debianized by Gergely POLONKAI <polesz@botcommander.hu> on
|
||||
Mon, 11 Sep 2006 07:31:20 +0200.
|
||||
|
||||
It was downloaded from http://www.botcommander.hu/
|
||||
|
||||
Upstream Author: Gergely POLONKAI <polesz@botcommander.hu>
|
||||
|
||||
Copyright: Gergely POLONKAI, 2006
|
||||
|
||||
License: GNU GPL, version 2 or later
|
||||
|
||||
The Debian packaging is (C) 2006, Gergely POLONKAI <polesz@botcommander.hu> and
|
||||
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#
|
||||
# Regular cron jobs for the botcommander package
|
||||
#
|
||||
0 4 * * * root botcommander_maintenance
|
|
@ -0,0 +1,2 @@
|
|||
usr/bin
|
||||
usr/share/pixmaps/botcommander
|
|
@ -0,0 +1 @@
|
|||
TODO
|
|
@ -0,0 +1,45 @@
|
|||
#! /bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/install/botcommander
|
||||
|
||||
# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
|
||||
# from the install scripts for gettext by Santiago Vila
|
||||
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=botcommander
|
||||
|
||||
if [ ${FLAVOR} = emacs ]; then exit 0; fi
|
||||
|
||||
echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
|
||||
|
||||
#FLAVORTEST=`echo $FLAVOR | cut -c-6`
|
||||
#if [ ${FLAVORTEST} = xemacs ] ; then
|
||||
# SITEFLAG="-no-site-file"
|
||||
#else
|
||||
# SITEFLAG="--no-site-file"
|
||||
#fi
|
||||
FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
|
||||
|
||||
ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
|
||||
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
|
||||
# Install-info-altdir does not actually exist.
|
||||
# Maybe somebody will write it.
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo install/${PACKAGE}: install Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
|
||||
fi
|
||||
|
||||
install -m 755 -d ${ELCDIR}
|
||||
cd ${ELDIR}
|
||||
FILES=`echo *.el`
|
||||
cp ${FILES} ${ELCDIR}
|
||||
cd ${ELCDIR}
|
||||
|
||||
cat << EOF > path.el
|
||||
(setq load-path (cons "." load-path) byte-compile-warnings nil)
|
||||
EOF
|
||||
${FLAVOR} ${FLAGS} ${FILES}
|
||||
rm -f *.el path.el
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh -e
|
||||
# /usr/lib/emacsen-common/packages/remove/botcommander
|
||||
|
||||
FLAVOR=$1
|
||||
PACKAGE=botcommander
|
||||
|
||||
if [ ${FLAVOR} != emacs ]; then
|
||||
if test -x /usr/sbin/install-info-altdir; then
|
||||
echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
|
||||
install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/botcommander.info.gz
|
||||
fi
|
||||
|
||||
echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
|
||||
rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
|
||||
fi
|
|
@ -0,0 +1,25 @@
|
|||
;; -*-emacs-lisp-*-
|
||||
;;
|
||||
;; Emacs startup file, e.g. /etc/emacs/site-start.d/50botcommander.el
|
||||
;; for the Debian botcommander package
|
||||
;;
|
||||
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
|
||||
;; Modified by Dirk Eddelbuettel <edd@debian.org>
|
||||
;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
|
||||
|
||||
;; The botcommander package follows the Debian/GNU Linux 'emacsen' policy and
|
||||
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
|
||||
;; xemacs19, emacs20, xemacs20...). The compiled code is then
|
||||
;; installed in a subdirectory of the respective site-lisp directory.
|
||||
;; We have to add this to the load-path:
|
||||
(let ((package-dir (concat "/usr/share/"
|
||||
(symbol-name flavor)
|
||||
"/site-lisp/botcommander")))
|
||||
;; If package-dir does not exist, the botcommander package must have
|
||||
;; removed but not purged, and we should skip the setup.
|
||||
(when (file-directory-p package-dir)
|
||||
(setq load-path (cons package-dir load-path))
|
||||
(autoload 'botcommander-mode "botcommander-mode"
|
||||
"Major mode for editing botcommander files." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.botcommander$" . botcommander-mode))))
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# skeleton example file to build /etc/init.d/ scripts.
|
||||
# This file should be used to construct scripts for /etc/init.d.
|
||||
#
|
||||
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
||||
# Modified for Debian
|
||||
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
||||
#
|
||||
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
|
||||
#
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/botcommander
|
||||
NAME=botcommander
|
||||
DESC=botcommander
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
# Include botcommander defaults if available
|
||||
if [ -f /etc/default/botcommander ] ; then
|
||||
. /etc/default/botcommander
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON -- $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
#reload)
|
||||
#
|
||||
# If the daemon can reload its config files on the fly
|
||||
# for example by sending it SIGHUP, do it here.
|
||||
#
|
||||
# If the daemon responds to changes in its config file
|
||||
# directly anyway, make this a do-nothing entry.
|
||||
#
|
||||
# echo "Reloading $DESC configuration files."
|
||||
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
|
||||
# /var/run/$NAME.pid --exec $DAEMON
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented, move the "force-reload"
|
||||
# option to the "reload" entry above. If not, "force-reload" is
|
||||
# just the same as "restart".
|
||||
#
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --pidfile \
|
||||
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,59 @@
|
|||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH BOTCOMMANDER SECTION "szeptember 11, 2006"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
botcommander \- program to do something
|
||||
.SH SYNOPSIS
|
||||
.B botcommander
|
||||
.RI [ options ] " files" ...
|
||||
.br
|
||||
.B bar
|
||||
.RI [ options ] " files" ...
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B botcommander
|
||||
and
|
||||
.B bar
|
||||
commands.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBbotcommander\fP is a program that...
|
||||
.SH OPTIONS
|
||||
These programs follow the usual GNU command line syntax, with long
|
||||
options starting with two dashes (`-').
|
||||
A summary of options is included below.
|
||||
For a complete description, see the Info files.
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Show version of program.
|
||||
.SH SEE ALSO
|
||||
.BR bar (1),
|
||||
.BR baz (1).
|
||||
.br
|
||||
The programs are documented fully by
|
||||
.IR "The Rise and Fall of a Fooish Bar" ,
|
||||
available via the Info system.
|
||||
.SH AUTHOR
|
||||
botcommander was written by <upstream author>.
|
||||
.PP
|
||||
This manual page was written by Gergely POLONKAI <polesz@botcommander.hu>,
|
||||
for the Debian project (but may be used by others).
|
|
@ -0,0 +1,156 @@
|
|||
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
|
||||
|
||||
<!-- Process this file with docbook-to-man to generate an nroff manual
|
||||
page: `docbook-to-man manpage.sgml > manpage.1'. You may view
|
||||
the manual page with: `docbook-to-man manpage.sgml | nroff -man |
|
||||
less'. A typical entry in a Makefile or Makefile.am is:
|
||||
|
||||
manpage.1: manpage.sgml
|
||||
docbook-to-man $< > $@
|
||||
|
||||
|
||||
The docbook-to-man binary is found in the docbook-to-man package.
|
||||
Please remember that if you create the nroff version in one of the
|
||||
debian/rules file targets (such as build), you will need to include
|
||||
docbook-to-man in your Build-Depends control field.
|
||||
|
||||
-->
|
||||
|
||||
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
|
||||
<!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
|
||||
<!ENTITY dhsurname "<surname>SURNAME</surname>">
|
||||
<!-- Please adjust the date whenever revising the manpage. -->
|
||||
<!ENTITY dhdate "<date>szeptember 11, 2006</date>">
|
||||
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
|
||||
allowed: see man(7), man(1). -->
|
||||
<!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
|
||||
<!ENTITY dhemail "<email>polesz@botcommander.hu</email>">
|
||||
<!ENTITY dhusername "Gergely POLONKAI">
|
||||
<!ENTITY dhucpackage "<refentrytitle>BOTCOMMANDER</refentrytitle>">
|
||||
<!ENTITY dhpackage "botcommander">
|
||||
|
||||
<!ENTITY debian "<productname>Debian</productname>">
|
||||
<!ENTITY gnu "<acronym>GNU</acronym>">
|
||||
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
|
||||
]>
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<address>
|
||||
&dhemail;
|
||||
</address>
|
||||
<author>
|
||||
&dhfirstname;
|
||||
&dhsurname;
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2003</year>
|
||||
<holder>&dhusername;</holder>
|
||||
</copyright>
|
||||
&dhdate;
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
&dhucpackage;
|
||||
|
||||
&dhsection;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>&dhpackage;</refname>
|
||||
|
||||
<refpurpose>program to do something</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>&dhpackage;</command>
|
||||
|
||||
<arg><option>-e <replaceable>this</replaceable></option></arg>
|
||||
|
||||
<arg><option>--example <replaceable>that</replaceable></option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
|
||||
<para>This manual page documents briefly the
|
||||
<command>&dhpackage;</command> and <command>bar</command>
|
||||
commands.</para>
|
||||
|
||||
<para>This manual page was written for the &debian; distribution
|
||||
because the original program does not have a manual page.
|
||||
Instead, it has documentation in the &gnu;
|
||||
<application>Info</application> format; see below.</para>
|
||||
|
||||
<para><command>&dhpackage;</command> is a program that...</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<para>These programs follow the usual &gnu; command line syntax,
|
||||
with long options starting with two dashes (`-'). A summary of
|
||||
options is included below. For a complete description, see the
|
||||
<application>Info</application> files.</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>
|
||||
<option>--help</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show summary of options.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-v</option>
|
||||
<option>--version</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show version of program.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
|
||||
<para>bar (1), baz (1).</para>
|
||||
|
||||
<para>The programs are documented fully by <citetitle>The Rise and
|
||||
Fall of a Fooish Bar</citetitle> available via the
|
||||
<application>Info</application> system.</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
|
||||
<para>This manual page was written by &dhusername; &dhemail; for
|
||||
the &debian; system (but may be used by others). Permission is
|
||||
granted to copy, distribute and/or modify this document under
|
||||
the terms of the &gnu; General Public License, Version 2 any
|
||||
later version published by the Free Software Foundation.
|
||||
</para>
|
||||
<para>
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License can be found in /usr/share/common-licenses/GPL.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:2
|
||||
sgml-indent-data:t
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:nil
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
-->
|
||||
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
<?xml version='1.0' encoding='ISO-8859-1'?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
||||
|
||||
<!--
|
||||
|
||||
Process this file with an XSLT processor: `xsltproc \
|
||||
-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
|
||||
manpages/docbook.xsl manpage.dbk'. A manual page
|
||||
<package>.<section> will be generated. You may view the
|
||||
manual page with: nroff -man <package>.<section> | less'. A
|
||||
typical entry in a Makefile or Makefile.am is:
|
||||
|
||||
DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
|
||||
manpages/docbook.xsl
|
||||
XP=xsltproc -''-nonet
|
||||
|
||||
manpage.1: manpage.dbk
|
||||
$(XP) $(DB2MAN) $<
|
||||
|
||||
The xsltproc binary is found in the xsltproc package. The
|
||||
XSL files are in docbook-xsl. Please remember that if you
|
||||
create the nroff version in one of the debian/rules file
|
||||
targets (such as build), you will need to include xsltproc
|
||||
and docbook-xsl in your Build-Depends control field.
|
||||
|
||||
-->
|
||||
|
||||
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
|
||||
<!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
|
||||
<!ENTITY dhsurname "<surname>SURNAME</surname>">
|
||||
<!-- Please adjust the date whenever revising the manpage. -->
|
||||
<!ENTITY dhdate "<date>szeptember 11, 2006</date>">
|
||||
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
|
||||
allowed: see man(7), man(1). -->
|
||||
<!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
|
||||
<!ENTITY dhemail "<email>polesz@botcommander.hu</email>">
|
||||
<!ENTITY dhusername "Gergely POLONKAI">
|
||||
<!ENTITY dhucpackage "<refentrytitle>BOTCOMMANDER</refentrytitle>">
|
||||
<!ENTITY dhpackage "botcommander">
|
||||
|
||||
<!ENTITY debian "<productname>Debian</productname>">
|
||||
<!ENTITY gnu "<acronym>GNU</acronym>">
|
||||
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
|
||||
]>
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<address>
|
||||
&dhemail;
|
||||
</address>
|
||||
<author>
|
||||
&dhfirstname;
|
||||
&dhsurname;
|
||||
</author>
|
||||
<copyright>
|
||||
<year>2003</year>
|
||||
<holder>&dhusername;</holder>
|
||||
</copyright>
|
||||
&dhdate;
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
&dhucpackage;
|
||||
|
||||
&dhsection;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>&dhpackage;</refname>
|
||||
|
||||
<refpurpose>program to do something</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>&dhpackage;</command>
|
||||
|
||||
<arg><option>-e <replaceable>this</replaceable></option></arg>
|
||||
|
||||
<arg><option>--example <replaceable>that</replaceable></option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
|
||||
<para>This manual page documents briefly the
|
||||
<command>&dhpackage;</command> and <command>bar</command>
|
||||
commands.</para>
|
||||
|
||||
<para>This manual page was written for the &debian; distribution
|
||||
because the original program does not have a manual page.
|
||||
Instead, it has documentation in the &gnu;
|
||||
<application>Info</application> format; see below.</para>
|
||||
|
||||
<para><command>&dhpackage;</command> is a program that...</para>
|
||||
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<para>These programs follow the usual &gnu; command line syntax,
|
||||
with long options starting with two dashes (`-'). A summary of
|
||||
options is included below. For a complete description, see the
|
||||
<application>Info</application> files.</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>
|
||||
<option>--help</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show summary of options.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-v</option>
|
||||
<option>--version</option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show version of program.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
|
||||
<para>bar (1), baz (1).</para>
|
||||
|
||||
<para>The programs are documented fully by <citetitle>The Rise and
|
||||
Fall of a Fooish Bar</citetitle> available via the
|
||||
<application>Info</application> system.</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
|
||||
<para>This manual page was written by &dhusername; &dhemail; for
|
||||
the &debian; system (but may be used by others). Permission is
|
||||
granted to copy, distribute and/or modify this document under
|
||||
the terms of the &gnu; General Public License, Version 2 any
|
||||
later version published by the Free Software Foundation.
|
||||
</para>
|
||||
<para>
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License can be found in /usr/share/common-licenses/GPL.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
?package(botcommander):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\
|
||||
title="botcommander" command="/usr/bin/botcommander"
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
# postinst script for botcommander
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
#
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
# postrm script for botcommander
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
# preinst script for botcommander
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
#
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
# prerm script for botcommander
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" --with-gconf-schema-file-dir=\$${prefix}/share/gconf/schemas
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#docbook-to-man debian/botcommander.sgml > botcommander.1
|
||||
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/botcommander.
|
||||
$(MAKE) install prefix=$(CURDIR)/debian/botcommander/usr
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
|
@ -0,0 +1,22 @@
|
|||
# Example watch control file for uscan
|
||||
# Rename this file to "watch" and then you can run the "uscan" command
|
||||
# to check for upstream updates and more.
|
||||
# See uscan(1) for format
|
||||
|
||||
# Compulsory line, this is a version 3 file
|
||||
version=3
|
||||
|
||||
# Uncomment to examine a Webpage
|
||||
# <Webpage URL> <string match>
|
||||
#http://www.example.com/downloads.php botcommander-(.*)\.tar\.gz
|
||||
|
||||
# Uncomment to examine a Webserver directory
|
||||
#http://www.example.com/pub/botcommander-(.*)\.tar\.gz
|
||||
|
||||
# Uncommment to examine a FTP server
|
||||
#ftp://ftp.example.com/pub/botcommander-(.*)\.tar\.gz debian uupdate
|
||||
|
||||
# Uncomment to find new files on sourceforge, for debscripts >= 2.9
|
||||
# http://sf.net/botcommander/botcommander-(.*)\.tar\.gz
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
include ../rules
|
||||
|
||||
TEXI2PDF = @TEXI2PDF@
|
||||
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
prefix = @prefix@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
PDFTARGETDIR = @pdfdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
all: $(DOC_OBJECTS)
|
||||
|
||||
botcommander.pdf: botcommander.texinfo
|
||||
$(TEXI2PDF) botcommander.texinfo
|
||||
|
||||
clean:
|
||||
$(RM) $(DOC_OBJECTS)
|
||||
$(RM) botcommander.aux botcommander.cp botcommander.cps botcommander.fn \
|
||||
botcommander.ky botcommander.log botcommander.pg botcommander.toc \
|
||||
botcommander.tp botcommander.vr
|
||||
|
||||
distclean: clean
|
||||
$(RM) Makefile config.status config.cache config.log
|
||||
|
||||
install: all
|
||||
$(top_srcdir)/mkinstalldirs $(PDFTARGETDIR)
|
||||
$(INSTALL) -m 0644 botcommander.pdf $(PDFTARGETDIR)
|
||||
|
||||
.PHONY: all clean distclean install
|
||||
|
|
@ -1,212 +1,349 @@
|
|||
\input texinfo @c -*- texinfo -*-
|
||||
@c %**start of header
|
||||
\input texinfo
|
||||
@c vim:textwidth=80
|
||||
@c Header
|
||||
@setfilename botcommander.info
|
||||
@settitle BOTCOMMANDER 1.0
|
||||
@c %**end of header
|
||||
@include version.texinfo
|
||||
@settitle BotCommander @value{VERSION}
|
||||
@documentdescription
|
||||
BotCommander manual for version @value{VERSION}
|
||||
@end documentdescription
|
||||
@setchapternewpage odd
|
||||
@firstparagraphindent insert
|
||||
|
||||
@c Summary and Copyright
|
||||
@copying
|
||||
This manual is for BotCommander, version 1.0
|
||||
This manual is for BotCommander
|
||||
(version @value{VERSION}, @value{UPDATED}),
|
||||
which is a specialized telnet client.
|
||||
|
||||
Copyright @copyright{} 2004-2008 Gergely POLONKAI.
|
||||
Copyright @copyright{} 2005, Gergely POLONKAI
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy and rewrite of this file regarding you mention the name of the original author
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
|
||||
and with the Back-Cover Texts as in (a) below. A copy of the
|
||||
license is included in the section entitled ``GNU Free Documentation
|
||||
License.''
|
||||
|
||||
(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
||||
this GNU Manual, like GNU software. Copies published by the Free
|
||||
Software Foundation raise funds for GNU development.''
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@titlepage
|
||||
@title BotCommander, v1.0
|
||||
@center @titlefont{BotCommander, v1.0}
|
||||
@subtitle Complete manual, written by the author
|
||||
@author Gergely POLONKAI
|
||||
Permission is granted to copy and rewrite of this file regarding you mention the name of the original author
|
||||
@dircategory Network Applications
|
||||
@direntry
|
||||
* BotCommander: (botcommander).
|
||||
@end direntry
|
||||
|
||||
@c The following two commands start the copyright page
|
||||
@c Title and Copyright
|
||||
@titlepage
|
||||
@title BotCommander
|
||||
@subtitle for version @value{VERSION}, @value{UPDATED}
|
||||
@author Gergely POLONKAI (@email{polesz@@botcommander.hu})
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
|
||||
@end titlepage
|
||||
|
||||
@c Let's print the TOC first
|
||||
@contents
|
||||
|
||||
@documentdescription
|
||||
BotCommander User's Manual
|
||||
@end documentdescription
|
||||
@setchapternewpage on
|
||||
@paragraphindent 2
|
||||
@firstparagraphindent insert
|
||||
@exampleindent 5
|
||||
|
||||
@c Top node and master menu
|
||||
@ifnottex
|
||||
@node Top, About, (dir), (dir)
|
||||
@top BotCommander v1.0 User's manual
|
||||
@node Top, About, , (dir)
|
||||
@top BotCommander
|
||||
|
||||
@insertcopying
|
||||
|
||||
Some text
|
||||
|
||||
@menu
|
||||
* About:: About this program
|
||||
* Usage:: Usage of the program
|
||||
* Plans:: Things I want to implement
|
||||
@end menu
|
||||
|
||||
@end ifnottex
|
||||
|
||||
@node About, Modes, Top, Top
|
||||
@menu
|
||||
* About:: About the application
|
||||
* Overview:: Features of BotCommander
|
||||
* Installation:: How to install BotCommander
|
||||
* Invoking:: Command line arguments
|
||||
* Commands:: Internal commands
|
||||
* Configuration:: The setup window
|
||||
* Plans:: Plans in future versions
|
||||
* Index:: Index
|
||||
@end menu
|
||||
|
||||
@c Body
|
||||
|
||||
@node About, Overview, Top, Top
|
||||
@chapter About BotCommander
|
||||
|
||||
BotCommander is a small tool, originally written for the Gnome2 interface, to remotely manage your @uref{http://www.eggheads.org/, eggdrop} IRC bots.
|
||||
@cindex about
|
||||
|
||||
Actually, it's acting as a small, configurable telnet client, but it will know a bit more. For example, it will have command-line history. While you cannot recall your previous command in a simple telnet client, you will be able to do it with this program. As it uses a GTK-Entry for the command line, you can also edit the recalled command.
|
||||
@cindex homepage
|
||||
|
||||
The program uses gconf2 to store it's configuration data. You can configure it to use a samba-like config file instead, so you won't depend that heavily on gnome2. In the near future I plan xml config backend support.
|
||||
You can reach the project's homepage at @url{http://www.botcommander.hu/}.
|
||||
|
||||
The main widget of the program is a vte-terminal, which (as I know), is also the part of the GTK2 project. (If you know something else, please let me know) If you are using gnome (and maybe gnome-terminal), vte is already installed on your system (altough you have to install the devel files, if you want to compile BotCommander yourself).
|
||||
@cindex description
|
||||
|
||||
The code is in beta status, but it isn't ready yet. You can see how will it look like, also can use it for connecting and giving commands to your bots, and decide if you will like it or not. The commands I want to implement are missing yet.
|
||||
BotCommander is a small tool, originally written for the Gnome2 interface, to
|
||||
remotely manage your @url{http://www.eggheads.org/, eggdrop} IRC bots.@*
|
||||
Actually, it's acting as a small, configurable telnet client, but it will know a
|
||||
bit more. For example, it has command-line history. While you cannot recall your
|
||||
previous command in a simple telnet client, you will be able to do it with this
|
||||
program. As it uses a text box for the command line, you can easily edit that
|
||||
command.
|
||||
|
||||
Suggestions, bugs and such can be submitted on the @uref{http://savannah.nongnu.org/projects/botcommander/, project page}.
|
||||
The program uses @url{http://www.gnome.org/projects/gconf/, GConf2}
|
||||
to store its configuration data. You can configure it to use a samba-like config
|
||||
file instead, so you won't depend that heavily on @url{http://www.gnome.org/,
|
||||
Gnome 2}, @xref{Installation}. In the near future I also plan
|
||||
@url{http://www.w3.org/XML/, XML} config backend support.
|
||||
|
||||
BotCommander icon is from Eggdrop's official homepage. I will draw a new one, but until then, this is perfect. Best regards: Gergely POLONKAI, the developer of BotCommander.
|
||||
On 28 August, 2006 I decided to drop this plan, and also the samba-like config
|
||||
backend for a longer period. I think the application should first function, and
|
||||
only after that I can create such addons.
|
||||
|
||||
Here is a listing of the features currently available.
|
||||
@cindex status
|
||||
|
||||
@menu
|
||||
* Modes::
|
||||
* Tabbed interface::
|
||||
@end menu
|
||||
The code is in alpha status. You can see how will it look like, also can use
|
||||
for one connection, and decide if you will like it or not.
|
||||
|
||||
@node Modes, Tabbed interface, About, About
|
||||
@section Modes
|
||||
@cindex icon
|
||||
|
||||
There are three modes: BotCommander Command Mode (B), Eggdrop Command Mode (E) and Message Mode (M).
|
||||
BotCommander icon is from @url{http://www.eggheads.org/, Eggdrop}'s official
|
||||
homepage. I will draw a new one, but until then, this is perfect.
|
||||
|
||||
Irrespectively of which mode you are in, you can give any command. If you are in mode M, but you have to execute a botcommander command, prefix it with a slash.
|
||||
@node Overview, Installation, About, Top
|
||||
@chapter Features
|
||||
|
||||
BotCommander is a telnet client and much more. It can connect to one or more
|
||||
@url{http://www.eggheads.org/, eggdrop} IRC bots, and give commands to them. In
|
||||
the near future it will also possible to give the same command to each connected
|
||||
bots.
|
||||
|
||||
Unlike the normal telnet client, this program has command line editing and
|
||||
recalling possibilities. E.g if you have a long command line such
|
||||
|
||||
@code{
|
||||
.process very much ugly paramters username
|
||||
}
|
||||
@*what you have to run multiple times, and in which you only change the username,
|
||||
it is possible to recall the previous command, change the username, and send the
|
||||
changed command. Thus, you don't have to enter the whole line again and again.
|
||||
|
||||
It uses @url{http://www.gtk.org/, GTK2} and some @url{http://www.gnome.org/,
|
||||
GnomeUI} components, and stores its configuration data in
|
||||
@url{http://www.gnome.org/projects/gconf/, GConf2}.
|
||||
|
||||
As it uses tabs, you can connect to many bots in one application, and at last
|
||||
you won't have one icon for every bot in your task bar.
|
||||
|
||||
If you want (and you are at least have global +o in the bot), you can have a
|
||||
sidebar on your tabs, in which you can see a list of the channels and the users
|
||||
you have. For this, you will need to install the @file{botcommander.tcl} script
|
||||
(can be found in the @file{eggdrop/} directory) in your bot (@code{.source
|
||||
botcommander.tcl}). When the script loads, or when someone connects to the bot
|
||||
via DCC
|
||||
|
||||
@node Installation, Invoking, Overview, Top
|
||||
@chapter How to install?
|
||||
|
||||
@cindex installation
|
||||
|
||||
As BotCommander is currently in alpha phase, you cannot compile it with the
|
||||
usual
|
||||
|
||||
@example
|
||||
/QUIT
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
@end example
|
||||
|
||||
If you are e.g in mode B, and want to execute an eggdrop command, prefix it with a dot.
|
||||
sequence. First, you should edit the config.h file, and change the location of
|
||||
the pixmaps dir. Then You should run @code{make check} to check if all the
|
||||
required packages are installed on your system. At the moment these are
|
||||
|
||||
@example
|
||||
.die
|
||||
@end example
|
||||
|
||||
If you are in mode E, and want to send a message to the bot, prefix it with a worm :)
|
||||
|
||||
@example
|
||||
@@Hello everyone!
|
||||
@end example
|
||||
|
||||
@node Tabbed interface, Usage, Modes, About
|
||||
@section Tabbed interface
|
||||
|
||||
Since version 1.0pre1 you can connect to multiple bots on tabs. I made this so I don't have to have one window for each bot, but all of my bots can beside in the same window.
|
||||
|
||||
You can open a new tab from the Bot menu, with the New tab menuitem. I put a close button on each tab, so you can easily close them, but if you prefer using menus, you can do it from there, too.
|
||||
|
||||
@node Usage, Command line parameters, Tabbed interface, Top
|
||||
@chapter Usage
|
||||
|
||||
In this section you will get information on how to use this program. I will try to explain how does menus work, what commands can you use, etc.
|
||||
|
||||
@menu
|
||||
* Command line parameters:: Explaining command line parameters
|
||||
* Menus:: Explanation of the menus
|
||||
* Commands:: Commands can be used
|
||||
@end menu
|
||||
|
||||
@node Command line parameters, Menus, Usage, Usage
|
||||
@section Command line parameters
|
||||
|
||||
Here I will explain all the command line parameters. There are none yet, so this section is very short...
|
||||
|
||||
@node Menus, Commands, Command line parameters, Usage
|
||||
@section Menus
|
||||
|
||||
In this section I will explain the meaning of each menu items.
|
||||
|
||||
BotCommander has a small amount of menus yet, because I'm focusing on the commands I want to implement. After those are ready (or at least almost ready), I will put many of them into the menu system.
|
||||
|
||||
@node Commands, QUIT command, Menus, Usage
|
||||
@section Commands
|
||||
|
||||
Here I will tell you about all the commands you can use. There are not too many of them, but there will be. BotCommander will be command-oriented :)
|
||||
|
||||
@menu
|
||||
* QUIT command::
|
||||
* EXIT command::
|
||||
* MODE command::
|
||||
* CONNECT command::
|
||||
@end menu
|
||||
|
||||
@node QUIT command, EXIT command, Commands, Commands
|
||||
@subsection The QUIT command
|
||||
|
||||
This command exits BotCommander. Nowadays, it just calls exit(), as I remember, but in a stable version, if a connection is still open, it will ask the user if (s)he really wants to quit...
|
||||
|
||||
@node EXIT command, MODE command, QUIT command, Commands
|
||||
@subsection The EXIT command
|
||||
|
||||
This is just an alias for QUIT.
|
||||
|
||||
@node MODE command, CONNECT command, EXIT command, Commands
|
||||
@subsection The MODE command
|
||||
|
||||
In BotCommander there are three modes. BotCommander Command Mode (B), Eggdrop Command Mode (E) and Message Mode (M). With this command you can switch between modes. I'm planning to assign hotkeys (F5-F7) to mode switching, but I just can't find out, how...
|
||||
|
||||
@node CONNECT command, Plans, MODE command, Commands
|
||||
@subsection The CONNECT command
|
||||
|
||||
This connects to a bot. Currently it has one syntax:
|
||||
|
||||
@example
|
||||
CONNECT host.of.my.bot portnumber
|
||||
@end example
|
||||
|
||||
This will connect to the host host.of.my.bot, on the port portnumber.
|
||||
|
||||
I'm planning a bot list, which will be managed through a separate window named Bot list, and with the commands ADDBOT, DELBOT and MODBOT. When it is done, you will be able to use another syntax:
|
||||
|
||||
@example
|
||||
CONNECT botname
|
||||
@end example
|
||||
|
||||
This will connect to the bot which occurs in the bot list with the name botname.
|
||||
|
||||
@node Plans, , CONNECT command, Top
|
||||
@chapter Plans
|
||||
|
||||
There are many things I want to implement in the future. Here are some. Some of them are under coding right now, but many will only be in the very future versions.
|
||||
|
||||
@itemize @bullet
|
||||
@itemize
|
||||
@item
|
||||
XML configuration backend
|
||||
pkg-config
|
||||
|
||||
@item
|
||||
Command-line history
|
||||
gtk
|
||||
|
||||
@item
|
||||
CONNECT botname will connect to the given bot
|
||||
vte
|
||||
|
||||
@item
|
||||
ADDBOT botname host port [nick] will add a new bot to the bot list
|
||||
gconf2
|
||||
|
||||
@item
|
||||
DELBOT botname will remove a bot from the bot list
|
||||
@item
|
||||
BOTLIST will open up the internal bot list window
|
||||
@item
|
||||
PREFS will open up the Preferences dialog box
|
||||
@item
|
||||
A bot list window, where you can easily organize your bots
|
||||
@item
|
||||
Scripting. BC will be able to run small scripts, perhaps in TCL
|
||||
@item
|
||||
Macros and command aliases, so you have to type only one command to achieve the same as you type in many
|
||||
@item
|
||||
Windows port. This will be in the very far future
|
||||
gnomeui2
|
||||
@end itemize
|
||||
|
||||
If all is OK, simply run @code{make}. If nothing goes wrong, the binary will be
|
||||
src/botcommander.
|
||||
|
||||
If you want to install BotCommander, copy the binary to /usr/local/bin. You
|
||||
should change the @code{PIXMAPSDIR} variable in @file{config.h} to something
|
||||
like @code{/usr/local/share/botcommander}, and recompile the whole thing.
|
||||
|
||||
@node Invoking, Commands, Installation, Top
|
||||
@chapter Command line arguments
|
||||
|
||||
@cindex command line args
|
||||
|
||||
No command line arguments are defined yet. This means that BotCommander
|
||||
currently accepts the @url{http://www.gnome.org/, Gnome} and
|
||||
@url{http://www.gtk.org, GTK} standard command line parameters.
|
||||
|
||||
Yet I don't even have any plans for such parameters.
|
||||
|
||||
@node Commands, QUIT, Invoking, Top
|
||||
@chapter Internal commands
|
||||
|
||||
@cindex command
|
||||
|
||||
BotCommander is a bit like an IRC client. As is, there are many commands built
|
||||
in.
|
||||
|
||||
Most of the commands can be abbreviated. This means you can shorten a command
|
||||
while it is still obvious.
|
||||
|
||||
For example, you can write @code{CON botname} instead of
|
||||
@code{CONNECT botname}, as no other commands begin with ``CON''.
|
||||
|
||||
However, there are some ``dangerous'' commands which cannot be abbreviated. One
|
||||
such command is QUIT.
|
||||
|
||||
@cindex internal command list
|
||||
|
||||
@menu
|
||||
* QUIT:: Exits BotCommander
|
||||
* CLOSE:: Closes the active tab
|
||||
* CONNECT:: Connects to a bot or a host
|
||||
* ASSIGN:: Assigns a bot to the active tab
|
||||
* MODE:: Changes the mode in the current tab
|
||||
* HISTLIST:: Lists the previously issued commands and sent messages
|
||||
* BOTLIST:: Opens the bot list window
|
||||
* PREFERENCES:: Opens the setup dialog
|
||||
* DISCONNECT:: Disconnects the current tab
|
||||
@end menu
|
||||
|
||||
@node QUIT, CLOSE, Commands, Commands
|
||||
@section The QUIT command
|
||||
|
||||
@cindex command, QUIT
|
||||
|
||||
This command simply exists BotCommander.
|
||||
|
||||
If at least one tab is open with an opened connection, BotCommander will pop up
|
||||
a dialog if the user really wants to exit.
|
||||
|
||||
These commands cannot be abbreviated.
|
||||
|
||||
@node CLOSE, CONNECT, QUIT, Commands
|
||||
@section The CLOSE command
|
||||
|
||||
@cindex command, CLOSE
|
||||
|
||||
This will close the active tab. If a connection is opened in the tab,
|
||||
BotCommander will pop up a dialog if the user really wants to do that.
|
||||
|
||||
@node CONNECT, ASSIGN, CLOSE, Commands
|
||||
@section The CONNECT command
|
||||
|
||||
@cindex command, CONNECT
|
||||
|
||||
This will open a connection. You can use it in several ways.
|
||||
|
||||
If you have already assigned a bot to the tab with the ASSIGN (@xref{ASSIGN}.) command,
|
||||
you can use it without parameters, so it will connect to the assigned bot.
|
||||
|
||||
If you have a bot in your bot list, you can connect to it with @code{CONNECT
|
||||
botname}. It will also assign that bot to the tab.
|
||||
|
||||
You can use it in the form @code{CONNECT host port}.
|
||||
|
||||
@node ASSIGN, MODE, CONNECT, Commands
|
||||
@section The ASSIGN command
|
||||
|
||||
@cindex command, ASSIGN
|
||||
|
||||
Assigns a bot to the active tab. You can use it in the form @code{ASSING
|
||||
botname} or @code{ASSIGN host port}. After assigning a bot, you can use the
|
||||
@code{CONNECT} command without parameters to connect to the bot.
|
||||
|
||||
@node MODE, HISTLIST, ASSIGN, Commands
|
||||
@section The MODE command
|
||||
|
||||
@cindex command, MODE
|
||||
|
||||
Sets the mode in the current tab. It has only one parameter, the new mode
|
||||
character. It can be B for BotCommander command mode, E for Eggdrop command mode
|
||||
or M for Message mode.
|
||||
|
||||
You can see the current mode in the right side of the status bar.
|
||||
|
||||
@node HISTLIST, BOTLIST, MODE, Commands
|
||||
@section The HISTLIST command
|
||||
|
||||
@cindex command, HISTLIST
|
||||
|
||||
It's a very useless command. Prints out all the commands and messages you
|
||||
entered in the current tab.
|
||||
|
||||
@node BOTLIST, PREFERENCES, HISTLIST, Commands
|
||||
@section The BOTLIST command
|
||||
|
||||
@cindex command, BOTLIST
|
||||
|
||||
This command simply opens the bot list dialog window.
|
||||
|
||||
@node PREFERENCES, DISCONNECT, BOTLIST, Commands
|
||||
@section The PREFERENCES command
|
||||
|
||||
@cindex command, PREFERENCES
|
||||
|
||||
This command simply opens the setup dialog.
|
||||
|
||||
@node DISCONNECT, Configuration, PREFERENCES, Commands
|
||||
@section The DISCONNECT command
|
||||
|
||||
@cindex command, DISCONNECT
|
||||
|
||||
This command forces the disconnection of the current tab. This is useful if you
|
||||
try to connect a bot which doesn't respond, and you don't want to wait for the
|
||||
"connection timeout" message before connecting to somewhere else.
|
||||
|
||||
@node Configuration, Plans, DISCONNECT, Top
|
||||
@chapter The preferences window
|
||||
|
||||
@node Plans, Index, Configuration, Top
|
||||
@chapter Future plans
|
||||
|
||||
@cindex plans
|
||||
|
||||
@itemize
|
||||
@item
|
||||
ADDBOT botname host port [nick] will add a new bot to the bot list
|
||||
|
||||
@item
|
||||
DELBOT botname will remove a bot from the bot list
|
||||
|
||||
@item
|
||||
Scripting. BotCommander will be able to run small scripts, perhaps in TCL
|
||||
|
||||
@item
|
||||
Macros and command aliases, so you have to type only one command to achieve the
|
||||
same as you type in many
|
||||
|
||||
@item
|
||||
Windows port. This will be done after the whole application is functioning. So
|
||||
this will be in the very far future, though I already got requests for it
|
||||
@end itemize
|
||||
|
||||
@node Index, , Plans, Top
|
||||
@unnumbered Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@c End
|
||||
@bye
|
||||
|
||||
|
|
|
@ -0,0 +1,542 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
||||
<book>
|
||||
<title>BotCommander</title>
|
||||
|
||||
<bookinfo>
|
||||
<author>
|
||||
<personname>
|
||||
<firstname>Gergely</firstname>
|
||||
|
||||
<surname>POLONKAI</surname>
|
||||
</personname>
|
||||
|
||||
<email>polesz@botcommander.hu</email>
|
||||
</author>
|
||||
|
||||
<copyright>
|
||||
<year>2005-2007</year>
|
||||
|
||||
<holder>Gergely POLONKAI</holder>
|
||||
</copyright>
|
||||
</bookinfo>
|
||||
|
||||
<dedication>
|
||||
<beginpage />
|
||||
|
||||
<para>I dedicate this book to my girlfriend, as she was so patient while I
|
||||
wrote it.</para>
|
||||
</dedication>
|
||||
|
||||
<toc>
|
||||
<beginpage />
|
||||
|
||||
<title>Table of Contents</title>
|
||||
|
||||
<tocpart>
|
||||
<tocentry>Part I: About BotCommander and this book</tocentry>
|
||||
|
||||
<tocchap>
|
||||
<tocentry>Chapter 1: Who should read this book?</tocentry>
|
||||
</tocchap>
|
||||
|
||||
<tocchap>
|
||||
<tocentry>Chapter 2: About BotCommander</tocentry>
|
||||
</tocchap>
|
||||
</tocpart>
|
||||
</toc>
|
||||
|
||||
<preface>
|
||||
<beginpage />
|
||||
|
||||
<title>Preface</title>
|
||||
|
||||
<para>This document tries to explain the history and usage of the software
|
||||
BotCommander briefly.</para>
|
||||
</preface>
|
||||
|
||||
<part>
|
||||
<title>About BotCommander and this book</title>
|
||||
|
||||
<chapter>
|
||||
<title>Who should read this book?</title>
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>Everyone, who handles at least one eggdrop IRC bot</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Everyone, who wants to write addons (modules) for
|
||||
BotCommander</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Everyone, who wants to learn the script-writing methods for
|
||||
BotCommander</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>About BotCommander</title>
|
||||
|
||||
<para>BotCommander is a specialized telnet client, and a bit more. It is
|
||||
specialized in eggdrop IRC bot handling, enhanced with scripting
|
||||
possibility, and may also be enhanced with self-written modules (just
|
||||
like eggdrop itself).</para>
|
||||
|
||||
<para>The project has its own homepage at
|
||||
<uri>http://www.botcommander.hu/</uri></para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>BotCommander features</title>
|
||||
|
||||
<glosslist>
|
||||
<glossentry>
|
||||
<glossterm>Command line history</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>BotCommander has command line history. This means you can
|
||||
recall your previous commands with the Up/Down keys, edit them,
|
||||
and/or issue them again.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>Tabbed interface</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>BotCommander has a tabbed interface, which means you can
|
||||
have several connections in only one window - just like an IRC, or
|
||||
IM client.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>Channel and user list</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>If you have the correct permissions, you can have a list of
|
||||
the bot's users and channels; also you will be able to manage
|
||||
these: change user and channel flags and more. However, this
|
||||
feature requires a small TCL script to be loaded in the bot (that
|
||||
script is provided with BotCommander).</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glosslist>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Some technical background</title>
|
||||
|
||||
<para>BotCommander uses GConf2 to store its configuration, and all
|
||||
bot-related data. The graphical part (the widgets) are from GTK+
|
||||
(currently using 2.6 features), and some are from libgnomeui.</para>
|
||||
</chapter>
|
||||
</part>
|
||||
|
||||
<part>
|
||||
<title>Installation</title>
|
||||
|
||||
<preface>
|
||||
<title>About this part</title>
|
||||
|
||||
<para>In this chapter you will learn about the installation methods of
|
||||
BotCommander. You will be able to install BotCommander under several
|
||||
Linux distributions, such as Debian and Gentoo, and also will know how
|
||||
to install it from the sources.</para>
|
||||
</preface>
|
||||
|
||||
<chapter>
|
||||
<title>Install on Debian machines</title>
|
||||
|
||||
<para>For a few years, I was a hardcore Debian-user. Thus, it was almost
|
||||
my first task to create a Debian package out of BotCommander.</para>
|
||||
|
||||
<para>I also created a Debian repository, so it is an easy task to
|
||||
install BotCommander under a Debian system. Just add the following lines
|
||||
to your <filename>sources list</filename> file.</para>
|
||||
|
||||
<example>
|
||||
<title>The <filename>sources.list</filename> snippet required to
|
||||
install BotCommander .deb packages with apt.</title>
|
||||
|
||||
<para>deb http://www.botcommander.hu/debian testing main</para>
|
||||
|
||||
<para>deb-src http://www.botcommander.hu/debian testing main</para>
|
||||
</example>
|
||||
|
||||
<para>This snippet is only for debian etch (as of writing, at the end of
|
||||
2006).</para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Install on Gentoo machines</title>
|
||||
|
||||
<para>After my Debian years, my next Linux-breed was Gentoo. It's
|
||||
absolutely does what the user wants (sure, if the user is smart enough).
|
||||
After a few days of coding, a Gentoo ebuild was born. It is the part of
|
||||
the BotCommander package, can be downloaded from
|
||||
<uri>http://www.botcommander.hu/</uri>, and I'm also trying to add it to
|
||||
the official Gentoo portage.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Install from sources</title>
|
||||
|
||||
<para>If you are not the user of the above systems, then currently no
|
||||
package exists for your needs. I'm really sorry for that, but I always
|
||||
welcome if someone sends me a package for any OS-es.</para>
|
||||
|
||||
<para>So, you arrived here, you want to install BotCommander from
|
||||
sources. This is good, but has some prerequisites: you will need bunch
|
||||
of software you may not currently have installed. I'm trying to make
|
||||
this list as correct as possible, but it may happen that I forgot about
|
||||
something. I'm really sorry if so.</para>
|
||||
|
||||
<glosslist>
|
||||
<glossentry>
|
||||
<glossterm>autoconf v2.60</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is required only if you want to compile the SVN tree,
|
||||
as it doesn't contain a configure script.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>gcc</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>gcc is the GNU C Compiler. This is a necessary tool.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>gdk-pixbuf</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the GDK-pixbuf library, required by BotCommander to
|
||||
render some icons.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>glib</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the GLib library. BotCommander uses its
|
||||
memory-handling routines.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>GTK+ v2.6.2 or greater</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the GTK library. BotCommander uses its widgets
|
||||
heavily.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>libgnome2</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the Gnome library. BotCommander uses some widgets in
|
||||
it.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>libgnomeui2</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the Gnome-UI library. BotCommander uses the file
|
||||
open dialog from it.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>VTE</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This is the VTE (Virtual Terminal Emulation) library.
|
||||
BotCommander displays all the bot-messages in such a
|
||||
widget.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>GNU Gettext package</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>This package is required for BotCommander to speak many
|
||||
languages. I'm trying to make this one optional, so one will be
|
||||
able to compile BotCommander without multilingual support (may be
|
||||
good for english-speaking people, and for minimalist
|
||||
systems)</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glosslist>
|
||||
</chapter>
|
||||
</part>
|
||||
|
||||
<part>
|
||||
<title>Basic eggdrop usage</title>
|
||||
|
||||
<preface>
|
||||
<title>Terms and assumptions</title>
|
||||
|
||||
<para>Throughout this part we assume that you install your bot yourself,
|
||||
and thus you have an owner flag in it. Many functions are not
|
||||
accessible, if you don't possess that +n flag.</para>
|
||||
</preface>
|
||||
|
||||
<chapter>
|
||||
<title>Compiling and installing eggdrop</title>
|
||||
|
||||
<note>
|
||||
<para>This chapter assumes that you have TCL installed system-wide. If
|
||||
not, please consult the eggdrop manual on how to install it for one
|
||||
single user, and how to make eggdrop use that library. I also assume
|
||||
that you know how to use the basic Unix/Linux commands, such as tar,
|
||||
thus you can unpack the eggdrop archive.</para>
|
||||
</note>
|
||||
|
||||
<para>First things first, you much fetch eggdrop from somewhere. The
|
||||
best place for this is eggheads' homepage at
|
||||
<uri>http://www.eggheads.org/</uri>. Download the latest version (as of
|
||||
writing, it is 1.6.18), and unpack it. Then enter the unpacked
|
||||
distibution's directory, and issue the following commands:</para>
|
||||
|
||||
<example>
|
||||
<title>Commands to configure and compile eggdrop</title>
|
||||
|
||||
<para>./configure</para>
|
||||
|
||||
<para>make iconfig</para>
|
||||
|
||||
<para>make</para>
|
||||
</example>
|
||||
|
||||
<para>After issuing <command>make iconfig</command>, that script will
|
||||
ask you several questions if you want to install this-or-that module.
|
||||
Read the module descriptions, and choose whichever you need.</para>
|
||||
|
||||
<note>
|
||||
<para>I'm currently planning to write my
|
||||
<filename>botcommander.tcl</filename> script as an eggdrop module. If
|
||||
I'm ready with that, I will instruct you how to compile new modules
|
||||
for eggdrop.</para>
|
||||
</note>
|
||||
|
||||
<para>After <command>make</command> finishes without errors, you can
|
||||
issue the last, <command>make install</command> command. This will
|
||||
install eggdrop to the given directory (if none was given, the default
|
||||
is <filename>$HOME/eggdrop</filename>.</para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Configuring your bot</title>
|
||||
|
||||
<para>Configuring eggdrop is a long, yet not hard process, which
|
||||
requires almost no understanding of eggdrop, if you know english.</para>
|
||||
|
||||
<note>
|
||||
<para>The following is only a suggestion; contains my way on
|
||||
configuring an eggdrop bot.You may do it several other ways; it's up
|
||||
to you. However, if you read through this chapter, and follow my
|
||||
words, I will assume that the name you have chosen your bot is
|
||||
<acronym>BCbot</acronym>.</para>
|
||||
</note>
|
||||
|
||||
<para>First of all, enter the directory which contains your eggdrop
|
||||
installation. As said in the previous chapter, by default it is
|
||||
<filename>$HOME/eggdrop</filename>. After that, make a copy of
|
||||
eggdrop.conf with a filename as you will call your bot; then make it
|
||||
executable for at least yourself.</para>
|
||||
|
||||
<example>
|
||||
<title>Copy eggdrop.conf to your own file, and make it
|
||||
executable.</title>
|
||||
|
||||
<para>cp eggdrop.conf BCbot</para>
|
||||
|
||||
<para>chmow 755 BCbot</para>
|
||||
</example>
|
||||
|
||||
<para>Now begin to edit your newly created configuration. The most
|
||||
important thing (of course, if you follow my way) it the very first row,
|
||||
which now looks like this:</para>
|
||||
|
||||
<para><code>#! /path/to/executable/eggdrop</code></para>
|
||||
|
||||
<para>This tells the Unix/Linux shell to use
|
||||
<filename>/path/to/executable/eggdrop</filename> to interpret this file.
|
||||
Thus, the shell, instead of trying on interpreting the command in that
|
||||
file, will run the given command with this file as a parameter. Unless
|
||||
your eggdrop is at that location, you must change that line to something
|
||||
like this:</para>
|
||||
|
||||
<para><code>#! /home/yourusername/eggdrop/eggdrop</code></para>
|
||||
</chapter>
|
||||
</part>
|
||||
|
||||
<part>
|
||||
<title>Usage</title>
|
||||
|
||||
<chapter>
|
||||
<title>Command line parameters</title>
|
||||
|
||||
<para>BotCommander doesn't have any defined command line parameters.
|
||||
This means that it accepts only the standard Gnome and GTK+ parameters
|
||||
only. I don't even have any plans on defining such things (yet).</para>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Built-in commands</title>
|
||||
|
||||
<para>BotCommander has several built-in commands. These can be called
|
||||
from BotCommander or external scripts, thus extending BotCommander's
|
||||
functionality.</para>
|
||||
|
||||
<para>Most of these commands can be abbreviated. This means that you can
|
||||
cut off the end of the commands, until it is obvious to the application.
|
||||
For example, as of the time of writing, the CONNECT command can be
|
||||
abbreviated as CON.</para>
|
||||
|
||||
<para>There are some "dangerous" commands, such as QUIT, which cannot be
|
||||
abbreviated, so - in this case - you won't exit BotCommander if you
|
||||
accidently type in the Q command.</para>
|
||||
|
||||
<section>
|
||||
<title>QUIT</title>
|
||||
|
||||
<para>The QUIT command does what it should according to its name:
|
||||
exits BotCommander.</para>
|
||||
|
||||
<para>If at least one connected tab is open, a small dialog will pop
|
||||
up, asking if you are serious about quitting.</para>
|
||||
|
||||
<para>This command cannot be abbreviated.</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>CLOSE</title>
|
||||
|
||||
<para>This command closes the currently active tab. If there is an
|
||||
active connection in that tab, a dialog will pop up asking if you
|
||||
really want to do that.</para>
|
||||
|
||||
<para>This command cannot be abbreviated.</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>CONNECT</title>
|
||||
|
||||
<para>This will open a connection in the current tab. It has many
|
||||
different invokations, depending on the parameters given.</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>CONNECT without parameters will work if you previously
|
||||
assigned a bot to the active tab with the ASSIGN command. If so,
|
||||
the connection will be open to the given bot.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CONNECT botname will connect to the named bot in the bot
|
||||
list.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CONNECT host port will connect to the specified host, on the
|
||||
specified port. This can be useful, if you want to connect to a
|
||||
bot only once, e.g to check some settings or such.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>CONNECT host port username does exactly as the above
|
||||
command, but it will automatically send the given username also.
|
||||
This will be useful as the initial connection to a bot, as I'm
|
||||
planning to implement a SAVEBOT command, which will do just what
|
||||
it name suggests: save the current bot to the bot list.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>ASSIGN</title>
|
||||
|
||||
<para>The ASSIGN command does the same as CONNECT, with only one
|
||||
difference: it won't connect. It will assign all the connection
|
||||
parameters to the current tab, so when you are ready, you can use the
|
||||
CONNECT command without any parameters to do the actual
|
||||
connection.</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>MODE</title>
|
||||
|
||||
<para>The MODE command changes the current tab's mode. You can read
|
||||
more about modes in <xref linkend="chap_modes" /></para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<chapter id="chap_modes">
|
||||
<title>Modes</title>
|
||||
|
||||
<para>BotCommander uses modes to distinguish between commands addressed
|
||||
to itself, and addressed to the connected bot.</para>
|
||||
|
||||
<para>There are three modes, identified by their english names' first
|
||||
character.</para>
|
||||
|
||||
<glosslist>
|
||||
<glossentry>
|
||||
<glossterm>B, or BotCommander command mode (/)</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>In this mode, entered text is validated against the commands
|
||||
built in to BotCommander, or commands provided by scripts and
|
||||
modules.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>E, or Eggdrop command mode (.)</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>In this mode, text is sent to the connected bot (if any), so
|
||||
eggdrop itself will validate it.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
|
||||
<glossentry>
|
||||
<glossterm>M, or Message mode (@)</glossterm>
|
||||
|
||||
<glossdef>
|
||||
<para>In this mode, entered text is sent to the connected bot. As
|
||||
you see, it is just the same as E mode, but there is a small
|
||||
difference. If the entered text begins with a dot (.), eggdrop
|
||||
would identify and parse it as a command. So in this case, the
|
||||
entered text is prefixed with a space.</para>
|
||||
</glossdef>
|
||||
</glossentry>
|
||||
</glosslist>
|
||||
|
||||
<para>You can change between these modes in the Mode menu, or with
|
||||
hotkeys (Ctrl-B, Ctrl-E and Ctrl-M respectively). However, if you want
|
||||
to use one specific mode for a long time, and issue one line in a
|
||||
different mode, you can prefix your text with the character in
|
||||
parentheses in the above list. E.g if you use Message mode for hours,
|
||||
and want to issue one BotCommander command, you can do it by entering
|
||||
/COMMAND. As this happens, BotCommander will parse and execute the given
|
||||
row as a BotCommander command, and return to message mode.</para>
|
||||
</chapter>
|
||||
</part>
|
||||
</book>
|
|
@ -0,0 +1,2 @@
|
|||
@set VERSION 1.0
|
||||
@set UPDATED 15 November 2005
|
|
@ -0,0 +1,50 @@
|
|||
bind chon - * botcommander:chon
|
||||
bind dcc - botcomm_chanlist botcommander:chanlist
|
||||
bind dcc - botcomm_userlist botcommander:userlist
|
||||
bind dcc - botcomm_chanprop botcommander:chanprop
|
||||
|
||||
proc botcommander:chon {handle connid} {
|
||||
putdcc $connid "BC+ ABILITY\r\n"
|
||||
}
|
||||
|
||||
proc botcommander:chanlist {handle connid params} {
|
||||
if {[matchattr $handle o]} {
|
||||
putdcc $connid "BC+ CHANLIST_START\r\n"
|
||||
foreach chan [channels] {
|
||||
set active [channel get $chan inactive]
|
||||
if {$active != 0} { set active 0 } else { set active 1 }
|
||||
putdcc $connid "BC+ CHAN $active $chan\r\n"
|
||||
}
|
||||
putdcc $connid "BC+ CHANLIST_END\r\n"
|
||||
} else {
|
||||
putcc $connid "BC- NOPRIV\r\n"
|
||||
}
|
||||
}
|
||||
|
||||
proc botcommander:userlist {handle connid params} {
|
||||
if {[matchattr $handle o]} {
|
||||
putdcc $connid "BC+ USERLIST_START\r\n"
|
||||
foreach user [userlist] {
|
||||
putdcc $connid "BC+ USER $user\r\n"
|
||||
}
|
||||
putdcc $connid "BC+ USERLIST_END\r\n"
|
||||
} else {
|
||||
putdcc $connid "BC- NOPRIV\r\n"
|
||||
}
|
||||
}
|
||||
|
||||
proc botcommander:chanprop {handle connid params} {
|
||||
if {[matchattr $handle o]} {
|
||||
set chan [lindex $params 0]
|
||||
putdcc $connid "BC+ CHANPROPS_START $chan\r\n"
|
||||
foreach prop [channel info $chan] {
|
||||
putdcc $connid "BC+ CHANPROP $chan $prop\r\n"
|
||||
}
|
||||
putdcc $connid "BC+ CHANPROPS_END $chan\r\n"
|
||||
} else {
|
||||
putdcc $connid "BC- NOPRIV"
|
||||
}
|
||||
}
|
||||
|
||||
putlog "BC+ ABILITY"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# ChangeLog for net-misc/botcommander
|
||||
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: $
|
||||
|
||||
*botcommander-1.0 (07 May 2007)
|
||||
|
||||
07 May 2007; Gergely POLONKAI <polesz@botcommander.hu> ChangeLog,
|
||||
metadata.xml, botcommander-1.0.ebuild :
|
||||
Initial import. Ebuild submitted by Gergely POLONKAI <polesz@botcommander.hu>.
|
|
@ -0,0 +1,16 @@
|
|||
DIST botcommander-1.0.tar.gz 199432 RMD160 2b215e140f4be8d606e50851f62a768415dc20bd SHA1 4791e1ef953447769e185dd09378959111a472bb SHA256 60c9b2304ffd52710896a3fc23cbe7d2a1a311e930588e1c0ff0770832d7d34c
|
||||
EBUILD botcommander-1.0.ebuild 824 RMD160 ba7a4d6d66187ff84a5b0f34099b0cae33c1d67d SHA1 5c236fa215ad00120ecc0d688e039e60a10537b2 SHA256 07b5b914e2a59f5a45b48fafa52ff391703a478a91a7a7722570af59b310145b
|
||||
MD5 02966d62ff21c59a56c6e49205d7ea73 botcommander-1.0.ebuild 824
|
||||
RMD160 ba7a4d6d66187ff84a5b0f34099b0cae33c1d67d botcommander-1.0.ebuild 824
|
||||
SHA256 07b5b914e2a59f5a45b48fafa52ff391703a478a91a7a7722570af59b310145b botcommander-1.0.ebuild 824
|
||||
MISC ChangeLog 347 RMD160 f388beb33308560a58336982968c1a42a10010e8 SHA1 f93cc861296127765a24db8027842f31ac7d7e58 SHA256 6bbc25b9c2de498ab7912fc269d55b4c56273f413215f8f89a4731ad6999c0ef
|
||||
MD5 8da252e524f30f329737a630a99822a5 ChangeLog 347
|
||||
RMD160 f388beb33308560a58336982968c1a42a10010e8 ChangeLog 347
|
||||
SHA256 6bbc25b9c2de498ab7912fc269d55b4c56273f413215f8f89a4731ad6999c0ef ChangeLog 347
|
||||
MISC metadata.xml 228 RMD160 63206419b7b7c6a2c350d341159550195e4a6c39 SHA1 5459d1b0d5252954b1e03749daf24fae8328241c SHA256 77715d077c12ef5f4fb0210a6ab0afbd1ce72893197b00172e113bc1feefd7b8
|
||||
MD5 12db369dccd15f41022110f874eec256 metadata.xml 228
|
||||
RMD160 63206419b7b7c6a2c350d341159550195e4a6c39 metadata.xml 228
|
||||
SHA256 77715d077c12ef5f4fb0210a6ab0afbd1ce72893197b00172e113bc1feefd7b8 metadata.xml 228
|
||||
MD5 3b1381c413a444be4c2ccf88873fb996 files/digest-botcommander-1.0 250
|
||||
RMD160 06d1d7d46814dd557e6d8e280747fc1efa37315b files/digest-botcommander-1.0 250
|
||||
SHA256 69bea651c8d76ef75dad3c4ad15772813f75e1673b7c8d54bc448ac60f89de3c files/digest-botcommander-1.0 250
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
inherit eutils versionator gnome2
|
||||
|
||||
DESCRIPTION="Eggdrop IRC bot maintanence program"
|
||||
HOMEPAGE="http://www.botcommander.hu/"
|
||||
SRC_URI="http://www.botcommander.hu/dl/${P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="x86 amd64"
|
||||
IUSE="-debug"
|
||||
DEPEND=""
|
||||
RDEPEND=">=dev-libs/glib-2.6.0
|
||||
>=x11-libs/gtk+-2.10.0"
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--prefix="${D}"/usr \
|
||||
--mandir="${D}"/usr/share/man \
|
||||
--infodir="${D}"/usr/share/info \
|
||||
--libdir="${D}"/usr/$(get_libdir) || die "econf failed"
|
||||
emake || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake \
|
||||
prefix="${D}"/usr \
|
||||
mandir="${D}"/usr/share/man \
|
||||
infodir="${D}"/usr/share/info \
|
||||
libdir="${D}"/usr/$(get_libdir) \
|
||||
install || die "emake install failed"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
MD5 1d44a59bc7466b2f36dbc812bb793793 botcommander-1.0.tar.gz 199432
|
||||
RMD160 2b215e140f4be8d606e50851f62a768415dc20bd botcommander-1.0.tar.gz 199432
|
||||
SHA256 60c9b2304ffd52710896a3fc23cbe7d2a1a311e930588e1c0ff0770832d7d34c botcommander-1.0.tar.gz 199432
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>net-misc</herd>
|
||||
<maintainer>
|
||||
<email>polesz@botcommander.hu</email>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
|
@ -0,0 +1,76 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* defines.h
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Macro definitions used in many places
|
||||
}}} */
|
||||
|
||||
/* {{{ _BC_DEFINES_H */
|
||||
#ifndef _BC_DEFINES_H
|
||||
# define _BC_DEFINES_H
|
||||
|
||||
/* {{{ Locale-related definition. It's much easier this way */
|
||||
#define _(String) gettext(String)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ BC_COMMAND prototype definition */
|
||||
#define BC_COMMAND(x) gboolean x (t_tab_data *tab, int paramnum, gchar **param)
|
||||
/* In typedefs.h there is a struct which is for the command list.
|
||||
* To make life easier, you only have to change the functions' type here (and
|
||||
* in the previous line).
|
||||
*/
|
||||
#define BC_COMMAND_DEF(x) gboolean (* x )(t_tab_data *, int, gchar **)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Command types */
|
||||
#define CT_INTERNAL 0
|
||||
#define CT_MODULE 1
|
||||
#define CT_SCRIPT 2
|
||||
/* }}} */
|
||||
|
||||
/* {{{ BotCommander error constants */
|
||||
#define BCE_SUCCESS 0
|
||||
#define BCE_BOT_EXISTS 1
|
||||
#define BCE_NOMEM 2
|
||||
#define BCE_NOBOT 3
|
||||
#define BCE_NOPROTO 4
|
||||
#define BCE_CANTRESOLV 5
|
||||
#define BCE_CANTCONNECT 6
|
||||
/* }}} */
|
||||
|
||||
/* {{{ The eggdrops character for eggdrop commands. You should never change this! */
|
||||
#define EGG_CMD_CHAR "."
|
||||
/* }}} */
|
||||
|
||||
/* {{{ The telnet codes we use, from RFC 854) */
|
||||
#define TELNET_IAC "\xff" /* Interpret As Command */
|
||||
#define TELNET_WILL "\xfb" /* Will */
|
||||
#define TELNET_WONT "\xfc" /* Won't */
|
||||
#define TELNET_ECHO "\x01" /* Echo */
|
||||
|
||||
#define TELNET_WILL_ECHO TELNET_IAC TELNET_WILL TELNET_ECHO
|
||||
#define TELNET_WONT_ECHO TELNET_IAC TELNET_WONT TELNET_ECHO
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* functions.h
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright 2004 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Function prototypes
|
||||
}}} */
|
||||
|
||||
/* {{{ _BC_FUNCTIONS_H */
|
||||
#ifndef _BC_FUNCTIONS_H
|
||||
# define _BC_FUNCTIONS_H
|
||||
|
||||
/* {{{ Includes */
|
||||
# include <gtk/gtk.h>
|
||||
# include <stdarg.h>
|
||||
# include "typedefs.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ widgets.c */
|
||||
void set_title(t_tab_data *, char *, ...);
|
||||
int create_main_window(void);
|
||||
void feed_message_to_terminal(t_tab_data *, gboolean, gchar *, ...);
|
||||
void feed_error_to_terminal(t_tab_data *, gboolean, gchar *, ...);
|
||||
void feed_info_to_terminal(t_tab_data *, gboolean, gchar *, ...);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ callbacks.c */
|
||||
void destroy_event(GtkWidget *, gpointer);
|
||||
gboolean delete_event(GtkWidget *, GdkEvent *, gpointer);
|
||||
void toolbar_quit(GtkButton *, gpointer);
|
||||
void toolbar_add_tab(GtkButton *, gpointer);
|
||||
void toolbar_close_active(GtkButton *, gpointer);
|
||||
void toolbar_open_prefs(GtkButton *, gpointer);
|
||||
void book_change_tab(GtkNotebook *, GtkNotebookPage *newpage, guint, gpointer);
|
||||
void close_tab_cb(GtkWidget *, gpointer);
|
||||
gboolean entry_activate(GtkWidget *, gpointer);
|
||||
void menu_exit(GtkWidget *, gpointer);
|
||||
void menu_mode_changed(GtkWidget *, gpointer);
|
||||
void menu_botlist_open(GtkWidget *, gpointer);
|
||||
void menu_prefs_open(GtkWidget *, gpointer);
|
||||
void menu_new_tab(GtkWidget *, gpointer);
|
||||
void menu_close_tab(GtkWidget *, gpointer);
|
||||
void menu_about(GtkWidget *, gpointer);
|
||||
int vte_clicked(GtkWidget *, gpointer);
|
||||
int entry_keypress(GtkEntry *, GdkEventKey *, gpointer);
|
||||
void socket_event(gpointer, gint, GdkInputCondition);
|
||||
void menu_showhide_sidebar(GtkWidget *, gpointer);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ main.c */
|
||||
void exit_cleanly(gboolean);
|
||||
void change_mode(char, gboolean);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ tabs.c */
|
||||
int add_tab(t_tab_data **);
|
||||
t_tab_data *get_active_tab(void);
|
||||
gboolean close_tab(t_tab_data *);
|
||||
gboolean assign_bot_to_tab_by_name(t_tab_data *, gchar *);
|
||||
void assign_bot_to_tab(t_tab_data *, t_bot_data *);
|
||||
gint connect_tab(t_tab_data *);
|
||||
void update_channel_list(t_tab_data *);
|
||||
void update_user_list(t_tab_data *);
|
||||
gint find_tab_by_pagenum(gconstpointer, gconstpointer);
|
||||
void disconnect_tab(t_tab_data *);
|
||||
void change_active_tab(gint);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ string.c */
|
||||
gboolean streq(gchar *, gchar *, gboolean);
|
||||
int wordwrap(gchar *, gchar *, gchar ***, gint *);
|
||||
void wl_free(gchar ***, gint);
|
||||
gboolean is_numeric(gchar *, gint *);
|
||||
gchar *trim(gchar *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ bots.c */
|
||||
#ifdef DEBUG
|
||||
void list_bots(void);
|
||||
#endif
|
||||
gint add_bot(gchar *, gchar *, guint, gchar *);
|
||||
t_bot_data *get_bot_by_botname(gchar *);
|
||||
gint create_bot_record(gchar *, gint, t_bot_data **);
|
||||
gint update_bot(t_bot_data *, gchar *, gchar *, guint, gchar *);
|
||||
void save_bot(t_bot_data *, t_bot_data *);
|
||||
void free_bot_data(gpointer, gpointer);
|
||||
t_bot_data *get_bot_by_conf_num(guint);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ commands.c */
|
||||
gboolean process_commandline(gchar *, t_tab_data *);
|
||||
void process_botcommander_script_commands(t_tab_data *, char *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ config.c */
|
||||
gboolean init_config(void);
|
||||
void read_config_data(void);
|
||||
gboolean set_int_conf_value(gchar *, gint);
|
||||
gboolean set_string_conf_value(gchar *, gchar *);
|
||||
void read_bot_list_from_config(void);
|
||||
void save_bot_list_to_config(void);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ about.c */
|
||||
void display_about_box(void);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ setup.c */
|
||||
void display_setup_window(void);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ networking.c */
|
||||
gint connect_to_host(gchar *, guint, int *, gint *, t_tab_data *);
|
||||
void process_incoming_data(t_tab_data *, char *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ history.c */
|
||||
void history_add(t_tab_data *, gchar, gchar *);
|
||||
gint get_history_len(t_tab_data *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ botlist.c */
|
||||
void display_botlist_window(void);
|
||||
void create_bot_editor(t_bot_data *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ chanprops.c */
|
||||
void update_channel_property(t_tab_data *, gchar *, gchar *);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ debug.c */
|
||||
/* This one is only compiled if DEBUG is defined */
|
||||
# ifdef DEBUG
|
||||
void debug_init(void);
|
||||
void set_context(char *file, int line);
|
||||
# define Context set_context(__FILE__, __LINE__)
|
||||
# else /* DEBUG */
|
||||
# define Context
|
||||
# endif /* DEBUG */
|
||||
/* }}} */
|
||||
|
||||
#endif /* _BC_FUNCTIONS_H */
|
||||
/* }}} */
|
|
@ -0,0 +1,187 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* typedefs.h
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Type definitions
|
||||
}}} */
|
||||
|
||||
/* {{{ _BC_TYPEDEFS_H */
|
||||
#ifndef _BC_TYPEDEFS_H
|
||||
# define _BC_TYPEDEFS_H
|
||||
|
||||
/* {{{ Includes */
|
||||
# include <gtk/gtk.h>
|
||||
|
||||
# include "defines.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Bot data */
|
||||
typedef struct _t_bot_data {
|
||||
/* The bot's name. NULL if now known */
|
||||
gchar *botname;
|
||||
/* The hostname of the bot */
|
||||
gchar *host;
|
||||
/* The port number of the bot */
|
||||
guint port;
|
||||
/* The handle in the bot (may be NULL) */
|
||||
gchar *handle;
|
||||
/* The config key value for this bot (used only when loading bot data from config */
|
||||
guint id;
|
||||
} t_bot_data;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ History data */
|
||||
typedef struct _t_history_data {
|
||||
gchar *line;
|
||||
struct _t_history_data *next;
|
||||
} t_history_data;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Tab data */
|
||||
typedef struct _t_tab_data {
|
||||
/* General data */
|
||||
|
||||
/* The number of the tab */
|
||||
gint num;
|
||||
/* The current mode in the tab (b|e|m)*/
|
||||
char mode;
|
||||
/* The bot assigned to this tab */
|
||||
t_bot_data *bot;
|
||||
/* The history data */
|
||||
t_history_data *history;
|
||||
/* The current position in the history list */
|
||||
gint history_position;
|
||||
|
||||
/* BC script related data */
|
||||
|
||||
/* Currently we are in the middle of the channel list */
|
||||
gboolean chanlist_process;
|
||||
/* Currently we are in the middle of the user list */
|
||||
gboolean userlist_process;
|
||||
/* Currently we are processing the properties of this channel */
|
||||
gchar *chanprops_process;
|
||||
/* This is number x in the property list */
|
||||
gint chanprops_list_num;
|
||||
/* The channel list */
|
||||
GList *actual_channel_list;
|
||||
/* The user list */
|
||||
GList *actual_user_list;
|
||||
|
||||
/* Networking data */
|
||||
|
||||
/* TRUE if the tab is connected, FALSE otherwise */
|
||||
gboolean connected;
|
||||
/* The socket descriptor */
|
||||
int sock;
|
||||
/* The GDK socket tag */
|
||||
gint socktag;
|
||||
/* Set to TRUE when the first byte arrives from the other side */
|
||||
gboolean data_arrived;
|
||||
|
||||
/* Widgets */
|
||||
|
||||
/* The virtual terminal */
|
||||
GtkWidget *vt;
|
||||
/* Command line */
|
||||
GtkWidget *editbox;
|
||||
/* The hbox containing the tab label and the close button */
|
||||
GtkWidget *labelbox;
|
||||
/* The tab label */
|
||||
GtkWidget *label;
|
||||
/* The close button */
|
||||
GtkWidget *closebutton;
|
||||
/* List of channels */
|
||||
GtkWidget *channel_list;
|
||||
/* List of users (handles) */
|
||||
GtkWidget *user_list;
|
||||
/* Channel store */
|
||||
GtkListStore *channel_store;
|
||||
/* User store */
|
||||
GtkListStore *user_store;
|
||||
} t_tab_data;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Configuration data */
|
||||
typedef struct _t_config_data {
|
||||
/* GUI options */
|
||||
gboolean change_to_new_tab;
|
||||
/* VTE options */
|
||||
gboolean scroll_on_output;
|
||||
gboolean transparent_background;
|
||||
gfloat background_saturation;
|
||||
gchar *vte_font;
|
||||
/* General options */
|
||||
gboolean change_to_message;
|
||||
#ifdef DEBUG
|
||||
gboolean debug;
|
||||
#endif /* DEBUG */
|
||||
gchar default_mode;
|
||||
gboolean save_prefs;
|
||||
gint history_len;
|
||||
} t_config_data;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Command Data */
|
||||
typedef struct _t_command {
|
||||
/* The command verb */
|
||||
gchar *command_verb;
|
||||
/* Type of the command: 0 - Internal; 1 - From a module; 2 - From a script */
|
||||
guint type;
|
||||
/* How many parameters do we require? */
|
||||
gint min_paramnum;
|
||||
/* Can this command be abbreviated? */
|
||||
gboolean can_abbrev;
|
||||
/* The commands function */
|
||||
BC_COMMAND_DEF(func);
|
||||
} t_command;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Channel data */
|
||||
typedef struct _t_channel {
|
||||
/* The channel name */
|
||||
char *name;
|
||||
/* TRUE if then channel is active */
|
||||
gboolean active;
|
||||
/* The property list */
|
||||
GList *properties;
|
||||
} t_channel;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ User data */
|
||||
typedef struct _t_user {
|
||||
/* The use name */
|
||||
char *name;
|
||||
} t_user;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Channel properties */
|
||||
typedef struct _t_chan_prop {
|
||||
char *name;
|
||||
gboolean bool_prop;
|
||||
gboolean bool_value;
|
||||
gchar *string_value;
|
||||
} t_chan_prop;
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{
|
||||
* variables.h
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Variable definitions
|
||||
}}} */
|
||||
|
||||
/* {{{ _BC_VARIABLES_H */
|
||||
#ifndef _BC_VARIABLES_H
|
||||
# define _BC_VARIABLES_H
|
||||
|
||||
/* {{{ Includes */
|
||||
# include <gtk/gtk.h>
|
||||
# include <gconf/gconf-client.h>
|
||||
|
||||
#include "typedefs.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ widgets.c */
|
||||
extern GtkWidget *main_window;
|
||||
extern GtkWidget *main_book;
|
||||
extern GtkWidget *main_statuslabel_mode;
|
||||
extern GtkWidget *main_menu_mode_b;
|
||||
extern GtkWidget *main_menu_mode_e;
|
||||
extern GtkWidget *main_menu_mode_m;
|
||||
extern GtkWidget *main_menu_show_sidebar;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ tabs.c */
|
||||
extern GList *tab_list;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ bots.c */
|
||||
extern GList *internal_bot_list;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ config.c */
|
||||
extern t_config_data config_data;
|
||||
extern GConfClient *gconf_client;
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
/* }}} */
|
||||
|
11
m4/ChangeLog
11
m4/ChangeLog
|
@ -1,11 +0,0 @@
|
|||
2010-10-07 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* gettext.m4: New file, from gettext-0.18.1.
|
||||
* iconv.m4: New file, from gettext-0.18.1.
|
||||
* lib-ld.m4: New file, from gettext-0.18.1.
|
||||
* lib-link.m4: New file, from gettext-0.18.1.
|
||||
* lib-prefix.m4: New file, from gettext-0.18.1.
|
||||
* nls.m4: New file, from gettext-0.18.1.
|
||||
* po.m4: New file, from gettext-0.18.1.
|
||||
* progtest.m4: New file, from gettext-0.18.1.
|
||||
|
383
m4/gettext.m4
383
m4/gettext.m4
|
@ -1,383 +0,0 @@
|
|||
# gettext.m4 serial 63 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
|
||||
|
||||
dnl Macro to add for using GNU gettext.
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
||||
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
||||
dnl default (if it is not specified or empty) is 'no-libtool'.
|
||||
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
||||
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
||||
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
||||
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
||||
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||
dnl implementations (in libc or libintl) without the ngettext() function
|
||||
dnl will be ignored. If NEEDSYMBOL is specified and is
|
||||
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
|
||||
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
|
||||
dnl INTLDIR is used to find the intl libraries. If empty,
|
||||
dnl the value `$(top_builddir)/intl/' is used.
|
||||
dnl
|
||||
dnl The result of the configuration is one of three cases:
|
||||
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
||||
dnl and used.
|
||||
dnl Catalog format: GNU --> install in $(datadir)
|
||||
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 2) GNU gettext has been found in the system's C library.
|
||||
dnl Catalog format: GNU --> install in $(datadir)
|
||||
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||
dnl 3) No internationalization, always use English msgid.
|
||||
dnl Catalog format: none
|
||||
dnl Catalog extension: none
|
||||
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
||||
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||
dnl maintainers.
|
||||
dnl
|
||||
AC_DEFUN([AM_GNU_GETTEXT],
|
||||
[
|
||||
dnl Argument checking.
|
||||
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
||||
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
||||
])])])])])
|
||||
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
|
||||
[AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
|
||||
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
||||
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
||||
])])])])
|
||||
define([gt_included_intl],
|
||||
ifelse([$1], [external],
|
||||
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
|
||||
[yes]))
|
||||
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
|
||||
gt_NEEDS_INIT
|
||||
AM_GNU_GETTEXT_NEED([$2])
|
||||
|
||||
AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
||||
])
|
||||
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
dnl Ideally we would do this search only after the
|
||||
dnl if test "$USE_NLS" = "yes"; then
|
||||
dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
|
||||
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
|
||||
dnl the configure script would need to contain the same shell code
|
||||
dnl again, outside any 'if'. There are two solutions:
|
||||
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
|
||||
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
|
||||
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
|
||||
dnl documented, we avoid it.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
])
|
||||
|
||||
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
|
||||
gt_INTL_MACOSX
|
||||
|
||||
dnl Set USE_NLS.
|
||||
AC_REQUIRE([AM_NLS])
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
BUILD_INCLUDED_LIBINTL=no
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
])
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
POSUB=
|
||||
|
||||
dnl Add a version number to the cache macros.
|
||||
case " $gt_needs " in
|
||||
*" need-formatstring-macros "*) gt_api_version=3 ;;
|
||||
*" need-ngettext "*) gt_api_version=2 ;;
|
||||
*) gt_api_version=1 ;;
|
||||
esac
|
||||
gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
|
||||
gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
gt_use_preinstalled_gnugettext=no
|
||||
ifelse(gt_included_intl, yes, [
|
||||
AC_MSG_CHECKING([whether included gettext is requested])
|
||||
AC_ARG_WITH([included-gettext],
|
||||
[ --with-included-gettext use the GNU gettext library included here],
|
||||
nls_cv_force_use_gnu_gettext=$withval,
|
||||
nls_cv_force_use_gnu_gettext=no)
|
||||
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
])
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If GNU gettext is available we use this. Else we have
|
||||
dnl to fall back to GNU NLS library.
|
||||
|
||||
if test $gt_api_version -ge 3; then
|
||||
gt_revision_test_code='
|
||||
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
||||
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
||||
#endif
|
||||
changequote(,)dnl
|
||||
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
||||
changequote([,])dnl
|
||||
'
|
||||
else
|
||||
gt_revision_test_code=
|
||||
fi
|
||||
if test $gt_api_version -ge 2; then
|
||||
gt_expression_test_code=' + * ngettext ("", "", 0)'
|
||||
else
|
||||
gt_expression_test_code=
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
|
||||
[AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern int *_nl_domain_bindings;],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
||||
[eval "$gt_func_gnugettext_libc=yes"],
|
||||
[eval "$gt_func_gnugettext_libc=no"])])
|
||||
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
|
||||
dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
||||
ifelse(gt_included_intl, yes, , [
|
||||
AM_ICONV_LINK
|
||||
])
|
||||
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
||||
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
||||
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
||||
dnl even if libiconv doesn't exist.
|
||||
AC_LIB_LINKFLAGS_BODY([intl])
|
||||
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||
[$gt_func_gnugettext_libintl],
|
||||
[gt_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $INCINTL"
|
||||
gt_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBINTL"
|
||||
dnl Now see whether libintl exists and does not depend on libiconv.
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
[eval "$gt_func_gnugettext_libintl=yes"],
|
||||
[eval "$gt_func_gnugettext_libintl=no"])
|
||||
dnl Now see whether libintl exists and depends on libiconv.
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <libintl.h>
|
||||
$gt_revision_test_code
|
||||
extern int _nl_msg_cat_cntr;
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
const char *_nl_expand_alias (const char *);],
|
||||
[bindtextdomain ("", "");
|
||||
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
|
||||
[LIBINTL="$LIBINTL $LIBICONV"
|
||||
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
||||
eval "$gt_func_gnugettext_libintl=yes"
|
||||
])
|
||||
fi
|
||||
CPPFLAGS="$gt_save_CPPFLAGS"
|
||||
LIBS="$gt_save_LIBS"])
|
||||
fi
|
||||
|
||||
dnl If an already present or preinstalled GNU gettext() is found,
|
||||
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||
dnl gettext is already preinstalled in libintl, we update this
|
||||
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
|
||||
|| { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
|
||||
&& test "$PACKAGE" != gettext-runtime \
|
||||
&& test "$PACKAGE" != gettext-tools; }; then
|
||||
gt_use_preinstalled_gnugettext=yes
|
||||
else
|
||||
dnl Reset the values set by searching for libintl.
|
||||
LIBINTL=
|
||||
LTLIBINTL=
|
||||
INCINTL=
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
||||
dnl GNU gettext is not found in the C library.
|
||||
dnl Fall back on included GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions used to generate GNU NLS library.
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
USE_INCLUDED_LIBINTL=yes
|
||||
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
|
||||
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
|
||||
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||
fi
|
||||
|
||||
CATOBJEXT=
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Mark actions to use GNU gettext tools.
|
||||
CATOBJEXT=.gmo
|
||||
fi
|
||||
])
|
||||
|
||||
if test -n "$INTL_MACOSX_LIBS"; then
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
dnl Some extra flags are needed during linking.
|
||||
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
|
||||
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
||||
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
|
||||
AC_DEFINE([ENABLE_NLS], [1],
|
||||
[Define to 1 if translation of program messages to the user's native language
|
||||
is requested.])
|
||||
else
|
||||
USE_NLS=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to use NLS])
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_MSG_CHECKING([where the gettext function comes from])
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
|
||||
gt_source="external libintl"
|
||||
else
|
||||
gt_source="libc"
|
||||
fi
|
||||
else
|
||||
gt_source="included intl directory"
|
||||
fi
|
||||
AC_MSG_RESULT([$gt_source])
|
||||
fi
|
||||
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
|
||||
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
||||
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
|
||||
AC_MSG_CHECKING([how to link with libintl])
|
||||
AC_MSG_RESULT([$LIBINTL])
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
||||
fi
|
||||
|
||||
dnl For backward compatibility. Some packages may be using this.
|
||||
AC_DEFINE([HAVE_GETTEXT], [1],
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
AC_DEFINE([HAVE_DCGETTEXT], [1],
|
||||
[Define if the GNU dcgettext() function is already present or preinstalled.])
|
||||
fi
|
||||
|
||||
dnl We need to process the po/ directory.
|
||||
POSUB=po
|
||||
fi
|
||||
|
||||
ifelse(gt_included_intl, yes, [
|
||||
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||
dnl to 'yes' because some of the testsuite requires it.
|
||||
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
|
||||
BUILD_INCLUDED_LIBINTL=yes
|
||||
fi
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST([BUILD_INCLUDED_LIBINTL])
|
||||
AC_SUBST([USE_INCLUDED_LIBINTL])
|
||||
AC_SUBST([CATOBJEXT])
|
||||
|
||||
dnl For backward compatibility. Some configure.ins may be using this.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
DATADIRNAME=share
|
||||
AC_SUBST([DATADIRNAME])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INSTOBJEXT=.mo
|
||||
AC_SUBST([INSTOBJEXT])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
GENCAT=gencat
|
||||
AC_SUBST([GENCAT])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLOBJS=
|
||||
if test "$USE_INCLUDED_LIBINTL" = yes; then
|
||||
INTLOBJS="\$(GETTOBJS)"
|
||||
fi
|
||||
AC_SUBST([INTLOBJS])
|
||||
|
||||
dnl Enable libtool support if the surrounding package wishes it.
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
||||
AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
|
||||
])
|
||||
|
||||
dnl For backward compatibility. Some Makefiles may be using this.
|
||||
INTLLIBS="$LIBINTL"
|
||||
AC_SUBST([INTLLIBS])
|
||||
|
||||
dnl Make all documented variables known to autoconf.
|
||||
AC_SUBST([LIBINTL])
|
||||
AC_SUBST([LTLIBINTL])
|
||||
AC_SUBST([POSUB])
|
||||
])
|
||||
|
||||
|
||||
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
|
||||
m4_define([gt_NEEDS_INIT],
|
||||
[
|
||||
m4_divert_text([DEFAULTS], [gt_needs=])
|
||||
m4_define([gt_NEEDS_INIT], [])
|
||||
])
|
||||
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
|
||||
AC_DEFUN([AM_GNU_GETTEXT_NEED],
|
||||
[
|
||||
m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
|
||||
])
|
||||
|
||||
|
||||
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
|
||||
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
214
m4/iconv.m4
214
m4/iconv.m4
|
@ -1,214 +0,0 @@
|
|||
# iconv.m4 serial 11 (gettext-0.18.1)
|
||||
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||
[
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
am_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_func_iconv=yes])
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_lib_iconv=yes]
|
||||
[am_cv_func_iconv=yes])
|
||||
LIBS="$am_save_LIBS"
|
||||
fi
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
|
||||
am_save_LIBS="$LIBS"
|
||||
if test $am_cv_lib_iconv = yes; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
fi
|
||||
AC_TRY_RUN([
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
int main ()
|
||||
{
|
||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||
returns. */
|
||||
{
|
||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_utf8_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
||||
successful returns. */
|
||||
{
|
||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\263";
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_ascii_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#if 0 /* This bug could be worked around by the caller. */
|
||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
char buf[50];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if ((int)res > 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
||||
provided. */
|
||||
if (/* Try standardized names. */
|
||||
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
||||
/* Try IRIX, OSF/1 names. */
|
||||
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
||||
/* Try AIX names. */
|
||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||
/* Try HP-UX names. */
|
||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||
return 1;
|
||||
return 0;
|
||||
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
||||
[case "$host_os" in
|
||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||
esac])
|
||||
LIBS="$am_save_LIBS"
|
||||
])
|
||||
case "$am_cv_func_iconv_works" in
|
||||
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
||||
*) am_func_iconv=yes ;;
|
||||
esac
|
||||
else
|
||||
am_func_iconv=no am_cv_lib_iconv=no
|
||||
fi
|
||||
if test "$am_func_iconv" = yes; then
|
||||
AC_DEFINE([HAVE_ICONV], [1],
|
||||
[Define if you have the iconv() function and it works.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST([LIBICONV])
|
||||
AC_SUBST([LTLIBICONV])
|
||||
])
|
||||
|
||||
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
|
||||
dnl avoid warnings like
|
||||
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
|
||||
dnl This is tricky because of the way 'aclocal' is implemented:
|
||||
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
|
||||
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
|
||||
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
|
||||
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||
dnl warnings.
|
||||
m4_define([gl_iconv_AC_DEFUN],
|
||||
m4_version_prereq([2.64],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[[AC_DEFUN(
|
||||
[$1], [$2])]]))
|
||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([
|
||||
$am_cv_proto_iconv])
|
||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
])
|
110
m4/lib-ld.m4
110
m4/lib-ld.m4
|
@ -1,110 +0,0 @@
|
|||
# lib-ld.m4 serial 4 (gettext-0.18)
|
||||
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH([gnu-ld],
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL([acl_cv_path_LD],
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT([$LD])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
774
m4/lib-link.m4
774
m4/lib-link.m4
|
@ -1,774 +0,0 @@
|
|||
# lib-link.m4 serial 21 (gettext-0.18)
|
||||
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ([2.54])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[translit([$1],[./-], [___])])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. The missing-message
|
||||
dnl defaults to 'no' and may contain additional hints for the user.
|
||||
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
||||
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[translit([$1],[./-], [___])])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
|
||||
dnl because these -l options might require -L options that are present in
|
||||
dnl LIBS. -l options benefit only from the -L options listed before it.
|
||||
dnl Otherwise, add it to the front of LIBS, because it may be a static
|
||||
dnl library that depends on another static library that is present in LIBS.
|
||||
dnl Static libraries benefit only from the static libraries listed after
|
||||
dnl it.
|
||||
case " $LIB[]NAME" in
|
||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
||||
esac
|
||||
AC_TRY_LINK([$3], [$4],
|
||||
[ac_cv_lib[]Name=yes],
|
||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl acl_libext,
|
||||
dnl acl_shlibext,
|
||||
dnl acl_hardcode_libdir_flag_spec,
|
||||
dnl acl_hardcode_libdir_separator,
|
||||
dnl acl_hardcode_direct,
|
||||
dnl acl_hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
acl_libext="$acl_cv_libext"
|
||||
acl_shlibext="$acl_cv_shlibext"
|
||||
acl_libname_spec="$acl_cv_libname_spec"
|
||||
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_FROMPACKAGE(name, package)
|
||||
dnl declares that libname comes from the given package. The configure file
|
||||
dnl will then not have a --with-libname-prefix option but a
|
||||
dnl --with-package-prefix option. Several libraries can come from the same
|
||||
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||
dnl macro call that searches for libname.
|
||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||
[
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
define([acl_frompackage_]NAME, [$2])
|
||||
popdef([NAME])
|
||||
pushdef([PACK],[$2])
|
||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
define([acl_libsinpackage_]PACKUP,
|
||||
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
||||
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||
dnl Autoconf >= 2.61 supports dots in --with options.
|
||||
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH(P_A_C_K[-prefix],
|
||||
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
||||
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||
&& ! test -d "$withval/$acl_libdirstem"; then
|
||||
additional_libdir="$withval/$acl_libdirstem2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
||||
dnl computed. So it has to be reset here.
|
||||
HAVE_LIB[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||
if test -n "$acl_shlibext"; then
|
||||
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||
else
|
||||
shrext=
|
||||
fi
|
||||
if test $use_additional = yes; then
|
||||
dir="$additional_libdir"
|
||||
dnl The same code as in the loop below:
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$acl_hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$acl_hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
popdef([P_A_C_K])
|
||||
popdef([PACKLIBS])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
popdef([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl For those cases where a variable contains several -L and -l options
|
||||
dnl referring to unknown libraries and directories, this macro determines the
|
||||
dnl necessary additional linker options for the runtime path.
|
||||
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
||||
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
||||
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
||||
dnl otherwise linking without libtool is assumed.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
$1=
|
||||
if test "$enable_rpath" != no; then
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode directories into the resulting
|
||||
dnl binary.
|
||||
rpathdirs=
|
||||
next=
|
||||
for opt in $2; do
|
||||
if test -n "$next"; then
|
||||
dir="$next"
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next=
|
||||
else
|
||||
case $opt in
|
||||
-L) next=yes ;;
|
||||
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next= ;;
|
||||
*) next= ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n ""$3""; then
|
||||
dnl libtool is used for linking. Use -R options.
|
||||
for dir in $rpathdirs; do
|
||||
$1="${$1}${$1:+ }-R$dir"
|
||||
done
|
||||
else
|
||||
dnl The linker is used for linking directly.
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user
|
||||
dnl must pass all path elements in one option.
|
||||
alldirs=
|
||||
for dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
||||
done
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="${$1}${$1:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([$1])
|
||||
])
|
224
m4/lib-prefix.m4
224
m4/lib-prefix.m4
|
@ -1,224 +0,0 @@
|
|||
# lib-prefix.m4 serial 7 (gettext-0.18)
|
||||
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_MULTILIB creates
|
||||
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
||||
dnl "lib" or "lib64" or "lib/64",
|
||||
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
||||
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
||||
dnl "lib/amd64".
|
||||
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
||||
[
|
||||
dnl There is no formal standard regarding lib and lib64.
|
||||
dnl On glibc systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
||||
dnl the compiler's default mode by looking at the compiler's library search
|
||||
dnl path. If at least one of its elements ends in /lib64 or points to a
|
||||
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
||||
dnl Otherwise we use the default, namely "lib".
|
||||
dnl On Solaris systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
||||
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
acl_libdirstem=lib
|
||||
acl_libdirstem2=
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
||||
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
|
||||
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
||||
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
||||
dnl symlink is missing, so we set acl_libdirstem2 too.
|
||||
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
||||
[AC_EGREP_CPP([sixtyfour bits], [
|
||||
#ifdef _LP64
|
||||
sixtyfour bits
|
||||
#endif
|
||||
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
|
||||
])
|
||||
if test $gl_cv_solaris_64bit = yes; then
|
||||
acl_libdirstem=lib/64
|
||||
case "$host_cpu" in
|
||||
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
||||
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
||||
if test -n "$searchpath"; then
|
||||
acl_save_IFS="${IFS= }"; IFS=":"
|
||||
for searchdir in $searchpath; do
|
||||
if test -d "$searchdir"; then
|
||||
case "$searchdir" in
|
||||
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
||||
*/../ | */.. )
|
||||
# Better ignore directories of this form. They are misleading.
|
||||
;;
|
||||
*) searchdir=`cd "$searchdir" && pwd`
|
||||
case "$searchdir" in
|
||||
*/lib64 ) acl_libdirstem=lib64 ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$acl_save_IFS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
||||
])
|
32
m4/nls.m4
32
m4/nls.m4
|
@ -1,32 +0,0 @@
|
|||
# nls.m4 serial 5 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
|
||||
dnl Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
AC_DEFUN([AM_NLS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE([nls],
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
AC_SUBST([USE_NLS])
|
||||
])
|
449
m4/po.m4
449
m4/po.m4
|
@ -1,449 +0,0 @@
|
|||
# po.m4 serial 17 (gettext-0.18)
|
||||
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
||||
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
dnl Checks for all prerequisites of the po subdirectory.
|
||||
AC_DEFUN([AM_PO_SUBDIRS],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
|
||||
AC_REQUIRE([AM_NLS])dnl
|
||||
|
||||
dnl Release version of the gettext macros. This is used to ensure that
|
||||
dnl the gettext macros and po/Makefile.in.in are in sync.
|
||||
AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
|
||||
|
||||
dnl Perform the following tests also if --disable-nls has been given,
|
||||
dnl because they are needed for "make dist" to work.
|
||||
|
||||
dnl Search for GNU msgfmt in the PATH.
|
||||
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
||||
dnl The second test excludes FreeBSD msgfmt.
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
|
||||
|
||||
dnl Test whether it is GNU msgfmt >= 0.15.
|
||||
changequote(,)dnl
|
||||
case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
|
||||
*) MSGFMT_015=$MSGFMT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([MSGFMT_015])
|
||||
changequote(,)dnl
|
||||
case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
|
||||
*) GMSGFMT_015=$GMSGFMT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([GMSGFMT_015])
|
||||
|
||||
dnl Search for GNU xgettext 0.12 or newer in the PATH.
|
||||
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
||||
dnl The second test excludes FreeBSD xgettext.
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
|
||||
(if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
||||
:)
|
||||
dnl Remove leftover from FreeBSD xgettext call.
|
||||
rm -f messages.po
|
||||
|
||||
dnl Test whether it is GNU xgettext >= 0.15.
|
||||
changequote(,)dnl
|
||||
case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
|
||||
*) XGETTEXT_015=$XGETTEXT ;;
|
||||
esac
|
||||
changequote([,])dnl
|
||||
AC_SUBST([XGETTEXT_015])
|
||||
|
||||
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
||||
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
||||
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
|
||||
|
||||
dnl Installation directories.
|
||||
dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
|
||||
dnl have to define it here, so that it can be used in po/Makefile.
|
||||
test -n "$localedir" || localedir='${datadir}/locale'
|
||||
AC_SUBST([localedir])
|
||||
|
||||
dnl Support for AM_XGETTEXT_OPTION.
|
||||
test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
|
||||
AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
|
||||
|
||||
AC_CONFIG_COMMANDS([po-directories], [[
|
||||
for ac_file in $CONFIG_FILES; do
|
||||
# Support "outfile[:infile[:infile...]]"
|
||||
case "$ac_file" in
|
||||
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||
esac
|
||||
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||
case "$ac_file" in */Makefile.in)
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
# Treat a directory as a PO directory if and only if it has a
|
||||
# POTFILES.in file. This allows packages to have multiple PO
|
||||
# directories under different names or in different locations.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||
rm -f "$ac_dir/POTFILES"
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
||||
POMAKEFILEDEPS="POTFILES.in"
|
||||
# ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
|
||||
# on $ac_dir but don't depend on user-specified configuration
|
||||
# parameters.
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
else
|
||||
# The set of available languages was given in configure.in.
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
|
||||
fi
|
||||
# Compute POFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
|
||||
# Compute UPDATEPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
|
||||
# Compute DUMMYPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
|
||||
# Compute GMOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
GMOFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
done
|
||||
fi
|
||||
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
||||
if test -f "$f"; then
|
||||
case "$f" in
|
||||
*.orig | *.bak | *~) ;;
|
||||
*) cat "$f" >> "$ac_dir/Makefile" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done]],
|
||||
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
|
||||
# POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
|
||||
# from automake < 1.5.
|
||||
eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
|
||||
# Capture the value of LINGUAS because we need it to compute CATALOGS.
|
||||
LINGUAS="${LINGUAS-%UNSET%}"
|
||||
])
|
||||
])
|
||||
|
||||
dnl Postprocesses a Makefile in a directory containing PO files.
|
||||
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
|
||||
[
|
||||
# When this code is run, in config.status, two variables have already been
|
||||
# set:
|
||||
# - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
|
||||
# - LINGUAS is the value of the environment variable LINGUAS at configure
|
||||
# time.
|
||||
|
||||
changequote(,)dnl
|
||||
# Adjust a relative srcdir.
|
||||
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||
# In autoconf-2.13 it is called $ac_given_srcdir.
|
||||
# In autoconf-2.50 it is called $srcdir.
|
||||
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||
case "$ac_given_srcdir" in
|
||||
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||
esac
|
||||
|
||||
# Find a way to echo strings without interpreting backslash.
|
||||
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
|
||||
gt_echo='echo'
|
||||
else
|
||||
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
|
||||
gt_echo='printf %s\n'
|
||||
else
|
||||
echo_func () {
|
||||
cat <<EOT
|
||||
$*
|
||||
EOT
|
||||
}
|
||||
gt_echo='echo_func'
|
||||
fi
|
||||
fi
|
||||
|
||||
# A sed script that extracts the value of VARIABLE from a Makefile.
|
||||
sed_x_variable='
|
||||
# Test if the hold space is empty.
|
||||
x
|
||||
s/P/P/
|
||||
x
|
||||
ta
|
||||
# Yes it was empty. Look if we have the expected variable definition.
|
||||
/^[ ]*VARIABLE[ ]*=/{
|
||||
# Seen the first line of the variable definition.
|
||||
s/^[ ]*VARIABLE[ ]*=//
|
||||
ba
|
||||
}
|
||||
bd
|
||||
:a
|
||||
# Here we are processing a line from the variable definition.
|
||||
# Remove comment, more precisely replace it with a space.
|
||||
s/#.*$/ /
|
||||
# See if the line ends in a backslash.
|
||||
tb
|
||||
:b
|
||||
s/\\$//
|
||||
# Print the line, without the trailing backslash.
|
||||
p
|
||||
tc
|
||||
# There was no trailing backslash. The end of the variable definition is
|
||||
# reached. Clear the hold space.
|
||||
s/^.*$//
|
||||
x
|
||||
bd
|
||||
:c
|
||||
# A trailing backslash means that the variable definition continues in the
|
||||
# next line. Put a nonempty string into the hold space to indicate this.
|
||||
s/^.*$/P/
|
||||
x
|
||||
:d
|
||||
'
|
||||
changequote([,])dnl
|
||||
|
||||
# Set POTFILES to the value of the Makefile variable POTFILES.
|
||||
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
|
||||
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
|
||||
# Compute POTFILES_DEPS as
|
||||
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
|
||||
POTFILES_DEPS=
|
||||
for file in $POTFILES; do
|
||||
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
|
||||
done
|
||||
POMAKEFILEDEPS=""
|
||||
|
||||
if test -n "$OBSOLETE_ALL_LINGUAS"; then
|
||||
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
||||
fi
|
||||
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
||||
# The LINGUAS file contains the set of available languages.
|
||||
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
||||
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
|
||||
else
|
||||
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
|
||||
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
|
||||
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
|
||||
fi
|
||||
# Hide the ALL_LINGUAS assigment from automake < 1.5.
|
||||
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
||||
# Compute POFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
|
||||
# Compute UPDATEPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
|
||||
# Compute DUMMYPOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
|
||||
# Compute GMOFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
|
||||
# Compute PROPERTIESFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
|
||||
# Compute CLASSFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
|
||||
# Compute QMFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
|
||||
# Compute MSGFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
|
||||
# Compute RESOURCESDLLFILES
|
||||
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
|
||||
case "$ac_given_srcdir" in
|
||||
.) srcdirpre= ;;
|
||||
*) srcdirpre='$(srcdir)/' ;;
|
||||
esac
|
||||
POFILES=
|
||||
UPDATEPOFILES=
|
||||
DUMMYPOFILES=
|
||||
GMOFILES=
|
||||
PROPERTIESFILES=
|
||||
CLASSFILES=
|
||||
QMFILES=
|
||||
MSGFILES=
|
||||
RESOURCESDLLFILES=
|
||||
for lang in $ALL_LINGUAS; do
|
||||
POFILES="$POFILES $srcdirpre$lang.po"
|
||||
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
||||
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
||||
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
||||
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
|
||||
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
|
||||
QMFILES="$QMFILES $srcdirpre$lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
# CATALOGS depends on both $ac_dir and the user's LINGUAS
|
||||
# environment variable.
|
||||
INST_LINGUAS=
|
||||
if test -n "$ALL_LINGUAS"; then
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "$LINGUAS"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
INST_LINGUAS="$INST_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
CATALOGS=
|
||||
JAVACATALOGS=
|
||||
QTCATALOGS=
|
||||
TCLCATALOGS=
|
||||
CSHARPCATALOGS=
|
||||
if test -n "$INST_LINGUAS"; then
|
||||
for lang in $INST_LINGUAS; do
|
||||
CATALOGS="$CATALOGS $lang.gmo"
|
||||
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
|
||||
QTCATALOGS="$QTCATALOGS $lang.qm"
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
|
||||
done
|
||||
fi
|
||||
|
||||
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
|
||||
if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
|
||||
# Add dependencies that cannot be formulated as a simple suffix rule.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
$frobbedlang.msg: $lang.po
|
||||
@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
|
||||
\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
|
||||
# Add dependencies that cannot be formulated as a simple suffix rule.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
|
||||
@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
|
||||
\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
|
||||
EOF
|
||||
done
|
||||
fi
|
||||
if test -n "$POMAKEFILEDEPS"; then
|
||||
cat >> "$ac_file.tmp" <<EOF
|
||||
Makefile: $POMAKEFILEDEPS
|
||||
EOF
|
||||
fi
|
||||
mv "$ac_file.tmp" "$ac_file"
|
||||
])
|
||||
|
||||
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
|
||||
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
|
||||
[
|
||||
XGETTEXT_EXTRA_OPTIONS=
|
||||
])
|
||||
|
||||
dnl Registers an option to be passed to xgettext in the po subdirectory.
|
||||
AC_DEFUN([AM_XGETTEXT_OPTION],
|
||||
[
|
||||
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
|
||||
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
|
||||
])
|
|
@ -1,92 +0,0 @@
|
|||
# progtest.m4 serial 6 (gettext-0.18)
|
||||
dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
dnl This file can can be used in projects which are not available under
|
||||
dnl the GNU General Public License or the GNU Library General Public
|
||||
dnl License but which still want to provide support for the GNU gettext
|
||||
dnl functionality.
|
||||
dnl Please note that the actual code of the GNU gettext library is covered
|
||||
dnl by the GNU Library General Public License, and the rest of the GNU
|
||||
dnl gettext package package is covered by the GNU General Public License.
|
||||
dnl They are *not* in the public domain.
|
||||
|
||||
dnl Authors:
|
||||
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||
|
||||
AC_PREREQ([2.50])
|
||||
|
||||
# Search path for a program which passes the given test.
|
||||
|
||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||
[
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
|
||||
# Find out how to test for executable files. Don't use a zero-byte file,
|
||||
# as systems may use methods other than mode bits to determine executability.
|
||||
cat >conf$$.file <<_ASEOF
|
||||
#! /bin/sh
|
||||
exit 0
|
||||
_ASEOF
|
||||
chmod +x conf$$.file
|
||||
if test -x conf$$.file >/dev/null 2>&1; then
|
||||
ac_executable_p="test -x"
|
||||
else
|
||||
ac_executable_p="test -f"
|
||||
fi
|
||||
rm -f conf$$.file
|
||||
|
||||
# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL([ac_cv_path_$1],
|
||||
[case "[$]$1" in
|
||||
[[\\/]]* | ?:[[\\/]]*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
IFS="$ac_save_IFS"
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
|
||||
echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
|
||||
break 2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS="$ac_save_IFS"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
||||
AC_MSG_RESULT([$][$1])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST([$1])dnl
|
||||
])
|
|
@ -0,0 +1,16 @@
|
|||
include ../rules
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
PACKAGE_PIXMAPS_DIR = @datarootdir@/pixmaps/@PACKAGE_TARNAME@
|
||||
|
||||
all:
|
||||
clean:
|
||||
|
||||
install:
|
||||
$(top_srcdir)/mkinstalldirs $(PACKAGE_PIXMAPS_DIR)
|
||||
$(INSTALL) -m 0644 $(PIXMAPS_OBJECTS) $(PACKAGE_PIXMAPS_DIR)
|
||||
|
||||
distclean:
|
||||
/bin/rm -f Makefile
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
|
@ -0,0 +1,307 @@
|
|||
# BotCommander gettext messages.
|
||||
# Original file created by Gergely POLONKAI for BotCommander v1.0
|
||||
|
||||
#: src/widgets.c:223
|
||||
msgid "_About"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:103
|
||||
msgid "Activate"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:180
|
||||
msgid "Add bot"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:114
|
||||
msgid "_BotCommander command mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:351
|
||||
msgid "Bot list"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:147
|
||||
msgid "_Bot list"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:384
|
||||
#: src/botlist.c:482
|
||||
msgid "Bot name"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:106
|
||||
msgid "_Bot"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:510
|
||||
msgid "Can not connect to bot"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:504
|
||||
msgid "Can not get IP protocol"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:507
|
||||
msgid "Can not resolv hostname %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:247
|
||||
msgid "Change to message mode after connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:253
|
||||
msgid "Change to newly created tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:309
|
||||
msgid "Channels"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:269
|
||||
msgid "Close active tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:200
|
||||
msgid "_Close tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:265
|
||||
msgid "Command line history length"
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:357
|
||||
msgid "Connected"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:131
|
||||
#: src/networking.c:53
|
||||
msgid "Connecting to %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:93
|
||||
#: src/commands.c:108
|
||||
msgid "Connecting to %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:593
|
||||
msgid "Connection closed"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:357
|
||||
msgid "_Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:240
|
||||
msgid "Debug mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:88
|
||||
msgid "Edit bot"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:123
|
||||
msgid "_Eggdrop command mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:267
|
||||
msgid "Exit BotCommander"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:91
|
||||
msgid "E_xit"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:306
|
||||
msgid "Font"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:494
|
||||
msgid "Handle"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:323
|
||||
msgid "Handles"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:237
|
||||
msgid "_Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:486
|
||||
msgid "Host"
|
||||
msgstr ""
|
||||
|
||||
#: src/about.c:52
|
||||
msgid "licence"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:131
|
||||
msgid "_Message mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:170
|
||||
msgid "Mode char can be one of B, E or M!"
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:93
|
||||
#: src/callbacks.c:94
|
||||
#: src/main.c:45
|
||||
#: src/main.c:46
|
||||
#: src/tabs.c:362
|
||||
#: src/tabs.c:363
|
||||
#: src/tabs.c:460
|
||||
#: src/tabs.c:461
|
||||
#: src/widgets.c:291
|
||||
#: src/widgets.c:292
|
||||
#: src/widgets.c:139
|
||||
#: src/widgets.c:185
|
||||
msgid "Mode: %c"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:268
|
||||
msgid "New tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:102
|
||||
#: src/commands.c:143
|
||||
msgid "No bot exists by that name"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:86
|
||||
msgid "No bot is assigned to this tab. Use ASSIGN to do that."
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:335
|
||||
#: src/tabs.c:360
|
||||
msgid "Not connected"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:124
|
||||
#: src/commands.c:261
|
||||
msgid "Not enough memory!"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:154
|
||||
#: src/commands.c:275
|
||||
msgid "Not enough parameters!"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:159
|
||||
msgid "Only one parameter required!"
|
||||
msgstr ""
|
||||
|
||||
#: src/botlist.c:490
|
||||
msgid "Port"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:162
|
||||
msgid "_Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:270
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:107
|
||||
#: src/tabs.c:124
|
||||
#: src/tabs.c:141
|
||||
msgid "Properties"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:295
|
||||
msgid "Saturation"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:259
|
||||
msgid "Save preferences on exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:285
|
||||
msgid "Scroll on output"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:119
|
||||
msgid "Second parameter must be a port number!"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:228
|
||||
msgid "Setup"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:177
|
||||
msgid "_Setup"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:583
|
||||
msgid "Tab is not connected"
|
||||
msgstr ""
|
||||
|
||||
#: src/widgets.c:215
|
||||
msgid "_Tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:280
|
||||
msgid "Terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:164
|
||||
msgid "The parameter must be one character!"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.c:84
|
||||
msgid "There are connected tabs. Are you sure, you want to exit?"
|
||||
msgstr ""
|
||||
|
||||
#: src/bots.c:75
|
||||
msgid "There is already a bot named %s in the list.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:109
|
||||
msgid "There was an error accessing GConf2: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:271
|
||||
msgid "This command cannot be abbreviated!"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:81
|
||||
msgid "This tab is already connected. Exit the bot with .quit, or use /DISCONNECT!"
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:431
|
||||
msgid "This tab is connected. Are you sure you want to close it?"
|
||||
msgstr ""
|
||||
|
||||
#: src/about.c:51
|
||||
msgid "translator_credits"
|
||||
msgstr ""
|
||||
|
||||
#: src/setup.c:290
|
||||
msgid "Transparent background"
|
||||
msgstr ""
|
||||
|
||||
#: src/commands.c:281
|
||||
msgid "Unknown command \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#: src/tabs.c:516
|
||||
msgid "Unknown error!"
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:141
|
||||
msgid "Won't send an eggdrop command to a not connected tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/callbacks.c:162
|
||||
msgid "Won't send message to a not connected tab"
|
||||
msgstr ""
|
||||
|
||||
#: data/botcommander.desktop.in.in
|
||||
msgid "BotCommander"
|
||||
msgstr ""
|
||||
|
||||
#: data/botcommander.desktop.in.in
|
||||
msgstr "BotCommander eggdrop client"
|
||||
msgid ""
|
||||
|
12
po/ChangeLog
12
po/ChangeLog
|
@ -1,12 +0,0 @@
|
|||
2010-10-07 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: New file, from gettext-0.18.1.
|
||||
* Rules-quot: New file, from gettext-0.18.1.
|
||||
* boldquot.sed: New file, from gettext-0.18.1.
|
||||
* en@boldquot.header: New file, from gettext-0.18.1.
|
||||
* en@quot.header: New file, from gettext-0.18.1.
|
||||
* insert-header.sin: New file, from gettext-0.18.1.
|
||||
* quot.sed: New file, from gettext-0.18.1.
|
||||
* remove-potcdate.sin: New file, from gettext-0.18.1.
|
||||
* POTFILES.in: New file.
|
||||
|
|
@ -1,443 +1,220 @@
|
|||
# Makefile for PO directory in any package using GNU gettext.
|
||||
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU General Public
|
||||
# License but which still want to provide support for the GNU gettext
|
||||
# functionality.
|
||||
# Please note that the actual code of GNU gettext is covered by the GNU
|
||||
# General Public License and is *not* in the public domain.
|
||||
# This file file be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
#
|
||||
# Origin: gettext-0.18
|
||||
GETTEXT_MACRO_VERSION = 0.18
|
||||
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
|
||||
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
|
||||
#
|
||||
# - Modified by jacob berkman <jacob@ximian.com> to install
|
||||
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
|
||||
#
|
||||
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
|
||||
#
|
||||
# We have the following line for use by intltoolize:
|
||||
# INTLTOOL_MAKEFILE
|
||||
|
||||
include ../rules
|
||||
|
||||
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ..
|
||||
VPATH = @srcdir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
localedir = @localedir@
|
||||
gettextsrcdir = $(datadir)/gettext/po
|
||||
libdir = @libdir@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
|
||||
subdir = po
|
||||
install_sh = @INSTALL@
|
||||
# Automake >= 1.8 provides @mkdir_p@.
|
||||
# Until it can be supposed, use the safe fallback:
|
||||
mkdir_p = $(install_sh) -d
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
|
||||
# We use $(mkdir_p).
|
||||
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
|
||||
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
|
||||
# @install_sh@ does not start with $(SHELL), so we add it.
|
||||
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
|
||||
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
|
||||
# versions, $(mkinstalldirs) and $(install_sh) are unused.
|
||||
mkinstalldirs = $(SHELL) @install_sh@ -d
|
||||
install_sh = $(SHELL) @install_sh@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
mkdir_p = @mkdir_p@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
|
||||
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
|
||||
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
|
||||
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
|
||||
|
||||
GMSGFMT_ = @GMSGFMT@
|
||||
GMSGFMT_no = @GMSGFMT@
|
||||
GMSGFMT_yes = @GMSGFMT_015@
|
||||
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
|
||||
MSGFMT_ = @MSGFMT@
|
||||
MSGFMT_no = @MSGFMT@
|
||||
MSGFMT_yes = @MSGFMT_015@
|
||||
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
|
||||
XGETTEXT_ = @XGETTEXT@
|
||||
XGETTEXT_no = @XGETTEXT@
|
||||
XGETTEXT_yes = @XGETTEXT_015@
|
||||
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
|
||||
MSGMERGE = msgmerge
|
||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||
MSGINIT = msginit
|
||||
MSGCONV = msgconv
|
||||
MSGFILTER = msgfilter
|
||||
ALL_LINGUAS = @ALL_LINGUAS@
|
||||
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
UPDATEPOFILES = @UPDATEPOFILES@
|
||||
DUMMYPOFILES = @DUMMYPOFILES@
|
||||
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
|
||||
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
|
||||
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
|
||||
$(POFILES) $(GMOFILES) \
|
||||
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
|
||||
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
|
||||
|
||||
POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
|
||||
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
|
||||
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
|
||||
|
||||
POTFILES = \
|
||||
#This Gets Replace for some reason
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
|
||||
# Makevars gets inserted here. (Don't remove this line!)
|
||||
CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
|
||||
.SUFFIXES: .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
@echo "$(MSGFMT) -c -o $@ $<"; \
|
||||
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
@lang=`echo $* | sed -e 's,.*/,,'`; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
|
||||
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
|
||||
file=`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.sin.sed:
|
||||
sed -e '/^#/d' $< > t-$@
|
||||
mv t-$@ $@
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && gencat $@ $*.msg
|
||||
|
||||
|
||||
all: check-macro-version all-@USE_NLS@
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: stamp-po
|
||||
all-yes: $(CATALOGS)
|
||||
all-no:
|
||||
|
||||
# Ensure that the gettext macros and this Makefile.in.in are in sync.
|
||||
check-macro-version:
|
||||
@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
|
||||
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
|
||||
exit 1; \
|
||||
}
|
||||
$(GETTEXT_PACKAGE).pot: $(POTFILES)
|
||||
$(GENPOT)
|
||||
|
||||
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
|
||||
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
|
||||
# we don't want to bother translators with empty POT files). We assume that
|
||||
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
|
||||
# In this case, stamp-po is a nop (i.e. a phony target).
|
||||
|
||||
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
|
||||
# been loosely updated. Its purpose is that when a developer or translator
|
||||
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
|
||||
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
|
||||
# invocations of "make" will do nothing. This timestamp would not be necessary
|
||||
# if updating the $(CATALOGS) would always touch them; however, the rule for
|
||||
# $(POFILES) has been designed to not touch files that don't need to be
|
||||
# changed.
|
||||
stamp-po: $(srcdir)/$(DOMAIN).pot
|
||||
test ! -f $(srcdir)/$(DOMAIN).pot || \
|
||||
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
|
||||
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
|
||||
echo "touch stamp-po" && \
|
||||
echo timestamp > stamp-poT && \
|
||||
mv stamp-poT stamp-po; \
|
||||
}
|
||||
|
||||
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
|
||||
# otherwise packages like GCC can not be built if only parts of the source
|
||||
# have been downloaded.
|
||||
|
||||
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
|
||||
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
|
||||
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
|
||||
if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
|
||||
package_gnu='GNU '; \
|
||||
else \
|
||||
package_gnu=''; \
|
||||
fi; \
|
||||
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
|
||||
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
|
||||
else \
|
||||
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
|
||||
fi; \
|
||||
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address" \
|
||||
;; \
|
||||
*) \
|
||||
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
|
||||
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
|
||||
--files-from=$(srcdir)/POTFILES.in \
|
||||
--copyright-holder='$(COPYRIGHT_HOLDER)' \
|
||||
--package-name="$${package_gnu}@PACKAGE@" \
|
||||
--package-version='@VERSION@' \
|
||||
--msgid-bugs-address="$$msgid_bugs_address" \
|
||||
;; \
|
||||
esac
|
||||
test ! -f $(DOMAIN).po || { \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
|
||||
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
|
||||
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
|
||||
else \
|
||||
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
|
||||
fi; \
|
||||
}
|
||||
|
||||
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
|
||||
# every "make" invocation, only create it when it is missing.
|
||||
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
|
||||
$(srcdir)/$(DOMAIN).pot:
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
|
||||
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
|
||||
# Note that a PO file is not touched if it doesn't need to be changed.
|
||||
$(POFILES): $(srcdir)/$(DOMAIN).pot
|
||||
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
|
||||
if test -f "$(srcdir)/$${lang}.po"; then \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
|
||||
cd $(srcdir) \
|
||||
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
|
||||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
|
||||
*) \
|
||||
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
|
||||
esac; \
|
||||
}; \
|
||||
else \
|
||||
$(MAKE) $${lang}.po-create; \
|
||||
fi
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install: install-data
|
||||
install-data: install-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
for file in Makevars; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkdir_p) $(DESTDIR)$$dir; \
|
||||
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
|
||||
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
|
||||
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
|
||||
fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
install-strip: install
|
||||
|
||||
installdirs: installdirs-exec installdirs-data
|
||||
installdirs-exec:
|
||||
installdirs-data: installdirs-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
|
||||
$(mkdir_p) $(DESTDIR)$(itlocaledir)
|
||||
if test -n "$(PO_LINGUAS)"; then \
|
||||
linguas="$(PO_LINGUAS)"; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
installdirs-data-no:
|
||||
installdirs-data-yes:
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkdir_p) $(DESTDIR)$$dir; \
|
||||
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
if test -n "$$lc"; then \
|
||||
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
|
||||
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
|
||||
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
|
||||
for file in *; do \
|
||||
if test -f $$file; then \
|
||||
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
|
||||
fi; \
|
||||
done); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
|
||||
else \
|
||||
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
|
||||
:; \
|
||||
else \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
|
||||
fi; \
|
||||
fi; \
|
||||
linguas="$(ALL_LINGUAS)"; \
|
||||
fi; \
|
||||
for lang in $$linguas; do \
|
||||
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
|
||||
$(mkdir_p) $$dir; \
|
||||
if test -r $$lang.gmo; then \
|
||||
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
|
||||
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
|
||||
echo "installing $(srcdir)/$$lang.gmo as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE).mo"; \
|
||||
fi; \
|
||||
if test -r $$lang.gmo.m; then \
|
||||
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
|
||||
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$lang.gmo.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
|
||||
$$dir/$(GETTEXT_PACKAGE).mo.m; \
|
||||
echo "installing $(srcdir)/$$lang.gmo.m as" \
|
||||
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
done; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Empty stubs to satisfy archaic automake needs
|
||||
dvi info tags TAGS ID:
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall: uninstall-exec uninstall-data
|
||||
uninstall-exec:
|
||||
uninstall-data: uninstall-data-@USE_NLS@
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
for file in $(DISTFILES.common) Makevars.template; do \
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||
done; \
|
||||
uninstall:
|
||||
if test -n "$(PO_LINGUAS)"; then \
|
||||
linguas="$(PO_LINGUAS)"; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
uninstall-data-no:
|
||||
uninstall-data-yes:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
|
||||
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
|
||||
done; \
|
||||
linguas="$(ALL_LINGUAS)"; \
|
||||
fi; \
|
||||
for lang in $$linguas; do \
|
||||
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
|
||||
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
|
||||
done
|
||||
|
||||
check: all
|
||||
|
||||
info dvi ps pdf html tags TAGS ctags CTAGS ID:
|
||||
check: all $(GETTEXT_PACKAGE).pot
|
||||
|
||||
mostlyclean:
|
||||
rm -f remove-potcdate.sed
|
||||
rm -f stamp-poT
|
||||
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
|
||||
rm -fr *.o
|
||||
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
|
||||
rm -f .intltool-merge-cache
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo
|
||||
rm -f Makefile Makefile.in POTFILES stamp-it
|
||||
rm -f *.mo *.msg *.cat *.cat.m *.gmo
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f stamp-po $(GMOFILES)
|
||||
rm -f Makefile.in.in
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir:
|
||||
$(MAKE) update-po
|
||||
@$(MAKE) dist2
|
||||
# This is a separate target because 'update-po' must be executed before.
|
||||
dist2: stamp-po $(DISTFILES)
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then \
|
||||
dists="$$dists Makevars.template"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/$(DOMAIN).pot; then \
|
||||
dists="$$dists $(DOMAIN).pot stamp-po"; \
|
||||
fi; \
|
||||
if test -f $(srcdir)/ChangeLog; then \
|
||||
dists="$$dists ChangeLog"; \
|
||||
fi; \
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do \
|
||||
if test -f $(srcdir)/ChangeLog.$$i; then \
|
||||
dists="$$dists ChangeLog.$$i"; \
|
||||
fi; \
|
||||
extra_dists="$(EXTRA_DISTFILES)"; \
|
||||
for file in $$extra_dists; do \
|
||||
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
|
||||
done; \
|
||||
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
|
||||
for file in $$dists; do \
|
||||
if test -f $$file; then \
|
||||
cp -p $$file $(distdir) || exit 1; \
|
||||
else \
|
||||
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
|
||||
fi; \
|
||||
test -f $$file || file="$(srcdir)/$$file"; \
|
||||
ln $$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(DOMAIN).pot-update
|
||||
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
|
||||
$(MAKE) update-gmo
|
||||
|
||||
# General rule for creating PO files.
|
||||
|
||||
.nop.po-create:
|
||||
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
|
||||
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
|
||||
exit 1
|
||||
|
||||
# General rule for updating PO files.
|
||||
|
||||
.nop.po-update:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||
$(MAKE) $(GETTEXT_PACKAGE).pot
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
|
||||
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
|
||||
cd $(srcdir); \
|
||||
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
|
||||
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
|
||||
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
|
||||
*) \
|
||||
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
|
||||
esac; \
|
||||
}; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
if test -n "$(PO_LINGUAS)"; then \
|
||||
linguas="$(PO_LINGUAS)"; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
linguas="$(ALL_LINGUAS)"; \
|
||||
fi; \
|
||||
for lang in $$linguas; do \
|
||||
echo "$$lang:"; \
|
||||
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
|
||||
if $$result; then \
|
||||
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "msgmerge for $$lang.gmo failed!"; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
Makefile POTFILES: stamp-it
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-it; \
|
||||
$(MAKE) stamp-it; \
|
||||
fi
|
||||
|
||||
$(DUMMYPOFILES):
|
||||
|
||||
update-gmo: Makefile $(GMOFILES)
|
||||
@:
|
||||
|
||||
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
|
||||
# because execution permission bits may not work on the current file system.
|
||||
# Use @SHELL@, which is the shell determined by autoconf for the use by its
|
||||
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
|
||||
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
|
||||
cd $(top_builddir) \
|
||||
&& @SHELL@ ./config.status $(subdir)/$@.in po-directories
|
||||
|
||||
force:
|
||||
stamp-it: Makefile.in.in ../config.status POTFILES.in
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
|
||||
$(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
41
po/Makevars
41
po/Makevars
|
@ -1,41 +0,0 @@
|
|||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Gergely Polonkai (W00d5t0ck)
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS = polesz@w00d5t0ck.info
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
|
@ -1,2 +1,13 @@
|
|||
# List of source files which contain translatable strings.
|
||||
src/main.c
|
||||
# List of source files containing translatable strings.
|
||||
# Please keep this list in alphabetical order.
|
||||
../src/about.c
|
||||
../src/botlist.c
|
||||
../src/bots.c
|
||||
../src/callbacks.c
|
||||
../src/commands.c
|
||||
../src/config.c
|
||||
../src/main.c
|
||||
../src/networking.c
|
||||
../src/setup.c
|
||||
../src/tabs.c
|
||||
../src/widgets.c
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
# Special Makefile rules for English message catalogs with quotation marks.
|
||||
|
||||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
|
||||
|
||||
.SUFFIXES: .insert-header .po-update-en
|
||||
|
||||
en@quot.po-create:
|
||||
$(MAKE) en@quot.po-update
|
||||
en@boldquot.po-create:
|
||||
$(MAKE) en@boldquot.po-update
|
||||
|
||||
en@quot.po-update: en@quot.po-update-en
|
||||
en@boldquot.po-update: en@boldquot.po-update-en
|
||||
|
||||
.insert-header.po-update-en:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
ll=`echo $$lang | sed -e 's/@.*//'`; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
en@quot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
|
||||
|
||||
en@boldquot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
|
||||
|
||||
mostlyclean: mostlyclean-quot
|
||||
mostlyclean-quot:
|
||||
rm -f *.insert-header
|
|
@ -1,10 +0,0 @@
|
|||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
s/“/“[1m/g
|
||||
s/”/[0m”/g
|
||||
s/‘/‘[1m/g
|
||||
s/’/[0m’/g
|
|
@ -1,23 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Gergely Polonkai (W00d5t0ck)
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: botcommander 1.0\n"
|
||||
"Report-Msgid-Bugs-To: polesz@w00d5t0ck.info\n"
|
||||
"POT-Creation-Date: 2013-01-04 23:38+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/main.c:6
|
||||
#, c-format
|
||||
msgid "Hello!\n"
|
||||
msgstr "Szia!\n"
|
|
@ -1,25 +0,0 @@
|
|||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
# This catalog furthermore displays the text between the quotation marks in
|
||||
# bold face, assuming the VT100/XTerm escape sequences.
|
||||
#
|
|
@ -1,22 +0,0 @@
|
|||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
|
@ -0,0 +1,324 @@
|
|||
# Magyar translation of BotCommander.
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
# Gergely POLONKAI <polesz@w00d5t0ck.info>, 2006.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: BotCommander 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-09-08 11:43+0200\n"
|
||||
"PO-Revision-Date: 2006-09-08 12:02+0200\n"
|
||||
"Last-Translator: Gergely POLONKAI <polesz@w00d5t0ck.info>\n"
|
||||
"Language-Team: Hungarian <hu@gnome.hu>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: "
|
||||
|
||||
# BotCommander gettext messages.
|
||||
# Original file created by Gergely POLONKAI for BotCommander v1.0
|
||||
#: src/widgets.c:223
|
||||
msgid "_About"
|
||||
msgstr "_Névjegy"
|
||||
|
||||
#: src/tabs.c:103
|
||||
msgid "Activate"
|
||||
msgstr "Aktiválás"
|
||||
|
||||
#: src/botlist.c:180
|
||||
msgid "Add bot"
|
||||
msgstr "Új bot"
|
||||
|
||||
#: src/widgets.c:114
|
||||
msgid "_BotCommander command mode"
|
||||
msgstr "_BotCommander parancs mód"
|
||||
|
||||
#: src/botlist.c:351
|
||||
msgid "Bot list"
|
||||
msgstr "Bot lista"
|
||||
|
||||
#: src/widgets.c:147
|
||||
msgid "_Bot list"
|
||||
msgstr "Bot _lista"
|
||||
|
||||
#: src/botlist.c:384
|
||||
#: src/botlist.c:482
|
||||
msgid "Bot name"
|
||||
msgstr "Bot neve"
|
||||
|
||||
#: src/widgets.c:106
|
||||
msgid "_Bot"
|
||||
msgstr "_Bot"
|
||||
|
||||
#: src/tabs.c:510
|
||||
msgid "Can not connect to bot"
|
||||
msgstr "Nem tudok csatlakozni a bothoz"
|
||||
|
||||
#: src/tabs.c:504
|
||||
msgid "Can not get IP protocol"
|
||||
msgstr "Nem találom az IP protokol adatait"
|
||||
|
||||
#: src/tabs.c:507
|
||||
msgid "Can not resolv hostname %s"
|
||||
msgstr "Nem lehet feloldani a nevet (%s)"
|
||||
|
||||
#: src/setup.c:247
|
||||
msgid "Change to message mode after connect"
|
||||
msgstr "Váltás üzenet-módba csatlakozás után"
|
||||
|
||||
#: src/setup.c:253
|
||||
msgid "Change to newly created tab"
|
||||
msgstr "Új fül nyitásakor váltás az új fülre"
|
||||
|
||||
#: src/tabs.c:309
|
||||
msgid "Channels"
|
||||
msgstr "Csatornák"
|
||||
|
||||
#: src/widgets.c:269
|
||||
msgid "Close active tab"
|
||||
msgstr "Aktív fül bezárása"
|
||||
|
||||
#: src/widgets.c:200
|
||||
msgid "_Close tab"
|
||||
msgstr "Fül be_zárása"
|
||||
|
||||
#: src/setup.c:265
|
||||
msgid "Command line history length"
|
||||
msgstr "Parancssor-megőrzés hossza"
|
||||
|
||||
#: src/callbacks.c:357
|
||||
msgid "Connected"
|
||||
msgstr "Csatlakozva"
|
||||
|
||||
#: src/commands.c:131
|
||||
#: src/networking.c:53
|
||||
msgid "Connecting to %s:%d"
|
||||
msgstr "Csatlakozás ide: %s:%d"
|
||||
|
||||
#: src/commands.c:93
|
||||
#: src/commands.c:108
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Csatlakozás ehhez: %s"
|
||||
|
||||
#: src/tabs.c:593
|
||||
msgid "Connection closed"
|
||||
msgstr "Kapcsolat lezárva"
|
||||
|
||||
#: src/botlist.c:357
|
||||
msgid "_Connect"
|
||||
msgstr "_Csatlakozás"
|
||||
|
||||
#: src/setup.c:240
|
||||
msgid "Debug mode"
|
||||
msgstr "Debug mód"
|
||||
|
||||
#: src/botlist.c:88
|
||||
msgid "Edit bot"
|
||||
msgstr "Bot szerkesztése"
|
||||
|
||||
#: src/widgets.c:123
|
||||
msgid "_Eggdrop command mode"
|
||||
msgstr "_Eggdrop parancs mód"
|
||||
|
||||
#: src/widgets.c:267
|
||||
msgid "Exit BotCommander"
|
||||
msgstr "Kilépés a BotCommanderből"
|
||||
|
||||
#: src/widgets.c:91
|
||||
msgid "E_xit"
|
||||
msgstr "K_ilépés"
|
||||
|
||||
#: src/setup.c:306
|
||||
msgid "Font"
|
||||
msgstr "Betűtípus"
|
||||
|
||||
#: src/botlist.c:494
|
||||
msgid "Handle"
|
||||
msgstr "Felhasználónév"
|
||||
|
||||
#: src/tabs.c:323
|
||||
msgid "Handles"
|
||||
msgstr "Felhasználók"
|
||||
|
||||
#: src/widgets.c:237
|
||||
msgid "_Help"
|
||||
msgstr "_Súgó"
|
||||
|
||||
#: src/botlist.c:486
|
||||
msgid "Host"
|
||||
msgstr "Cím"
|
||||
|
||||
#: src/about.c:52
|
||||
msgid "licence"
|
||||
msgstr "A BotCommander a GNU General Public Licence alatt készült. Ennek egy másolata megtalálható a program forrás-fájljai között."
|
||||
|
||||
#: src/widgets.c:131
|
||||
msgid "_Message mode"
|
||||
msgstr "Üzenet _mód"
|
||||
|
||||
#: src/commands.c:170
|
||||
msgid "Mode char can be one of B, E or M!"
|
||||
msgstr "A mód karakter csak B, E vagy M lehet!"
|
||||
|
||||
#: src/callbacks.c:93
|
||||
#: src/callbacks.c:94
|
||||
#: src/main.c:45
|
||||
#: src/main.c:46
|
||||
#: src/tabs.c:362
|
||||
#: src/tabs.c:363
|
||||
#: src/tabs.c:460
|
||||
#: src/tabs.c:461
|
||||
#: src/widgets.c:291
|
||||
#: src/widgets.c:292
|
||||
#: src/widgets.c:139
|
||||
#: src/widgets.c:185
|
||||
msgid "Mode: %c"
|
||||
msgstr "Mód: %c"
|
||||
|
||||
#: src/widgets.c:268
|
||||
msgid "New tab"
|
||||
msgstr "Új fül"
|
||||
|
||||
#: src/commands.c:102
|
||||
#: src/commands.c:143
|
||||
msgid "No bot exists by that name"
|
||||
msgstr "Nem létezik ilyen nevű bot"
|
||||
|
||||
#: src/commands.c:86
|
||||
msgid "No bot is assigned to this tab. Use ASSIGN to do that."
|
||||
msgstr "Nincs bot rendelve ehhez a fülhöz. A hozzárendeléshez használd az ASSIGN parancsot."
|
||||
|
||||
#: src/tabs.c:335
|
||||
#: src/tabs.c:360
|
||||
msgid "Not connected"
|
||||
msgstr "Nincs csatlakoztatva"
|
||||
|
||||
#: src/commands.c:124
|
||||
#: src/commands.c:261
|
||||
msgid "Not enough memory!"
|
||||
msgstr "Nincs elég memória!"
|
||||
|
||||
#: src/commands.c:154
|
||||
#: src/commands.c:275
|
||||
msgid "Not enough parameters!"
|
||||
msgstr "Túl kevés paraméter!"
|
||||
|
||||
#: src/commands.c:159
|
||||
msgid "Only one parameter required!"
|
||||
msgstr "Csak egy paramétert kell megadni!"
|
||||
|
||||
#: src/botlist.c:490
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
#: src/widgets.c:162
|
||||
msgid "_Preferences"
|
||||
msgstr "_Beállítás"
|
||||
|
||||
#: src/widgets.c:270
|
||||
msgid "Preferences"
|
||||
msgstr "Beállítások"
|
||||
|
||||
#: src/tabs.c:107
|
||||
#: src/tabs.c:124
|
||||
#: src/tabs.c:141
|
||||
msgid "Properties"
|
||||
msgstr "Tulajdonságok"
|
||||
|
||||
#: src/setup.c:295
|
||||
msgid "Saturation"
|
||||
msgstr "Áttetszőség"
|
||||
|
||||
#: src/setup.c:259
|
||||
msgid "Save preferences on exit"
|
||||
msgstr "Beállítások mentése kilépéskor"
|
||||
|
||||
#: src/setup.c:285
|
||||
msgid "Scroll on output"
|
||||
msgstr "Automatikus görgetés"
|
||||
|
||||
#: src/commands.c:119
|
||||
msgid "Second parameter must be a port number!"
|
||||
msgstr "A második paraméternek portszámnak kell lennie!"
|
||||
|
||||
#: src/setup.c:228
|
||||
msgid "Setup"
|
||||
msgstr "Beállítás"
|
||||
|
||||
#: src/widgets.c:177
|
||||
msgid "_Setup"
|
||||
msgstr "B_eállítás"
|
||||
|
||||
#: src/tabs.c:583
|
||||
msgid "Tab is not connected"
|
||||
msgstr "A fül nincs csatlakozva"
|
||||
|
||||
#: src/widgets.c:215
|
||||
msgid "_Tab"
|
||||
msgstr "_Fül"
|
||||
|
||||
#: src/setup.c:280
|
||||
msgid "Terminal"
|
||||
msgstr "Terminál"
|
||||
|
||||
#: src/commands.c:164
|
||||
msgid "The parameter must be one character!"
|
||||
msgstr "A paraméternek egy karakter hosszúnak kell lennie!"
|
||||
|
||||
#: src/main.c:84
|
||||
msgid "There are connected tabs. Are you sure, you want to exit?"
|
||||
msgstr "Még vannak csatlakozott fülek. Biztosan ki akarsz lépni?"
|
||||
|
||||
#: src/bots.c:75
|
||||
msgid "There is already a bot named %s in the list.\n"
|
||||
msgstr "Már van %s nevű bot a listában\n"
|
||||
|
||||
#: src/config.c:109
|
||||
msgid "There was an error accessing GConf2: %s"
|
||||
msgstr "Hiba történt a GConf2 elérése közben: %s"
|
||||
|
||||
#: src/commands.c:271
|
||||
msgid "This command cannot be abbreviated!"
|
||||
msgstr "Ezt a parancsot nem lehet rövidíteni!"
|
||||
|
||||
#: src/commands.c:81
|
||||
msgid "This tab is already connected. Exit the bot with .quit, or use /DISCONNECT!"
|
||||
msgstr "A fül csatlakoztatva van. Lépj ki a botból a .quit paranccsal, vagy használd a /DISCONNECT-et!"
|
||||
|
||||
#: src/tabs.c:431
|
||||
msgid "This tab is connected. Are you sure you want to close it?"
|
||||
msgstr "A fül csatlakoztatva van. Biztosan bezárod?"
|
||||
|
||||
#: src/about.c:51
|
||||
msgid "translator_credits"
|
||||
msgstr "Fordította: POLONKAI Gergely <polesz@w00d5t0ck.info>"
|
||||
|
||||
#: src/setup.c:290
|
||||
msgid "Transparent background"
|
||||
msgstr "Áttetsző háttér"
|
||||
|
||||
#: src/commands.c:281
|
||||
msgid "Unknown command \"%s\""
|
||||
msgstr "Ismeretlen parancs: %s"
|
||||
|
||||
#: src/tabs.c:516
|
||||
msgid "Unknown error!"
|
||||
msgstr "Ismeretlen hiba!"
|
||||
|
||||
#: src/callbacks.c:141
|
||||
msgid "Won't send an eggdrop command to a not connected tab"
|
||||
msgstr "Nem küldhetek eggdrop parancsot egy nem csatlakoztatott fülön"
|
||||
|
||||
#: src/callbacks.c:162
|
||||
msgid "Won't send message to a not connected tab"
|
||||
msgstr "Nem küldhetek üzenetet egy nem csatlakoztatott fülön"
|
||||
|
||||
#: data/botcommander.desktop.in.in
|
||||
msgid "BotCommander"
|
||||
msgstr "BotCommander"
|
||||
|
||||
#: data/botcommander.desktop.in.in
|
||||
msgid "BotCommander eggdrop client"
|
||||
msgstr "BotCommander eggdrop kliens"
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# Sed script that inserts the file called HEADER before the header entry.
|
||||
#
|
||||
# At each occurrence of a line starting with "msgid ", we execute the following
|
||||
# commands. At the first occurrence, insert the file. At the following
|
||||
# occurrences, do nothing. The distinction between the first and the following
|
||||
# occurrences is achieved by looking at the hold space.
|
||||
/^msgid /{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/m/m/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Read the file.
|
||||
r HEADER
|
||||
# Output the file's contents by reading the next line. But don't lose the
|
||||
# current line while doing this.
|
||||
g
|
||||
N
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
|
@ -1,19 +0,0 @@
|
|||
# Sed script that remove the POT-Creation-Date line in the header entry
|
||||
# from a POT file.
|
||||
#
|
||||
# The distinction between the first and the following occurrences of the
|
||||
# pattern is achieved by looking at the hold space.
|
||||
/^"POT-Creation-Date: .*"$/{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/P/P/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Remove the line.
|
||||
g
|
||||
d
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
C_OBJECTS = main.@OBJEXT@ widgets.@OBJEXT@ callbacks.@OBJEXT@ tabs.@OBJEXT@ string.@OBJEXT@ bots.@OBJEXT@ commands.@OBJEXT@ config.@OBJEXT@ setup.@OBJEXT@ about.@OBJEXT@ networking.@OBJEXT@ history.@OBJEXT@ botlist.@OBJEXT@ debug.@OBJEXT@ chanprops.@OBJEXT@
|
||||
DOC_OBJECTS = botcommander.pdf
|
||||
RM = rm -f
|
||||
PIXMAPS_OBJECTS = bc48.png bc48_trans.png
|
||||
INSTALL = @INSTALL@
|
||||
EXE = botcommander@EXEEXT@
|
||||
prefix = ${DESTDIR}@prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
|
@ -1,5 +0,0 @@
|
|||
bin_PROGRAMS = botcommander
|
||||
AM_CPPFLAGS = $(GTK_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
|
||||
|
||||
botcommander_SOURCES = main.c
|
||||
botcommander_LDADD = $(GTK_LIBS) @LIBINTL@
|
|
@ -0,0 +1,33 @@
|
|||
include ../rules
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
CC = @CC@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS = -I../include -I.. @BOTCOMMANDER_CFLAGS@ $(CPPFLAGS) @CFLAGS@
|
||||
LIBS = @BOTCOMMANDER_LIBS@ @LDFLAGS@ @LIBS@
|
||||
|
||||
all: $(C_OBJECTS)
|
||||
$(CC) -o $(EXE) $(LIBS) $(C_OBJECTS)
|
||||
|
||||
about.@OBJEXT@ botlist.@OBJEXT@ bots.@OBJEXT@ callbacks.@OBJEXT@ config.@OBJEXT@ networking.@OBJEXT@: ../config.h
|
||||
about.@OBJEXT@ config.@OBJEXT@ main.@OBJEXT@ networking.@OBJEXT@ string.@OBJEXT@ tabs.@OBJEXT@ widgets.@OBJEXT@: ../include/defines.h
|
||||
about.@OBJEXT@ botlist.@OBJEXT@ bots.@OBJEXT@ callbacks.@OBJEXT@ commands.@OBJEXT@ config.@OBJEXT@ main.@OBJEXT@ networking.@OBJEXT@ setup.@OBJEXT@ tabs.@OBJEXT@ widgets.@OBJEXT@ chanprops.@OBJEXT@: ../include/functions.h
|
||||
$(C_OBJECTS): ../include/typedefs.h
|
||||
botlist.@OBJEXT@ bots.@OBJEXT@ callbacks.@OBJEXT@ commands.@OBJEXT@ config.@OBJEXT@ history.@OBJEXT@ main.@OBJEXT@ networking.@OBJEXT@ setup.@OBJEXT@ tabs.@OBJEXT@ widgets.@OBJEXT@: ../include/variables.h
|
||||
|
||||
.c.@OBJEXT@:
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
clean:
|
||||
$(RM) $(EXE) $(C_OBJECTS)
|
||||
|
||||
install: all
|
||||
$(top_srcdir)/mkinstalldirs $(bindir)
|
||||
$(INSTALL) -m 0755 botcommander $(bindir)
|
||||
|
||||
distclean: clean
|
||||
$(RM) Makefile config.status config.cache config.log
|
||||
|
||||
.PHONY: all clean
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* about.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* The About dialog
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <gtk/gtk.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "defines.h"
|
||||
#include "functions.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ authors[] */
|
||||
const gchar *authors[] = {
|
||||
"Gergely POLONKAI <polesz@w00d5t0ck.info>",
|
||||
"KrzychuG from #eggdrop@IRCNET as Beta Tester",
|
||||
"Peter \"FaZy\" Erdosi as Beta Tester",
|
||||
NULL,
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ documenters[] */
|
||||
const gchar *documenters[] = {
|
||||
"Gergely POLONKAI <polesz@w00d5t0ck.info>",
|
||||
NULL,
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ display_about_box() */
|
||||
void
|
||||
display_about_box(void)
|
||||
{
|
||||
static GtkWidget *about_box = NULL;
|
||||
GdkPixbuf *logo;
|
||||
gchar *translator_credits = _("translator_credits");
|
||||
gchar *licence = _("licence");
|
||||
|
||||
if (!GTK_IS_WINDOW(about_box))
|
||||
{
|
||||
char *buf = NULL;
|
||||
|
||||
buf = g_locale_to_utf8(licence, -1, NULL, NULL, NULL);
|
||||
logo = gdk_pixbuf_new_from_file(PACKAGE_PIXMAPS_DIR "/bc48_trans.png", NULL);
|
||||
|
||||
about_box = gtk_about_dialog_new();
|
||||
gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about_box), "BotCommander");
|
||||
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_box), "1.0");
|
||||
gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_box), "\xc2\xa9 2005, Gergely POLONKAI");
|
||||
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_box), "Developer's Version");
|
||||
gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about_box), buf);
|
||||
g_free(buf);
|
||||
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_box), "http://botcommander.hu/");
|
||||
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about_box), authors);
|
||||
gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(about_box), documenters);
|
||||
gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about_box), translator_credits);
|
||||
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about_box), logo);
|
||||
|
||||
if (logo)
|
||||
g_object_unref(logo);
|
||||
|
||||
g_signal_connect(G_OBJECT(about_box), "destroy", G_CALLBACK(gtk_widget_destroyed), &about_box);
|
||||
gtk_widget_show(about_box);
|
||||
}
|
||||
else
|
||||
gtk_window_present(GTK_WINDOW(about_box));
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,532 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* botlist.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* The Bot list dialog
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "variables.h"
|
||||
#include "functions.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Variables */
|
||||
static GtkDialog *editor_window = NULL;
|
||||
static GtkDialog *botlist_win = NULL;
|
||||
GtkWidget *botlist_edit_button,
|
||||
*botlist_connect_button,
|
||||
*botlist_remove_button,
|
||||
*botlist_editor_botname,
|
||||
*botlist_editor_host,
|
||||
*botlist_editor_port,
|
||||
*botlist_editor_handle;
|
||||
static GtkWidget *bot_list = NULL;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ add_this_data() */
|
||||
static void
|
||||
add_this_data(gpointer data, gpointer user_data)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store = (GtkListStore *)user_data;
|
||||
t_bot_data *bot = (t_bot_data *)data;
|
||||
|
||||
gtk_list_store_append(store, &iter);
|
||||
gtk_list_store_set(store, &iter, 0, bot->botname, -1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ refresh_botlist() */
|
||||
static void
|
||||
refresh_botlist(void)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
|
||||
model = gtk_tree_view_get_model(GTK_TREE_VIEW(bot_list));
|
||||
g_object_ref(model);
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(bot_list), NULL);
|
||||
gtk_list_store_clear(GTK_LIST_STORE(model));
|
||||
|
||||
g_list_foreach(internal_bot_list, add_this_data, (gpointer)model);
|
||||
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(bot_list), model);
|
||||
g_object_unref(model);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ edit_bot_dialog() */
|
||||
static void
|
||||
edit_bot_dialog(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* Here we can be sure that we have a selected item */
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
gint response;
|
||||
gboolean can_close = FALSE;
|
||||
|
||||
if (!editor_window)
|
||||
create_bot_editor(NULL);
|
||||
gtk_window_set_title(GTK_WINDOW(editor_window), _("Edit bot"));
|
||||
|
||||
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(bot_list));
|
||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
{
|
||||
gchar *name;
|
||||
t_bot_data *bot;
|
||||
|
||||
gtk_tree_model_get(model, &iter, 0, &name, -1);
|
||||
|
||||
if ((bot = get_bot_by_botname(name)) != NULL)
|
||||
{
|
||||
char *portnum;
|
||||
|
||||
asprintf(&portnum, "%d", bot->port);
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_botname), bot->botname);
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_host), bot->host);
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_port), portnum);
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_handle), bot->handle);
|
||||
|
||||
while (!can_close)
|
||||
{
|
||||
can_close = TRUE;
|
||||
response = gtk_dialog_run(editor_window);
|
||||
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
{
|
||||
gint port_num;
|
||||
char *endptr;
|
||||
|
||||
gchar *botname = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_botname)));
|
||||
gchar *host = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_host)));
|
||||
gchar *port = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_port)));
|
||||
gchar *handle = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_handle)));
|
||||
if ((strcmp(botname, "") == 0) || (strcmp(host, "") == 0) || (strcmp(port, "") == 0))
|
||||
{
|
||||
can_close = FALSE;
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "All fields are mandatory except Handle\n");
|
||||
#endif /* DEBUG */
|
||||
// TODO: Here we have to notify the user
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(port);
|
||||
g_free(handle);
|
||||
continue;
|
||||
}
|
||||
port_num = strtol(port, &endptr, 10);
|
||||
if (*endptr)
|
||||
{
|
||||
can_close = FALSE;
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "Port must be a number! (%s)\n", endptr);
|
||||
#endif /* DEBUG */
|
||||
// TODO: Here we have to notify the user
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(port);
|
||||
g_free(handle);
|
||||
continue;
|
||||
}
|
||||
(void)update_bot(bot, botname, host, port_num, handle);
|
||||
refresh_botlist();
|
||||
|
||||
g_free(port);
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(handle);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_hide(GTK_WIDGET(editor_window));
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
if (config_data.debug)
|
||||
printf("No bot selected, but signal caught??\n");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ add_bot_dialog() */
|
||||
/* This callback is called when the "Add" button is pressed in the Botlist dialog */
|
||||
static void
|
||||
add_bot_dialog(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gint response;
|
||||
gboolean can_close = FALSE;
|
||||
|
||||
if (!editor_window)
|
||||
create_bot_editor(NULL);
|
||||
gtk_window_set_title(GTK_WINDOW(editor_window), _("Add bot"));
|
||||
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_botname), "");
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_host), "");
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_port), "");
|
||||
gtk_entry_set_text(GTK_ENTRY(botlist_editor_handle), "");
|
||||
|
||||
while (!can_close)
|
||||
{
|
||||
can_close = TRUE;
|
||||
response = gtk_dialog_run(editor_window);
|
||||
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
{
|
||||
gint port_num;
|
||||
char *endptr;
|
||||
|
||||
gchar *botname = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_botname)));
|
||||
gchar *host = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_host)));
|
||||
gchar *port = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_port)));
|
||||
gchar *handle = trim((char *)gtk_entry_get_text(GTK_ENTRY(botlist_editor_handle)));
|
||||
if ((strcmp(botname, "") == 0) || (strcmp(host, "") == 0) || (strcmp(port, "") == 0))
|
||||
{
|
||||
can_close = FALSE;
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "All fields are mandatory except Handle\n");
|
||||
#endif /* DEBUG */
|
||||
// TODO: Here we have to notify the user
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(port);
|
||||
g_free(handle);
|
||||
continue;
|
||||
}
|
||||
port_num = strtol(port, &endptr, 10);
|
||||
if (*endptr)
|
||||
{
|
||||
can_close = FALSE;
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "Port must be a number! (%s)\n", endptr);
|
||||
#endif /* DEBUG */
|
||||
// TODO: Here we have to notify the user
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(port);
|
||||
g_free(handle);
|
||||
continue;
|
||||
}
|
||||
if (add_bot(botname, host, port_num, handle) != BCE_SUCCESS)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "Port must be a number! (%s)\n", endptr);
|
||||
#endif /* DEBUG */
|
||||
// TODO: Here we have to notify the user
|
||||
}
|
||||
else
|
||||
refresh_botlist();
|
||||
g_free(port);
|
||||
g_free(botname);
|
||||
g_free(host);
|
||||
g_free(handle);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_hide(GTK_WIDGET(editor_window));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ cchange() */
|
||||
/* This callback is called, when I select a list item */
|
||||
void
|
||||
static cchange(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* Here we can be sure that we have a selected item */
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
|
||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
{
|
||||
gtk_widget_set_sensitive(botlist_connect_button, TRUE);
|
||||
gtk_widget_set_sensitive(botlist_edit_button, TRUE);
|
||||
gtk_widget_set_sensitive(botlist_remove_button, TRUE);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
if (config_data.debug)
|
||||
printf("No bot selected, but signal caught??\n");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ cactivate() */
|
||||
/* This callback is called when I double-click a list item, or when I navigate to an item and press Enter */
|
||||
static void
|
||||
cactivate(GtkWidget *widget, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
|
||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
gtk_button_clicked(GTK_BUTTON(botlist_connect_button));
|
||||
#ifdef DEBUG
|
||||
else
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, "No bot selected, but signal caught??\n");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ toggle_cursor_row() */
|
||||
/* This callback is called when I select or deselect a list item (but not when I change selection!) */
|
||||
static gboolean
|
||||
toggle_cursor_row(GtkTreeView *widget, gpointer data)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
|
||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
{
|
||||
gtk_widget_set_sensitive(botlist_connect_button, FALSE);
|
||||
gtk_widget_set_sensitive(botlist_edit_button, FALSE);
|
||||
gtk_widget_set_sensitive(botlist_remove_button, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive(botlist_connect_button, TRUE);
|
||||
gtk_widget_set_sensitive(botlist_edit_button, TRUE);
|
||||
gtk_widget_set_sensitive(botlist_remove_button, TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ create_and_fill_model() */
|
||||
/* This function creates the tree model and fills it with data */
|
||||
static GtkTreeModel *
|
||||
create_and_fill_model(void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
|
||||
store = gtk_list_store_new(1, G_TYPE_STRING);
|
||||
|
||||
g_list_foreach(internal_bot_list, add_this_data, (gpointer)store);
|
||||
|
||||
return GTK_TREE_MODEL(store);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ display_botlist_window() */
|
||||
/* This one creates the bot list window if it doesn't exist, and displays it */
|
||||
void
|
||||
display_botlist_window(void)
|
||||
{
|
||||
gint response;
|
||||
gboolean created_model = FALSE;
|
||||
GtkTreeModel *model;
|
||||
|
||||
if (!GTK_IS_WINDOW(botlist_win))
|
||||
{
|
||||
GtkCellRenderer *renderer;
|
||||
GtkWidget *hbox,
|
||||
*vbox,
|
||||
*button,
|
||||
*scrollwin,
|
||||
*image,
|
||||
*bbox,
|
||||
*blabel;
|
||||
|
||||
created_model = TRUE;
|
||||
|
||||
botlist_win = (GtkDialog *)gtk_dialog_new();
|
||||
gtk_window_set_title(GTK_WINDOW(botlist_win), _("Bot list"));
|
||||
gtk_window_set_transient_for(GTK_WINDOW(botlist_win), GTK_WINDOW(main_window));
|
||||
gtk_window_set_destroy_with_parent(GTK_WINDOW(botlist_win), TRUE);
|
||||
gtk_window_set_modal(GTK_WINDOW(botlist_win), TRUE);
|
||||
|
||||
image = gtk_image_new_from_stock(GTK_STOCK_CONNECT, GTK_ICON_SIZE_BUTTON);
|
||||
blabel = gtk_label_new_with_mnemonic(_("_Connect"));
|
||||
bbox = gtk_hbox_new(FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(bbox), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(bbox), blabel, TRUE, TRUE, 0);
|
||||
|
||||
botlist_connect_button = gtk_button_new();
|
||||
gtk_widget_set_sensitive(botlist_connect_button, FALSE);
|
||||
gtk_container_add(GTK_CONTAINER(botlist_connect_button), bbox);
|
||||
gtk_widget_show_all(botlist_connect_button);
|
||||
gtk_dialog_add_action_widget(botlist_win, botlist_connect_button, GTK_RESPONSE_APPLY);
|
||||
|
||||
button = gtk_button_new_from_stock(GTK_STOCK_SAVE);
|
||||
gtk_widget_show(button);
|
||||
gtk_dialog_add_action_widget(botlist_win, button, GTK_RESPONSE_OK);
|
||||
|
||||
button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
|
||||
gtk_widget_show(button);
|
||||
gtk_dialog_add_action_widget(botlist_win, button, GTK_RESPONSE_CANCEL);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_widget_set_size_request(scrollwin, 150, 200);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
bot_list = gtk_tree_view_new();
|
||||
gtk_signal_connect(GTK_OBJECT(bot_list), "cursor-changed", GTK_SIGNAL_FUNC(cchange), NULL);
|
||||
gtk_signal_connect(GTK_OBJECT(bot_list), "row-activated", GTK_SIGNAL_FUNC(cactivate), NULL);
|
||||
gtk_signal_connect(GTK_OBJECT(bot_list), "toggle-cursor-row", GTK_SIGNAL_FUNC(toggle_cursor_row), NULL);
|
||||
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(bot_list), -1, _("Bot name"), renderer, "text", 0, NULL);
|
||||
model = create_and_fill_model();
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(bot_list), model);
|
||||
g_object_unref(model);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(scrollwin), bot_list);
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, 2);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), scrollwin, TRUE, TRUE, 0);
|
||||
|
||||
vbox = gtk_vbox_new(FALSE, 2);
|
||||
|
||||
button = gtk_button_new_from_stock(GTK_STOCK_ADD);
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(add_bot_dialog), NULL);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
botlist_edit_button = gtk_button_new_from_stock(GTK_STOCK_EDIT);
|
||||
gtk_signal_connect(GTK_OBJECT(botlist_edit_button), "clicked", GTK_SIGNAL_FUNC(edit_bot_dialog), NULL);
|
||||
gtk_widget_set_sensitive(botlist_edit_button, FALSE);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), botlist_edit_button, FALSE, FALSE, 0);
|
||||
|
||||
botlist_remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
|
||||
gtk_widget_set_sensitive(botlist_remove_button, FALSE);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), botlist_remove_button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
gtk_widget_show_all(hbox);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(botlist_win->vbox), hbox);
|
||||
}
|
||||
|
||||
if (!created_model)
|
||||
refresh_botlist();
|
||||
|
||||
response = gtk_dialog_run(botlist_win);
|
||||
|
||||
switch (response)
|
||||
{
|
||||
case GTK_RESPONSE_APPLY:
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
t_tab_data *tab = get_active_tab();
|
||||
|
||||
if (tab)
|
||||
gtk_widget_grab_focus(tab->editbox);
|
||||
|
||||
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(bot_list));
|
||||
if (gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
{
|
||||
gchar *name;
|
||||
|
||||
if (!tab)
|
||||
add_tab(&tab);
|
||||
|
||||
if (tab->connected)
|
||||
add_tab(&tab);
|
||||
|
||||
gtk_tree_model_get(model, &iter, 0, &name, -1);
|
||||
|
||||
assign_bot_to_tab_by_name(tab, name);
|
||||
g_free(name);
|
||||
connect_tab(tab);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
if (config_data.debug)
|
||||
printf("No bot selected, but signal caught??\n");
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
break;
|
||||
case GTK_RESPONSE_OK:
|
||||
save_bot_list_to_config();
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_widget_hide(GTK_WIDGET(botlist_win));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ create_bot_editor */
|
||||
void
|
||||
create_bot_editor(t_bot_data *bot)
|
||||
{
|
||||
if (!editor_window)
|
||||
{
|
||||
GtkWidget *button,
|
||||
*label;
|
||||
GtkTable *table;
|
||||
|
||||
editor_window = (GtkDialog *)gtk_dialog_new();
|
||||
gtk_window_set_transient_for(GTK_WINDOW(editor_window), GTK_WINDOW(botlist_win));
|
||||
gtk_window_set_destroy_with_parent(GTK_WINDOW(editor_window), TRUE);
|
||||
gtk_window_set_modal(GTK_WINDOW(editor_window), TRUE);
|
||||
|
||||
table = (GtkTable *)gtk_table_new(4, 2, FALSE);
|
||||
|
||||
gtk_table_attach(table, (label = gtk_label_new(_("Bot name"))), 0, 1, 0, 1, GTK_FILL, 0, 2, 2);
|
||||
gtk_table_attach(table, (botlist_editor_botname = gtk_entry_new()), 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 2, 2);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
gtk_table_attach(table, (label = gtk_label_new(_("Host"))), 0, 1, 1, 2, GTK_FILL, 0, 2, 2);
|
||||
gtk_table_attach(table, (botlist_editor_host = gtk_entry_new()), 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 2, 2);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
gtk_table_attach(table, (label = gtk_label_new(_("Port"))), 0, 1, 2, 3, GTK_FILL, 0, 2, 2);
|
||||
gtk_table_attach(table, (botlist_editor_port = gtk_entry_new()), 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, 0, 2, 2);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
gtk_table_attach(table, (label = gtk_label_new(_("Handle"))), 0, 1, 3, 4, GTK_FILL, 0, 2, 2);
|
||||
gtk_table_attach(table, (botlist_editor_handle = gtk_entry_new()), 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, 0, 2, 2);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(editor_window->vbox), GTK_WIDGET(table));
|
||||
|
||||
button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
||||
gtk_dialog_add_action_widget(editor_window, button, GTK_RESPONSE_CANCEL);
|
||||
|
||||
button = gtk_button_new_from_stock(GTK_STOCK_SAVE);
|
||||
gtk_dialog_add_action_widget(editor_window, button, GTK_RESPONSE_OK);
|
||||
}
|
||||
gtk_widget_show_all(GTK_WIDGET(editor_window));
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* bots.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Bot list handling
|
||||
}}} */
|
||||
|
||||
/* TODO: Put this into a Makefile */
|
||||
#define _GNU_SOURCE
|
||||
/* {{{ Includes */
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Variables */
|
||||
GList *internal_bot_list;
|
||||
/* }}} */
|
||||
|
||||
#ifdef DEBUG
|
||||
/* {{{ print_this_bot() */
|
||||
void print_this_bot(gpointer data, gpointer user_data)
|
||||
{
|
||||
t_bot_data *temp = (t_bot_data *)data;
|
||||
|
||||
printf("%s:%s:%d:%s\n", temp->botname, temp->host, temp->port, temp->handle);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ list_bots() */
|
||||
void
|
||||
list_bots(void)
|
||||
{
|
||||
g_list_foreach(internal_bot_list, print_this_bot, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ search_function() */
|
||||
static gint
|
||||
search_function(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
t_bot_data *bot = (t_bot_data *)a;
|
||||
char *botname = (char *)b;
|
||||
|
||||
return strcmp(bot->botname, botname);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ add_bot() */
|
||||
gint
|
||||
add_bot(gchar *botname, gchar *host, guint port, gchar *handle)
|
||||
{
|
||||
t_bot_data *temp;
|
||||
|
||||
if (g_list_find_custom(internal_bot_list, botname, search_function))
|
||||
{
|
||||
// TODO: Here we should notify the user that this bot already exists.
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
fprintf(stderr, _("There is already a bot named %s in the list.\n"), botname);
|
||||
#endif /* DEBUG */
|
||||
return BCE_BOT_EXISTS;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Adding bot %s at %s:%d with user %s\n", botname, host, port, handle);
|
||||
#endif
|
||||
|
||||
temp = g_malloc(sizeof(t_bot_data));
|
||||
|
||||
temp->botname = g_strdup(botname);
|
||||
temp->host = g_strdup(host);
|
||||
temp->port = port;
|
||||
temp->handle = g_strdup(handle);
|
||||
|
||||
internal_bot_list = g_list_append(internal_bot_list, temp);
|
||||
|
||||
return BCE_SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ del_bot() */
|
||||
gint
|
||||
del_bot(gchar *botname)
|
||||
{
|
||||
return BCE_SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_bot_by_botname() */
|
||||
t_bot_data *
|
||||
get_bot_by_botname(gchar *name)
|
||||
{
|
||||
GList *temp = g_list_find_custom(internal_bot_list, name, search_function);
|
||||
|
||||
if (temp)
|
||||
return (t_bot_data *)(temp->data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ create_bot_record() */
|
||||
gint
|
||||
create_bot_record(gchar *host, gint port, t_bot_data **rec)
|
||||
{
|
||||
t_bot_data *temp;
|
||||
|
||||
if (rec == NULL)
|
||||
return BCE_NOMEM;
|
||||
|
||||
temp = g_malloc(sizeof(t_bot_data));
|
||||
|
||||
if (temp)
|
||||
{
|
||||
temp->botname = NULL;
|
||||
temp->host = g_strdup(host);
|
||||
temp->port = port;
|
||||
temp->handle = NULL;
|
||||
|
||||
*rec = temp;
|
||||
return BCE_SUCCESS;
|
||||
}
|
||||
|
||||
return BCE_NOMEM;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ update_bot() */
|
||||
gint
|
||||
update_bot(t_bot_data *bot, gchar *botname, gchar *host, guint port, gchar *handle)
|
||||
{
|
||||
if (bot)
|
||||
{
|
||||
t_bot_data *temp = g_malloc(sizeof(t_bot_data));
|
||||
memset(temp, 0, sizeof(t_bot_data));
|
||||
|
||||
if (bot->botname)
|
||||
{
|
||||
temp->botname = g_strdup(bot->botname);
|
||||
g_free(bot->botname);
|
||||
}
|
||||
if (bot->host)
|
||||
{
|
||||
temp->host = g_strdup(bot->host);
|
||||
g_free(bot->host);
|
||||
}
|
||||
temp->port = bot->port;
|
||||
if (bot->handle)
|
||||
{
|
||||
temp->handle = g_strdup(bot->handle);
|
||||
g_free(bot->handle);
|
||||
}
|
||||
|
||||
bot->botname = g_strdup(botname);
|
||||
bot->host = g_strdup(host);
|
||||
bot->port = port;
|
||||
bot->handle = g_strdup(handle);
|
||||
|
||||
if (temp->botname)
|
||||
g_free(temp->botname);
|
||||
if (temp->host)
|
||||
g_free(temp->host);
|
||||
if (temp->handle)
|
||||
g_free(temp->handle);
|
||||
}
|
||||
|
||||
return BCE_SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_bot_by_name() */
|
||||
gint
|
||||
get_bot_by_name(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
GConfEntry *entry = (GConfEntry *)a;
|
||||
gchar *name = (gchar *)b;
|
||||
gchar *i;
|
||||
GConfValue *value;
|
||||
gchar *this_name;
|
||||
gchar *key;
|
||||
gint len = strlen(GCONF2_ROOT "/bots/");
|
||||
|
||||
/* TODO: Would be easier with regex? */
|
||||
key = (gchar *)gconf_entry_get_key(entry);
|
||||
if (strncmp(key + len, "bot", 3) != 0)
|
||||
return 1;
|
||||
for (i = key + len + 3; *i && isdigit(*i); i++);
|
||||
if (*i != '_')
|
||||
return 1;
|
||||
if (strcmp(++i, "name") != 0)
|
||||
return 1;
|
||||
value = gconf_entry_get_value(entry);
|
||||
if (value->type != GCONF_VALUE_STRING)
|
||||
return 1;
|
||||
this_name = (char *)gconf_value_get_string(value);
|
||||
return strcmp(this_name, name);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ free_bot_data() */
|
||||
void
|
||||
free_bot_data(gpointer data, gpointer user_data)
|
||||
{
|
||||
t_bot_data *bot = (t_bot_data *)data;
|
||||
|
||||
if (bot)
|
||||
{
|
||||
if (bot->botname)
|
||||
g_free(bot->botname);
|
||||
if (bot->host)
|
||||
g_free(bot->host);
|
||||
if (bot->handle)
|
||||
g_free(bot->handle);
|
||||
g_free(bot);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ is_this_num_bot() */
|
||||
gint
|
||||
is_this_num_bot(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
if (((t_bot_data *)a)->id == *((guint *)b))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_bot_by_conf_num() */
|
||||
t_bot_data *
|
||||
get_bot_by_conf_num(guint num)
|
||||
{
|
||||
GList *entry;
|
||||
|
||||
entry = g_list_find_custom(internal_bot_list, &num, is_this_num_bot);
|
||||
if (entry)
|
||||
return entry->data;
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,518 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* callbacks.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Various widget callbacks
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#define _GNU_SOURCE
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <libintl.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "variables.h"
|
||||
#include "functions.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ destroy_event() */
|
||||
void
|
||||
destroy_event(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
if (widget == main_window)
|
||||
gtk_main_quit();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ delete_event() */
|
||||
gboolean
|
||||
delete_event(GtkWidget * widget, GdkEvent *event, gpointer data)
|
||||
{
|
||||
exit_cleanly(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ toolbar_quit() */
|
||||
void
|
||||
toolbar_quit(GtkButton *button, gpointer data)
|
||||
{
|
||||
exit_cleanly(FALSE);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ toolbar_add_tab() */
|
||||
void
|
||||
toolbar_add_tab(GtkButton *button, gpointer data)
|
||||
{
|
||||
add_tab(NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ toolbar_close_active() */
|
||||
void toolbar_close_active(GtkButton *button, gpointer data)
|
||||
{
|
||||
close_tab(get_active_tab());
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ toolbar_open_prefs() */
|
||||
void
|
||||
toolbar_open_prefs(GtkButton *button, gpointer data)
|
||||
{
|
||||
display_setup_window();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ book_change_tab() */
|
||||
void
|
||||
book_change_tab(GtkNotebook *book, GtkNotebookPage *newpage, guint pagenum, gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
list = g_list_find_custom(tab_list, &pagenum, find_tab_by_pagenum);
|
||||
if (list)
|
||||
{
|
||||
t_tab_data *temp;
|
||||
gchar *buf;
|
||||
gboolean sidebar_visible;
|
||||
gboolean menuitem_state;
|
||||
GtkWidget *box = gtk_paned_get_child2(GTK_PANED(gtk_notebook_get_nth_page(GTK_NOTEBOOK(main_book), pagenum)));
|
||||
|
||||
temp = list->data;
|
||||
Context;
|
||||
set_title(NULL, "BotCommander - %s", gtk_label_get_text(GTK_LABEL(temp->label)));
|
||||
Context;
|
||||
buf = g_malloc(strlen(_("Mode: %c")) + 1);
|
||||
sprintf(buf, _("Mode: %c"), toupper(temp->mode));
|
||||
gtk_label_set_text(GTK_LABEL(main_statuslabel_mode), buf);
|
||||
g_free(buf);
|
||||
|
||||
menuitem_state = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(main_menu_show_sidebar));
|
||||
sidebar_visible = GTK_WIDGET_VISIBLE(box);
|
||||
|
||||
if (menuitem_state != sidebar_visible)
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(main_menu_show_sidebar), sidebar_visible);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ close_tab_cb() */
|
||||
void
|
||||
close_tab_cb(GtkWidget *button, gpointer data)
|
||||
{
|
||||
GList *to_remove = g_list_find(tab_list, data);
|
||||
|
||||
if (to_remove)
|
||||
close_tab((t_tab_data *)data);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ entry_activate() */
|
||||
gboolean
|
||||
entry_activate(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
char this_mode;
|
||||
t_tab_data *active_tab = (t_tab_data *)data;
|
||||
gchar *text;
|
||||
gboolean add_to_history = TRUE;
|
||||
gboolean shift = FALSE;
|
||||
gboolean want_change = TRUE;
|
||||
|
||||
this_mode = active_tab->mode;
|
||||
text = (gchar *)gtk_entry_get_text(GTK_ENTRY(widget));
|
||||
|
||||
if (*text == '/')
|
||||
this_mode = 'b';
|
||||
else if (*text == '.')
|
||||
this_mode = 'e';
|
||||
else if (*text == '@')
|
||||
this_mode = 'm';
|
||||
|
||||
switch (tolower(this_mode))
|
||||
{
|
||||
case 'b':
|
||||
Context;
|
||||
want_change = process_commandline((*text == '/') ? text + 1 : text, active_tab);
|
||||
Context;
|
||||
shift = (*text == '/');
|
||||
Context;
|
||||
break;
|
||||
case 'e':
|
||||
if (!active_tab->connected)
|
||||
{
|
||||
feed_error_to_terminal(active_tab, TRUE, _("Won't send an eggdrop command to a not connected tab"));
|
||||
add_to_history = FALSE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *buf = NULL;
|
||||
|
||||
buf = g_convert(text, -1, BOT_CHARSET, "UTF-8", NULL, NULL, NULL);
|
||||
if (buf)
|
||||
{
|
||||
dprintf(active_tab->sock, "%s%s\n", (*buf != *EGG_CMD_CHAR) ? EGG_CMD_CHAR : "", buf);
|
||||
g_free(buf);
|
||||
}
|
||||
}
|
||||
shift = (*text == '.');
|
||||
break;
|
||||
case 'm':
|
||||
default:
|
||||
if (!active_tab->connected)
|
||||
{
|
||||
feed_error_to_terminal(active_tab, TRUE, _("Won't send message to a not connected tab"));
|
||||
add_to_history = FALSE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *buf = NULL;
|
||||
|
||||
buf = g_convert(text, -1, BOT_CHARSET, "UTF-8", NULL, NULL, NULL);
|
||||
if (buf)
|
||||
{
|
||||
dprintf(active_tab->sock, "%s%s\n", (*buf == *EGG_CMD_CHAR) ? " " : "", buf);
|
||||
g_free(buf);
|
||||
}
|
||||
}
|
||||
shift = (*text == '@');
|
||||
}
|
||||
|
||||
Context;
|
||||
|
||||
if ((add_to_history) && (gtk_entry_get_visibility(GTK_ENTRY(widget))))
|
||||
history_add(active_tab, tolower(this_mode), (shift) ? text + 1 : text);
|
||||
active_tab->history_position = -1;
|
||||
Context;
|
||||
|
||||
if (want_change)
|
||||
gtk_entry_set_text(GTK_ENTRY(((t_tab_data *)data)->editbox), "");
|
||||
|
||||
Context;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_exit() */
|
||||
void
|
||||
menu_exit(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
exit_cleanly(FALSE);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_mode_changed() */
|
||||
void
|
||||
menu_mode_changed(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)))
|
||||
{
|
||||
char m = 0;
|
||||
|
||||
if (widget == main_menu_mode_b)
|
||||
m = 'b';
|
||||
else
|
||||
{
|
||||
if (widget == main_menu_mode_e)
|
||||
m = 'e';
|
||||
else
|
||||
{
|
||||
if (widget == main_menu_mode_m)
|
||||
m = 'm';
|
||||
}
|
||||
}
|
||||
if (m)
|
||||
change_mode(m, TRUE);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_botlist_open() */
|
||||
void
|
||||
menu_botlist_open(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
display_botlist_window();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_prefs_open() */
|
||||
void
|
||||
menu_prefs_open(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
display_setup_window();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_new_tab() */
|
||||
void
|
||||
menu_new_tab(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
add_tab(NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_close_tab() */
|
||||
void
|
||||
menu_close_tab(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
close_tab(get_active_tab());
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_about() */
|
||||
void
|
||||
menu_about(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
display_about_box();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ entry_keypress() */
|
||||
int
|
||||
entry_keypress(GtkEntry *entry, GdkEventKey *event, gpointer data)
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
t_tab_data *tab = (t_tab_data *)data;
|
||||
if (entry == (GtkEntry *)tab->editbox)
|
||||
{
|
||||
if (event->keyval == GDK_Up)
|
||||
{
|
||||
gint count = get_history_len(tab);
|
||||
gint steps;
|
||||
t_history_data *temp = tab->history;
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
tab->history_position = -1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((count > 0) && (count > tab->history_position + 1))
|
||||
tab->history_position++;
|
||||
|
||||
steps = count - tab->history_position - 1;
|
||||
while (steps)
|
||||
{
|
||||
if (!temp)
|
||||
return TRUE;
|
||||
temp = temp->next;
|
||||
steps--;
|
||||
}
|
||||
gtk_entry_set_text(GTK_ENTRY(tab->editbox), temp->line);
|
||||
gtk_entry_set_position(GTK_ENTRY(tab->editbox), -1);
|
||||
return TRUE;
|
||||
}
|
||||
else if (event->keyval == GDK_Down)
|
||||
{
|
||||
gint count = get_history_len(tab);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
tab->history_position = -1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (tab->history_position > -1)
|
||||
tab->history_position--;
|
||||
|
||||
if (tab->history_position == -1)
|
||||
gtk_entry_set_text(GTK_ENTRY(tab->editbox), "");
|
||||
else
|
||||
{
|
||||
t_history_data *temp = tab->history;
|
||||
gint steps = count - tab->history_position - 1;
|
||||
|
||||
while (steps)
|
||||
{
|
||||
if (!temp)
|
||||
return TRUE;
|
||||
temp = temp->next;
|
||||
steps--;
|
||||
}
|
||||
gtk_entry_set_text(GTK_ENTRY(tab->editbox), temp->line);
|
||||
gtk_entry_set_position(GTK_ENTRY(tab->editbox), -1);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_0:
|
||||
case GDK_1:
|
||||
case GDK_2:
|
||||
case GDK_3:
|
||||
case GDK_4:
|
||||
case GDK_5:
|
||||
case GDK_6:
|
||||
case GDK_7:
|
||||
case GDK_8:
|
||||
case GDK_9:
|
||||
if (event->state & GDK_MOD1_MASK)
|
||||
{
|
||||
gint num = event->keyval - GDK_0;
|
||||
if (num == 0)
|
||||
num = 9;
|
||||
else
|
||||
num--;
|
||||
|
||||
change_active_tab(num);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case GDK_Tab:
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
if (event->keyval == GDK_Tab)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ socket_event() */
|
||||
void
|
||||
socket_event(gpointer data, gint fd, GdkInputCondition cond)
|
||||
{
|
||||
t_tab_data *tab = data;
|
||||
ssize_t len;
|
||||
char buf[MAX_READ_LINE_LEN];
|
||||
static char *current_line = NULL;
|
||||
static int current_line_pointer = 0;
|
||||
static char current_telnet_code[4];
|
||||
static int current_telnet_code_pointer = 0;
|
||||
|
||||
memset(&buf, 0, MAX_READ_LINE_LEN);
|
||||
memset(¤t_telnet_code, 0, 4);
|
||||
|
||||
len = recv(tab->sock, &buf, MAX_READ_LINE_LEN - 1, 0);
|
||||
|
||||
if (len == 0)
|
||||
disconnect_tab(tab);
|
||||
else if (len > 0)
|
||||
{
|
||||
char *obuf = NULL, *a;
|
||||
|
||||
if (tab->data_arrived == FALSE)
|
||||
{
|
||||
if (config_data.change_to_message)
|
||||
change_mode('M', FALSE);
|
||||
tab->data_arrived = TRUE;
|
||||
feed_info_to_terminal(tab, TRUE, _("Connected"));
|
||||
}
|
||||
|
||||
if (current_line == NULL)
|
||||
{
|
||||
current_line = g_malloc(MAX_READ_LINE_LEN + 1);
|
||||
memset(current_line, 0, MAX_READ_LINE_LEN + 1);
|
||||
}
|
||||
|
||||
for (a = (char *)&buf; *a; a++)
|
||||
{
|
||||
if (*a == '\r')
|
||||
continue;
|
||||
if (*a == '\n')
|
||||
{
|
||||
process_incoming_data(tab, current_line);
|
||||
memset(current_line, 0, MAX_READ_LINE_LEN + 1);
|
||||
current_line_pointer = 0;
|
||||
continue;
|
||||
}
|
||||
if ((*a == *TELNET_IAC) || (*a == *TELNET_WILL) || (*a == *TELNET_WONT) || (*a == *TELNET_ECHO))
|
||||
{
|
||||
current_telnet_code[current_telnet_code_pointer++] = *a;
|
||||
if (strlen((char *)¤t_telnet_code) == 3)
|
||||
{
|
||||
if (strcmp((char *)¤t_telnet_code, TELNET_WILL_ECHO) == 0)
|
||||
gtk_entry_set_visibility(GTK_ENTRY(tab->editbox), FALSE);
|
||||
else if (strcmp((char *)¤t_telnet_code, TELNET_WONT_ECHO) == 0)
|
||||
gtk_entry_set_visibility(GTK_ENTRY(tab->editbox), TRUE);
|
||||
memset(¤t_telnet_code, 0, 4);
|
||||
current_telnet_code_pointer = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
current_line[current_line_pointer++] = *a;
|
||||
}
|
||||
|
||||
obuf = g_convert(buf, -1, "UTF-8", BOT_CHARSET, NULL, NULL, NULL);
|
||||
g_free(obuf);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else if (config_data.debug)
|
||||
{
|
||||
char *buf = NULL;
|
||||
char *orig = strerror(errno);
|
||||
|
||||
buf = g_locale_to_utf8(orig, -1, NULL, NULL, NULL);
|
||||
feed_error_to_terminal(tab, TRUE, "%s", buf);
|
||||
g_free(buf);
|
||||
|
||||
disconnect_tab(tab);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ menu_showhide_sidebar() */
|
||||
void
|
||||
menu_showhide_sidebar(GtkWidget *menuitem, gpointer data)
|
||||
{
|
||||
gint current_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(main_book));
|
||||
|
||||
if (current_page >= 0)
|
||||
{
|
||||
gboolean new_state,
|
||||
current_state;
|
||||
GtkWidget *box = gtk_paned_get_child2(GTK_PANED(gtk_notebook_get_nth_page(GTK_NOTEBOOK(main_book), current_page)));
|
||||
|
||||
new_state = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem));
|
||||
current_state = GTK_WIDGET_VISIBLE(box);
|
||||
|
||||
feed_info_to_terminal(get_active_tab(), TRUE, "Current state: %s; new state: %s\n", (current_state) ? "active" : "not active", (new_state) ? "active" : "not active");
|
||||
|
||||
if (current_state != new_state)
|
||||
{
|
||||
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) == TRUE)
|
||||
gtk_widget_show_all(box);
|
||||
else
|
||||
gtk_widget_hide_all(box);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* chanprops.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* This holds functions which belong to the Channel properties dialog
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <gtk/gtk.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "functions.h"
|
||||
#include "typedefs.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ find_chan_in_list() */
|
||||
gint
|
||||
find_chan_in_list(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
t_channel *chanrec = (t_channel *)a;
|
||||
gchar *channame = (gchar *)b;
|
||||
|
||||
if (streq(chanrec->name, channame, FALSE))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ find_chan_property() */
|
||||
gint
|
||||
find_chan_property(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
t_chan_prop *prop = (t_chan_prop *)a;
|
||||
gchar *propname = (gchar *)b;
|
||||
|
||||
return strcmp(prop->name, propname);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ update_channel_property() */
|
||||
void
|
||||
update_channel_property(t_tab_data *tab, gchar *chan, gchar *property)
|
||||
{
|
||||
GList *this_chan;
|
||||
|
||||
if ((this_chan = g_list_find_custom(tab->actual_channel_list, chan, find_chan_in_list)))
|
||||
{
|
||||
t_chan_prop *prop;
|
||||
GList *this_prop;
|
||||
t_channel *chanrec = this_chan->data;
|
||||
|
||||
switch (tab->chanprops_list_num)
|
||||
{
|
||||
case 1:
|
||||
/* Channel modes */
|
||||
break;
|
||||
case 2:
|
||||
/* idle-kick */
|
||||
break;
|
||||
case 3:
|
||||
/* stopnethack-mode */
|
||||
break;
|
||||
case 4:
|
||||
/* revenge-mode */
|
||||
break;
|
||||
}
|
||||
|
||||
prop = g_malloc0(sizeof(t_chan_prop));
|
||||
|
||||
prop->bool_prop = ((*property == '+') || (*property == '-'));
|
||||
|
||||
Context;
|
||||
|
||||
if (prop->bool_prop)
|
||||
{
|
||||
prop->name = g_strdup(property + 1);
|
||||
prop->bool_value = (*property == '+') ? TRUE : FALSE;
|
||||
prop->string_value = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *a;
|
||||
|
||||
Context;
|
||||
|
||||
for (a = property; *a; a++)
|
||||
if (isspace(*a))
|
||||
break;
|
||||
|
||||
if (*a && (a - property > 0))
|
||||
{
|
||||
prop->name = g_strndup(property, a - property);
|
||||
for (; *a; a++)
|
||||
if (!isspace(*a))
|
||||
break;
|
||||
prop->string_value = g_strdup(a);
|
||||
}
|
||||
|
||||
Context;
|
||||
}
|
||||
|
||||
if (prop->name)
|
||||
{
|
||||
this_prop = g_list_find_custom(chanrec->properties, prop->name, find_chan_property);
|
||||
if (this_prop)
|
||||
{
|
||||
printf("Updating %s property \"%s\" with value %s\n", (prop->bool_prop) ? "boolean" : "string", prop->name, (prop->bool_prop) ? ((prop->bool_value) ? "TRUE" : "FALSE") : prop->string_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Adding %s property \"%s\" with value %s\n", (prop->bool_prop) ? "boolean" : "string", prop->name, (prop->bool_prop) ? ((prop->bool_value) ? "TRUE" : "FALSE") : prop->string_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,453 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* commands.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* BotCommander internal command definitions
|
||||
}}} */
|
||||
|
||||
/* TODO: Put this into a Makefile */
|
||||
#define _GNU_SOURCE
|
||||
/* {{{ Includes */
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Prototypes */
|
||||
BC_COMMAND(command_exit);
|
||||
BC_COMMAND(command_close);
|
||||
BC_COMMAND(command_connect);
|
||||
BC_COMMAND(command_assign);
|
||||
BC_COMMAND(command_mode);
|
||||
BC_COMMAND(command_histlist);
|
||||
BC_COMMAND(command_botlist);
|
||||
BC_COMMAND(command_preferences);
|
||||
BC_COMMAND(command_disconnect);
|
||||
/* }}} */
|
||||
|
||||
/* {{{ internal_command[] */
|
||||
t_command internal_command[] = {
|
||||
/* verb, CT_INTERNAL, paramnum, can_abbrev, function */
|
||||
{"QUIT", CT_INTERNAL, 0, FALSE, command_exit},
|
||||
{"CLOSE", CT_INTERNAL, 0, TRUE, command_close},
|
||||
{"CONNECT", CT_INTERNAL, 0, TRUE, command_connect},
|
||||
{"ASSIGN", CT_INTERNAL, 1, TRUE, command_assign},
|
||||
{"MODE", CT_INTERNAL, 1, TRUE, command_mode},
|
||||
{"HISTLIST", CT_INTERNAL, 0, TRUE, command_histlist},
|
||||
{"BOTLIST", CT_INTERNAL, 0, TRUE, command_botlist},
|
||||
{"PREFERENCES", CT_INTERNAL, 0, TRUE, command_preferences},
|
||||
{"DISCONNECT", CT_INTERNAL, 0, TRUE, command_disconnect},
|
||||
{NULL, CT_INTERNAL, 0, FALSE, NULL},
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
#define num_commands (sizeof(command) / sizeof(t_command))
|
||||
|
||||
/* {{{ command_exit */
|
||||
BC_COMMAND(command_exit)
|
||||
{
|
||||
exit_cleanly(FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_close */
|
||||
BC_COMMAND(command_close)
|
||||
{
|
||||
Context;
|
||||
close_tab(tab);
|
||||
Context;
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_connect */
|
||||
BC_COMMAND(command_connect)
|
||||
{
|
||||
if (tab->connected)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("This tab is already connected. Exit the bot with .quit, or use /DISCONNECT!"));
|
||||
return TRUE;
|
||||
}
|
||||
if ((paramnum == 0) && (tab->bot == NULL))
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("No bot is assigned to this tab. Use ASSIGN to do that."));
|
||||
return TRUE;
|
||||
}
|
||||
if (paramnum == 0)
|
||||
{
|
||||
#ifdef DEBUG /* {{{ */
|
||||
if (config_data.debug)
|
||||
feed_message_to_terminal(tab, TRUE, _("Connecting to %s"), tab->bot->botname);
|
||||
#endif /* DEBUG }}} */
|
||||
}
|
||||
if (paramnum == 1)
|
||||
{
|
||||
t_bot_data *bot;
|
||||
|
||||
if ((bot = get_bot_by_botname(param[1])) == NULL)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("No bot exists by that name"));
|
||||
return TRUE;
|
||||
}
|
||||
assign_bot_to_tab(tab, bot);
|
||||
#ifdef DEBUG /* {{{ */
|
||||
if (config_data.debug)
|
||||
feed_message_to_terminal(tab, TRUE, _("Connecting to %s"), bot->botname);
|
||||
#endif /* DEBUG }}} */
|
||||
}
|
||||
if (paramnum > 1)
|
||||
{
|
||||
gchar *host = param[1];
|
||||
gint port;
|
||||
t_bot_data *bot;
|
||||
|
||||
if (!is_numeric(param[2], &port))
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Second parameter must be a port number!"));
|
||||
return TRUE;
|
||||
}
|
||||
if (create_bot_record(host, port, &bot) != BCE_SUCCESS)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Not enough memory!"));
|
||||
return TRUE;
|
||||
}
|
||||
tab->bot = bot;
|
||||
set_title(tab, "%s:%d", host, port);
|
||||
#ifdef DEBUG /* {{{ */
|
||||
if (config_data.debug)
|
||||
feed_message_to_terminal(tab, TRUE, _("Connecting to %s:%d"), host, port);
|
||||
#endif /* DEBUG }}} */
|
||||
}
|
||||
|
||||
connect_tab(tab);
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_assign */
|
||||
BC_COMMAND(command_assign)
|
||||
{
|
||||
if (!assign_bot_to_tab_by_name(tab, param[1]))
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("No bot exists by this name"));
|
||||
return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_mode */
|
||||
BC_COMMAND(command_mode)
|
||||
{
|
||||
char newmode;
|
||||
if (paramnum < 1)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Not enough parameters!"));
|
||||
return TRUE;
|
||||
}
|
||||
if (paramnum > 1)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Only one parameter required!"));
|
||||
return TRUE;
|
||||
}
|
||||
if (strlen(param[1]) > 1)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("The parameter must be one character!"));
|
||||
return TRUE;
|
||||
}
|
||||
newmode = *param[1];
|
||||
if (!strchr("bem", tolower(newmode)))
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Mode char can be one of B, E or M!"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
change_mode(newmode, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_histlist */
|
||||
BC_COMMAND(command_histlist)
|
||||
{
|
||||
t_history_data *temp = tab->history;
|
||||
|
||||
while (temp)
|
||||
{
|
||||
feed_info_to_terminal(tab, TRUE, temp->line);
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_botlist */
|
||||
BC_COMMAND(command_botlist)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
list_bots();
|
||||
#endif
|
||||
|
||||
display_botlist_window();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_preferences */
|
||||
BC_COMMAND(command_preferences)
|
||||
{
|
||||
display_setup_window();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ command_disconnect */
|
||||
BC_COMMAND(command_disconnect)
|
||||
{
|
||||
disconnect_tab(tab);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_command_from_abbrev() */
|
||||
/* Returning rules:
|
||||
* If the given abbreviation is a whole command, that command will be returned
|
||||
* If there are more commands matching the pattern, and only one of them can be abbreviated, that command will be returned
|
||||
* If there are multiple commands matching the pattern, and more of them can be abbreviated, nothing is returned
|
||||
*/
|
||||
t_command *
|
||||
get_command_from_abbrev(gchar *abbrev)
|
||||
{
|
||||
t_command *temp, *found_command = NULL;
|
||||
gchar *a;
|
||||
|
||||
for (temp = internal_command; temp->command_verb; temp++)
|
||||
{
|
||||
gboolean found = TRUE;
|
||||
|
||||
if (streq(temp->command_verb, abbrev, FALSE))
|
||||
return temp;
|
||||
if (strlen(abbrev) > strlen(temp->command_verb))
|
||||
continue;
|
||||
for (a = abbrev; *a; a++)
|
||||
{
|
||||
if (tolower(*a) != tolower(*(temp->command_verb + (a - abbrev))))
|
||||
{
|
||||
found = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((found) && (temp->can_abbrev == TRUE))
|
||||
{
|
||||
if (found_command)
|
||||
return NULL;
|
||||
found_command = temp;
|
||||
}
|
||||
}
|
||||
|
||||
return found_command;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ process_commandline() */
|
||||
gboolean
|
||||
process_commandline(gchar *cmdline, t_tab_data *tab)
|
||||
{
|
||||
gchar **wl;
|
||||
gint wnum;
|
||||
t_command *this_command;
|
||||
gboolean want_change = TRUE;
|
||||
|
||||
Context;
|
||||
|
||||
if (wordwrap(cmdline, " \t", &wl, &wnum) != BCE_SUCCESS)
|
||||
{
|
||||
feed_error_to_terminal(tab, TRUE, _("Not enough memory!"));
|
||||
}
|
||||
|
||||
Context;
|
||||
|
||||
if (!wnum)
|
||||
return TRUE;
|
||||
|
||||
this_command = get_command_from_abbrev(wl[0]);
|
||||
if (this_command)
|
||||
{
|
||||
if (!this_command->can_abbrev && (strlen(wl[0]) != strlen(this_command->command_verb)))
|
||||
feed_error_to_terminal(tab, TRUE, _("This command cannot be abbreviated!"));
|
||||
else
|
||||
{
|
||||
if (this_command->min_paramnum > wnum - 1)
|
||||
feed_error_to_terminal(tab, TRUE, _("Not enough parameters!"));
|
||||
else
|
||||
want_change = this_command->func(tab, wnum - 1, wl);
|
||||
}
|
||||
}
|
||||
else
|
||||
feed_error_to_terminal(tab, TRUE, _("Unknown command \"%s\""), wl[0]);
|
||||
|
||||
Context;
|
||||
|
||||
wl_free(&wl, wnum);
|
||||
|
||||
Context;
|
||||
|
||||
return want_change;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ process_botcommander_script_commands() */
|
||||
/* This function processes the messages sent by the botcommander.tcl script. */
|
||||
void
|
||||
process_botcommander_script_commands(t_tab_data *tab, char *string)
|
||||
{
|
||||
/* Here the script command is already in UTF-8 */
|
||||
|
||||
Context;
|
||||
|
||||
switch (*(string + 2))
|
||||
{
|
||||
case '+':
|
||||
if (strlen(string) > 4)
|
||||
{
|
||||
char *command = (string + 4);
|
||||
|
||||
Context;
|
||||
if (strcmp(command, "ABILITY") == 0)
|
||||
{
|
||||
dprintf(tab->sock, ".botcomm_chanlist\n");
|
||||
dprintf(tab->sock, ".botcomm_userlist\n");
|
||||
}
|
||||
else if (strcmp(command, "CHANLIST_START") == 0)
|
||||
{
|
||||
tab->chanlist_process = TRUE;
|
||||
if (tab->actual_channel_list != NULL)
|
||||
g_list_free(tab->actual_channel_list);
|
||||
tab->actual_channel_list = NULL;
|
||||
}
|
||||
else if (strcmp(command, "CHANLIST_END") == 0)
|
||||
{
|
||||
tab->actual_channel_list = g_list_reverse(tab->actual_channel_list);
|
||||
tab->chanlist_process = FALSE;
|
||||
update_channel_list(tab);
|
||||
}
|
||||
else if ((strncmp(command, "CHAN ", 5) == 0) && (tab->chanlist_process))
|
||||
{
|
||||
t_channel *chan = g_malloc(sizeof(t_channel));
|
||||
|
||||
chan->active = (*(command + 5) == '1') ? TRUE : FALSE;
|
||||
chan->name = g_strdup((command + 7));
|
||||
chan->properties = NULL;
|
||||
tab->actual_channel_list = g_list_prepend(tab->actual_channel_list, chan);
|
||||
}
|
||||
else if (strcmp(command, "USERLIST_START") == 0)
|
||||
{
|
||||
tab->userlist_process = TRUE;
|
||||
if (tab->actual_user_list != NULL)
|
||||
g_list_free(tab->actual_user_list);
|
||||
tab->actual_user_list = NULL;
|
||||
}
|
||||
else if (strcmp(command, "USERLIST_END") == 0)
|
||||
{
|
||||
tab->actual_user_list = g_list_reverse(tab->actual_user_list);
|
||||
tab->userlist_process = FALSE;
|
||||
update_user_list(tab);
|
||||
}
|
||||
else if ((strncmp(command, "USER ", 5) == 0) && (tab->userlist_process))
|
||||
{
|
||||
t_user *user = g_malloc(sizeof(t_user));
|
||||
|
||||
user->name = g_strdup((command + 5));
|
||||
tab->actual_user_list = g_list_prepend(tab->actual_user_list, user);
|
||||
}
|
||||
else if (strncmp(command, "CHANPROPS_START ", 16) == 0)
|
||||
{
|
||||
tab->chanprops_process = g_strdup(command + 16);
|
||||
tab->chanprops_list_num = 0;
|
||||
}
|
||||
else if (strncmp(command, "CHANPROPS_END ", 14) == 0)
|
||||
{
|
||||
if (tab->chanprops_process != NULL)
|
||||
{
|
||||
g_free(tab->chanprops_process);
|
||||
tab->chanprops_process = NULL;
|
||||
}
|
||||
tab->chanprops_list_num = 0;
|
||||
}
|
||||
else if (strncmp(command, "CHANPROP ", 9) == 0)
|
||||
{
|
||||
gchar *chan = command + 9;
|
||||
gchar *property;
|
||||
|
||||
for (property = chan; *property; property++)
|
||||
if (isspace(*property))
|
||||
break;
|
||||
if (*property)
|
||||
{
|
||||
*property = 0;
|
||||
if (streq(chan, tab->chanprops_process, FALSE))
|
||||
{
|
||||
property++;
|
||||
for (; *property; property++)
|
||||
if (!isspace(*property))
|
||||
break;
|
||||
tab->chanprops_list_num++;
|
||||
update_channel_property(tab, chan, property);
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else if (config_data.debug)
|
||||
printf("Unknown script command: %s\n", command);
|
||||
#endif /* DEBUG */
|
||||
Context;
|
||||
}
|
||||
break;
|
||||
case '-':
|
||||
feed_error_to_terminal(tab, FALSE, "%s", string);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
Context;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (config_data.debug)
|
||||
{
|
||||
feed_message_to_terminal(tab, TRUE, string);
|
||||
printf("%s\n", string);
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,611 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* config.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Configuration backend handlers
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <stdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libintl.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "defines.h"
|
||||
#include "typedefs.h"
|
||||
#include "variables.h"
|
||||
#include "functions.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Defines */
|
||||
#define TA_NAME 1
|
||||
#define TA_HOST 2
|
||||
#define TA_PORT 3
|
||||
#define TA_HANDLE 4
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Variables */
|
||||
GConfClient *gconf_client;
|
||||
t_config_data config_data;
|
||||
|
||||
static gboolean gconf_inited = FALSE;
|
||||
static int internal_value;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_gconf_values() */
|
||||
gboolean
|
||||
set_gconf_values(GConfClient *client)
|
||||
{
|
||||
int err = 0;
|
||||
GError *error = NULL;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_float(client, GCONF2_ROOT "/background_saturation", DEFAULT_BACKGROUND_SATURATION, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_bool(client, GCONF2_ROOT "/change_to_message", DEFAULT_CHANGE_TO_MESSAGE, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_bool(client, GCONF2_ROOT "/debug", DEFAULT_DEBUG, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_string(client, GCONF2_ROOT "/default_mode", DEFAULT_DEFAULT_MODE, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_string(client, GCONF2_ROOT "/sanity", "Needed for gconf sanity check, please don't remove!", &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_bool(client, GCONF2_ROOT "/scroll_on_output", DEFAULT_SCROLL_ON_OUTPUT, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_bool(client, GCONF2_ROOT "/transparent_background", DEFAULT_TRANSPARENT_BACKGROUND, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_string(client, GCONF2_ROOT "/vte_font", DEFAULT_VTE_FONT, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_bool(client, GCONF2_ROOT "/change_to_new_tab", DEFAULT_CHANGE_TO_NEW_TAB, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
error = NULL;
|
||||
gconf_client_set_int(client, GCONF2_ROOT "/history_length", DEFAULT_HISTORY_LENGTH, &error);
|
||||
if (error) err = 1;
|
||||
|
||||
if (err)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("There was an error accessing GConf2: %s"), error->message);
|
||||
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ gconf_sanity_check_string() */
|
||||
gboolean
|
||||
gconf_sanity_check_string(GConfClient *client, const gchar *key)
|
||||
{
|
||||
gchar *string;
|
||||
GError *error = NULL;
|
||||
|
||||
string = gconf_client_get_string(client, key, &error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
gboolean temp = set_gconf_values(client);
|
||||
if (temp == FALSE)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!string)
|
||||
{
|
||||
gboolean temp = set_gconf_values(client);
|
||||
if (temp == FALSE)
|
||||
return FALSE;
|
||||
} else
|
||||
g_free(string);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ init_config() */
|
||||
gboolean
|
||||
init_config(void)
|
||||
{
|
||||
GError *error = NULL;
|
||||
|
||||
gconf_client = gconf_client_get_default();
|
||||
if (!gconf_sanity_check_string(gconf_client, GCONF2_ROOT "/sanity"))
|
||||
return FALSE;
|
||||
gconf_client_add_dir(gconf_client, GCONF2_ROOT, GCONF_CLIENT_PRELOAD_RECURSIVE, &error);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_boolean_conf_value() */
|
||||
gboolean
|
||||
get_boolean_conf_value(gchar *key, gboolean *retval)
|
||||
{
|
||||
GError *error = NULL;;
|
||||
GConfValue *value = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
value = gconf_client_get(gconf_client, full_key, &error);
|
||||
if (error && !value)
|
||||
{
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
if (value->type == GCONF_VALUE_BOOL)
|
||||
{
|
||||
if (retval)
|
||||
*retval = gconf_client_get_bool(gconf_client, full_key, &error);
|
||||
g_free(full_key);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_float_conf_value() */
|
||||
gboolean
|
||||
get_float_conf_value(gchar *key, gfloat *retval)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GConfValue *value = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
value = gconf_client_get(gconf_client, full_key, &error);
|
||||
|
||||
if ((error != NULL) || (value == NULL)) {
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (value->type == GCONF_VALUE_FLOAT) {
|
||||
if (retval)
|
||||
*retval = gconf_client_get_float(gconf_client, full_key, &error);
|
||||
g_free(full_key);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_int_conf_value() */
|
||||
gboolean
|
||||
get_int_conf_value(gchar *key, gint *retval)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GConfValue *value = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
value = gconf_client_get(gconf_client, full_key, &error);
|
||||
|
||||
if ((error != NULL) || (value == NULL)) {
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (value->type == GCONF_VALUE_INT) {
|
||||
if (retval)
|
||||
*retval = gconf_client_get_int(gconf_client, full_key, &error);
|
||||
g_free(full_key);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_string_conf_value() */
|
||||
gboolean
|
||||
get_string_conf_value(gchar *key, gchar **retval)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GConfValue *value = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
value = gconf_client_get(gconf_client, full_key, &error);
|
||||
|
||||
if (error || !value) {
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (value->type == GCONF_VALUE_STRING) {
|
||||
if (retval)
|
||||
*retval = g_strdup(gconf_client_get_string(gconf_client, full_key, &error));
|
||||
g_free(full_key);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_boolean_conf_value() */
|
||||
gboolean
|
||||
set_boolean_conf_value(gchar *key, gboolean value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
gconf_client_set_bool(gconf_client, full_key, value, &error);
|
||||
if (error)
|
||||
{
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_float_conf_value() */
|
||||
gboolean
|
||||
set_float_conf_value(gchar *key, gdouble value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
gconf_client_set_float(gconf_client, full_key, value, &error);
|
||||
if (error)
|
||||
{
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_int_conf_value() */
|
||||
gboolean
|
||||
set_int_conf_value(gchar *key, gint value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
gconf_client_set_int(gconf_client, full_key, value, &error);
|
||||
if (error)
|
||||
{
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_string_conf_value() */
|
||||
gboolean
|
||||
set_string_conf_value(gchar *key, gchar *value)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gchar *full_key;
|
||||
|
||||
if ((full_key = g_malloc(strlen(GCONF2_ROOT) + strlen(key) + 2)) == NULL)
|
||||
return FALSE;
|
||||
|
||||
memset(full_key, 0, strlen(GCONF2_ROOT) + strlen(key) + 2);
|
||||
|
||||
strcpy(full_key, GCONF2_ROOT);
|
||||
strcat(full_key, "/");
|
||||
strcat(full_key, key);
|
||||
|
||||
gconf_client_set_string(gconf_client, full_key, value, &error);
|
||||
if (error)
|
||||
{
|
||||
printf("%s\n", error->message);
|
||||
g_free(full_key);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ read_config_data() */
|
||||
void
|
||||
read_config_data(void)
|
||||
{
|
||||
gboolean setting_b;
|
||||
gfloat setting_f;
|
||||
gchar *setting_s;
|
||||
gint setting_i;
|
||||
|
||||
if (get_boolean_conf_value("scroll_on_output", &setting_b))
|
||||
config_data.scroll_on_output = setting_b;
|
||||
else
|
||||
config_data.scroll_on_output = DEFAULT_SCROLL_ON_OUTPUT;
|
||||
|
||||
if (get_boolean_conf_value("change_to_message", &setting_b))
|
||||
config_data.change_to_message = setting_b;
|
||||
else
|
||||
config_data.change_to_message = DEFAULT_CHANGE_TO_MESSAGE;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (get_boolean_conf_value("debug", &setting_b))
|
||||
config_data.debug = setting_b;
|
||||
else
|
||||
config_data.debug = DEFAULT_DEBUG;
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (get_boolean_conf_value("transparent_background", &setting_b))
|
||||
config_data.transparent_background = setting_b;
|
||||
else
|
||||
config_data.transparent_background = DEFAULT_TRANSPARENT_BACKGROUND;
|
||||
|
||||
if (get_float_conf_value("background_saturation", &setting_f))
|
||||
config_data.background_saturation = setting_f;
|
||||
else
|
||||
config_data.background_saturation = DEFAULT_BACKGROUND_SATURATION;
|
||||
|
||||
if (get_string_conf_value("default_mode", &setting_s))
|
||||
config_data.default_mode = *setting_s;
|
||||
else
|
||||
config_data.default_mode = *DEFAULT_DEFAULT_MODE;
|
||||
|
||||
if (get_string_conf_value("vte_font", &setting_s))
|
||||
config_data.vte_font = setting_s;
|
||||
else
|
||||
config_data.vte_font = DEFAULT_VTE_FONT;
|
||||
|
||||
if (get_boolean_conf_value("change_to_new_tab", &setting_b))
|
||||
config_data.change_to_new_tab = setting_b;
|
||||
else
|
||||
config_data.change_to_new_tab = DEFAULT_CHANGE_TO_NEW_TAB;
|
||||
|
||||
if (get_int_conf_value("history_length", &setting_i))
|
||||
config_data.history_len = setting_i;
|
||||
else
|
||||
config_data.history_len = DEFAULT_HISTORY_LENGTH;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_bot_data_from_conf() */
|
||||
void
|
||||
set_bot_data_from_conf(gpointer data, gpointer discard)
|
||||
{
|
||||
GConfEntry *entry = (GConfEntry *)data;
|
||||
gint len = strlen(GCONF2_ROOT "/bots/");
|
||||
gchar *key = (char *)gconf_entry_get_key(entry);
|
||||
gchar *num = NULL;
|
||||
gchar *i;
|
||||
gint bot_id;
|
||||
t_bot_data *bot;
|
||||
int to_add = 0;
|
||||
GConfValue *value;
|
||||
gchar *string_value = NULL;
|
||||
gint int_value = 0;
|
||||
|
||||
if (strncmp(key + len, "bot", 3))
|
||||
return;
|
||||
num = key + len + 3;
|
||||
for (i = num; *i && isdigit(*i); i++);
|
||||
if (*i != '_')
|
||||
return;
|
||||
*i = 0;
|
||||
i++;
|
||||
bot_id = atoi((const char *)num);
|
||||
if (bot_id == 0)
|
||||
return;
|
||||
if (strcmp(i, "name") == 0)
|
||||
to_add = TA_NAME;
|
||||
else if (strcmp(i, "host") == 0)
|
||||
to_add = TA_HOST;
|
||||
else if (strcmp(i, "port") == 0)
|
||||
to_add = TA_PORT;
|
||||
else if (strcmp(i, "handle") == 0)
|
||||
to_add = TA_HANDLE;
|
||||
|
||||
if (to_add == 0)
|
||||
return;
|
||||
|
||||
value = gconf_entry_get_value(entry);
|
||||
if (to_add == TA_PORT)
|
||||
int_value = gconf_value_get_int((const GConfValue *)value);
|
||||
else
|
||||
string_value = (gchar *)gconf_value_get_string((const GConfValue *)value);
|
||||
|
||||
if ((bot = get_bot_by_conf_num(bot_id)) == NULL)
|
||||
{
|
||||
create_bot_record(NULL, 0, &bot);
|
||||
bot->id = bot_id;
|
||||
internal_bot_list = g_list_append(internal_bot_list, bot);
|
||||
}
|
||||
|
||||
switch (to_add)
|
||||
{
|
||||
case TA_NAME:
|
||||
bot->botname = g_strdup(string_value);
|
||||
break;
|
||||
case TA_HOST:
|
||||
bot->host = g_strdup(string_value);
|
||||
break;
|
||||
case TA_PORT:
|
||||
bot->port = int_value;
|
||||
break;
|
||||
case TA_HANDLE:
|
||||
bot->handle = g_strdup(string_value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ read_bot_list_from_config() */
|
||||
void
|
||||
read_bot_list_from_config(void)
|
||||
{
|
||||
GSList *entries;
|
||||
|
||||
if (internal_bot_list)
|
||||
{
|
||||
g_list_foreach(internal_bot_list, free_bot_data, NULL);
|
||||
g_list_free(internal_bot_list);
|
||||
internal_bot_list = NULL;
|
||||
}
|
||||
entries = gconf_client_all_entries(gconf_client, GCONF2_ROOT "/bots", NULL);
|
||||
if (entries)
|
||||
{
|
||||
g_slist_foreach(entries, set_bot_data_from_conf, NULL);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ save_this_bot() */
|
||||
void
|
||||
save_this_bot(gpointer data, gpointer user_data)
|
||||
{
|
||||
/* NEVER CHANGE THIS, or change the code below, either! */
|
||||
static char *config_keynames[] = { "name", "host", "port", "handle", NULL };
|
||||
gchar *key;
|
||||
gint len;
|
||||
char **a;
|
||||
|
||||
internal_value++;
|
||||
|
||||
for (a = config_keynames; *a; a++)
|
||||
{
|
||||
len = (int)log10((double)internal_value) + 11 + strlen(*a);
|
||||
key = g_malloc(len);
|
||||
|
||||
sprintf(key, "bots/bot%d_%s", internal_value, *a);
|
||||
|
||||
if (strcmp(*a, "name") == 0)
|
||||
set_string_conf_value(key, ((t_bot_data *)data)->botname);
|
||||
else if (strcmp(*a, "host") == 0)
|
||||
set_string_conf_value(key, ((t_bot_data *)data)->host);
|
||||
else if (strcmp(*a, "port") == 0)
|
||||
set_int_conf_value(key, ((t_bot_data *)data)->port);
|
||||
else if (strcmp(*a, "handle") == 0)
|
||||
set_string_conf_value(key, ((t_bot_data *)data)->handle);
|
||||
g_free(key);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ save_bot_list_to_config() */
|
||||
void
|
||||
save_bot_list_to_config(void)
|
||||
{
|
||||
gconf_client_recursive_unset(gconf_client, GCONF2_ROOT "/bots", GCONF_UNSET_INCLUDING_SCHEMA_NAMES, NULL);
|
||||
|
||||
internal_value = 0;
|
||||
g_list_foreach(internal_bot_list, save_this_bot, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* debug.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Debugging functions
|
||||
}}} */
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
/* {{{ Includes */
|
||||
# include <signal.h>
|
||||
# include <gtk/gtk.h>
|
||||
# include <stdlib.h>
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Variables */
|
||||
char *last_file = NULL;
|
||||
int last_line = 0;
|
||||
/* }}} */
|
||||
|
||||
/* {{{ fatal_signal() */
|
||||
void fatal_signal_handler(int sig)
|
||||
{
|
||||
if (last_file)
|
||||
fprintf(stderr, "Fatal signal cought (%d). Last context was at %s:%d\n", sig, last_file, last_line);
|
||||
exit(1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ debug_init() */
|
||||
void
|
||||
debug_init()
|
||||
{
|
||||
signal(SIGSEGV, fatal_signal_handler);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ set_context() */
|
||||
void
|
||||
set_context(char *file, int line)
|
||||
{
|
||||
if (last_file)
|
||||
g_free(last_file);
|
||||
last_file = g_strdup(file);
|
||||
last_line = line;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* history.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Handles tabs' command line history
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <gtk/gtk.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "variables.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ history_add() */
|
||||
void
|
||||
history_add(t_tab_data *tab, gchar mode, gchar *line)
|
||||
{
|
||||
t_history_data *temp;
|
||||
|
||||
if (config_data.history_len == 0)
|
||||
return;
|
||||
|
||||
if (tab)
|
||||
{
|
||||
gint count = 0;
|
||||
char modechar = 0;
|
||||
|
||||
switch (tolower(mode))
|
||||
{
|
||||
case 'b':
|
||||
modechar = '/';
|
||||
break;
|
||||
case 'e':
|
||||
modechar = '.';
|
||||
break;
|
||||
case 'm':
|
||||
modechar = '@';
|
||||
break;
|
||||
}
|
||||
|
||||
if (modechar == 0)
|
||||
return;
|
||||
|
||||
temp = tab->history;
|
||||
while (temp)
|
||||
{
|
||||
count++;
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
if (count == config_data.history_len)
|
||||
{
|
||||
temp = tab->history;
|
||||
tab->history = temp->next;
|
||||
g_free(temp->line);
|
||||
g_free(temp);
|
||||
}
|
||||
|
||||
temp = g_malloc(sizeof(t_history_data));
|
||||
temp->line = g_malloc(strlen(line) + 2);
|
||||
sprintf(temp->line, "%c%s", modechar, line);
|
||||
temp->next = NULL;
|
||||
|
||||
if (tab->history == NULL)
|
||||
tab->history = temp;
|
||||
else
|
||||
{
|
||||
t_history_data *t = tab->history;
|
||||
while (t->next)
|
||||
t = t->next;
|
||||
t->next = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ get_history_len() */
|
||||
gint
|
||||
get_history_len(t_tab_data *tab)
|
||||
{
|
||||
|
||||
if (tab)
|
||||
{
|
||||
t_history_data *temp = tab->history;
|
||||
gint count = 0;
|
||||
|
||||
if (tab->history == NULL)
|
||||
return 0;
|
||||
while (temp)
|
||||
{
|
||||
count++;
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
153
src/main.c
153
src/main.c
|
@ -1,68 +1,143 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* main.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Very common functions
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <stdio.h>
|
||||
#include <libintl.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <locale.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
static void
|
||||
quit(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "defines.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ change_mode() */
|
||||
void
|
||||
change_mode(char newmode, gboolean from_menu)
|
||||
{
|
||||
GApplication *app = user_data;
|
||||
char *buf;
|
||||
|
||||
g_application_quit(app);
|
||||
t_tab_data *active_tab = get_active_tab();
|
||||
|
||||
buf = g_malloc(strlen(_("Mode: %c")) + 1);
|
||||
sprintf(buf, _("Mode: %c"), toupper(newmode));
|
||||
|
||||
active_tab->mode = toupper(newmode);
|
||||
gtk_label_set_text(GTK_LABEL(main_statuslabel_mode), buf);
|
||||
g_free(buf);
|
||||
|
||||
if (!from_menu)
|
||||
{
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(main_menu_mode_b), (toupper(newmode) == 'B') ? TRUE : FALSE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(main_menu_mode_e), (toupper(newmode) == 'E') ? TRUE : FALSE);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(main_menu_mode_m), (toupper(newmode) == 'M') ? TRUE : FALSE);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void
|
||||
startup(GtkApplication *app, gpointer user_data)
|
||||
/* {{{ find_connected_tab() */
|
||||
gint
|
||||
find_connected_tab(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
static const GActionEntry actions[] = {
|
||||
{ "quit", quit }
|
||||
};
|
||||
if (((t_tab_data *)a)->connected)
|
||||
return 0;
|
||||
|
||||
GMenu *menu;
|
||||
|
||||
g_action_map_add_action_entries(G_ACTION_MAP(app), actions, G_N_ELEMENTS(actions), app);
|
||||
|
||||
menu = g_menu_new();
|
||||
g_menu_append(menu, "Quit", "app.quit");
|
||||
gtk_application_set_app_menu(app, G_MENU_MODEL(menu));
|
||||
g_object_unref(menu);
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void
|
||||
activate(GtkApplication *app, gpointer user_data)
|
||||
/* {{{ exit_cleanly() */
|
||||
void
|
||||
exit_cleanly(gboolean force)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *botlist;
|
||||
gboolean ask = FALSE;
|
||||
|
||||
window = gtk_application_window_new(app);
|
||||
gtk_window_set_default_size(GTK_WINDOW(window), 400, 300);
|
||||
gtk_window_set_application(GTK_WINDOW(window), GTK_APPLICATION(app));
|
||||
gtk_window_set_title(GTK_WINDOW(window), "BotCommander");
|
||||
save_bot_list_to_config();
|
||||
|
||||
botlist = gtk_notebook_new();
|
||||
if (g_list_find_custom(tab_list, NULL, find_connected_tab))
|
||||
ask = TRUE;
|
||||
|
||||
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(botlist));
|
||||
if (ask)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
gint result;
|
||||
|
||||
gtk_widget_show_all(window);
|
||||
dialog = gtk_message_dialog_new(GTK_WINDOW(main_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("There are connected tabs. Are you sure, you want to exit?"));
|
||||
result = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
if (result == GTK_RESPONSE_NO)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("exit_cleanly(%d)\n", force);
|
||||
#endif /* DEBUG */
|
||||
gtk_main_quit();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ main() */
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
GtkApplication *app;
|
||||
int status;
|
||||
#ifdef DEBUG
|
||||
debug_init();
|
||||
#endif /* DEBUG */
|
||||
|
||||
Context;
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
textdomain(GETTEXT_PACKAGE);
|
||||
|
||||
app = gtk_application_new("org.botcommander.gtk", G_APPLICATION_FLAGS_NONE);
|
||||
g_signal_connect(app, "startup", G_CALLBACK(startup), NULL);
|
||||
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
|
||||
status = g_application_run(G_APPLICATION(app), argc, argv);
|
||||
g_object_unref(app);
|
||||
Context;
|
||||
|
||||
return status;
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
if (!init_config())
|
||||
return 1;
|
||||
|
||||
read_config_data();
|
||||
read_bot_list_from_config();
|
||||
|
||||
tab_list = NULL;
|
||||
|
||||
g_set_prgname("BotCommander");
|
||||
g_set_application_name("BotCommander");
|
||||
|
||||
create_main_window();
|
||||
|
||||
add_tab(NULL);
|
||||
|
||||
gtk_main();
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
/* vim: set foldmethod=marker : */
|
||||
/* {{{ Legal info
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
}}} */
|
||||
/* {{{ Author and file info
|
||||
* networking.c
|
||||
*
|
||||
* Wed Nov 09 22:16:59 2005
|
||||
* Copyright (C) 2005 Gergely POLONKAI
|
||||
* polesz@techinfo.hu
|
||||
*
|
||||
* Network-handling functions
|
||||
}}} */
|
||||
|
||||
/* {{{ Includes */
|
||||
#include <gtk/gtk.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "defines.h"
|
||||
#include "typedefs.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
/* }}} */
|
||||
|
||||
/* {{{ connect_to_host() */
|
||||
gint
|
||||
connect_to_host(gchar *host, guint port, int *fd, gint *tag, t_tab_data *tab)
|
||||
{
|
||||
int desc;
|
||||
static struct protoent *p = NULL;
|
||||
struct hostent *h = NULL;
|
||||
struct sockaddr_in dest;
|
||||
|
||||
if (tab)
|
||||
feed_info_to_terminal(tab, TRUE, _("Connecting to %s:%d"), host, port);
|
||||
|
||||
if (!p)
|
||||
{
|
||||
if ((p = getprotobyname("IP")) == NULL)
|
||||
return BCE_NOPROTO;
|
||||
}
|
||||
desc = socket(PF_INET, SOCK_STREAM, p->p_proto);
|
||||
fcntl(desc, F_SETFL, O_NONBLOCK);
|
||||
|
||||
if ((h = gethostbyname(host)) == NULL)
|
||||
return BCE_CANTRESOLV;
|
||||
|
||||
memset(&dest, 0, sizeof(struct sockaddr_in));
|
||||
dest.sin_family = AF_INET;
|
||||
dest.sin_addr = *((struct in_addr *)h->h_addr);
|
||||
dest.sin_port = htons(port);
|
||||
|
||||
if (connect(desc, (struct sockaddr *)&dest, sizeof(struct sockaddr)) < 0)
|
||||
{
|
||||
if (errno != EINPROGRESS)
|
||||
{
|
||||
if (tab)
|
||||
{
|
||||
char *buf = NULL;
|
||||
char *orig = strerror(errno);
|
||||
|
||||
buf = g_locale_to_utf8(orig, -1, NULL, NULL, NULL);
|
||||
feed_error_to_terminal(tab, TRUE, "%s", buf);
|
||||
g_free(buf);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
perror("BotCommander: connect");
|
||||
#endif /* DEBUG */
|
||||
return BCE_CANTCONNECT;
|
||||
}
|
||||
}
|
||||
|
||||
if (fd)
|
||||
*fd = desc;
|
||||
if (tag)
|
||||
*tag = gdk_input_add(desc, GDK_INPUT_READ | GDK_INPUT_EXCEPTION, socket_event, tab);
|
||||
|
||||
return BCE_SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ process_incoming_data() */
|
||||
void
|
||||
process_incoming_data(t_tab_data *tab, char *string)
|
||||
{
|
||||
char *obuf;
|
||||
|
||||
obuf = g_convert(string, -1, "UTF-8", BOT_CHARSET, NULL, NULL, NULL);
|
||||
if (strncmp(obuf, "BC", 2) == 0)
|
||||
process_botcommander_script_commands(tab, obuf);
|
||||
else
|
||||
feed_message_to_terminal(tab, TRUE, obuf);
|
||||
}
|
||||
/* }}} */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue