Code Restructuring to make mega-glest more standard

This commit is contained in:
Mark Vejvoda 2010-03-12 05:20:53 +00:00
parent 7cb4f99ec4
commit 43c3f2457e
399 changed files with 0 additions and 73357 deletions

View File

@ -1,93 +0,0 @@
###########################
#Glest Community Megapack #
###########################
( from http://www.titusgames.de )
Factions:
=========
Indians:
Copyright 2007-2010 (C) Titus Tscharntke(titi) & Philipp Tscharntke ( http://www.titusgames.de )
The Norsemen:
Copyright 2008-2010 (C) Titus Tscharntke(titi) & Raphael Schröder(weedkiller) & Philipp Tscharntke ( http://www.titusgames.de )
The Persian:
Copyright 2010 (C) Titus Tscharntke(titi) & Philipp Tscharntke ( http://www.titusgames.de )
The Norsemen:
Copyright 2008-2010 (C) Titus Tscharntke(titi) & Raphael Schröder(weedkiller) & Philipp Tscharntke ( http://www.titusgames.de )
The Egypts:
Copyright 2010-2010 (C) Titus Tscharntke(titi) ( http://www.titusgames.de )
Tech and Magic:
The factions tech and magic are from the original game glest ( a bit modified now ).
( copyrighted by the glest team www.glest.org )
The new factions Indians/Norsemen/Persian use some models from original glest!
Tilesets:
=========
Tileset Jungle: by Titus Tscharntke(titi) & Philipp Tscharntke
Tileset Evergreen: by Titus Tscharntke(titi)
Tileset Autumn: by Titus Tscharntke(titi)
Tileset Desert2: by Idanwin and Titus Tscharntke(titi)
Tileset Winter: by Titus Tscharntke(titi)
Tileset Hell: by Titus Tscharntke(titi)
Tileset Mediterran: by Titus Tscharntke(titi)
Tileset Scurbland: by MadElf (improved a bit by titi)
Maps:
=====
conflict by ttsmj
domination_isles by mapmaker(from the glest forum)
one_on_one by original glest team ( but no longer in the game yet )
overgrown_city by mapmaker and Titus Tscharntke(titi)
tropical_arena by mapmaker(from the glest forum)
tt_goldrush_v2 by Titus Tscharntke(titi)
waterworld by Titus Tscharntke(titi)
Scenarios:
==========
m4_amazones by Titus Tscharntke(titi)
m4_amazones_light by Titus Tscharntke(titi)
m4_beehive_castle by Titus Tscharntke(titi)
m4_indian_attack by Titus Tscharntke(titi)
m4_kill_the_magic by Titus Tscharntke(titi)
m4_magic_can_do_it by Titus Tscharntke(titi)
m4_my_island by Titus Tscharntke(titi)
m4_norsemen_attack by Titus Tscharntke(titi)
m4_persian_conflict by Philipp Tscharntke
m4_waterworld_light by Titus Tscharntke(titi)
m4_waterworld by Titus Tscharntke(titi)
Credits go to:
==============
The original glest team who made all this possible!!!
Aminos for the indians and persian background music !!
Margaras for the egypt background music!!
manolo camp for the background music(norsemen)!!
http://www.burningwell.org who have nice free (public domain) textures!
Gameboy for the norsemen icons
Weedkiller who created the spearman model of the indians, and the princess and swordman model of the persian faction
My family, some friends and neighbors for the unit voices.
ZaggyDad for some help with textures/models (norsemen) and for the persian elephant model.
Baida for the axe_thrower model (norsemen)
erdie (from http://www.freesound.org) for the autumn day sound
patchen (from http://www.freesound.org) for the autumn night sound
royal (from http://www.freesound.org) for the desert day sound
Cacatoes (from http://forum.freegamedev.net/) for a nice rock texture photo used in autumn tileset.
INFO:
Some source textures distributed with the tilesets(evergreen/autumn) are copyrighted by CGTextures.com. Permission to release these specific textures has been granted to the creator of these tilesets.
!!Textures downloaded from CGTextures.com DO NOT fall under any GPL or Creative Commons License by default.!!
( !!! Texture Hint: Better use textures from www.burningwell.org which are really free to use (public domain)!!!)
All files are released under the Terms of the
Attribution-ShareAlike 3.0 Unported license ( see data_license.txt )

View File

@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) 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
this service 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. 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.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.
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
convey 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 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 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision 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, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This 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 Library General
Public License instead of this License.

View File

@ -1,77 +0,0 @@
Attribution-ShareAlike 3.0 Unported
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.
3. "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.
4. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
5. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.
6. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
7. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
8. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
9. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
10. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
11. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
4. to Distribute and Publicly Perform Adaptations.
5.
For the avoidance of doubt:
1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested.
2. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.
3. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
4. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
Creative Commons Notice
Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License.
Creative Commons may be contacted at http://creativecommons.org/.
« Back to Commons Deed

View File

@ -1,7 +0,0 @@
Glest source code v3.2.x - Copyright (C) 2002-2009 Martiño Figueroa (www.glest.org - contact_game@glest.org).
You can redistribute this code 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.
For compilation instructions or any other info please visit the developer board at http://www.glest.org
The data (including images and 3D models) is provided under the "Attribution-ShareAlike" Creative Commons license. This license lets others remix, tweak, and build upon your work even for commercial reasons, as long as they credit you and license their new creations under the identical terms. This license is often compared to open source software licenses. All new works based on yours will carry the same license, so any derivatives will also allow commercial use.

View File

@ -1,124 +0,0 @@
Glest linux port
by Matthias Braun
1. System requirements
Developed on Linux with glibc, little endian cpu. The game does currently not
work on big endian cpus like ppc. There are some unfinished patches floating
around the glest board, so this might improve (feel free to send me
updated/finished ppc patches).
Graphics card + OpenGL libraries that support OpenGL 1.3 and shader extensions
(=opengl 1.4 or glUseProgramObjectARB and co.)
The app has been reported to run fine on a 900Mhz Athlon box with nvidia geforce
3 graphics card.
It seems that the game also runs on geforce 2 and geforce mx class hardware when
you disable 3d textures and shadowmaps in the options menu. The game seems not
to work with the open source (ATI) DRI drivers. It has reported to run nicely
with ATIs proprietary drivers though.
2. Building and Installation
2.1 Prerequesites
The game depends on some tools and libraries to be present, before you can
start compiling it. Here's a list of them:
* normal gnu compiler and additional tools (g++ version 3.2 or later is
required at the moment)
* perforce jam 2.5 or later (used as build tool)
ftp://ftp.perforce.com/pub/jam
* X11 libraries +headers
http://www.x.org (or the older http://www.xfree86.org)
* SDL 1.2.5 or later
http://www.libsdl.org
* Xerces-C
http://xml.apache.org/xerces-c/index.html
* OpenAL
http://www.openal.org
* Ogg
http://www.xiph.org/ogg/vorbis
* Vorbis
http://www.vorbis.com
If the configure script can't find some of the libraries, make sure that you
also have the -dev packages installed that some distributions provide.
At this point I'd like to thank all the authors of these helpful libraries
that made our development easy and straightforward.
2.2 Building
To build and install the game use the following commands
./configure
jam
Note: if you got the game from the subversion repository then you have to
change to the mk/linux directory first and create a configure script:
cd mk/linux
./autogen.sh
2.3 Installation
Unfortunately there is no real installation mechanism present yet (jam install
does NOT work correctly). Please copy the executable file named "glest" and the
example linux config "glest.ini" into the directory where you extracted the
datafiles and start the game there.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3. Troubleshooting
Some hints for troubleshooting.
In General:
* Make sure you fullfill the system requirement above
* Sound is played through OpenAL you might take a look at your openal
configuration: http://supertux.lethargik.org/wiki/OpenAL_Configuration
Compiling:
* If configure fails make sure you have read the Building section above
* If you don't manage to get it compiled, you can get a precompiled version for
x86 (32bit) at http://www.lifl.org
Sound/Audio errors when starting
* If the game doesn't start because of audio/sound errors:
Make sure no other application is using your soundcard. Typical problems
are the gnome/kde sound dameons esd and artsd. You can kill these 2
daemons with
killall esd ; killall artsd
* If this doesn't solve your sound problems try to get an updated OpenAL from
somewhere, unfortunately there hasn't been an official OpenAL version up to
now so distributions are only packing some preliminary snapshots. Some
distributions seem to have bad versions that don't work (SuSE 9.2 is such a
distribution)
(The compiled binary from lifl.org has openal included and should not be
affected by this problem)
The game complains about opengl1.3 not available, is missing opengl extensions
or works very slowly
* Make sure you fullfill the system requirements
* look at glxinfo and make sure the system is using ATI or NVIDIA driver and NOT the
mesa drivers ("glxinfo | grep -i mesa" should return nothing)
The game crashs
* Fedora3 seems to have problems with the precompiled glest binaries -> compile
the application yourself
* There are some bugs related to the font code which I can't reproduce and am
unable to fix without further input. Someone can help me with this?
* The game does not work on ppc (big endian architectures) yet
* Check the forums at www.glest.org
* It would be nice if you could report any other crashs that are not described
here yet (or post them to the forum at www.glest.org) preferably with gdb
backtrace from a debugging enabled build (configure --enable-debug)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. Contact
Original Glest is from http://www.glest.org
Linux port by Matthias Braun <matze@braunis.de> with help from
Karl Robillard <krobbillard@san.rr.com>

View File

@ -1,75 +0,0 @@
SubDir TOP ;
UseAutoconf ;
Package license.txt readme.txt ;
#### Library ####
SubDir TOP shared_lib sources ;
LIB_DIRS =
platform/sdl
platform/posix
util
graphics
graphics/gl
sound
sound/openal
xml
glew
lua
;
LIB_INCLUDE_DIRS = ../include/$(LIB_DIRS) ;
for i in $(LIB_DIRS) {
LIB_SOURCES += [ Wildcard $(i) : *.c *.cpp *.h ] ;
}
Library glestlib : $(LIB_SOURCES) ;
ExternalLibs glestlib : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL LUA ;
IncludeDir glestlib : $(LIB_INCLUDE_DIRS) ;
#### Game ####
SubDir TOP glest_game ;
GLEST_DIRS =
.
ai
facilities
game
global
graphics
gui
main
menu
network
sound
type_instances
types
world
;
for i in $(GLEST_DIRS) {
GLEST_SOURCES += [ Wildcard $(i) : *.cpp *.h ] ;
}
Application glest.bin : $(GLEST_SOURCES) ;
LinkWith glest.bin : glestlib ;
ExternalLibs glest.bin : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL LUA ;
IncludeDir glest.bin : ../shared_lib/include/$(LIB_INCLUDE_DIRS) $(GLEST_DIRS) ;
#### Editor ####
if $(WX_AVAILABLE) = "yes" {
SubDir TOP glest_map_editor ;
GLEST_MAP_DIRS = . ;
for i in $(GLEST_DIRS) {
GLEST_MAP_SOURCES += [ Wildcard $(i) : *.cpp *.h ] ;
}
Application glest_editor : $(GLEST_MAP_SOURCES) ;
LinkWith glest_editor : glestlib ;
ExternalLibs glest_editor : SDL GL GLU XERCES VORBIS VORBISFILE OGG OPENAL WX ;
IncludeDir glest_editor : ../shared_lib/include/$(LIB_INCLUDE_DIRS) $(GLEST_MAP_DIRS) ;
}

View File

@ -1,39 +0,0 @@
if ! $(top_builddir)
{
top_builddir = $(TOP) ;
}
top_srcdir = $(TOP) ;
JAMCONFIG ?= $(top_builddir)/Jamconfig ;
include $(JAMCONFIG) ;
if ! $(JAMCONFIG_READ)
{
EXIT "Couldn't find config. Please run 'configure' first." ;
}
if $(USE_STLPORT_DEBUG)
{
CPPFLAGS += -I/usr/include/stlport ;
CPPFLAGS += -D_STLP_DEBUG=1 -D_STLP_DEBUG_UNINITIALIZED=1 ;
CPPFLAGS += -D_STLP_SHRED_BYTE=0xA3 ;
LIBS += -lstlport_gcc_debug ;
}
COMPILER_CFLAGS += -Wall -W -Wno-unused -Wno-sign-compare ;
COMPILER_CFLAGS_optimize += -O3 -DNDEBUG ;
COMPILER_CXXFLAGS_optimize += -O3 -DNDEBUG ;
COMPILER_LIBS_optimize += ;
COMPILER_CFLAGS_debug += -DDEBUG -g3 ;
COMPILER_CXXFLAGS_debug += -DDEBUG -g3 ;
COMPILER_LIBS_debug += -g3 ;
COMPILER_CFLAGS_profile += -O3 -fno-inline -pg ;
COMPILER_CXXFLAGS_profile += -O3 -fno-inline -g3 -pg ;
COMPILER_LIBS_profile += -pg ;
LINK = $(CXX) ;
# Include build rules
include $(TOP)/mk/jam/build.jam ;
# Include Dirs
IncludeDir $(top_builddir) ; # for config.h

View File

@ -1,37 +0,0 @@
#!/bin/sh
# Correct working directory?
if test ! -f configure.ac ; then
echo "*** Please invoke this script from directory containing configure.ac."
exit 1
fi
echo "aclocal..."
#autoheader
aclocal -I mk/autoconf
# generate Jamconfig.in
echo "generating Jamconfig.in ..."
autoconf --trace=AC_SUBST \
| sed -e 's/configure.ac:[0-9]*:AC_SUBST:\([^:]*\).*/\1 ?= "@\1@" ;/g' \
> Jamconfig.in
sed -e 's/.*BACKSLASH.*//' -i~ Jamconfig.in
rm Jamconfig.in~
echo 'INSTALL ?= "@INSTALL@" ;' >> Jamconfig.in
echo 'JAMCONFIG_READ = yes ;' >> Jamconfig.in
echo "autoconf"
autoconf
# create symlinks to the source dirs
echo "Updating Source symlinks..."
if [ ! -d shared_lib ]; then
ln -sf ../../source/shared_lib .
fi
if [ ! -d glest_game ]; then
ln -sf ../../source/glest_game .
fi
if [ ! -d glest_map_editor ]; then
ln -sf ../../source/glest_map_editor .
fi

View File

@ -1,131 +0,0 @@
#----------------------------------------------------------------------------
# Autoconf input script. Start the ./autgen.sh script for producing a
# configure script.
#----------------------------------------------------------------------------
AC_PREREQ([2.54])
AC_INIT([megaglest], [3.2.4-1-beta3], [matze@braunis.de])
AC_CONFIG_SRCDIR([mk/jam/build.jam])
AC_CONFIG_AUX_DIR([mk/autoconf])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
#----------------------------------------------------------------------------
# Configuration header
#----------------------------------------------------------------------------
AC_C_BIGENDIAN()
# stupid autoconf is adding default -g -O2 flags when we don't want this :-/
test ".$CXXFLAGS" = "." && CXXFLAGS=" "
#----------------------------------------------------------------------------
# Check for build variant (debug, profile, optimize)
#----------------------------------------------------------------------------
VARIANT=optimize
AC_ARG_ENABLE([optimize], [AC_HELP_STRING([--enable-optimize],
[build with optimizations enabled (default YES)])],
[test "$enableval" = "yes" && VARIANT=optimize])
AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug],
[build with debugging information (default NO)])],
[test "$enableval" = "yes" && VARIANT=debug])
AC_ARG_ENABLE([profile], [AC_HELP_STRING([--enable-profile],
[build with profiling information (default NO)])],
[test "$enableval" = "yes" && VARIANT=profile])
AC_SUBST([VARIANT])
#----------------------------------------------------------------------------
# find applications
#----------------------------------------------------------------------------
AC_PROG_CXX
AC_PROG_INSTALL
#----------------------------------------------------------------------------
# Check for operating system
#----------------------------------------------------------------------------
AC_MSG_CHECKING([for target host])
winapi_available=no
case $host_os in
mingw*|cygwin*)
AC_MSG_RESULT([WIN32])
winapi_available=yes
AC_DEFINE([USE_WINSOCK], [], [Define if winsock should be used])
LIBS="$LIBS -lwsock32"
;;
*)
AC_MSG_RESULT([assume posix])
AC_DEFINE([USE_POSIX_SOCKETS], [],
[Define if posix sockets should be used])
AC_PATH_X
if test "$no_x" != "yes"; then
AC_DEFINE([X11_AVAILABLE], [1], [Defined if X11 is avilable])
else
AC_MSG_ERROR("Please install X11 libraries and headers.")
fi
;;
esac
#----------------------------------------------------------------------------
# find libraries
#----------------------------------------------------------------------------
AC_CHECK_HEADERS([glob.h sys/ioctl.h sys/filio.h])
AX_TYPE_SOCKLEN_T
AM_PATH_SDL([1.2.5],
[AC_DEFINE([USE_SDL], [], [Define when SDL should be used])], [
if test "$winapi_available" != "yes"; then
AC_MSG_ERROR([Please install libsdl >= 1.2.])
else
AC_DEFINE([USE_WINAPI], [], [Define if win32 API should be used])
fi
])
AC_LANG_PUSH([C++])
NP_FINDLIB([XERCES], [xerces], [xerces],
NP_LANG_PROGRAM([#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_USE;], [XMLPlatformUtils::Initialize();]),
[], [-lxerces-c -lpthread],
[],
[AC_MSG_ERROR([Please install xerces-c])],
[], [])
AC_LANG_POP([C++])
NP_FINDLIB([OPENAL], [OpenAL], [OpenAL],
NP_LANG_PROGRAM([#include <AL/al.h>],
[alcOpenDevice(0);]),
[], [-lopenal],
[],
[AC_MSG_ERROR([Please intall OpenAL])],
[], [])
CHECK_LUA([], [AC_MSG_ERROR([Please install lua 5.1])])
AX_CHECK_GL
if test "$no_gl" = "yes"; then
AC_MSG_ERROR([You need to have OpenGL headers and libraries installed])
fi
AX_CHECK_GLU
if test "$no_glu" = "yes"; then
AC_MSG_ERROR([You need to have GLU headers and libraries installed])
fi
XIPH_PATH_VORBIS(, [AC_MSG_ERROR([Please install vorbis])])
XIPH_PATH_OGG(, [AC_MSG_ERROR([Please install ogg/vorbis])])
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG([2.6.0], [WX_AVAILABLE="yes"], [WX_AVAILABLE="no"], [std,gl], [--unicode=yes])
AC_SUBST([WX_AVAILABLE])
AC_INIT_JAM
AC_CONFIG_FILES([Jamconfig])
AC_OUTPUT
AC_MSG_NOTICE([
Notice: This project uses jam (and not make) as build tool.
])

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/data

View File

@ -1,25 +0,0 @@
#!/bin/sh
# Library directory
LIBDIR="lib"
# If we are launching from a symlink, such as /usr/local/bin/runglest.sh, we need to get where
# the symlink points to
pth="`readlink $0`"
# $pth will be empty if our start path wasnt a symlink
if [ $pth ]; then
GAMEDIR="`dirname $pth`"
else
GAMEDIR="`dirname $0`"
fi
# Change to the game dir, and go!
cd $GAMEDIR
# export game library directory
test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}"
#./glest.bin > glest.log 2>&1
./glest.bin
# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1

View File

@ -1,47 +0,0 @@
; === propertyMap File ===
AiLog=0
AiRedir=0
AutoTest=0
CheckGlCaps=1
ColorBits=32
ConsoleMaxLines=10
ConsoleTimeout=10
DayTime=1000
DebugMode=0
DepthBits=16
FactoryGraphics=OpenGL
FactorySound=OpenAL
FastSpeedLoops=2
Filter=Bilinear
FilterMaxAnisotropy=1
FirstTime=0
FocusArrows=1
FogOfWar=1
FogOfWarSmoothing=1
FogOfWarSmoothingFrameSkip=3
FontConsole=-*-*-*-*-*-*-12-*-*-*-*-*-*-*
FontDisplay=-*-*-*-*-*-*-12-*-*-*-*-*-*-*
FontMenu=-*-*-*-*-*-*-12-*-*-*-*-*-*-*
Lang=english
MaxLights=3
NetworkConsistencyChecks=0
PhotoMode=0
RefreshFrequency=75
ScreenHeight=984
ScreenWidth=1680
ServerIp=200.200.200.200
ServerPort=6666
ShadowAlpha=0.2
ShadowFrameSkip=2
ShadowTextureSize=512
Shadows=Projected
SoundStaticBuffers=16
SoundStreamingBuffers=4
SoundVolumeAmbient=90
SoundVolumeFx=100
SoundVolumeMusic=0
StencilBits=0
Textures3D=1
UnitParticles=1
Windowed=1

View File

@ -1 +0,0 @@
../../source/glest_game

View File

@ -1 +0,0 @@
../../source/glest_map_editor

View File

@ -1,31 +0,0 @@
#!/bin/bash
VERSION=`autoconf -t AC_INIT | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/g'`
RELEASENAME=megaglest-source
RELEASEDIR="`pwd`/release/$RELEASENAME-$VERSION"
echo "Creating source package in $RELEASEDIR"
rm -rf $RELEASEDIR
mkdir -p $RELEASEDIR
# copy sources
pushd "`pwd`/../../source"
find glest_game/ \( -name "*.cpp" -o -name "*.h" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
find shared_lib/ \( -name "*.cpp" -o -name "*.h" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
find glest_map_editor/ \( -name "*.cpp" -o -name "*.h" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
popd
AUTOCONFSTUFF="configure.ac autogen.sh Jamrules Jamfile `find mk/jam -name "*.jam"` `find mk/autoconf -name "*.m4" -o -name "config.*" -o -name "*sh"`"
cp -p --parents $AUTOCONFSTUFF $RELEASEDIR
cp -p ../../docs/readme*.txt ../../docs/*license*.txt $RELEASEDIR
cp -p glest.ini $RELEASEDIR
pushd $RELEASEDIR
./autogen.sh
popd
pushd release
PACKAGE="$RELEASENAME-$VERSION.tar.bz2"
echo "creating $PACKAGE"
tar -c --bzip2 -f "$PACKAGE" "$RELEASENAME-$VERSION"
popd

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/maps

View File

@ -1,235 +0,0 @@
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl This macro figures out how to build C programs using POSIX threads.
dnl It sets the PTHREAD_LIBS output variable to the threads library and
dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
dnl C compiler flags that are needed. (The user can also force certain
dnl compiler flags/libs to be tested by setting these environment
dnl variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise).
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl NOTE: You are assumed to not only compile your program with these
dnl flags, but also link it with them as well. e.g. you should link
dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
dnl $LIBS
dnl
dnl If you are only building threads programs, you may wish to use
dnl these variables in your default LIBS, CFLAGS, and CC:
dnl
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
dnl CC="$PTHREAD_CC"
dnl
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
dnl default action will define HAVE_PTHREAD.
dnl
dnl Please let the authors know if this macro fails on any platform, or
dnl if you have any other suggestions or comments. This macro was based
dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
dnl We are also grateful for the helpful feedback of numerous users.
dnl
dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2005-01-14
dnl @license GPLWithACException
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
[attr_name=$attr; break])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD

View File

@ -1,95 +0,0 @@
dnl @synopsis AX_CHECK_GL
dnl
dnl Check for an OpenGL implementation. If GL is found, the required
dnl compiler and linker flags are included in the output variables
dnl "GL_CFLAGS" and "GL_LIBS", respectively. This macro adds the
dnl configure option "--with-apple-opengl-framework", which users can
dnl use to indicate that Apple's OpenGL framework should be used on Mac
dnl OS X. If Apple's OpenGL framework is used, the symbol
dnl "HAVE_APPLE_OPENGL_FRAMEWORK" is defined. If no GL implementation
dnl is found, "no_gl" is set to "yes".
dnl
dnl @category InstalledPackages
dnl @author Braden McDaniel <braden@endoframe.com>
dnl @version 2004-11-15
dnl @license AllPermissive
AC_DEFUN([AX_CHECK_GL],
[AC_REQUIRE([AC_PATH_X])dnl
AC_REQUIRE([ACX_PTHREAD])dnl
#
# There isn't a reliable way to know we should use the Apple OpenGL framework
# without a configure option. A Mac OS X user may have installed an
# alternative GL implementation (e.g., Mesa), which may or may not depend on X.
#
AC_ARG_WITH([apple-opengl-framework],
[AC_HELP_STRING([--with-apple-opengl-framework],
[use Apple OpenGL framework (Mac OS X only)])])
if test "X$with_apple_opengl_framework" = "Xyes"; then
AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1],
[Use the Apple OpenGL framework.])
GL_LIBS="-framework OpenGL"
else
AC_LANG_PUSH(C)
AX_LANG_COMPILER_MS
if test X$ax_compiler_ms = Xno; then
GL_CFLAGS="${PTHREAD_CFLAGS}"
GL_LIBS="${PTHREAD_LIBS} -lm"
fi
#
# Use x_includes and x_libraries if they have been set (presumably by
# AC_PATH_X).
#
if test "X$no_x" != "Xyes"; then
if test -n "$x_includes"; then
GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}"
fi
if test -n "$x_libraries"; then
GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}"
fi
fi
AC_CHECK_HEADERS([windows.h])
AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl],
[ax_cv_check_gl_libgl="no"
ax_save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
ax_save_LIBS="${LIBS}"
LIBS=""
ax_check_libs="-lopengl32 -lGL"
for ax_lib in ${ax_check_libs}; do
if test X$ax_compiler_ms = Xyes; then
ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
else
ax_try_lib="${ax_lib}"
fi
LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
# if HAVE_WINDOWS_H && defined(_WIN32)
# include <windows.h>
# endif
# include <GL/gl.h>]],
[[glBegin(0)]])],
[ax_cv_check_gl_libgl="${ax_try_lib}"; break])
done
LIBS=${ax_save_LIBS}
CPPFLAGS=${ax_save_CPPFLAGS}])
if test "X${ax_cv_check_gl_libgl}" = "Xno"; then
no_gl="yes"
GL_CFLAGS=""
GL_LIBS=""
else
GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}"
fi
AC_LANG_POP(C)
fi
AC_SUBST([GL_CFLAGS])
AC_SUBST([GL_LIBS])
])dnl

View File

@ -1,71 +0,0 @@
dnl @synopsis AX_CHECK_GLU
dnl
dnl Check for GLU. If GLU is found, the required preprocessor and
dnl linker flags are included in the output variables "GLU_CFLAGS" and
dnl "GLU_LIBS", respectively. This macro adds the configure option
dnl "--with-apple-opengl-framework", which users can use to indicate
dnl that Apple's OpenGL framework should be used on Mac OS X. If
dnl Apple's OpenGL framework is used, the symbol
dnl "HAVE_APPLE_OPENGL_FRAMEWORK" is defined. If no GLU implementation
dnl is found, "no_glu" is set to "yes".
dnl
dnl @category InstalledPackages
dnl @author Braden McDaniel <braden@endoframe.com>
dnl @version 2004-11-15
dnl @license AllPermissive
AC_DEFUN([AX_CHECK_GLU],
[AC_REQUIRE([AX_CHECK_GL])dnl
AC_REQUIRE([AC_PROG_CXX])dnl
GLU_CFLAGS="${GL_CFLAGS}"
if test "X${with_apple_opengl_framework}" != "Xyes"; then
AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu],
[ax_cv_check_glu_libglu="no"
ax_save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}"
ax_save_LIBS="${LIBS}"
LIBS=""
ax_check_libs="-lglu32 -lGLU"
for ax_lib in ${ax_check_libs}; do
if test X$ax_compiler_ms = Xyes; then
ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
else
ax_try_lib="${ax_lib}"
fi
LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}"
#
# libGLU typically links with libstdc++ on POSIX platforms. However,
# setting the language to C++ means that test program source is named
# "conftest.cc"; and Microsoft cl doesn't know what to do with such a
# file.
#
AC_LANG_PUSH([C++])
if test X$ax_compiler_ms = Xyes; then
AC_LANG_PUSH([C])
fi
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
# if HAVE_WINDOWS_H && defined(_WIN32)
# include <windows.h>
# endif
# include <GL/glu.h>]],
[[gluBeginCurve(0)]])],
[ax_cv_check_glu_libglu="${ax_try_lib}"; break])
if test X$ax_compiler_ms = Xyes; then
AC_LANG_POP([C])
fi
AC_LANG_POP([C++])
done
LIBS=${ax_save_LIBS}
CPPFLAGS=${ax_save_CPPFLAGS}])
if test "X${ax_cv_check_glu_libglu}" = "Xno"; then
no_glu="yes"
GLU_CFLAGS=""
GLU_LIBS=""
else
GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}"
fi
fi
AC_SUBST([GLU_CFLAGS])
AC_SUBST([GLU_LIBS])
])

View File

@ -1,23 +0,0 @@
dnl @synopsis AX_LANG_COMPILER_MS
dnl
dnl Check whether the compiler for the current language is Microsoft.
dnl
dnl This macro is modeled after _AC_LANG_COMPILER_GNU in the GNU
dnl Autoconf implementation.
dnl
dnl @category InstalledPackages
dnl @author Braden McDaniel <braden@endoframe.com>
dnl @version 2004-11-15
dnl @license AllPermissive
AC_DEFUN([AX_LANG_COMPILER_MS],
[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler],
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER
choke me
#endif
]])],
[ax_compiler_ms=yes],
[ax_compiler_ms=no])
ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
])])

View File

@ -1,23 +0,0 @@
dnl @synopsis TYPE_SOCKLEN_T
dnl
dnl Check whether sys/socket.h defines type socklen_t. Please note
dnl that some systems require sys/types.h to be included before
dnl sys/socket.h can be compiled.
dnl
dnl @version $Id: ax_type_socklen_t.m4,v 1.1 2005/06/12 18:14:34 matzebraun Exp $
dnl @author Lars Brinkhoff <lars@nocrew.org>
dnl
AC_DEFUN([AX_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[socklen_t len = 42; return 0;],
ac_cv_type_socklen_t=yes,
ac_cv_type_socklen_t=no)
])
if test $ac_cv_type_socklen_t != yes; then
AC_DEFINE(socklen_t, int, [define socklen_t if sys headers don't do that])
fi
])

View File

@ -1,77 +0,0 @@
# Check for binary relocation support
# Hongli Lai
# slightly modified by Matze (don't enable automatically)
# http://autopackage.org/
AC_DEFUN([AM_BINRELOC],
[
AC_ARG_ENABLE(binreloc,
[ --enable-binreloc compile with binary relocation support
(default=disabled)],
enable_binreloc=$enableval,enable_binreloc=no)
AC_ARG_ENABLE(binreloc-threads,
[ --enable-binreloc-threads compile binary relocation with threads support
(default=yes)],
enable_binreloc_threads=$enableval,enable_binreloc_threads=yes)
BINRELOC_CFLAGS=
BINRELOC_LIBS=
if test "x$enable_binreloc" = "xauto"; then
AC_CHECK_FILE([/proc/self/maps])
AC_CACHE_CHECK([whether everything is installed to the same prefix],
[br_cv_valid_prefixes], [
if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
"$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
"$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
then
br_cv_valid_prefixes=yes
else
br_cv_valid_prefixes=no
fi
])
fi
AC_CACHE_CHECK([whether binary relocation support should be enabled],
[br_cv_binreloc],
[if test "x$enable_binreloc" = "xyes"; then
br_cv_binreloc=yes
elif test "x$enable_binreloc" = "xauto"; then
if test "x$br_cv_valid_prefixes" = "xyes" -a \
"x$ac_cv_file__proc_self_maps" = "xyes"; then
br_cv_binreloc=yes
else
br_cv_binreloc=no
fi
else
br_cv_binreloc=no
fi])
if test "x$br_cv_binreloc" = "xyes"; then
#BINRELOC_CFLAGS="-DENABLE_BINRELOC"
AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?])
if test "x$enable_binreloc_threads" = "xyes"; then
AC_CHECK_LIB([pthread], [pthread_getspecific])
fi
AC_CACHE_CHECK([whether binary relocation should use threads],
[br_cv_binreloc_threads],
[if test "x$enable_binreloc_threads" = "xyes"; then
if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then
br_cv_binreloc_threads=yes
else
br_cv_binreloc_threads=no
fi
else
br_cv_binreloc_threads=no
fi])
if test "x$br_cv_binreloc_threads" = "xyes"; then
BINRELOC_LIBS="-lpthread"
AC_DEFINE(BR_PTHREAD,1,[Include pthread support for binary relocation?])
else
BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREADS=0"
AC_DEFINE(BR_PTHREAD,0,[Include pthread support for binary relocation?])
fi
fi
AC_SUBST(BINRELOC_CFLAGS)
AC_SUBST(BINRELOC_LIBS)
])

View File

@ -1,97 +0,0 @@
# derived from lua.m4 in mod_wombat from httpd.apache.org
# http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/build/ac-macros/lua.m4?view=markup
# which is under Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
#
# Apache mod_wombat
# Copyright 2006 The Apache Software Foundation
#
# This product includes software developed at
# The Apache Software Foundation (http://www.apache.org/).
#
# This software makes use of Lua ( http://www.lua.org/ )
# developed by Copyright 1994-2006 Lua.org, PUC-Rio.
# Lua is distributed under the MIT license
# ( http://www.lua.org/license.html ).
#
# ==========================================
# Check for Lua 5.1 Libraries
# CHECK_LUA(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
# Sets:
# LUA_AVAILABLE
# LUA_CFLAGS
# LUA_LIBS
AC_DEFUN([CHECK_LUA],
[
AC_ARG_WITH(
lua,
[AC_HELP_STRING([--with-lua=PFX],[Prefix where Lua 5.1 is installed (optional)])],
lua_pfx="$withval",
:)
# Determine lua lib directory
if test -z "${lua_pfx}"; then
paths="/usr/local /usr"
else
paths="${lua_pfx}"
fi
[LUA_AVAILABLE=no
LUA_LIBS=""
LUA_CFLAGS=""]
AC_CHECK_LIB([m], [pow], lib_m=" -lm")
AC_LANG_PUSH([C++])
for p in $paths ; do
AC_MSG_CHECKING([for lua.hpp in ${p}/include/lua5.1])
if test -f ${p}/include/lua5.1/lua.hpp; then
AC_MSG_RESULT([yes])
save_CFLAGS=$CFLAGS
save_LDFLAGS=$LDFLAGS
CFLAGS="$CFLAGS"
LDFLAGS="-L${p}/lib $LDFLAGS $lib_m"
AC_CHECK_LIB(lua5.1, luaL_newstate,
[
LUA_AVAILABLE=yes
LUA_LIBS="-L${p}/lib -llua5.1"
LUA_CFLAGS="-I${p}/include/lua5.1"
])
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
break
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([for lua.hpp in ${p}/include])
if test -f ${p}/include/lua.hpp; then
AC_MSG_RESULT([yes])
save_CFLAGS=$CFLAGS
save_LDFLAGS=$LDFLAGS
CFLAGS="$CFLAGS"
LDFLAGS="-L${p}/lib $LDFLAGS $lib_m"
AC_CHECK_LIB(lua, luaL_newstate,
[
LUA_AVAILABLE=yes
LUA_LIBS="-L${p}/lib -llua"
LUA_CFLAGS="-I${p}/include"
])
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
break
else
AC_MSG_RESULT([no])
fi
done
AC_LANG_POP([C++])
AC_SUBST(LUA_AVAILABLE)
AC_SUBST(LUA_LIBS)
AC_SUBST(LUA_CFLAGS)
if test -z "${LUA_LIBS}"; then
ifelse([$2], , :, [$2])
else
ifelse([$1], , :, [$1])
fi
])

File diff suppressed because it is too large Load Diff

View File

@ -1,548 +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-2003 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# 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
# 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.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# 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 M$VC,
# 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 AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $CC in
icc|ecc)
wl='-Wl,'
;;
ccc)
wl='-Wl,'
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# 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
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# 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 can 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*)
# 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
;;
netbsd*)
;;
solaris* | sysv5*)
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
;;
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" = yes; then
# 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'
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
;;
aix4* | aix5*)
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].*|aix5*)
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
hardcode_direct=yes
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
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
# 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*)
if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
hardcode_direct=no
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*)
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* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
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
;;
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*)
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
;;
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=:
;;
sco3.2v5*)
;;
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.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
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*)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
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_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
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"
# 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

View File

@ -1,103 +0,0 @@
# iconv.m4 serial AM4 (gettext-0.11.3)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
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).
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_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
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)
])
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([$]{ac_t:-
}[$]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
])

View File

@ -1,24 +0,0 @@
#----------------------------------------------------------------------------
# AC_INIT_JAM
# This rule fixes several issues related to autoconf being make centric
#----------------------------------------------------------------------------
AC_DEFUN([AC_INIT_JAM],
[
AC_INIT_JAMFILE
AC_OUTPUT_INSTALLDIRS
AC_FIX_INSTALL])
#----------------------------------------------------------------------------
# AC_INIT_JAMFILE
# This rule let's config.status create a wrapper Jamfile in case configure
# has been invoked from a directory outside the source directory
#----------------------------------------------------------------------------
AC_DEFUN([AC_INIT_JAMFILE],
[AC_CONFIG_COMMANDS([Jamfile],
[AS_IF([test ! -f "${ac_top_builddir}Jamfile"],
[echo Installing Jamfile wrapper.
echo "# This file was automatically create by config.status" > Jamfile
echo "TOP ?= $ac_top_srcdir ;" >> Jamfile
echo "top_builddir ?= . ;" >> Jamfile
echo "include \$(TOP)/Jamfile ;" >> Jamfile])])])

View File

@ -1,276 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

View File

@ -1,91 +0,0 @@
#-----------------------------------------------------------------------------
# installdirs.m4 (c) Matze Braun <matze@braunis.de>
# Macros for outputing the installation paths which autoconf gathers into the
# Jamconfig file.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# AC_OUTPUT_INSTALLDIRS
# Transforms the installation dirs which are gathered by autoconf and sets
# properties in the Jamconfig file for them. We deal with stuff like
# variable references inside the paths (often the paths contain ${prefix})
# and with correct quoting here.
# The script will set the INSTALLDIR.PREFIX, INSTALLDIR.EXEC_PREFIX,
# INSTALLDIR.APPLICATION, INSTALLDIR.SBIN, INSTALLDIR.LIBEXEC,
# INSTALLDIR.DATA, INSTALLDIR.MAP, INSTALLDIR.CONFIG, INSTALLDIR.SHAREDSTATE
# INSTALLDIR.LOCALSTATE, INSTALLDIR.PLUGIN, INSTALLDIR.DOC
# INSTALLDIR.LIBRARY, INSTALLDIR.INCLUDE, INSTALLDIR.OLDINCLUDE,
# INSTALLDIR.INFO, INSTALLDIR.MAN
#-----------------------------------------------------------------------------
AC_DEFUN([AC_OUTPUT_INSTALLDIRS],[
# Handle the case when no prefix is given. And the special case when a path
# contains more than 2 slashes, these paths seem to be correct but jam fails
# on them.
AS_IF([test $prefix = NONE], [prefix="$ac_default_prefix"],
[prefix=`echo "$prefix" | sed -e 's:///*:/:g'`])
AS_IF([test $exec_prefix = NONE],
[exec_prefix="AS_ESCAPE([$(prefix)])"],
[exec_prefix=`echo "$exec_prefix" | sed -e 's:///*:/:g'`])
prefix=AC_FIX_VARIABLEREF([$prefix])
exec_prefix=AC_FIX_VARIABLEREF([$exec_prefix])
bindir=AC_FIX_VARIABLEREF([$bindir])
sbindir=AC_FIX_VARIABLEREF([$sbindir])
libexecdir=AC_FIX_VARIABLEREF([$libexecdir])
datadir=AC_FIX_VARIABLEREF([$datadir])
sysconfdir=AC_FIX_VARIABLEREF([$sysconfdir])
sharedstatedir=AC_FIX_VARIABLEREF([$sharedstatedir])
localstatedir=AC_FIX_VARIABLEREF([$localstatedir])
libdir=AC_FIX_VARIABLEREF([$libdir])
includedir=AC_FIX_VARIABLEREF([$includedir])
oldincludedir=AC_FIX_VARIABLEREF([$oldincludedir])
infodir=AC_FIX_VARIABLEREF([$infodir])
mandir=AC_FIX_VARIABLEREF([$mandir])
#hack to get the order right :-/ (autoconf --trace reports wrong order...)
AC_SUBST(prefix)
AC_SUBST(exec_prefix)
AC_SUBST(bindir)
AC_SUBST(sbindir)
AC_SUBST(libexecdir)
AC_SUBST(datadir)
AC_SUBST(sysconfdir)
AC_SUBST(sharedstatedir)
AC_SUBST(localstatedir)
AC_SUBST(libdir)
AC_SUBST(includedir)
AC_SUBST(oldincludedir)
AC_SUBST(infodir)
AC_SUBST(mandir)
])
#-----------------------------------------------------------------------------
# AC_FIX_INSTALL
# Fixes the output from AC_PROG_INSTALL
#-----------------------------------------------------------------------------
AC_DEFUN([AC_FIX_INSTALL], [
AC_REQUIRE([AC_PROG_INSTALL])
INSTALL=AC_FIX_VARIABLEREF([$INSTALL])
INSTALL_PROGRAM=AC_FIX_VARIABLEREF([$INSTALL_PROGRAM])
INSTALL_SCRIPT=AC_FIX_VARIABLEREF([$INSTALL_SCRIPT])
INSTALL_DATA=AC_FIX_VARIABLEREF([$INSTALL_DATA])
# fix for order...
AC_SUBST([INSTALL])
AC_SUBST([INSTALL_PROGRAM])
AC_SUBST([INSTALL_SCRIPT])
AC_SUBST([INSTALL_DATA])
])
#-----------------------------------------------------------------------------
# AC_PREPARE_INSTALLPATH
# Transform variables of the form ${bla} to $(bla) inside the string and
# correctly quotes backslashes.
# This is needed if you want to output some of the paths that autoconf
# creates to the Jamconfig file.
#-----------------------------------------------------------------------------
AC_DEFUN([AC_FIX_VARIABLEREF],
dnl We need all the strange \\\\ quoting here, because the command will be
dnl inserted into a "" block and sed needs quoting as well
[`echo "$1" | sed -e 's/\${\([[a-zA-Z_][a-zA-Z_]]*\)}/$(\1)/g' -e 's/\\\\/\\\\\\\\/g'`])

View File

@ -1,112 +0,0 @@
# lib-ld.m4 serial 3 (gettext-0.13)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
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
])

View File

@ -1,551 +0,0 @@
# lib-link.m4 serial 4 (gettext-0.12)
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl From Bruno Haible.
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.
AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
define([Name],[translit([$1],[./-], [___])])
define([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"
])
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
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
undefine([Name])
undefine([NAME])
])
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
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. If found, it
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
dnl 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.
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
define([Name],[translit([$1],[./-], [___])])
define([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"
LIBS="$LIBS $LIB[]NAME"
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
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 $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=
fi
AC_SUBST([HAVE_LIB]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
undefine([Name])
undefine([NAME])
])
dnl Determine the platform dependent parameters needed to use rpath:
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
dnl hardcode_direct, hardcode_minus_L.
AC_DEFUN([AC_LIB_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"
libext="$acl_cv_libext"
shlibext="$acl_cv_shlibext"
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
hardcode_direct="$acl_cv_hardcode_direct"
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_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.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
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$1-prefix],
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
--without-lib$1-prefix don't search for lib$1 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/lib"
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=
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=
if test $use_additional = yes; then
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
found_dir="$additional_libdir"
found_so="$additional_libdir/lib$name.$shlibext"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
else
if test -f "$additional_libdir/lib$name.$libext"; then
found_dir="$additional_libdir"
found_a="$additional_libdir/lib$name.$libext"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
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//'`
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
found_dir="$dir"
found_so="$dir/lib$name.$shlibext"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi
else
if test -f "$dir/lib$name.$libext"; then
found_dir="$dir"
found_a="$dir/lib$name.$libext"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi
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/lib"; 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 "$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 "$hardcode_libdir_flag_spec" && test "$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 "$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 $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
*/lib | */lib/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
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*) 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/lib"; then
haveit=
if test "X$additional_libdir" = "X/usr/local/lib"; then
if test -n "$GCC"; then
case $host_os in
linux*) 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 "$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:+$hardcode_libdir_separator}$found_dir"
done
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
acl_save_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$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=\"$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
])
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
])

View File

@ -1,155 +0,0 @@
# lib-prefix.m4 serial 3 (gettext-0.13)
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
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_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/lib"
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*) 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/lib"; 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/lib"; 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"
])

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +0,0 @@
# NP_FINDLIB(VARNAME, NAME, STRING, TESTAPP, CFLAGS, LIBS, ACTION_IF_FOUND,
# ACTION_IF_NOT_FOUND, EXTRACFLAGS, EXTRALIBS)
AC_DEFUN([NP_FINDLIB], [
AC_ARG_WITH([lib$2], [AC_HELP_STRING([--with-lib$2=dir],
[specify location of lib$2 if not detected automatically; uses
dir, dir/include and dir/lib])])
save_CFLAGS="$CFLAGS"
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
RESCFLAGS="$5"
RESLIBS="$6"
CFLAGS="$CFLAGS $5 $9"
CPPFLAGS="$CPPFLAGS $5 $9"
LIBS="$LIBS $6 $10"
AS_IF([test -n "$with_lib$2"], [
CFLAGS="-I$with_lib$2/include $CFLAGS"
CPPFLAGS="-I$with_lib$2/include $CPPFLAGS"
LIBS="-L$with_lib$2/lib $LIBS"
RESCFLAGS="-I$with_lib$2/include $RESCFLAGS"
RESLIBS="-L$with_lib$2/lib $RESLIBS"
])
AC_MSG_CHECKING([for $3])
AC_LINK_IFELSE([$4], [buildok=yes], [buildok=no])
LIBS=$save_LIBS
CPPFLAGS=$save_CPPFLAGS
CFLAGS=$save_CFLAGS
AS_IF([test $buildok = yes],
[AC_MSG_RESULT([found])
$1_AVAILABLE=yes
$1_CFLAGS="$RESCFLAGS"
$1_LIBS="$RESLIBS"],
[AC_MSG_RESULT([not found])
$1_AVAILABLE=no
$1_CFLAGS=""
$1_LIBS=""])
AC_SUBST([$1_AVAILABLE])
AC_SUBST([$1_CFLAGS])
AC_SUBST([$1_LIBS])
AS_IF([test $buildok = yes],
[ifelse([$7], , :, [$7])],
[ifelse([$8], , :, [$8])])
])

View File

@ -1,13 +0,0 @@
# NP_LANG_PROGRAM, custom version of AC_LANG_PROGRAM (because SDL on win32
# NEEDS main(int argc, char** argv)
AC_DEFUN([NP_LANG_PROGRAM],
[$1
m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl
int
main(int argc, char** argv)
{
$2
;
return 0;
}
])

View File

@ -1,103 +0,0 @@
# Configure paths for libogg
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
AC_DEFUN([XIPH_PATH_OGG],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR
Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
if test "x$ogg_libraries" != "x" ; then
OGG_LIBS="-L$ogg_libraries"
elif test "x$ogg_prefix" != "x" ; then
OGG_LIBS="-L$ogg_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
OGG_LIBS="-L$prefix/lib"
fi
OGG_LIBS="$OGG_LIBS -logg"
if test "x$ogg_includes" != "x" ; then
OGG_CFLAGS="-I$ogg_includes"
elif test "x$ogg_prefix" != "x" ; then
OGG_CFLAGS="-I$ogg_prefix/include"
elif test "x$prefix" != "xNONE"; then
OGG_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for Ogg)
no_ogg=""
if test "x$enable_oggtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>
int main ()
{
system("touch conf.oggtest");
return 0;
}
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_ogg" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.oggtest ; then
:
else
echo "*** Could not run Ogg test program, checking why..."
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <ogg/ogg.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
echo "*** or that you have moved Ogg since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OGG_CFLAGS=""
OGG_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OGG_CFLAGS)
AC_SUBST(OGG_LIBS)
rm -f conf.oggtest
])

View File

@ -1,57 +0,0 @@
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
if $PKG_CONFIG --exists "$2" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING($1_CFLAGS)
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
$1_LIBS=`$PKG_CONFIG --libs "$2"`
AC_MSG_RESULT($$1_LIBS)
else
$1_CFLAGS=""
$1_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
ifelse([$4], ,echo $$1_PKG_ERRORS,)
fi
AC_SUBST($1_CFLAGS)
AC_SUBST($1_LIBS)
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
ifelse([$3], , :, [$3])
else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
fi
])

View File

@ -1,176 +0,0 @@
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX
Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
AC_REQUIRE([AC_CANONICAL_TARGET])
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])

View File

@ -1,124 +0,0 @@
# Configure paths for libvorbis
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
dnl
AC_DEFUN([XIPH_PATH_VORBIS],
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR
Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR
Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
if test "x$vorbis_libraries" != "x" ; then
VORBIS_LIBS="-L$vorbis_libraries"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_LIBS="-L$vorbis_prefix/lib"
elif test "x$prefix" != "xNONE"; then
VORBIS_LIBS="-L$prefix/lib"
fi
VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
VORBISFILE_LIBS="-lvorbisfile"
VORBISENC_LIBS="-lvorbisenc"
if test "x$vorbis_includes" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_includes"
elif test "x$vorbis_prefix" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_prefix/include"
elif test "x$prefix" != "xNONE"; then
VORBIS_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for Vorbis)
no_vorbis=""
if test "x$enable_vorbistest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Vorbis is sufficiently new.
dnl
rm -f conf.vorbistest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>
int main ()
{
vorbis_block vb;
vorbis_dsp_state vd;
vorbis_info vi;
vorbis_info_init (&vi);
vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
vorbis_analysis_init (&vd, &vi);
vorbis_block_init (&vd, &vb);
/* this function was added in 1.0rc3, so this is what we're testing for */
vorbis_bitrate_addblock (&vb);
system("touch conf.vorbistest");
return 0;
}
],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_vorbis" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.vorbistest ; then
:
else
echo "*** Could not run Vorbis test program, checking why..."
CFLAGS="$CFLAGS $VORBIS_CFLAGS"
LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <vorbis/codec.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
echo "*** or that you have moved Vorbis since it was installed." ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
VORBIS_CFLAGS=""
VORBIS_LIBS=""
VORBISFILE_LIBS=""
VORBISENC_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(VORBIS_CFLAGS)
AC_SUBST(VORBIS_LIBS)
AC_SUBST(VORBISFILE_LIBS)
AC_SUBST(VORBISENC_LIBS)
rm -f conf.vorbistest
])

View File

@ -1,336 +0,0 @@
dnl ---------------------------------------------------------------------------
dnl Macros for wxWidgets detection. Typically used in configure.in as:
dnl
dnl AC_ARG_ENABLE(...)
dnl AC_ARG_WITH(...)
dnl ...
dnl AM_OPTIONS_WXCONFIG
dnl ...
dnl ...
dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1)
dnl if test "$wxWin" != 1; then
dnl AC_MSG_ERROR([
dnl wxWidgets must be installed on your system
dnl but wx-config script couldn't be found.
dnl
dnl Please check that wx-config is in path, the directory
dnl where wxWidgets libraries are installed (returned by
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
dnl equivalent variable and wxWidgets version is 2.3.4 or above.
dnl ])
dnl fi
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
dnl
dnl LIBS="$LIBS $WX_LIBS"
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl AM_OPTIONS_WXCONFIG
dnl
dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and
dnl --wx-config command line options
dnl ---------------------------------------------------------------------------
AC_DEFUN([AM_OPTIONS_WXCONFIG],
[
AC_ARG_WITH(wxdir,
[ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH],
[ wx_config_name="$withval/wx-config"
wx_config_args="--inplace"])
AC_ARG_WITH(wx-config,
[ --with-wx-config=CONFIG wx-config script to use (optional)],
wx_config_name="$withval" )
AC_ARG_WITH(wx-prefix,
[ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)],
wx_config_prefix="$withval", wx_config_prefix="")
AC_ARG_WITH(wx-exec-prefix,
[ --with-wx-exec-prefix=PREFIX
Exec prefix where wxWidgets is installed (optional)],
wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
])
dnl Helper macro for checking if wx version is at least $1.$2.$3, set's
dnl wx_ver_ok=yes if it is:
AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
[
wx_ver_ok=""
if test "x$WX_VERSION" != x ; then
if test $wx_config_major_version -gt $1; then
wx_ver_ok=yes
else
if test $wx_config_major_version -eq $1; then
if test $wx_config_minor_version -gt $2; then
wx_ver_ok=yes
else
if test $wx_config_minor_version -eq $2; then
if test $wx_config_micro_version -ge $3; then
wx_ver_ok=yes
fi
fi
fi
fi
fi
fi
])
dnl ---------------------------------------------------------------------------
dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]])
dnl
dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME
dnl environment variable to override the default name of the wx-config script
dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this
dnl case the macro won't even waste time on tests for its existence.
dnl
dnl Optional WX-LIBS argument contains comma- or space-separated list of
dnl wxWidgets libraries to link against (it may include contrib libraries). If
dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to
dnl link with all of the core wxWidgets libraries.
dnl
dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
dnl invocation command in present. It can be used to fine-tune lookup of
dnl best wxWidgets build available.
dnl
dnl Example use:
dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
dnl [--unicode --debug])
dnl ---------------------------------------------------------------------------
dnl
dnl Get the cflags and libraries from the wx-config script
dnl
AC_DEFUN([AM_PATH_WXCONFIG],
[
dnl do we have wx-config name: it can be wx-config or wxd-config or ...
if test x${WX_CONFIG_NAME+set} != xset ; then
WX_CONFIG_NAME=wx-config
fi
if test "x$wx_config_name" != x ; then
WX_CONFIG_NAME="$wx_config_name"
fi
dnl deal with optional prefixes
if test x$wx_config_exec_prefix != x ; then
wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
fi
if test x$wx_config_prefix != x ; then
wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
fi
if test "$cross_compiling" = "yes"; then
wx_config_args="$wx_config_args --host=$host_alias"
fi
dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
if test -x "$WX_CONFIG_NAME" ; then
AC_MSG_CHECKING(for wx-config)
WX_CONFIG_PATH="$WX_CONFIG_NAME"
AC_MSG_RESULT($WX_CONFIG_PATH)
else
AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
fi
if test "$WX_CONFIG_PATH" != "no" ; then
WX_VERSION=""
min_wx_version=ifelse([$1], ,2.2.1,$1)
if test -z "$5" ; then
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version])
else
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
fi
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4"
WX_VERSION=`$WX_CONFIG_PATH --version 2>/dev/null`
wx_config_major_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
wx_config_minor_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
wx_config_micro_version=`echo $WX_VERSION | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
wx_requested_major_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
wx_requested_minor_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
wx_requested_micro_version=`echo $min_wx_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
_WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version],
[$wx_requested_minor_version],
[$wx_requested_micro_version])
if test -n "$wx_ver_ok"; then
AC_MSG_RESULT(yes (version $WX_VERSION))
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
dnl starting with version 2.2.6 wx-config has --cppflags argument
wx_has_cppflags=""
if test $wx_config_major_version -gt 2; then
wx_has_cppflags=yes
else
if test $wx_config_major_version -eq 2; then
if test $wx_config_minor_version -gt 2; then
wx_has_cppflags=yes
else
if test $wx_config_minor_version -eq 2; then
if test $wx_config_micro_version -ge 6; then
wx_has_cppflags=yes
fi
fi
fi
fi
fi
if test "x$wx_has_cppflags" = x ; then
dnl no choice but to define all flags like CFLAGS
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags`
WX_CPPFLAGS=$WX_CFLAGS
WX_CXXFLAGS=$WX_CFLAGS
WX_CFLAGS_ONLY=$WX_CFLAGS
WX_CXXFLAGS_ONLY=$WX_CFLAGS
else
dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS
WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags`
WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags`
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags`
dnl WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
dnl WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
fi
dnl we don't need no \n in the flags
WX_CFLAGS=`echo $WX_CFLAGS`
WX_CPPFLAGS=`echo $WX_CPPFLAGS`
WX_CXXFLAGS=`echo $WX_CXXFLAGS`
WX_LIBS=`echo $WX_LIBS`
ifelse([$2], , :, [$2])
else
if test "x$WX_VERSION" = x; then
dnl no wx-config at all
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(no (version $WX_VERSION is not new enough))
fi
WX_CFLAGS=""
WX_CPPFLAGS=""
WX_CXXFLAGS=""
WX_LIBS=""
ifelse([$3], , :, [$3])
fi
else
WX_CFLAGS=""
WX_CPPFLAGS=""
WX_CXXFLAGS=""
WX_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(WX_CPPFLAGS)
AC_SUBST(WX_CFLAGS)
AC_SUBST(WX_CXXFLAGS)
AC_SUBST(WX_CFLAGS_ONLY)
AC_SUBST(WX_CXXFLAGS_ONLY)
AC_SUBST(WX_LIBS)
AC_SUBST(WX_VERSION)
])
dnl ---------------------------------------------------------------------------
dnl Get information on the wxrc program for making C++, Python and xrs
dnl resource files.
dnl
dnl AC_ARG_ENABLE(...)
dnl AC_ARG_WITH(...)
dnl ...
dnl AM_OPTIONS_WXCONFIG
dnl AM_OPTIONS_WXRC
dnl ...
dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1)
dnl if test "$wxWin" != 1; then
dnl AC_MSG_ERROR([
dnl wxWidgets must be installed on your system
dnl but wx-config script couldn't be found.
dnl
dnl Please check that wx-config is in path, the directory
dnl where wxWidgets libraries are installed (returned by
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
dnl equivalent variable and wxWidgets version is 2.6.0 or above.
dnl ])
dnl fi
dnl
dnl AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0])
dnl if test "x$HAVE_WXRC" != x1; then
dnl AC_MSG_ERROR([
dnl The wxrc program was not installed or not found.
dnl
dnl Please check the wxWidgets installation.
dnl ])
dnl fi
dnl
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
dnl
dnl LDFLAGS="$LDFLAGS $WX_LIBS"
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl
dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS
dnl resources. The variable WXRC will be set and substituted in the configure
dnl script and Makefiles.
dnl
dnl Example use:
dnl AM_PATH_WXRC([wxrc=1], [wxrc=0])
dnl ---------------------------------------------------------------------------
dnl
dnl wxrc program from the wx-config script
dnl
AC_DEFUN([AM_PATH_WXRC],
[
AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler])
if test "x$WX_CONFIG_NAME" = x; then
AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.])
else
AC_MSG_CHECKING([for wxrc])
if test "x$WXRC" = x ; then
dnl wx-config --utility is a new addition to wxWidgets:
_WX_PRIVATE_CHECK_VERSION(2,5,3)
if test -n "$wx_ver_ok"; then
WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc`
fi
fi
if test "x$WXRC" = x ; then
AC_MSG_RESULT([not found])
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT([$WXRC])
ifelse([$1], , :, [$1])
fi
AC_SUBST(WXRC)
fi
])

View File

@ -1,94 +0,0 @@
#============================================================================
# Rules for compiling applications
#============================================================================
## Application appname : sources [ : options ]
## Build an application out of sourcefiles. All sourcefiles will be passed
## to the Objects rule which tries to compile them into object-files. You
## can create rules for your own filetypes with the UserObject rule. Header
## files will just be ignored. They are only used for MSVC projectfile
## generation.
## Possible options are "noinstall" if you don't want a default install
## target to be created and "console" if you're building a console
## application (an application without any graphical output which is
## intended to be used on commandline)
## Some notes: You should not add the .exe extension to the appname - jam
## will do that on win32.
## If you have sourcefiles in subdirectories, then you'll need to use the
## SearchSubdir rule. Never specify sourcefiles with paths, only specify
## the filenames.
## Options:
## console: Create a console application
## noinstall: Don't setup a default installation target.
## independent: The target will not be made a dependency of the apps and
## all target.
rule Application
{
# check options
CheckOptions noinstall console independent : $(3) : $(<) ;
local target = [ ConstructApplicationTarget $(<) : $(3) ] ;
local sources = [ SearchSource $(>) ] ;
local objects = [ CompileObjects $(sources) ] ;
$(<)_TYPE = application ;
$(<)_OBJECTS = $(objects) ;
$(<)_SOURCES = $(sources) ;
$(<)_TARGET = $(target) ;
$(<)_OPTIONS = $(3) ;
$(<)_INSTALLTARGET = ;
# create target clean rule
Always $(<)clean ;
NotFile $(<)clean ;
Clean $(<)clean : $(objects) ; # create target clean rule
Depends clean : $(<)clean ;
# so 'jam foo' works when it's really foo.exe (Windows) or foo.app (MacOS/X)
if $(target) != $(<)
{
Depends $(<) : $(target) ;
NotFile $(<) ;
}
# make dependency on apps target
if ! [ IsElem independent : $(3) ]
{
Depends apps : $(<) ;
}
# construct Install target
if ! [ IsElem noinstall : $(3) ]
{
$(<)_INSTALLTARGET = [
DoInstall $(target) : $(bindir) : $(INSTALL_PROGRAM) : nopackage
] ;
Depends install_bin : $($(<)_INSTALLTARGET) ;
}
# Link
MakeLocate $(target) : $(LOCATE_TARGETS) ;
SystemLinkApplication $(<) : $(objects) : $(3) ;
# Import default flags
CppFlags $(<) : $(APPLICTION_CPPFLAGS) ;
CFlags $(<) : $(APPLICATION_CFLAGS) ;
C++Flags $(<) : $(APPLICATION_CXXFLAGS) ;
LFlags $(<) : $(APPLICATION_LIBS) ;
# Sources are part of the package
if ! [ IsElem nopackage : $(3) ]
{
Package $(sources) ;
}
return $(target) ;
}
#----------------------------------------------------------------------------
# private part
# Construct pseudo target apps
Depends all : apps ;
NotFile apps ;

View File

@ -1,44 +0,0 @@
# Clean rules for autoconf generated stuff
## Setup some stuff that makes usage of autoconf easier
rule UseAutoconf
{
# construct some clean targets
Clean distclean : config.log config.status config.cache aclocal.m4
Jamconfig config.h out.txt log.txt stamp-h1
libtool ;
CleanDir distclean : autom4te.cache out ;
Depends distclean : clean ;
Clean maintainer-clean : configure aclocal.m4 config.h.in Jamconfig.in ;
Depends maintainer-clean : distclean ;
Help clean : "Cleanup objectfiles and targets" ;
Help distclean : "Cleanup objectfiles and build configuration" ;
Help maintainer-clean :
"Cleanup all objectfiles, buildconfig and generated files." ;
Package autogen.sh configure.ac configure config.h.in
Jamrules Jamconfig.in ;
Package [ Wildcard mk/jam : *.jam ] [ Wildcard mk/autoconf : *.m4 ]
[ Wildcard mk/autoconf : config.* ]
mk/autoconf/install-sh ;
actions CheckNewer {
echo Error: $(>) is newer than $(<).
echo ""
echo You should rerun ./autogen.sh and ./configure
exit 1
}
rule CheckNewer {
Depends $(<) : $(>) ;
Depends all : $(<) ;
}
# Disabled for now because it often gives false alarm...
#configurefiles
# = configure.ac [ Wildcard mk/autoconf : *.m4 ] ;
# SEARCH on $(configurefiles) = $(top_srcdir) ;
# CheckNewer configure : $(configurefiles) ;
# CheckNewer Jamconfig : $(configurefiles) ;
}

View File

@ -1,117 +0,0 @@
#============================================================================
# Rules for flex and bison
#============================================================================
if $(LEX)
{
rule LexRule
{
local cfile = [ LocateTarget $(<:S=.c) ] ;
local object = [ CompileObjects $(cfile) ] ;
Lex $(cfile) : $(<) ;
return $(object) ;
}
RegisterFileType LexRule : .l ;
rule Lex++Rule
{
local cppfile = [ LocateTarget $(<:S=.cpp) ] ;
local object = [ CompileObjects $(cppfile) ] ;
Lex $(cppfile) : $(<) ;
return $(object) ;
}
RegisterFileType Flex++Rule : .ll ;
if $(COMPILER_TYPE) != "GCC"
{
# compilers like msvc don't like #line statements.
LEX_FLAGS += -L ;
}
rule Lex
{
Depends $(<) : $(>) ;
LEX_FLAGS on $(cfile) += $(LEX_FLAGS) ;
Clean clean : $(cfile) ;
}
# Use -t and output redirection to avoid flex choosing stupid names for it's
# output files.
actions Lex
{
$(LEX) -t $(LEX_FLAGS) $(>) > $(<)
}
}
if $(BISON)
{
rule BisonRule
{
local cfile = [ LocateTarget $(<:S=.c) ] ;
local headerfile = [ LocateTarget $(<:S=.h) ] ;
local object = [ CompileObjects $(cfile) ] ;
Includes $(headerfile:G=) : $(headerfile) ;
Bison $(cfile) $(headerfile) : $(<) ;
# work around jam warning about independent target
Includes $(cfile) : $(headerfile) ;
return $(object) ;
}
RegisterFileType BisonRule : .y ;
rule Bison++Rule
{
local cppfile = [ LocateTarget $(<:S=.cpp) ] ;
local headerfile = [ LocateTarget $(<:S=.hpp) ] ;
headerfile = $(headerfile:G=) ;
local object = [ CompileObjects $(cppfile) ] ;
# jams header file scannning doesn't use grist so we have to workaround this
# here
Includes $(headerfile:G=) : $(headerfile) ;
Bison $(cppfile) $(headerfile) : $(<) ;
Includes $(cppfile) : $(headerfile) ;
return $(object) ;
}
RegisterFileType Bison++Rule : .yy ;
rule Bison
{
Depends $(<) : $(>) ;
BISON_FLAGS on $(<) += $(BISON_FLAGS) ;
Clean clean : $(<) ;
}
rule BisonFlags
{
local target ;
if $(<:S) = .yy
{
target = [ LocateTarget $(<:S=.cpp) $(<:S=.hpp) ] ;
}
else
{
target = [ LocateTarget $(<:S=.c) $(<:S=.h) ] ;
}
BISON_FLAGS on $(target) += $(>) ;
}
if $(COMPILER_TYPE) != "GCC"
{
# compilers like msvc don't like #line statements.
BISON_FLAGS += --no-lines ;
}
actions Bison
{
$(BISON) -d $(BISON_FLAGS) -o $(<[1]) $(>)
}
}

View File

@ -1,51 +0,0 @@
#============================================================================
# Main rules file - Includes all important rulefiles in correct order
#============================================================================
# enable if you want debug messages
JAM_DEBUG ?= 1 ;
jamrulesdir = $(TOP)/mk/jam ;
include $(jamrulesdir)/jamcompatibility.jam ;
include $(jamrulesdir)/helper.jam ;
include $(jamrulesdir)/subdir.jam ;
include $(jamrulesdir)/package.jam ;
include $(jamrulesdir)/variant.jam ;
include $(jamrulesdir)/resource.jam ;
include $(jamrulesdir)/help.jam ;
include $(jamrulesdir)/groups.jam ;
include $(jamrulesdir)/install.jam ;
include $(jamrulesdir)/clean.jam ;
include $(jamrulesdir)/objects.jam ;
include $(jamrulesdir)/compiler.jam ;
include $(jamrulesdir)/bisonflex.jam ;
include $(jamrulesdir)/autoconf.jam ;
include $(jamrulesdir)/flags.jam ;
include $(jamrulesdir)/libtool.jam ;
include $(jamrulesdir)/library.jam ;
include $(jamrulesdir)/application.jam ;
include $(jamrulesdir)/options.jam ;
# Include OS specific rules
switch $(target_os)
{
case cygwin* :
include $(jamrulesdir)/win32.jam ;
case mingw32* :
include $(jamrulesdir)/win32.jam ;
case apple-darwin :
include $(jamrulesdir)/macosx.jam ;
case linux-gnu :
include $(jamrulesdir)/unix.jam ;
case * :
include $(jamrulesdir)/unix.jam ;
}

View File

@ -1,21 +0,0 @@
#============================================================================
# Rules for cleaning build detritus.
#============================================================================
DELTREE ?= "rm -rf" ;
# CleanDir <tag> : <dir> ...
# Forcibly delete a set of directories, even if they are not empty.
# Tag is one of the standard targets used with the "Clean" rule, such as
# "clean" or "distclean".
rule CleanDir
{
Always $(<) ;
NotFile $(<) ;
NoCare $(>) ;
}
actions piecemeal together existing CleanDir
{
$(DELTREE) $(>)
}

View File

@ -1,72 +0,0 @@
#============================================================================
# Rules for C and C++ files
#============================================================================
if $(CC)
{
rule CcRule
{
local object ;
if [ IsElem shared : $(2) ]
{
object = [ LocateTarget $(<:S=.lo) ] ;
CC on $(object) = "$(LIBTOOL) --mode=compile $(CC)" ;
} else {
object = [ LocateTarget $(<:S=.o) ] ;
}
CFLAGS on $(object) = $(CFLAGS) ;
CPPFLAGS on $(object) = $(CPPFLAGS) ;
Cc $(object) : $(<) ;
Depends $(object) : $(<) ;
return $(object) ;
}
RegisterFileType CcRule : .c ;
RegisterHeaderRule HeaderRule : $(HDRPATTERN) : .c ;
actions Cc
{
$(CC) -c -o $(<) $(CPPFLAGS) $(CFLAGS) $(>)
}
} # end if $(CC)
if $(CXX)
{
rule C++Rule
{
local object ;
if [ IsElem shared : $(2) ] {
object = [ LocateTarget $(<:S=.lo) ] ;
CXX on $(object) = "$(LIBTOOL) --mode=compile $(CXX)" ;
} else {
object = [ LocateTarget $(<:S=.o) ] ;
}
CXXFLAGS on $(object) = $(CXXFLAGS) ;
CPPFLAGS on $(object) = $(CPPFLAGS) ;
C++ $(object) : $(<) ;
Depends $(object) : $(<) ;
return $(object) ;
}
RegisterFileType C++Rule : .cpp .cc .c++ ; # we can't register .C here because
# of windows being case-insensitive.
RegisterHeaderRule HeaderRule : $(HDRPATTERN) : .cpp .cc .c++ ;
actions C++
{
$(CXX) -c -o $(<) $(CPPFLAGS) $(CXXFLAGS) $(>)
}
} # end if $(CXX)
rule CreateIncludeFlags
{
return -I$(<) ;
}
rule CreateDefineFlags
{
return -D$(<) ;
}

View File

@ -1,172 +0,0 @@
#============================================================================
# Rules for specifying compiler and linker flags
#============================================================================
## LinkWith target : libs [ : options ]
## Link a target with libraries. The specified libraries should have
## build rules in the same project. For external libraries use the
## ExternalLibs rule. Specify the library names without any extensions or
## the leading "lib".
rule LinkWith
{
local i libs sharedlib ;
for i in $(>) {
if $($(i)_TYPE) = "library" {
if [ IsElem shared : $($(i)_OPTIONS) ] {
libs += $(i) ;
sharedlib = true ;
} else {
# for non shared libs add inherit the compile flags and libs
libs += $(i) $($(i)_LIBRARIES) ;
# inherit the exported flags
CppFlags $(<) : $($(i)_CPPFLAGS) : $(3) ;
CFlags $(<) : $($(i)_CFLAGS) : $(3) ;
C++Flags $(<) : $($(i)_CXXFLAGS) : $(3) ;
LFlags $(<) : $($(i)_LIBS) : $(3) ;
LdFlags $(<) : $($(i)_LDFLAGS) : $(3) ;
}
} else {
echo "WARNING: Trying to link" $(i)
"with" $(<) "which is not a library." ;
}
}
# resolve library dependencies
libs = [ RemoveDups $(libs) ] ;
$(<)_LIBRARIES = $(libs) ;
local libfiles ;
for i in $(libs) {
libfiles += $($(i)_TARGET) ;
}
DEPENDS $($(<)_TARGET) : $(libfiles) ;
NEEDLIBS on $($(<)_TARGET) += $(libfiles) ;
# the usual libtool hack...
if $(sharedlib) {
LINK on $($(<)_TARGET) = "$(LIBTOOL) $(LINK)" ;
INSTALL on $($(<)_INSTALLTARGET) = "$(LIBTOOL) --mode=install $(INSTALL)" ;
}
}
rule CppFlags
{
CPPFLAGS on $($(<)_OBJECTS) += $(>) ;
if [ IsElem export : $(3) ] {
$(<)_CPPFLAGS = $(>) ;
}
}
## CFlags target : flags [ : options ]
## Sets cflags on all sourcefiles of a target
## This rule affects c++ and c compiler flags. Options:
## export - export the cflags to dependent targets (for example in
## a library context this will inherit the cflags to the apps using
## the library)
rule CFlags
{
CFLAGS on $($(<)_OBJECTS) += $(>) ;
if [ IsElem export : $(3) ] {
$(<)_CFLAGS = $(>) ;
}
}
rule C++Flags
{
CXXFLAGS on $($(<)_OBJECTS) += $(>) ;
if [ IsElem export : $(3) ] {
$(<)_CXXFLAGS = $(>) ;
}
}
## LFlags target : flags [ : options ]
## Sets linker flags for a library, plugin or application target
rule LFlags
{
LIBS on $($(<)_TARGET) += $(>) ;
if [ IsElem export : $(3) ] {
$(<)_LIBS = $(>) ;
}
}
rule LdFlags
{
LDFLAGS on $($(<)_TARGET) += $(>) ;
if [ IsElem export : $(3) ] {
$(<)_LDFLAGS = $(>) ;
}
}
## ExternalLibs appname : packages [ : options ]
## Link an application/library/plugin with external libraries. This mainly
## takes $(package)_CFLAGS and $(package)_LIBS and appends them to the target
## specific CPPFLAGS/LIBS.
rule ExternalLibs
{
local i ;
for i in $(>)
{
# Hack: most autoconf macros only define CFLAGS and not CPPFLAGS and
# CXXFLAGS so we import the CFLAGS to CPPFLAGS which makes them
# shared between C and C++ compiler
CppFlags $(<) : $($(i)_CFLAGS) : $(3) ;
LFlags $(<) : $($(i)_LIBS) : $(3) ;
}
}
## ExtraObjects target : objectfiles
## Link additional object files with a target
rule ExtraObjects
{
EXTRAOBJECTS on $($(<)_TARGET) += $(>) ;
Depends $($(<)_TARGET) : $(>) ;
Clean $(<)clean : $(>) ;
Clean clean : $(>) ;
}
## IncludeDir [target : ] directories
## Description: Is used to specify the location of header files for a
## target or the whole project if no target is given.
## This rule will automatically generate the -I compiler flags and makes
## sure the dependency scanner is able to locate your header files. The
## directories are relative to the current subdir specified with the SubDir
## rule.
## Implementation: The directories are simply added to the HDRSEARCH variable
## which is respected by all jam rules.
rule IncludeDir
{
local dir i ;
if $(>) {
for i in $(>) {
dir = [ ConcatDirs $(SUBDIR) $(i) ] ;
CppFlags $(<) : [ CreateIncludeFlags $(dir) ] ;
# needed for header scanning
HDRSEARCH on $($(<)_SOURCES) += $(dir) ;
}
} else {
for i in $(<) {
dir = [ ConcatDirs $(SUBDIR) $(i) ] ;
CPPFLAGS += [ CreateIncludeFlags $(dir) ] ;
# needed for header scanning
HDRSEARCH += $(dir) ;
}
}
}
rule DefineConst
{
if $(>) {
CppFlags $(<) : [ CreateDefineFlags $(>) ] ;
} else {
CPPFLAGS += [ CreateDefineFlags $(<) ] ;
}
}

View File

@ -1,27 +0,0 @@
#============================================================================
# Rules for building compile groups
#============================================================================
## CompileGroups target : groups
## Adds a target to a list of compile groups. A compile group is a virtual
## target which combines several targets. This is usefull for things like a
## creating a target which compiles all image loaders, all renderers, ...
rule CompileGroups
{
local _i ;
for _i in $(>)
{
Depends $(_i) : $(<) ;
Depends $(_i)clean : $(<)clean ;
}
}
## RegisterCompileGroups
## Registers compilegroups. You must specify all compile groups here before
## can use them.
rule RegisterCompileGroups
{
# nothing here (but msvcgen will override this)
}

View File

@ -1,28 +0,0 @@
#============================================================================
# Rules for displaying help messages about targets
#============================================================================
## Help target : description
## Adds a description to a target which will be shown to the user when
## "jam help" is invoked.
rule Help
{
$(<)_help = $(>) ;
local target = $(<:G=help) ;
Depends help : $(target) ;
NotFile $(>) ;
PrintHelp $(target) : $(>) ;
Always $(target) ;
}
#----------------------------------------------------------------------------
NotFile help ;
Always help ;
actions quietly PrintHelp
{
# target width:13, description width:51
echo "jam ->$(<) <- =>$(>) <=" | \
sed 's/->\(..............\).*<-/\1/;s/=>\(...................................................\).*<=/\1/'
}

View File

@ -1,177 +0,0 @@
#============================================================================
# Helper rules
#============================================================================
CP ?= "cp" ;
MV ?= "mv" ;
## Wildcard [ dir : ] patterns
## Create a list of files in a directory which match the pattern. You can
## optionally specify a subdirectory. The files will be returned with
## stripped pathnames. The difference from GLOB is that this rule respects
## subdirectories which may have been entered with the SubDir rule.
rule Wildcard
{
local files dir sdir wildcards ;
# Is a directory given?
if $(>) {
dir = $(<)/ ;
sdir = $(<) ;
wildcards = $(>) ;
} else {
dir = "" ;
sdir = "" ;
wildcards = $(<) ;
}
files = [ GLOB [ ConcatDirs $(SUBDIR) $(dir) ] : $(wildcards) ] ;
return $(files:BSR=$(sdir)) ;
}
## Prefix list : prefix
## Adds a prefix to a all elements in list.
rule Prefix
{
return $(>)$(<) ;
}
if $(JAMVERSION) >= 2.5
{
## IsElem element : list
## Returns "true" if the elemnt is in the list. Otherwise nothing is
## returned.
rule IsElem
{
local i ;
for i in $(>)
{
if $(i) = $(<)
{
return "true" ;
}
}
return ;
}
}
else
{
# jam<2.4's return statement doesn't exit the function
rule IsElem
{
local i result ;
for i in $(>)
{
if $(i) = $(<)
{
result = "true" ;
$(>) = ;
}
}
return $(result) ;
}
}
## Filter list : filter
## Returns the list without the words contained in filter.
rule Filter
{
local i result ;
for i in $(<)
{
if ! [ IsElem $(i) : $(>) ]
{
result += $(i) ;
}
}
return $(result) ;
}
## RemoveDups list
## Removes duplicates in the list (this function tries to preserve the list
## order)
rule RemoveDups
{
local i result ;
for i in $(<)
{
if ! [ IsElem $(i) : $(result) ]
{
result += $(i) ;
}
}
return $(result) ;
}
rule Reverse
{
local result ;
for i in $(<)
{
result = $(i) $(result) ;
}
return $(result) ;
}
## GetVar argument
## Simply returns the value of the variable with name argument.
## This is useful to query on target variables:
## bla = [ on TARGET GetVar CFlags ] ;
rule GetVar
{
return $($(<)) ;
}
## ConcatDirs dirs
## Concatenates a set of directories. This is a substitute for FDirName in
## Jambase. It works also correctly for several rooted paths, where FDirName
## fails.
## The advantage over $(dir1)/$(dir2) is that this also works correctly if
## $(dir1) or $(dir2) is not set.
rule ConcatDirs
{
local i ;
local result = $(<[1]) ;
if ! $(result) { $result = "" ; }
local dir1 dir2 ;
for i in $(<[2-])
{
# eleminate multiple slashes because jam is somewhat buggy here
dir1 = [ MATCH (.*[^/]?) : $(result) ] ;
dir2 = [ MATCH ([^/].*) : $(i) ] ;
if ! $(dir1) { dir1 = "" ; }
if $(dir1) != "" { dir1 = $(dir1)/ ; }
if ! $(dir2) { dir2 = "" ; }
result = $(dir1)$(dir2) ;
}
return $(result) ;
}
## Copy target : source
## Copy source file to target.
actions Copy
{
$(CP) "$(>)" "$(<)"
}
actions ignore Move
{
$(MV) $(>) $(<)
}

View File

@ -1,162 +0,0 @@
#============================================================================
# Rules for installation
#============================================================================
COPYDIRS ?= "cp -R" ;
INSTALL ?= "install" ;
INSTALL_PROGRAM ?= $(INSTALL) ;
INSTALL_SCRIPT ?= $(INSTALL) ;
INSTALL_DATA ?= "$(INSTALL) -m644" ;
# set some paths
appdatadir ?= [ ConcatDirs $(datadir) $(PACKAGE_NAME) ] ;
appdocdir ?= [ ConcatDirs $(datadir) doc $(PACKAGE_NAME)-$(PACKAGE_VERSION) ] ;
appconfdir ?= [ ConcatDirs $(sysconfdir) $(PACKAGE_NAME) ] ;
plugindir ?= [ ConcatDirs $(libdir) $(PACKAGE_NAME) ] ;
applicationsdir ?= [ ConcatDirs $(datadir) applications ] ;
pixmapsdir ?= [ ConcatDirs $(datadir) pixmaps ] ;
## InstallHeader headername [ : subdir ]
## DoInstall a headerfile into the includedir directory. A subdirectory
## relative to the includedir can be specified.
rule InstallHeader
{
SEARCH on $(<:G=installheader) = $(SUBDIR) ;
Depends install_include : [ DoInstall $(<:G=installheader) : $(includedir) $(2) ] ;
}
## InstallShellScript scriptname [ : subdir ]
## Installs a shell script into the bindir directory. A subdirectory
## relative to the bindir can be specified.
rule InstallShellScript
{
SEARCH on $(<:G=installscript) = $(SUBDIR) ;
Depends install_shellscript
: [ DoInstall $(<:G=installscript) : $(bindir) $(2) : $(INSTALL_SCRIPT) ]
;
}
## InstallData files [ : subdir ]
## Installs data files
rule InstallData
{
SEARCH on $(<:G=installdata) = $(SUBDIR) ;
Depends install_data : [ DoInstall $(<:G=installdata) : $(appdatadir) $(2) ] ;
}
## InstallConfig files [ : subdir ]
## Installs configuration files
rule InstallConfig
{
SEARCH on $(<:G=installconfig) = $(SUBDIR) ;
Depends install_config : [ DoInstall $(<:G=installconfig) : $(appconfdir) $(2) ] ;
}
## InstallDoc files [ : subdir ]
## Installs documentation files
rule InstallDoc
{
SEARCH on $(<:G=installdoc) = $(SUBDIR) ;
Depends install_doc : [ DoInstall $(<:G=installdoc) : $(appdocdir) $(2) ] ;
}
## InstallMan files
## DoInstall man files
rule InstallMan
{
local dir i ;
SEARCH on $(<:G=installman) = $(SUBDIR) ;
for i in $(<:G=installman) {
dir = $(mandir) ;
switch $(i:S) {
case .1 : dir += man1 ;
case .2 : dir += man2 ;
case .3 : dir += man3 ;
case .4 : dir += man4 ;
case .5 : dir += man5 ;
case .6 : dir += man6 ;
case .7 : dir += man7 ;
case .8 : dir += man8 ;
case .9 : dir += man9 ;
case * :
echo "WARNING: manfile has no *.[0-9] ending." ;
}
Depends install_man : [ DoInstall $(i) : $(dir) ] ;
}
}
## InstallPixmap files [ : subdir ]
## Install a pixmap
rule InstallPixmap
{
LOCATE on $(<:G=installpixmap) = $(SUBDIR) ;
Depends install_data
: [ DoInstall $(<:G=installpixmap) : $(pixmapsdir) $(2) ] ;
}
## InstallDesktop files [ : subdir ]
## Install a .desktop file (menu entries for kde/gnome and others)
rule InstallDesktop
{
LOCATE on $(<:G=installdesktop) = $(SUBDIR) ;
Depends install_bin
: [ DoInstall $(<:G=installdesktop) : $(applicationsdir) $(2) ] ;
}
## DoInstall sourcename : directories [ : installapp ] [ : options ]
## Creates a new installtarget for the given sources. The target(s) are
## returned as function result.
rule DoInstall
{
local targets target i dir gdir ;
dir = [ ConcatDirs $(DESTDIR) $(2) ] ;
gdir = $(dir:G=dir) ;
MkDir $(gdir) ;
for i in $(<) {
target = $(i:BSR=$(dir):G=install) ;
targets += $(target) ;
Depends $(target) : $(gdir) $(i) ;
Install1 $(target) : $(i) ;
if $(3) {
INSTALL on $(target) = $(3) ;
} else {
INSTALL on $(target) = $(INSTALL_DATA) ;
}
}
# We want to package all files we install
if ! [ IsElem nopackage : $(4) ] {
Package $(<) ;
}
Always $(targets) ;
return $(targets) ;
}
#----------------------------------------------------------------------------
INSTALLTARGETS = install_bin install_plugin install_lib install_header
install_shellscript install_data install_config
install_doc ;
Always install $(INSTALLTARGETS) ;
NotFile install $(INSTALLTARGETS) ;
Depends install : $(INSTALLTARGETS) ;
Help install : "Install $(PACKAGE_NAME)" ;
actions Install1
{
$(INSTALL) "$(>)" "$(<:D)" $(INSTALLIBS) ;
}
actions CopyDirs
{
$(COPYDIRS) "$(>)" "$(<)"
}

View File

@ -1,29 +0,0 @@
#============================================================================
# Several hacks to make the build compatible with certain old/broken jam
# versions
#============================================================================
# boostjam is evil: It is compatible to jam 2.4 but has a version number 3.1, we# try to detect boostjam with the ARGV extension
if $(ARGV[0])
{
EXIT "Error: You can't use boostjam for this build." ;
}
# we can't use boostjam at the moment as it still has the bug from jam 2.4 where
# settings variables on header targets doesn't work
if $(JAMVERSION) <= 2.4
{
EXIT "Error: This buildsystem requires jam version 2.5 or later." ;
}
# All scripts invoked by the build system expect a Bourne or compatible shell.
# Reject C-shell and its variants (such as tcsh). Unfortunately, this is a bit
# of an ugly hack. It would be nicer to perform this logic at the very end of
# this file as a last-minute assertion. Unfortunately, however, it seems that
# references to $(SHELL) in any of the included files get bound at the point
# of reference, thus we need to perform this filtering as early as possible.
if [ Match (csh) : $(SHELL) ]
{
SHELL = "/bin/sh" ;
}

View File

@ -1,172 +0,0 @@
#============================================================================
# Rules for library creation
#============================================================================
## Library libname : sources [ : options ]
## Build a library out of sourcefiles. All sourcefiles will be passed
## to the Objects rule which tries to compile them into object-files. You
## can create rules for your own filetypes with the UserObject rule. Header
## files will just be ignored. They are only used for MSVC projectfile
## generation. If additional objects are given (fourth argument), they
## should be the output of CompileObjects, and will be included in the
## library.
## Available options are 'shared' if you want to build a shared library on
## platforms which support that. You can specify the 'noinstall' option if
## you don't want an install target is generated.
## Don't specify any extensions for the library name, also leave out the
## leading "lib".
rule Library
{
# check options
CheckOptions noinstall independent shared : $(3) : $(<) ;
local no_scan_archive = $(NOARSCAN) ;
local target = [ ConstructLibraryTarget $(<) : $(3) ] ;
local sources = [ SearchSource $(>) ] ;
local objects = [ CompileObjects $(sources) : $(3) ] ;
local install_targets ;
$(<)_TYPE = library ;
$(<)_OBJECTS = $(objects) ;
$(<)_SOURCES = $(sources) ;
$(<)_TARGET = $(target) ;
$(<)_OPTIONS = $(3) ;
# create target clean rule
Always $(<)clean ;
NotFile $(<)clean ;
Clean $(<)clean : $(objects) ; # create target clean rule
# so 'jam foo' works when it's really foo.exe (Windows) or foo.app (MacOS/X)
if $(target) != $(<)
{
Depends $(<) : $(target) ;
NotFile $(<) ; }
# library depends on its member objects
if ! [ IsElem independent : $(3) ]
{
if $(KEEPOBJS)
{
Depends obj : $(objects) ;
}
else
{
Depends libs : $(<) ;
}
}
# Generate install rules
if ! [ IsElem noinstall : $(3) ]
{
install_targets = [ DoInstall $(target) : $(libdir) : $(INSTALL) : nopackage ] ;
Depends install_lib : $(install_targets) ;
}
if [ IsElem shared : $(3) ]
{
if ! $(LIBTOOL) {
exit "LIBTOOL not defined, can't create dynamic library." ;
}
no_scan_archive = 1 ;
DoLibToolClean ;
if $(install_targets) {
INSTALL on $(install_targets) = "$(LIBTOOL) --mode=install $(INSTALL)" ;
InvokeLibtoolFinish $(install_targets) ;
}
}
# Set LOCATE for the library and its contents. The bound
# value shows up as $(NEEDLIBS) on the Link actions.
# For compatibility, we only do this if the library doesn't
# already have a path.
if ! $(target:D)
{
MakeLocate $(target) $(target)($(objects:BS)) : $(LOCATE_TARGET) ;
}
if ! $(no_scan_archive)
{
# If we can scan the library, we make the library depend
# on its members and each member depend on the on-disk
# object file.
Depends $(target) : $(target)($(objects:BS)) ;
local i ;
for i in $(objects)
{
Depends $(target)($(i:BS)) : $(i) ;
}
} else {
Depends $(target) : $(objects) ;
}
if $(CRELIB) { CreLib $(target) : $(objects[1]) ; }
SystemLinkLibrary $(<) : $(objects) : $(3) ;
# If we can't scan the library, we have to leave the .o's around.
if ! ( $(no_scan_archive) || $(NOARUPDATE) )
{
RmTemps $(target) : $(objects) ;
}
# Import default flags
CppFlags $(<) : $(LIBRARY_CPPFLAGS) ;
CFlags $(<) : $(LIBRARY_CFLAGS) ;
C++Flags $(<) : $(LIBRARY_CXXFLAGS) ;
LFlags $(<) : $(LIBRARY_LIBS) ;
# Sources are part of the package
if ! [ IsElem nopackage : $(3) ]
{
Package $(sources) ;
}
return $(target) ;
}
## LibraryVersion
## Specify the version of a library. The version should have the form
## major:minor:patchlevel
rule LibraryVersion
{
LIBS on $($(<)_TARGET) = -version-info $(>) ;
}
#----------------------------------------------------------------------------
# private part
# default implementation of SystemLinkLibrary
rule SystemLinkLibrary
{
local target = $($(<)_TARGET) ;
if [ IsElem shared : $(3) ] {
LINK on $(target) = "$(LIBTOOL) --mode=link $(LINK) -rpath $(libdir)" ;
LinkLibrary $(target) : $(>) ;
} else {
Archive $(target) : $(>) ;
if $(RANLIB) { Ranlib $(target) ; }
}
Clean clean : $(target) ;
Clean $(<)clean : $(target) ;
}
actions together Ranlib
{
$(RANLIB) $(<)
}
actions LinkLibrary bind NEEDLIBS bind EXTRAOBJECTS
{
$(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
}
# Construct pseudo target libs which is used instead of the pseudo target lib
# in Jambase
Depends lib : libs ;
NotFile libs ;

View File

@ -1,38 +0,0 @@
rule InvokeLibtoolFinish
{
# eventually invoke libtool --mode=finish after installation
if ! $(INVOKE_LIBTOOL_FINISH) && ! $(DESTDIR) {
INVOKE_LIBTOOL_FINISH = true ;
NotFile libtool_finish ;
Always libtool_finish ;
LibToolFinish libtool_finish ;
Depends install_lib : libtool_finish ;
}
Depends libtool_finish : $(<) ;
}
rule DoLibToolClean
{
local target = libtoolclean ;
Always $(target) ;
NotFile $(target) ;
Depends clean : $(target) ;
LibToolClean $(target) ;
}
actions LibToolFinish bind INSTALLLIBS
{
$(LIBTOOL) --mode=finish $(libdir)
}
actions LibToolClean
{
$(LIBTOOL) --mode=clean $(RM)
}
if ! $(LIBTOOL_VERBOSE)
{
LIBTOOL = "$(LIBTOOL) --quiet" ;
}

View File

@ -1,55 +0,0 @@
#============================================================================
# Jam configuration and actions for MacOS/X
# Copyright (C) 2003 by Eric Sunshine <sunshine@sunshineco.com>
#============================================================================
SHELL ?= "/bin/sh" ;
DEEPCOPY ?= "cp -R" ;
# Experience seems to indicate that library scanning misbehaves on MacOS/X with
# Jam 2.4, consequently we disable it.
AR = "ar ru" ;
NOARUPDATE = true ;
NOARSCAN = true ;
actions Archive
{
$(AR) $(<) $(>)
}
#------------------------------------------------------------------------------
# Public rules.
#------------------------------------------------------------------------------
# ConstructApplicationTarget target : options
# Constructs the application target name (ie. foo.app for foo)
rule ConstructApplicationTarget
{
return $(<) ;
}
# ConstructLibraryTarget target : options
rule ConstructLibraryTarget
{
return lib$(<).a ;
}
# SystemLinkApplication target : objects : options
rule SystemLinkApplication
{
local target = $($(<)_TARGET) ;
Depends $(target) : $(>) ;
LinkApplication $(target) : $(>) ;
LIBS on $(target) = $(LIBS) ;
LDFLAGS on $(target) = $(LDFLAGS) ;
Clean clean : $(target) ;
Clean $(<)clean : $(target) ;
}
# LinkApplicationConsole exe : objects
# Link a console (non-GUI) appliation from a set of object files.
actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
{
$(MACOSX.ENVIRON)
$(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LDFLAGS) $(LIBS)
}

View File

@ -1,383 +0,0 @@
#============================================================================
# Rules for creating msvc projectfiles
#============================================================================
# BUGS & TODO
#------------
# - Create a secondary target (such as "msvcinst") which copies the generated
# project files from the build/"out" directory back into the source
# directory. This is useful for maintainers who, after having created and
# tested a new set of project files, want to then commit them to the CVS
# repository.
#
# - Either respect ExternaLibs() or fix all the Jamfiles which require special
# Windows libraries to invoke MsvcExternalLibrary(). This is necessary for
# modules such as cssocket and ensocket which require wsock32.lib, for
# instance. There are a number of other such modules. The current monlithic
# solution of placing this information in CS/mk/msvcgen/Jamconfig is ugly,
# error-prone, and a maintenance headache.
#
# - Overhaul the "config" file handling rule so that it associates
# configuration files with built targets. This will allow the generated
# projects to reference configuration files. Rather than the present
# InstallConfig rule, we either need a ConfigFile:<target>:<configs> rule, or
# we should upgrade the Application and Plugin rules to also accept
# configuration files.
#
# - Likewise, provide a generic Resources() rule which allows specification of
# additional textual resources for inclusion in generated projects.
#
# - Upgrade module Jamfiles to mention headers from the CS/include/module
# directory. This will allow related headers to appear in the generated
# project files. For instance, the libcsengine project should mention
# headers from CS/include/csengine, in addition to the ones from
# CS/libs/csengine which it currently mentions.
#
# - When PERL5.SDK.AVAILABLE is "yes", Jam reports that it doesn't know how to
# locate or create <grist>csperlxs.c.
if $(MSVCGEN_CONFIG)
{
MSVCGEN = "$(PERL) $(TOP)/mk/msvcgen/msvcgen.pl" ;
MKVERRES = "$(SHELL) $(TOP)/libs/cssys/win32/mkverres.sh" ;
MKMETADATARES = "$(SHELL) $(TOP)/libs/cssys/win32/mkmetadatares.sh" ;
MERGERES = "$(SHELL) $(TOP)/libs/cssys/win32/mergeres.sh" ;
MSVCGEN_BUILD_ROOT = $(BUILDTOP)/out ;
MSVC_VERSION ?= 6 ;
if $(MSVC_VERSION) = 6
{
MSVCGEN_LOCATE_TARGET ?= $(MSVCGEN_BUILD_ROOT)/mk/visualc6 ;
MSVCGEN_LOCATE_FRAGMENT ?= $(MSVCGEN_BUILD_ROOT)/mk/fragment6 ;
MSVCGEN_TEMPLATEDIR ?= $(TOP)/mk/msvcgen/template6 ;
MSVCGEN_EXTRA_OPTS = ;
SSUFPRJ = dsp ;
SSUFWSP = dsw ;
SUFPRJ = .dsp ;
SUFWSP = .dsw ;
}
else if $(MSVC_VERSION) = 7
{
MSVCGEN_LOCATE_TARGET ?= $(MSVCGEN_BUILD_ROOT)/mk/visualc7 ;
MSVCGEN_LOCATE_FRAGMENT ?= $(MSVCGEN_BUILD_ROOT)/mk/fragment7 ;
MSVCGEN_TEMPLATEDIR ?= $(TOP)/mk/msvcgen/template7 ;
MSVCGEN_EXTRA_OPTS = --xml-protect ;
SSUFPRJ = vcproj ;
SUFPRJ = .vcproj ;
SSUFWSP = sln ;
SUFWSP = .sln ;
}
else
{
EXIT "No support for MSVC version $(MSVC_VERSION) yet!" ;
}
#----------------------------------------------------------------------------
# Override some rules
## MsvcProject target : sources : type : target-with-ext
rule MsvcProject
{
local rcpath resource msvcname target fragments fragroot files i ;
switch $(3)
{
case appgui :
msvcname = app$(<) ;
case appcon :
msvcname = app$(<) ;
case plugin :
msvcname = plg$(<) ;
case library :
msvcname = lib$(<) ;
case group :
msvcname = grp$(<) ;
case * :
exit "Unknown msvc projecttype: $(3) specified!" ;
}
$(<)_MSVCNAME = $(msvcname) ;
fragroot = $(MSVCGEN_LOCATE_FRAGMENT)/$(msvcname).frag ;
NotFile $(fragroot) ;
fragments = [ FAppendSuffix $(msvcname) : .frag.cff ]
[ FAppendSuffix $(msvcname) : .frag.dpf ]
[ FAppendSuffix $(msvcname) : .frag.pjf ] ;
MakeLocate $(fragments) : $(MSVCGEN_LOCATE_FRAGMENT) ;
target = [ FAppendSuffix $(msvcname) : $(SUFPRJ) ] ;
MakeLocate $(target) : $(MSVCGEN_LOCATE_TARGET) ;
target += $(fragments) ;
$(<)_TARGET = $(target) ;
# Only include source and headers files for now. In the future, we also
# want to include .cfg files and any other textual resources which which the
# user might care to read/view in the MSVC IDE.
for i in $(>)
{
i = $(i:G=$(LOCATE_SOURCE)) ;
switch $(i:S)
{
case .h : files += $(i) ;
case .hpp : files += $(i) ;
case .H : files += $(i) ;
case .c : files += $(i) ;
case .cc : files += $(i) ;
case .cpp : files += $(i) ;
case .m : files += $(i) ;
case .mm : files += $(i) ;
case .M : files += $(i) ;
}
}
# Search at the correct place for the files
SEARCH on $(files) = $(SEARCH_SOURCE) ;
# Add resource file
if $(3) = "plugin" || $(3) = "appgui" || $(3) = "appcon"
{
resource = $(msvcname:S=.rc) ;
# @@@ Uber-ugly
rcpath = ../../../mk/visualc7/$(msvcname:S=.rc) ;
#files += $(resource) ;
Depends $(target) : $(resource) ;
LOCATE on $(resource) = $(MSVCGEN_LOCATE_TARGET) ;
SEARCH on $(resource) = $(MSVCGEN_LOCATE_FRAGMENT) ;
NAME on $(resource) = $(<) ;
#RCNAME on $(<) = $(resource) ;
$(<)_RCNAME = $(resource) ;
#ResourceGen $(resource) ;
local versionrc = $(resource:S=.vrctmp) ;
# normalize version list
local v1, v2, v3, v4 ;
v1 = $(PACKAGE.VERSION.LIST[1]) ;
if ! $(v1) { v1 = 0 ; }
v2 = $(PACKAGE.VERSION.LIST[2]) ;
if ! $(v2) { v2 = 0 ; }
v3 = $(PACKAGE.VERSION.LIST[3]) ;
if ! $(v3) { v3 = 0 ; }
v4 = $(PACKAGE.VERSION.LIST[4]) ;
if ! $(v4) { v4 = 0 ; }
PACKAGE.VERSION.LIST on $(versionrc) = $(v1) $(v2) $(v3) $(v4) ;
# @@@ The "Help" rule is usually invoked after 'Plugin'/'Application',
# so "$(<)_help" is empty...
DESCRIPTION on $(versionrc) = $($(<)_help) ;
LOCATE on $(versionrc) = $(MSVCGEN_LOCATE_FRAGMENT) ;
GenerateWin32VersionRc $(versionrc) ;
Always $(versionrc) ;
Win32Resource $(<) : $(versionrc) ;
RmTemps $(target) : $(versionrc) ;
if $(3) = "plugin"
{
local metarc = $(resource:S=.mrctmp) ;
LOCATE on $(metarc) = $(MSVCGEN_LOCATE_FRAGMENT) ;
SEARCH on $(metarc) = $(SEARCH_SOURCE) ;
Depends $(metarc) : $($(<)_METAFILE) ;
GenerateWin32MetadataRc $(metarc) : $($(<)_METAFILE) ;
Always $(metarc) ;
Win32Resource $(<) : $(metarc) ;
RmTemps $(target) : $(metarc) ;
}
Always $(resource) ;
}
RAWNAME on $(target) = $(<) ;
PROJECTNAME on $(target) = $(msvcname) ;
TARGET on $(target) = $(4) ;
TYPE on $(target) = $(3) ;
FRAGMENT_ROOT on $(target) = $(fragroot) ;
DEPEND on $(target) += $(MSVC.DEPEND) $(MSVC.DEPEND.$(3)) ;
LIBRARIES on $(target) += $(MSVC.LIBRARY) $(MSVC.LIBRARY.$(3)) ;
LFLAGS on $(target) += $(MSVC.LFLAGS) $(MSVC.LFLAGS.$(3)) ;
CFLAGS on $(target) += $(MSVC.CFLAGS) $(MSVC.CFLAGS.$(3)) ;
Depends msvcgen : $(target) ;
Depends $(target) : $(files) $(MSVCGEN_LOCATE_FRAGMENT:G=dir) ;
MsvcProjectGen $(target) : $(files) $(rcpath) ;
Always $(target) ;
MSVCWorkspace csall : $(fragments) : $(fragroot) ;
Clean msvcclean : $(target) ;
}
#----------------------------------------------------------------------------
rule Application
{
# _Options $(<) : $(3) ;
local projtype ;
if $(CONSOLEAPP_$(<)) = "yes"
{
projtype = appcon ;
}
else
{
projtype = appgui ;
}
MsvcProject $(<) : $(>) : $(projtype) : $(<:S=.exe) ;
CompileGroups $(<) : all apps ;
}
rule Plugin
{
local metafile ;
metafile = [ FAppendSuffix $(<) : $(SUFMETA) ] ;
SEARCH on $(metafile) = $(SEARCH_SOURCE) ;
$(<)_METAFILE = $(metafile) ;
MsvcProject $(<) : $(>) : plugin : $(<:S=.dll) ;
CompileGroups $(<) : all plugins ;
}
rule Library
{
MsvcProject $(<) : $(>) : library : $(<:S=.lib) ;
CompileGroups $(<) : all libs ;
}
rule RegisterCompileGroups
{
local i ;
for i in $(<)
{
RegisterCompileGroup $(i) ;
}
}
rule RegisterCompileGroup
{
MsvcProject $(<) : $(>) : group ;
}
rule CompileGroups
{
for i in $(>)
{
DEPEND on $($(i)_TARGET) += $($(<)_MSVCNAME) ;
}
}
rule LinkWith
{
DEPEND on $($(<)_TARGET) += lib$(>) ;
}
rule MsvcExternalLibrary
{
LIBRARIES on $($(<)_TARGET) += $(>) ;
}
rule CFlags
{
if $(>) != ""
{
CFLAGS on $($(<)_TARGET) += $(>) ;
}
}
rule LFlags
{
LFLAGS on $($(<)_TARGET) += $(>) ;
}
rule ExternalLibs
{
local i ;
for i in $(>)
{
CFlags $(<) : $($(i).CFLAGS) ;
LFlags $(<) : $($(i).LFLAGS) ;
MsvcExternalLibrary $(<) : $($(i).MSVCLIBS) ;
}
}
rule MSVCWorkspace
{
local target ;
target = [ FAppendSuffix $(<) : $(SUFWSP) ] ;
MakeLocate $(target) : $(MSVCGEN_LOCATE_TARGET) ;
Depends msvcgen : $(target) ;
Depends $(target) : $(>[1]) ;
MsvcWorkspaceGen $(target) : $(3) ;
RmTemps $(target) : $(>) ;
}
rule Win32Resource
{
Depends $(<) : $($(<)_RCNAME) ;
Depends $($(<)_RCNAME) : $(>) ;
MergeRcs $($(<)_RCNAME) : $(>) ;
}
#----------------------------------------------------------------------------
actions MsvcProjectGen
{
$(MSVCGEN) \
--quiet \
--project \
$(MSVCGEN_EXTRA_OPTS) \
--project-extension=$(SSUFPRJ) \
--name=$(RAWNAME) \
--template=$(TYPE) \
--template-dir=$(MSVCGEN_TEMPLATEDIR) \
--project-name=$(PROJECTNAME) \
--output=$(<[1]) \
--target=$(TARGET) \
--fragment=$(FRAGMENT_ROOT) \
--depend=$(DEPEND) \
--library=$(LIBRARIES) \
--lflags='$(LFLAGS)' \
--cflags='$(CFLAGS)' \
--strip-root='$(TOP)/' \
--strip-root='$(MSVCGEN_BUILD_ROOT)/' \
$(>)
}
actions together MsvcWorkspaceGen
{
$(MSVCGEN) \
--quiet \
--workspace \
$(MSVCGEN_EXTRA_OPTS) \
--workspace-extension=$(SSUFWSP) \
--output=$(<) \
--template-dir=$(MSVCGEN_TEMPLATEDIR) \
$(>)
}
actions together MergeRcs
{
$(MERGERES) '$(<)' '$(TOP)' '../..' '$(>)'
}
#----------------------------------------------------------------------------
RegisterCompileGroups all apps plugins libs ;
NotFile msvcgen ;
Always msvcgen ;
Clean clean : $(MSVCGEN_LOCATE_TARGET:G=dir) ;
Clean clean : $(MSVCGEN_LOCATE_FRAGMENT:G=dir) ;
Clean clean : $(MSVCGEN_BUILD_ROOT) ;
Clean msvcclean : $(MSVCGEN_LOCATE_TARGET:G=dir) ;
Clean msvcclean : $(MSVCGEN_LOCATE_FRAGMENT:G=dir) ;
}

View File

@ -1,192 +0,0 @@
#============================================================================
# Rules for compiling a set of sources to object files
#============================================================================
# These are slightly modified versions of the Object and Objects rules from
# jam. The problem with the original rules in Jambase is the handling of
# custom file types. The solution with the UserObject rule is monolithic, you
# can only have 1 such rule. Thus we construct a more flexible toolkit here
# which let's you register rules for certain filetypes.
## RegisterFileType Rulename : extensions
## Register a rule which is used to compile a filetype into object
## files. The registered rule is called with the name of the
## sourcefile as argument (completely gristed and SEARCH is set already).
## The rule should return the object files created completely gristed and
## with LOCATE set (use the LocateTarget rule to do this).
rule RegisterFileType
{
local suffix ;
for suffix in $(>)
{
FILETYPE_$(suffix) = $(<) ;
}
}
## RegisterHeaderRule rulename : regexpattern : extensions
## Registers a rule and a regular expression which will be used for header
## file scanning of the specified extensions.
rule RegisterHeaderRule
{
local suffix ;
for suffix in $(3)
{
HDRRULE_$(suffix) = $(<) ;
HDRPATTERN_$(suffix) = $(>) ;
}
}
## CompileObjects sources [ : options ]
## Compile a set of sourcefiles into objectfiles (usually .o extension).
## For ungristed sourcefiles $(SEARCH) will be set to $(SEARCH_SOURCE).
## The function returns the names of the targets being built (gristed and
## with LOCATE set.
## Normally you don't have to use this rule. The Application or Library rules
## are taking care of calling it for you.
rule CompileObjects
{
local s ;
local sources = [ SearchSource $(<) ] ;
local targets ;
for s in $(sources)
{
# compile the sourcefile to targetfile
targets += [ CompileObject $(s) : $(2) ] ;
}
return $(targets) ;
}
#----------------------------------------------------------------------------
# private part
# CompileObject sourcefile [ : options ]
# helper rule: Compiles a source file to an object file. The source should be
# correctly gristed and SEARCH should be set. The function will return the
# target names gristed and with LOCATE set.
rule CompileObject
{
# handle #includes for source: Jam scans for headers with
# the regexp pattern $(HDRSCAN) and then invokes $(HDRRULE)
# with the scanned file as the target and the found headers
# as the sources. HDRSEARCH is the value of SEARCH used for
# the found header files.
# $(SEARCH_SOURCE:E) is where cc first looks for #include
# "foo.h" files. If the source file is in a distant directory,
# look there. Else, look in "" (the current directory).
if $(HDRRULE_$(<:S))
{
HDRSEARCH on $(<) = $(SEARCH_SOURCE:E) $(HDRSEARCH) $(STDHDRSEARCH) ;
SEARCH_SOURCE on $(<) = $(SEARCH_SOURCE) ;
HDRRULE on $(<) = $(HDRRULE_$(<:S)) ;
HDRSCAN on $(<) = $(HDRPATTERN_$(<:S)) ;
}
local targets ;
# Invoke filetype specific rule
if $(FILETYPE_$(<:S)) {
targets = [ $(FILETYPE_$(<:S)) $(<) : $(2) ] ;
} else {
echo "Warning: no rules for filetype $(<:S) defined (at file $(<))." ;
}
if $(targets) {
# construct clean target
Clean clean : $(targets) ;
}
return $(targets) ;
}
## HeaderRule source : headers
## This rule is the default header rule used by the objects rules. You
## might register custom rules with the RegisterHeaderRule rule.
rule HeaderRule
{
# N.B. This rule is called during binding, potentially after
# the fate of many targets has been determined, and must be
# used with caution: don't add dependencies to unrelated
# targets, and don't set variables on $(<).
# Tell Jam that anything depending on $(<) also depends on $(>),
# set SEARCH so Jam can find the headers, but then say we don't
# care if we can't actually find the headers (they may have been
# within ifdefs),
local HDRSEARCH = [ on $(<) GetVar HDRSEARCH ] ;
local SEARCH_SOURCE = [ on $(<) GetVar SEARCH_SOURCE ] ;
Includes $(<) : $(>) ;
SEARCH on $(>) = $(HDRSEARCH) $(SEARCH_SOURCE)/$(<:D) ;
NoCare $(>) ;
local i ;
for i in $(>)
{
SEARCH on $(>) = $(HDRSEARCH) $(SEARCH_SOURCE)/$(<:D) ;
if $(i:D) = "" {
SEARCH_SOURCE on $(i) = $(SEARCH_SOURCE)/$(<:D) ;
} else {
SEARCH_SOURCE on $(i) = $(SEARCH_SOURCE) ;
}
HDRSEARCH on $(>) = $(HDRSEARCH) ;
HDRRULE on $(>) = [ on $(<) GetVar HDRRULE ] ;
HDRSCAN on $(>) = [ on $(<) GetVar HDRPATTERN ] ;
}
}
# Dummy rule: .o files are used as is.
rule UseObjectFile
{
return $(<) ;
}
RegisterFileType UseObjectFile : .o ;
# Ignore header files.
rule UseHeaderFile
{
return ;
}
RegisterFileType UseHeaderFile : .h .hpp ;
RegisterHeaderRule HeaderRule : $(HDRPATTERN) : .h .hpp .inc ;
## SearchSource
## Sets search path of the sourcefiles to the current SUBDIR and sets a
## suitable grist on the sources. Ignores source files that already have
## grist set.
rule SearchSource
{
local sources ;
for f in $(<) {
if $(f:G) {
sources += $(f) ;
} else {
local source = $(f:G=$(SOURCE_GRIST:E)) ;
sources += $(source) ;
SEARCH on $(source) = $(SEARCH_SOURCE) ;
}
}
return $(sources) ;
}
## LocateTarget
## Sets LOCATE on the current output directory (depending on builddir,
## variant and current subdir), sets a suitable grist and makes sure the
## target directory is created if it doesn't exist.
rule LocateTarget
{
local targetdir ;
if $(>) {
targetdir = $(>) ;
} else {
targetdir = $(LOCATE_TARGET) ;
}
local targets = $(<:G=T!$(SOURCE_GRIST:E)!$(SUBVARIANT)) ;
MakeLocate $(targets) : $(targetdir) ;
return $(targets) ;
}

View File

@ -1,21 +0,0 @@
#============================================================================
# Rule for setting options at targets
#============================================================================
#----------------------------------------------------------------------------
# private rule - please specify the options in Application, Plugin or Library
# rule and don't use this rule here directly.
## CheckOptions candidates : Options : target
rule CheckOptions
{
local i ;
for i in $(>)
{
if ! [ IsElem $(i) : $(<) ]
{
echo "WARNING: Unknown option $(i) specified at $(3)." ;
}
}
}

View File

@ -1,33 +0,0 @@
#============================================================================
# Rules for creating distribution packages
#============================================================================
PACKAGE_FILES = ;
PACKAGE_FILE = $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2 ;
PACKAGE_DIR = $(PACKAGE_NAME)-$(PACKAGE_VERSION) ;
LOCATE_DISTTEMP ?= $(top_builddir)/build/dist ;
## Package files
## Add files to distribution package
rule Package
{
for i in $(<) {
local target = $(i:R=$(LOCATE_DISTTEMP)/$(PACKAGE_DIR)/$(SUBDIR)) ;
local dir = $(i:DR=$(LOCATE_DISTTEMP)/$(PACKAGE_DIR)/$(SUBDIR)) ;
local source = $(i:G=$(SOURCE_GRIST:E)_PACKAGE) ;
MkDir $(dir) ;
Copy $(target) : $(source) ;
LOCATE on $(source) = $(SUBDIR) ;
Depends $(target) : $(dir) ;
Depends $(target) : $(source) ;
Depends $(PACKAGE_FILE) : $(target) ;
}
}
actions TarBz2
{
tar -c --bzip2 -C $(LOCATE_DISTTEMP) -f $(<) $(PACKAGE_DIR)
}
TarBz2 $(PACKAGE_FILE) ;
Depends dist : $(PACKAGE_FILE) ;

View File

@ -1,22 +0,0 @@
#============================================================================
# Stub Rules for handling additional resources (the OS specific Jamfiles will
# override these.
#============================================================================
## Win32Resource
## Specify .rc files for targets. The .rc files should already have SEARCH
## set correctly.
rule Win32Resource { }
## ApplicationIconOSX basename : icon [ : pathcomponents ]
## Specify the icon for the application given by basename. If
## pathcomponents is omitted, SEARCH_SOURCE is used. If this rule is not
## invoked, then the icon specified via ApplicationIconDefaultOSX is used.
## If ApplicationIconDefaultOSX was never invoked, then no icon is used.
rule ApplicationIconOSX { }
## ApplicationIconDefaultOSX icon [ : pathcomponents ]
## Specify the default icon for GUI applications. This setting can be
## overriden for a individual application with the ApplicationIconOSX rule.
rule ApplicationIconDefaultOSX { }

View File

@ -1,93 +0,0 @@
#============================================================================
# Work around problems the SubDir rule of Jambase
# (until jampeople accept my patches :-/ )
#============================================================================
LOCATE_OBJECTS ?= $(top_builddir)/build/$(target) ;
LOCATE_TARGETS ?= $(top_builddir) ;
LOCATE_DOCS ?= $(top_builddir)/build ;
SUBDIRRULES += FixSubDirPath ;
MKDIR ?= mkdir ;
MKDIRS ?= "$(MKDIR) -p" ;
rule FixSubDirPath
{
LOCATE_SOURCE = [ ConcatDirs $(LOCATE_OBJECTS) $(SUBDIR_TOKENS) ] ;
LOCATE_TARGET = [ ConcatDirs $(LOCATE_OBJECTS) $(SUBDIR_TOKENS) ] ;
# We need to package the Jamfile (a bit hacky here...)
Package Jamfile ;
}
# fix bug in Jambase where SubInclude in the middle of a jam file made it break
rule SubInclude
{
if ! $($(<[1]))
{
Exit SubInclude $(<[1]) without prior SubDir $(<[1]) ;
}
local save_SUBDIR_TOKENS = $(SUBDIR_TOKENS) ;
SubDir $(<) ;
include $(JAMFILE:D=$(SUBDIR)) ;
SubDir $(<[1]) $(save_SUBDIR_TOKENS) ;
}
# this MakeLocate rule differs from the Jambase one in that it also works with
# files being in subdirectories
rule MakeLocate
{
# MakeLocate targets : directory ;
# Sets special variable LOCATE on targets, and arranges
# with MkDir to create target directory.
# Note we grist the directory name with 'dir',
# so that directory path components and other
# targets don't conflict.
if $(>) && $(>) != "" && $(>) != "."
{
local i ;
for i in $(<) {
LOCATE on $(i) = $(>) ;
local targetfile = $(i:R=$(>)) ;
Depends $(i) : $(targetfile:DG=dir) ;
MkDir $(targetfile:DG=dir) ;
}
}
}
# The default MkDir rule in Jambase has problems when paths contains a sequence
# of multiple slashes (ie. bla////fup). We solve these problems and greatly
# simply this rule by using the "mkdir -p" or mkdirs command.
rule MkDir
{
# MkDir directory ;
# Make a directory and all its parent directories.
# Ignore timestamps on directories: we only care if they
# exist.
NoUpdate $(<) ;
# don't create the dir multiple times
if ! $($(<)-mkdir)
{
$(<)-mkdir = true ;
MkDir1 $(<) ;
}
}
actions MkDir1
{
$(MKDIRS) "$(<)"
}

View File

@ -1,49 +0,0 @@
#============================================================================
# Jam configuration and actions for Linux/Unix
#============================================================================
SHELL ?= "/bin/sh" ;
#----------------------------------------------------------------------------
# platform specific rules
## ConstructApplicationTarget target : options
## Constructs the application atrget name (ie. foo.exe for foo)
rule ConstructApplicationTarget
{
return $(<) ;
}
rule ConstructLibraryTarget
{
if [ IsElem shared : $(2) ] {
return lib$(<).la ;
} else {
return lib$(<).a ;
}
}
rule ConstructPluginTarget
{
return $(<).so ;
}
# SystemLinkApplication target : objects : options
# do system specific actions needed for linking the application and construct
# correct clean targets.
rule SystemLinkApplication
{
local target = $($(<)_TARGET) ;
Depends $(target) : $(>) ;
LinkApplication $(target) : $(>) ;
LIBS on $(target) = $(LIBS) ;
LDFLAGS on $(target) = $(LDFLAGS) ;
# setup clean rules
Clean clean : $(target) ;
Clean $(<)clean : $(target) ;
}
actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
{
$(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LDFLAGS) $(LIBS)
}

View File

@ -1,39 +0,0 @@
#============================================================================
# Setup of compiler/linker flags for debug/optimize mode
#============================================================================
VARIANT ?= optimize ;
# Set modus related flags
CPPFLAGS += $(DEFS) ;
CFLAGS += $(COMPILER_CFLAGS) $(COMPILER_CFLAGS_$(VARIANT)) ;
CXXFLAGS += $(COMPILER_CXXFLAGS) $(COMPILER_CXXFLAGS_$(VARIANT)) ;
LIBS += $(COMPILER_LIBS) $(COMPILER_LIBS_$(VARIANT)) ;
LDFLAGS += $(COMPILER_LDFLAGS) $(COMPILER_LDFLAGS_$(VARIANT)) ;
LOCATE_OBJECTS = $(LOCATE_OBJECTS)/$(VARIANT) ;
## SubVariant variantname
## Specify subvarianet which are placed in separate compilation directories.
SUBVARIANT ?= "" ;
rule SubVariant
{
SUBVARIANT = $(<) ;
if ! $(<)
{
SUBVARIANT = "" ;
if $(SAVED_LOCATE_TARGET)
{
LOCATE_TARGET = $(SAVED_LOCATE_TARGET) ;
}
SAVED_LOCATE_TARGET = ;
}
else
{
if ! $(SAVED_LOCATE_TARGET)
{
SAVED_LOCATE_TARGET = $(LOCATE_TARGET) ;
}
LOCATE_TARGET = $(LOCATE_TARGET)/$(SUBVARIANT) ;
}
}

View File

@ -1,73 +0,0 @@
#============================================================================
# Jam configuration and actions for Win32
#============================================================================
SHELL ?= "/bin/sh" ;
#----------------------------------------------------------------------------
# resource handling
# Unfortunately we can't simply specify resources on the source list, because
# Mingw/Cygwin have the limitation that they can only link 1 resource file
# in. So we have to concatenate all resourcefiles here before compiling them.
actions together CompileResources
{
cat $(>) | $(WINDRES) $(WINDRES_FLAGS) --include-dir=$(>:D) -o $(<)
}
rule CompileResources
{
Depends $(<) : $(>) ;
}
rule Win32Resource
{
local target = $($(<)_TARGET) ;
local rcobject = [ LocateTarget _resource.o ] ;
# only add 1 resource object per target
if ! $($(<)_HASWIN32RESOURCE)
{
$(<)_HASWIN32RESOURCE = yes ;
ExtraObjects $(<) : $(rcobject) ;
}
CompileResources $(rcobject) : $(>) ;
}
#----------------------------------------------------------------------------
# linking part
## ConstructApplicationTarget target : options
## Constructs the application atrget name (ie. foo.exe for foo)
rule ConstructApplicationTarget
{
return $(<).exe ;
}
rule ConstructLibraryTarget
{
return lib$(<).a ;
}
rule ConstructPluginTarget
{
return $(<).dll ;
}
# SystemLinkApplication target : objects : options
rule SystemLinkApplication
{
local target = $($(<)_TARGET) ;
Depends $(target) : $(>) ;
LinkApplication $(target) : $(>) ;
LIBS on $(target) = $(LIBS) ;
LDFLAGS on $(target) = $(LDFLAGS) ;
# setup clean rules
Clean clean : $(target) ;
Clean $(<)clean : $(target) ;
}
actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
{
$(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LDFLAGS) $(LIBS)
}

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/scenarios

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/screenshots

View File

@ -1,3 +0,0 @@
; === propertyMap File ===
Martino=192.168.1.100

View File

@ -1 +0,0 @@
../../source/shared_lib

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/techs

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/tilesets

View File

@ -1 +0,0 @@
/home/softcoder/Code/glest/megaglest/data/glest_game/tutorials

View File

@ -1,38 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glest_game", "glest_game.vcproj", "{6B0C65F1-D031-46AF-AC0D-7C38892D2952}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libglest", "shared_lib.vcproj", "{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glest_editor", "glest_editor.vcproj", "{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3d_viewer", "g3d_viewer.vcproj", "{FE5C7C7C-F109-44F5-8329-25A4E24F162C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug|Win32.ActiveCfg = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug|Win32.Build.0 = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Release|Win32.ActiveCfg = Release|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Release|Win32.Build.0 = Release|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug|Win32.ActiveCfg = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug|Win32.Build.0 = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Release|Win32.ActiveCfg = Release|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Release|Win32.Build.0 = Release|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug|Win32.ActiveCfg = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug|Win32.Build.0 = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Release|Win32.ActiveCfg = Release|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Release|Win32.Build.0 = Release|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug|Win32.ActiveCfg = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Release|Win32.ActiveCfg = Release|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -1,216 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="g3d_viewer"
ProjectGUID="{FE5C7C7C-F109-44F5-8329-25A4E24F162C}"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\data\glest_game"
IntermediateDirectory="Debug"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;"
PreprocessorDefinitions="MWIN;__WXMSW__;__WXDEBUG__"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28d_adv.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxmsw28d_gl.lib wxmsw28d_html.lib wxmsw28d_media.lib wxmsw28d_qa.lib wxmsw28d_richtext.lib wxmsw28d_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib ..\libglest.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib winmm.lib rpcrt4.lib"
OutputFile="$(OutDir)\G3D_Viewer.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\source\win32_deps\lib"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="Release"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\release\$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wxbase28.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib wxjpeg.lib wxmsw28_adv.lib wxmsw28_aui.lib wxmsw28_core.lib wxmsw28_gl.lib wxmsw28_html.lib wxmsw28_media.lib wxmsw28_qa.lib wxmsw28_richtext.lib wxmsw28_xrc.lib wxpng.lib wxregex.lib wxtiff.lib wxzlib.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib libglest.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\source\g3d_viewer\main.h"
>
</File>
<File
RelativePath="..\..\source\g3d_viewer\renderer.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\glest.rc"
>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\source\g3d_viewer\main.cpp"
>
</File>
<File
RelativePath="..\..\source\g3d_viewer\renderer.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
ShowAllFiles="true"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><VisualStudioUserFile ProjectType="Visual C++" Version="9.00" ShowAllFiles="true"></VisualStudioUserFile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -1 +0,0 @@
GLEST ICON "glest.ico"

View File

@ -1,233 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="glest_editor"
ProjectGUID="{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}"
RootNamespace="glest_editor"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\data\glest_game"
IntermediateDirectory="Debug"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;"
PreprocessorDefinitions="MWIN;__WXMSW__;__WXDEBUG__"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\debug\$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28d_adv.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxmsw28d_gl.lib wxmsw28d_html.lib wxmsw28d_media.lib wxmsw28d_qa.lib wxmsw28d_richtext.lib wxmsw28d_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib"
OutputFile="$(OutDir)\Glest_Editor.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\source\win32_deps\lib"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="Release"
ConfigurationType="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\msw&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;"
PreprocessorDefinitions="MWIN;__WXMSW__"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\release\$(TargetName).pch"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="wxbase28.lib wxbase28_net.lib wxbase28_xml.lib wxexpat.lib wxjpeg.lib wxmsw28_adv.lib wxmsw28_aui.lib wxmsw28_core.lib wxmsw28_gl.lib wxmsw28_html.lib wxmsw28_media.lib wxmsw28_qa.lib wxmsw28_richtext.lib wxmsw28_xrc.lib wxpng.lib wxregex.lib wxtiff.lib wxzlib.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib libglest.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\source\glest_map_editor\main.h"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\map.h"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\program.h"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\renderer.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\glest.rc"
>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\source\glest_map_editor\main.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\map.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\program.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_map_editor\renderer.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
ShowAllFiles="true"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><VisualStudioUserFile ProjectType="Visual C++" Version="9.00" ShowAllFiles="true"></VisualStudioUserFile>

View File

@ -1,843 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="glest_game"
ProjectGUID="{6B0C65F1-D031-46AF-AC0D-7C38892D2952}"
RootNamespace="glest_game"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;"
AdditionalUsingDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;XML_LIBRARY;NO_GL_ASSERTIONS;USE_PCH=1"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\glest\$(TargetName).pch"
BrowseInformation="1"
WarningLevel="2"
DebugInformationFormat="3"
DisableSpecificWarnings="4018;4244"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib zlib.lib lua5.1.lib xerces-c_3D.lib Dbghelp.lib"
AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
LinkTimeCodeGeneration="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
ConfigurationType="1"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;"
AdditionalUsingDirectories=""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;XML_LIBRARY;USE_PCH=1;_CRT_SECURE_NO_WARNINGS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="2"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib zlib.lib lua5.1.lib xerces-c_3.lib Dbghelp.lib"
AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="facilities"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\source\glest_game\facilities\auto_test.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\auto_test.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\components.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\components.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\game_util.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\game_util.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\logger.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\facilities\logger.h"
>
</File>
</Filter>
<Filter
Name="ai"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\source\glest_game\ai\ai.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\ai.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\ai_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\ai_interface.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\ai_rule.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\ai_rule.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\path_finder.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\ai\path_finder.h"
>
</File>
</Filter>
<Filter
Name="game"
>
<File
RelativePath="..\..\source\glest_game\game\chat_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\chat_manager.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\commander.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\commander.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\console.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\console.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game_camera.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game_camera.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game_constants.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\game_settings.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\script_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\script_manager.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\stats.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\game\stats.h"
>
</File>
</Filter>
<Filter
Name="global"
>
<File
RelativePath="..\..\source\glest_game\global\config.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\config.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\core_data.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\core_data.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\lang.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\lang.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\metrics.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\global\metrics.h"
>
</File>
</Filter>
<Filter
Name="graphics"
>
<File
RelativePath="..\..\source\glest_game\graphics\particle_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\graphics\particle_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\graphics\renderer.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\graphics\renderer.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\graphics\unit_particle_type.cpp"
>
</File>
</Filter>
<Filter
Name="gui"
>
<File
RelativePath="..\..\source\glest_game\gui\display.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\gui\display.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\gui\gui.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\gui\gui.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\gui\selection.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\gui\selection.h"
>
</File>
</Filter>
<Filter
Name="main"
>
<File
RelativePath="..\..\source\glest_game\main\battle_end.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\battle_end.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\intro.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\intro.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\main.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\main.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\program.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\main\program.h"
>
</File>
</Filter>
<Filter
Name="menu"
>
<File
RelativePath="..\..\source\glest_game\menu\main_menu.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\main_menu.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_background.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_background.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_about.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_about.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_custom_game.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_custom_game.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_graphic_info.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_graphic_info.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_join_game.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_join_game.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_new_game.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_new_game.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_options.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_options.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_root.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_root.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_scenario.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\menu\menu_state_scenario.h"
>
</File>
</Filter>
<Filter
Name="network"
>
<File
RelativePath="..\..\source\glest_game\network\client_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\client_interface.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\connection_slot.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\connection_slot.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_interface.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_manager.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_message.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_message.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_types.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\network_types.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\server_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\network\server_interface.h"
>
</File>
</Filter>
<Filter
Name="sound"
>
<File
RelativePath="..\..\source\glest_game\sound\sound_container.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\sound\sound_container.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\sound\sound_renderer.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\sound\sound_renderer.h"
>
</File>
</Filter>
<Filter
Name="type_instances"
>
<File
RelativePath="..\..\source\glest_game\type_instances\command.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\command.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\faction.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\faction.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\object.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\object.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\resource.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\resource.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\unit.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\unit.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\upgrade.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\type_instances\upgrade.h"
>
</File>
</Filter>
<Filter
Name="types"
>
<File
RelativePath="..\..\source\glest_game\types\command_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\command_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\damage_multiplier.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\damage_multiplier.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\element_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\element_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\faction_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\faction_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\object_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\object_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\resource_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\resource_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\skill_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\skill_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\tech_tree.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\tech_tree.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\unit_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\unit_type.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\upgrade_type.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\types\upgrade_type.h"
>
</File>
</Filter>
<Filter
Name="world"
>
<File
RelativePath="..\..\source\glest_game\world\map.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\map.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\minimap.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\minimap.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\scenario.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\scenario.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\surface_atlas.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\surface_atlas.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\tileset.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\tileset.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\time_flow.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\time_flow.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\unit_updater.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\unit_updater.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\water_effects.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\water_effects.h"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\world.cpp"
>
</File>
<File
RelativePath="..\..\source\glest_game\world\world.h"
>
</File>
</Filter>
<File
RelativePath=".\glest.rc"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command="$(TargetPath)"
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1,689 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libglest"
ProjectGUID="{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}"
RootNamespace="shared_lib"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
ConfigurationType="4"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NO_GL_ASSERTIONS;USE_PCH=1"
StringPooling="true"
MinimalRebuild="true"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
EnableFunctionLevelLinking="true"
FloatingPointModel="2"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
PrecompiledHeaderFile="c:\temp\glest\$(TargetName).pch"
WarningLevel="2"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
IntermediateDirectory="../../build/$(ConfigurationName)/$(ProjectName)"
ConfigurationType="4"
CharacterSet="0"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
RuntimeTypeInfo="false"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\source\win32_deps\src\glprocs.c"
>
</File>
<Filter
Name="graphics"
>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\buffer.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\camera.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\context.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\font.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\font_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\graphics_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\interpolation.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\model.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\model_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\particle.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\pixmap.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\quaternion.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\shader.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\shader_manager.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\texture.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\texture_manager.cpp"
>
</File>
<Filter
Name="gl"
>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\context_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\font_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\model_renderer_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\opengl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\particle_renderer_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\shader_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\text_renderer_gl.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\graphics\gl\texture_gl.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="lua"
>
<File
RelativePath="..\..\source\shared_lib\sources\lua\lua_script.cpp"
>
</File>
</Filter>
<Filter
Name="xml"
>
<File
RelativePath="..\..\source\shared_lib\sources\xml\xml_parser.cpp"
>
</File>
</Filter>
<Filter
Name="util"
>
<File
RelativePath="..\..\source\shared_lib\sources\util\checksum.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\conversion.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\leak_dumper.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\profiler.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\properties.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\random.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\util\util.cpp"
>
</File>
</Filter>
<Filter
Name="sound"
>
<File
RelativePath="..\..\source\shared_lib\sources\sound\sound.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\sound\sound_file_loader.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\sound\sound_interface.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\sound\sound_player.cpp"
>
</File>
<Filter
Name="ds8"
>
<File
RelativePath="..\..\source\shared_lib\sources\sound\ds8\sound_player_ds8.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="platform"
>
<Filter
Name="win32"
>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\factory_repository.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\gl_wrap.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\platform_menu.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\platform_util.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\socket.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\thread.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\window.cpp"
>
</File>
<File
RelativePath="..\..\source\shared_lib\sources\platform\win32\window_gl.cpp"
>
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<Filter
Name="graphics"
>
<File
RelativePath="..\..\source\shared_lib\include\graphics\buffer.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\camera.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\context.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\font.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\font_manager.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\graphics_factory.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\graphics_interface.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\interpolation.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\math_util.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\matrix.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\model.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\model_header.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\model_manager.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\model_renderer.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\particle.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\particle_renderer.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\pixmap.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\quaternion.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\shader.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\shader_manager.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\text_renderer.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\texture.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\texture_manager.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\vec.h"
>
</File>
<Filter
Name="gl"
>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\context_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\font_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\graphics_factory_basic_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\graphics_factory_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\graphics_factory_gl2.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\model_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\model_renderer_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\opengl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\particle_renderer_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\shader_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\text_renderer_gl.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\graphics\gl\texture_gl.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="lua"
>
<File
RelativePath="..\..\source\shared_lib\include\lua\lua_script.h"
>
</File>
</Filter>
<Filter
Name="sound"
>
<File
RelativePath="..\..\source\shared_lib\include\sound\sound.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\sound\sound_factory.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\sound\sound_file_loader.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\sound\sound_interface.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\sound\sound_player.h"
>
</File>
<Filter
Name="ds8"
>
<File
RelativePath="..\..\source\shared_lib\include\sound\ds8\sound_factory_ds8.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\sound\ds8\sound_player_ds8.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="xml"
>
<File
RelativePath="..\..\source\shared_lib\include\xml\xml_parser.h"
>
</File>
</Filter>
<Filter
Name="platform"
>
<Filter
Name="win32"
>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\factory_repository.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\gl_wrap.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_definitions.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_main.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_menu.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\platform_util.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\socket.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\thread.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\types.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\window.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\platform\win32\window_gl.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="util"
>
<File
RelativePath="..\..\source\shared_lib\include\util\checksum.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\conversion.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\factory.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\leak_dumper.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\profiler.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\properties.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\random.h"
>
</File>
<File
RelativePath="..\..\source\shared_lib\include\util\util.h"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9.00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="SOFTHAUS-XPVM"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -1,391 +0,0 @@
#include "configuration.h"
#include <stdexcept>
#include "xml/xml_parser.h"
#include "util/util.h"
#include "util/properties.h"
#include "util/conversion.h"
using namespace std;
using namespace Shared::Xml;
using namespace Shared::Util;
namespace Configurator{
// ===============================================
// class Configuration
// ===============================================
Configuration::~Configuration(){
for(int i= 0; i<fieldGroups.size(); ++i){
delete fieldGroups[i];
}
}
void Configuration::load(const string &path){
loadStructure(path);
loadValues(fileName);
}
void Configuration::loadStructure(const string &path){
XmlTree xmlTree;
xmlTree.load(path);
const XmlNode *configurationNode= xmlTree.getRootNode();
//title
title= configurationNode->getChild("title")->getAttribute("value")->getValue();
//fileName
fileName= configurationNode->getChild("file-name")->getAttribute("value")->getValue();
//icon
XmlNode *iconNode= configurationNode->getChild("icon");
icon= iconNode->getAttribute("value")->getBoolValue();
if(icon){
iconPath= iconNode->getAttribute("path")->getValue();
}
const XmlNode *fieldGroupsNode= configurationNode->getChild("field-groups");
fieldGroups.resize(fieldGroupsNode->getChildCount());
for(int i=0; i<fieldGroups.size(); ++i){
const XmlNode *fieldGroupNode= fieldGroupsNode->getChild("field-group", i);
FieldGroup *fieldGroup= new FieldGroup();
fieldGroup->load(fieldGroupNode);
fieldGroups[i]= fieldGroup;
}
}
void Configuration::loadValues(const string &path){
Properties properties;
properties.load(path);
for(int i=0; i<fieldGroups.size(); ++i){
FieldGroup *fg= fieldGroups[i];
for(int j=0; j<fg->getFieldCount(); ++j){
Field *f= fg->getField(j);
f->setValue(properties.getString(f->getVariableName()));
}
}
}
void Configuration::save(){
Properties properties;
properties.load(fileName);
for(int i=0; i<fieldGroups.size(); ++i){
FieldGroup *fg= fieldGroups[i];
for(int j=0; j<fg->getFieldCount(); ++j){
Field *f= fg->getField(j);
f->updateValue();
if(!f->isValueValid(f->getValue())){
f->setValue(f->getDefaultValue());
f->updateControl();
}
properties.setString(f->getVariableName(), f->getValue());
}
}
properties.save(fileName);
}
string Field::getInfo() const{
return name+" (default: " + defaultValue + ")";
}
// ===============================================
// class FieldGroup
// ===============================================
FieldGroup::~FieldGroup(){
for(int i= 0; i<fields.size(); ++i){
delete fields[i];
}
}
void FieldGroup::load(const XmlNode *groupNode){
name= groupNode->getAttribute("name")->getValue();
fields.resize(groupNode->getChildCount());
for(int i=0; i<fields.size(); ++i){
const XmlNode *fieldNode= groupNode->getChild("field", i);
Field *f= newField(fieldNode->getAttribute("type")->getValue());
//name
const XmlNode *nameNode= fieldNode->getChild("name");
f->setName(nameNode->getAttribute("value")->getValue());
//variableName
const XmlNode *variableNameNode= fieldNode->getChild("variable-name");
f->setVariableName(variableNameNode->getAttribute("value")->getValue());
//description
const XmlNode *descriptionNode= fieldNode->getChild("description");
f->setDescription(descriptionNode->getAttribute("value")->getValue());
//default
const XmlNode *defaultNode= fieldNode->getChild("default");
f->setDefaultValue(defaultNode->getAttribute("value")->getValue());
f->loadSpecific(fieldNode);
if(!f->isValueValid(f->getDefaultValue())){
throw runtime_error("Default value not valid in field: " + f->getName());
}
fields[i]= f;
}
}
Field *FieldGroup::newField(const string &type){
if(type=="Bool"){
return new BoolField();
}
else if(type=="Int"){
return new IntField();
}
else if(type=="Float"){
return new FloatField();
}
else if(type=="String"){
return new StringField();
}
else if(type=="Enum"){
return new EnumField();
}
else if(type=="IntRange"){
return new IntRangeField();
}
else if(type=="FloatRange"){
return new FloatRangeField();
}
else{
throw runtime_error("Unknown field type: " + type);
}
}
// ===============================================
// class BoolField
// ===============================================
void BoolField::createControl(wxWindow *parent, wxSizer *sizer){
checkBox= new wxCheckBox(parent, -1, "");
checkBox->SetValue(strToBool(value));
sizer->Add(checkBox);
}
void BoolField::updateValue(){
value= boolToStr(checkBox->GetValue());
}
void BoolField::updateControl(){
checkBox->SetValue(strToBool(value));
}
bool BoolField::isValueValid(const string &value){
try{
strToBool(value);
}
catch(const exception &){
return false;
}
return true;
}
// ===============================================
// class IntField
// ===============================================
void IntField::createControl(wxWindow *parent, wxSizer *sizer){
textCtrl= new wxTextCtrl(parent, -1, value.c_str());
sizer->Add(textCtrl);
}
void IntField::updateValue(){
value= textCtrl->GetValue();
}
void IntField::updateControl(){
textCtrl->SetValue(value.c_str());
}
bool IntField::isValueValid(const string &value){
try{
strToInt(value);
}
catch(const exception &){
return false;
}
return true;
}
// ===============================================
// class FloatField
// ===============================================
void FloatField::createControl(wxWindow *parent, wxSizer *sizer){
textCtrl= new wxTextCtrl(parent, -1, value.c_str());
sizer->Add(textCtrl);
}
void FloatField::updateValue(){
value= textCtrl->GetValue();
}
void FloatField::updateControl(){
textCtrl->SetValue(value.c_str());
}
bool FloatField::isValueValid(const string &value){
try{
strToFloat(value);
}
catch(const exception &){
return false;
}
return true;
}
// ===============================================
// class StringField
// ===============================================
void StringField::createControl(wxWindow *parent, wxSizer *sizer){
textCtrl= new wxTextCtrl(parent, -1, value.c_str());
textCtrl->SetSize(wxSize(3*textCtrl->GetSize().x/2, textCtrl->GetSize().y));
sizer->Add(textCtrl);
}
void StringField::updateValue(){
value= textCtrl->GetValue();
}
void StringField::updateControl(){
textCtrl->SetValue(value.c_str());
}
bool StringField::isValueValid(const string &value){
return true;
}
// ===============================================
// class EnumField
// ===============================================
void EnumField::createControl(wxWindow *parent, wxSizer *sizer){
comboBox= new wxComboBox(parent, -1, "", wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY);
for(int i=0; i<enumerants.size(); ++i){
comboBox->Append(enumerants[i].c_str());
}
comboBox->SetValue(value.c_str());
sizer->Add(comboBox);
}
void EnumField::updateValue(){
value= comboBox->GetValue();
}
void EnumField::updateControl(){
comboBox->SetValue(value.c_str());
}
bool EnumField::isValueValid(const string &value){
return true;
}
void EnumField::loadSpecific(const XmlNode *fieldNode){
const XmlNode *enumsNode= fieldNode->getChild("enums");
for(int i=0; i<enumsNode->getChildCount(); ++i){
const XmlNode *enumNode= enumsNode->getChild("enum", i);
enumerants.push_back(enumNode->getAttribute("value")->getValue());
}
};
// ===============================================
// class IntRange
// ===============================================
void IntRangeField::createControl(wxWindow *parent, wxSizer *sizer){
slider= new wxSlider(parent, -1, strToInt(value), min, max, wxDefaultPosition, wxDefaultSize, wxSL_LABELS);
sizer->Add(slider);
}
void IntRangeField::updateValue(){
value= intToStr(slider->GetValue());
}
void IntRangeField::updateControl(){
slider->SetValue(strToInt(value));
}
bool IntRangeField::isValueValid(const string &value){
try{
strToInt(value);
}
catch(const exception &){
return false;
}
return true;
}
void IntRangeField::loadSpecific(const XmlNode *fieldNode){
const XmlNode *minNode= fieldNode->getChild("min");
min= strToInt(minNode->getAttribute("value")->getValue());
const XmlNode *maxNode= fieldNode->getChild("max");
max= strToInt(maxNode->getAttribute("value")->getValue());
}
string IntRangeField::getInfo() const{
return name + " (min: " + intToStr(min)+ ", max: " + intToStr(max) + ", default: " + defaultValue + ")";
}
// ===============================================
// class FloatRangeField
// ===============================================
void FloatRangeField::createControl(wxWindow *parent, wxSizer *sizer){
textCtrl= new wxTextCtrl(parent, -1, value.c_str());
sizer->Add(textCtrl);
}
void FloatRangeField::updateValue(){
value= textCtrl->GetValue();
}
void FloatRangeField::updateControl(){
textCtrl->SetValue(value.c_str());
}
bool FloatRangeField::isValueValid(const string &value){
try{
float f= strToFloat(value);
return f>=min && f<=max;
}
catch(const exception &){
return false;
}
return true;
}
void FloatRangeField::loadSpecific(const XmlNode *fieldNode){
const XmlNode *minNode= fieldNode->getChild("min");
min= strToFloat(minNode->getAttribute("value")->getValue());
const XmlNode *maxNode= fieldNode->getChild("max");
max= strToFloat(maxNode->getAttribute("value")->getValue());
};
string FloatRangeField::getInfo() const{
return name + " (min: " + floatToStr(min)+ ", max: " + floatToStr(max) + ", default: " + defaultValue + ")";
}
}//end namespace

View File

@ -1,237 +0,0 @@
#ifndef _CONFIGURATOR_CONFIGURATION_H_
#define _CONFIGURATOR_CONFIGURATION_H_
#include <string>
#include <vector>
#include <wx/wx.h>
#include "xml/xml_parser.h"
using std::string;
using std::vector;
using Shared::Xml::XmlNode;
namespace Configurator{
class Field;
class FieldGroup;
// ===============================
// class Configuration
// ===============================
class Configuration{
public:
typedef vector<FieldGroup*> FieldGroups;
private:
string title;
string fileName;
bool icon;
string iconPath;
FieldGroups fieldGroups;
public:
~Configuration();
void load(const string &path);
void loadStructure(const string &path);
void loadValues(const string &path);
void save();
const string &getTitle() const {return title;}
const string &getFileName() const {return fileName;}
bool getIcon() const {return icon;}
const string &getIconPath() const {return iconPath;}
int getFieldGroupCount() const {return fieldGroups.size();}
FieldGroup *getFieldGroup(int i) const {return fieldGroups[i];}
};
// ===============================
// class FieldGroup
// ===============================
class FieldGroup{
public:
typedef vector<Field*> Fields;
private:
Fields fields;
string name;
public:
~FieldGroup();
int getFieldCount() const {return fields.size();}
Field *getField(int i) const {return fields[i];}
const string &getName() const {return name;}
void load(const XmlNode *groupNode);
private:
Field *newField(const string &type);
};
// ===============================
// class Field
// ===============================
class Field{
protected:
string name;
string variableName;
string description;
string value;
string defaultValue;
public:
virtual ~Field()= 0{}
const string &getName() const {return name;}
const string &getVariableName() const {return variableName;}
const string &getDescription() const {return description;}
const string &getValue() const {return value;}
const string &getDefaultValue() const {return defaultValue;}
void setName(const string &name) {this->name= name;}
void setVariableName(const string &variableName) {this->variableName= variableName;}
void setDescription(const string &description) {this->description= description;}
void setValue(const string &value) {this->value= value;}
void setDefaultValue(const string &defaultValue) {this->defaultValue= defaultValue;}
virtual void loadSpecific(const XmlNode *fieldNode){};
virtual string getInfo() const;
virtual void createControl(wxWindow *parent, wxSizer *sizer)= 0;
virtual void updateValue()= 0;
virtual void updateControl()= 0;
virtual bool isValueValid(const string &value)= 0;
};
// ===============================
// class BoolField
// ===============================
class BoolField: public Field{
private:
wxCheckBox *checkBox;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
};
// ===============================
// class IntField
// ===============================
class IntField: public Field{
private:
wxTextCtrl *textCtrl;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
};
// ===============================
// class FloatField
// ===============================
class FloatField: public Field{
private:
wxTextCtrl *textCtrl;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
};
// ===============================
// class StringField
// ===============================
class StringField: public Field{
private:
wxTextCtrl *textCtrl;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
};
// ===============================
// class EnumField
// ===============================
class EnumField: public Field{
private:
wxComboBox *comboBox;
vector<string> enumerants;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
virtual void loadSpecific(const XmlNode *fieldNode);
};
// ===============================
// class IntRangeField
// ===============================
class IntRangeField: public Field{
private:
wxSlider *slider;
int min;
int max;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
virtual void loadSpecific(const XmlNode *fieldNode);
virtual string getInfo() const;
};
// ===============================
// class FloatRangeField
// ===============================
class FloatRangeField: public Field{
private:
wxTextCtrl *textCtrl;
float min;
float max;
public:
virtual void createControl(wxWindow *parent, wxSizer *sizer);
virtual void updateValue();
virtual void updateControl();
virtual bool isValueValid(const string &value);
virtual void loadSpecific(const XmlNode *fieldNode);
virtual string getInfo() const;
};
}//end namespace
#endif

View File

@ -1,197 +0,0 @@
#include "main.h"
#include <stdexcept>
#include <wx/wx.h>
#include <wx/sizer.h>
#include <wx/image.h>
#include <wx/bitmap.h>
#include <wx/icon.h>
using namespace std;
namespace Configurator{
// ===============================================
// class MainWindow
// ===============================================
const int MainWindow::margin= 10;
const int MainWindow::panelMargin= 20;
const int MainWindow::gridMarginHorizontal= 30;
MainWindow::MainWindow(){
SetExtraStyle(wxFRAME_EX_CONTEXTHELP);
configuration.load("configuration.xml");
Create(NULL, -1, "", wxDefaultPosition, wxDefaultSize, wxCAPTION | wxSYSTEM_MENU);
SetTitle(("Configurator - " + configuration.getTitle() + " - Editing " + configuration.getFileName()).c_str());
if(configuration.getIcon()){
wxIcon icon;
icon.LoadFile(configuration.getIconPath().c_str(), wxBITMAP_TYPE_ICO);
SetIcon(icon);
}
notebook= new wxNotebook(this, -1);
wxSizer *mainSizer= new wxBoxSizer(wxVERTICAL);
wxSizer *topSizer= new wxBoxSizer(wxHORIZONTAL);
topSizer->Add(notebook, 0, wxALL, 0);
mainSizer->Add(topSizer, 0, wxALL, margin);
for(int i=0; i<configuration.getFieldGroupCount(); ++i){
//create page
FieldGroup *fg= configuration.getFieldGroup(i);
wxPanel *panel= new wxPanel(notebook, -1);
notebook->AddPage(panel, fg->getName().c_str());
//sizers
wxSizer *gridSizer= new wxFlexGridSizer(2, margin, gridMarginHorizontal);
wxSizer *panelSizer= new wxBoxSizer(wxVERTICAL);
panelSizer->Add(gridSizer, 0, wxALL, panelMargin);
panel->SetSizer(panelSizer);
for(int j=0; j<fg->getFieldCount(); ++j){
Field *f= fg->getField(j);
FieldText *staticText= new FieldText(panel, this, f);
staticText->SetAutoLayout(true);
gridSizer->Add(staticText);
f->createControl(panel, gridSizer);
idMap.insert(IdPair(staticText->GetId(), staticText));
}
}
//buttons
wxSizer *bottomSizer= new wxBoxSizer(wxHORIZONTAL);
buttonOk= new wxButton(this, biOk, "OK");
buttonApply= new wxButton(this, biApply, "Apply");
buttonCancel= new wxButton(this, biCancel, "Cancel");
buttonDefault= new wxButton(this, biDefault, "Default");
bottomSizer->Add(buttonOk, 0, wxALL, margin);
bottomSizer->Add(buttonApply, 0, wxRIGHT | wxDOWN | wxUP, margin);
bottomSizer->Add(buttonCancel, 0, wxRIGHT | wxDOWN | wxUP, margin);
bottomSizer->Add(buttonDefault, 0, wxRIGHT | wxDOWN | wxUP, margin);
infoText= new wxTextCtrl(this, -1, "Info text.", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY);
infoText->SetSize(infoText->GetSize().x, 2*infoText->GetSize().y/3);
infoText->SetBackgroundColour(buttonOk->GetBackgroundColour());
mainSizer->Add(infoText, 1, wxGROW | wxALL | wxALIGN_CENTER, margin);
mainSizer->Add(bottomSizer, 0, wxALIGN_CENTER);
SetBackgroundColour(buttonOk->GetBackgroundColour());
SetSizerAndFit(mainSizer);
Refresh();
}
void MainWindow::onButtonOk(wxCommandEvent &event){
configuration.save();
Close();
}
void MainWindow::onButtonApply(wxCommandEvent &event){
configuration.save();
}
void MainWindow::onButtonCancel(wxCommandEvent &event){
Close();
}
void MainWindow::onButtonDefault(wxCommandEvent &event){
for(int i=0; i<configuration.getFieldGroupCount(); ++i){
FieldGroup *fg= configuration.getFieldGroup(i);
for(int j=0; j<fg->getFieldCount(); ++j){
Field *f= fg->getField(j);
f->setValue(f->getDefaultValue());
f->updateControl();
}
}
}
void MainWindow::onClose(wxCloseEvent &event){
Destroy();
}
void MainWindow::onMouseDown(wxMouseEvent &event){
setInfoText("");
}
void MainWindow::setInfoText(const string &str){
infoText->SetValue(str.c_str());
}
BEGIN_EVENT_TABLE(MainWindow, wxFrame)
EVT_BUTTON(biOk, MainWindow::onButtonOk)
EVT_BUTTON(biApply, MainWindow::onButtonApply)
EVT_BUTTON(biCancel, MainWindow::onButtonCancel)
EVT_BUTTON(biDefault, MainWindow::onButtonDefault)
EVT_CLOSE(MainWindow::onClose)
EVT_LEFT_DOWN(MainWindow::onMouseDown)
END_EVENT_TABLE()
// ===============================================
// class FieldText
// ===============================================
FieldText::FieldText(wxWindow *parent, MainWindow *mainWindow, const Field *field):
wxStaticText(parent, -1, field->getName().c_str())
{
this->mainWindow= mainWindow;
this->field= field;
}
void FieldText::onHelp(wxHelpEvent &event){
string str= field->getInfo()+".";
if(!field->getDescription().empty()){
str+= "\n"+field->getDescription()+".";
}
mainWindow->setInfoText(str);
}
BEGIN_EVENT_TABLE(FieldText, wxStaticText)
EVT_HELP(-1, FieldText::onHelp)
END_EVENT_TABLE()
// ===============================================
// class App
// ===============================================
bool App::OnInit(){
try{
mainWindow= new MainWindow();
mainWindow->Show();
}
catch(const exception &e){
wxMessageDialog(NULL, e.what(), "Exception", wxOK | wxICON_ERROR).ShowModal();
return 0;
}
return true;
}
int App::MainLoop(){
try{
return wxApp::MainLoop();
}
catch(const exception &e){
wxMessageDialog(NULL, e.what(), "Exception", wxOK | wxICON_ERROR).ShowModal();
return 0;
}
}
int App::OnExit(){
return 0;
}
}//end namespace
IMPLEMENT_APP(Configurator::App)

View File

@ -1,101 +0,0 @@
#ifndef _CONFIGURATOR_MAIN_H_
#define _CONFIGURATOR_MAIN_H_
#include <map>
#include <wx/wx.h>
#include <wx/cshelp.h>
#include <wx/notebook.h>
#include <wx/sizer.h>
#include "configuration.h"
using std::pair;
using std::map;
namespace Configurator{
// ===============================
// class MainWindow
// ===============================
class MainWindow: public wxFrame{
private:
DECLARE_EVENT_TABLE()
private:
typedef pair<int, wxWindow*> IdPair;
typedef map<int, wxWindow*> IdMap;
private:
static const int margin;
static const int panelMargin;
static const int gridMarginHorizontal;
enum ButtonId{
biOk,
biApply,
biCancel,
biDefault
};
private:
IdMap idMap;
Configuration configuration;
wxButton *buttonOk;
wxButton *buttonApply;
wxButton *buttonCancel;
wxButton *buttonDefault;
wxNotebook *notebook;
wxTextCtrl *infoText;
public:
MainWindow();
void onButtonOk(wxCommandEvent &event);
void onButtonApply(wxCommandEvent &event);
void onButtonCancel(wxCommandEvent &event);
void onButtonDefault(wxCommandEvent &event);
void onClose(wxCloseEvent &event);
void onMouseDown(wxMouseEvent &event);
void setInfoText(const string &str);
};
// ===============================
// class FieldText
// ===============================
class FieldText: public wxStaticText{
private:
MainWindow *mainWindow;
const Field *field;
private:
DECLARE_EVENT_TABLE()
public:
FieldText(wxWindow *parentm, MainWindow *mainWindow, const Field *field);
void onHelp(wxHelpEvent &event);
};
// ===============================
// class App
// ===============================
class App: public wxApp{
private:
MainWindow *mainWindow;
public:
virtual bool OnInit();
virtual int MainLoop();
virtual int OnExit();
};
}//end namespace
DECLARE_APP(Configurator::App)
#endif

View File

@ -1,304 +0,0 @@
#include "main.h"
#include <stdexcept>
#include "graphics_factory_basic_gl.h"
#include "graphics_interface.h"
#include "util.h"
using namespace Shared::Platform;
using namespace Shared::Graphics;
using namespace Shared::Graphics::Gl;
using namespace Shared::Util;
using namespace std;
namespace Shared{ namespace G3dViewer{
// ===============================================
// class MainWindow
// ===============================================
const string MainWindow::versionString= "v1.3.5-beta1";
const string MainWindow::winHeader= "G3D viewer " + versionString + " - Built: " + __DATE__;
MainWindow::MainWindow(const string &modelPath):
wxFrame(
NULL, -1, winHeader.c_str(),
wxPoint(Renderer::windowX, Renderer::windowY),
wxSize(Renderer::windowW, Renderer::windowH))
{
renderer= Renderer::getInstance();
this->modelPath= modelPath;
model= NULL;
playerColor= Renderer::pcRed;
speed= 0.025f;
glCanvas = new GlCanvas(this);
glCanvas->SetCurrent();
renderer->init();
menu= new wxMenuBar();
//menu
menuFile= new wxMenu();
menuFile->Append(miFileLoad, "Load");
menu->Append(menuFile, "File");
//mode
menuMode= new wxMenu();
menuMode->AppendCheckItem(miModeNormals, "Normals");
menuMode->AppendCheckItem(miModeWireframe, "Wireframe");
menuMode->AppendCheckItem(miModeGrid, "Grid");
menu->Append(menuMode, "Mode");
//mode
menuSpeed= new wxMenu();
menuSpeed->Append(miSpeedSlower, "Slower");
menuSpeed->Append(miSpeedFaster, "Faster");
menu->Append(menuSpeed, "Speed");
//custom color
menuCustomColor= new wxMenu();
menuCustomColor->AppendCheckItem(miColorRed, "Red");
menuCustomColor->AppendCheckItem(miColorBlue, "Blue");
menuCustomColor->AppendCheckItem(miColorYellow, "Yellow");
menuCustomColor->AppendCheckItem(miColorGreen, "Green");
menu->Append(menuCustomColor, "Custom Color");
menuMode->Check(miModeGrid, true);
menuCustomColor->Check(miColorRed, true);
SetMenuBar(menu);
//misc
model= NULL;
rotX= 0.0f;
rotY= 0.0f;
zoom= 1.0f;
lastX= 0;
lastY= 0;
anim= 0.0f;
CreateStatusBar();
timer = new wxTimer(this);
timer->Start(40);
if(!modelPath.empty()){
Model *tmpModel= new ModelGl();
renderer->loadTheModel(tmpModel, modelPath);
model= tmpModel;
GetStatusBar()->SetStatusText(getModelInfo().c_str());
}
}
MainWindow::~MainWindow(){
delete renderer;
delete model;
delete timer;
delete glCanvas;
}
void MainWindow::onPaint(wxPaintEvent &event){
renderer->reset(GetClientSize().x, GetClientSize().y, playerColor);
renderer->transform(rotX, rotY, zoom);
renderer->renderGrid();
renderer->renderTheModel(model, anim);
glCanvas->SwapBuffers();
}
void MainWindow::onClose(wxCloseEvent &event){
delete this;
}
void MainWindow::onMouseMove(wxMouseEvent &event){
int x= event.GetX();
int y= event.GetY();
wxPaintEvent paintEvent;
if(event.LeftIsDown()){
rotX+= clamp(lastX-x, -10, 10);
rotY+= clamp(lastY-y, -10, 10);
onPaint(paintEvent);
}
else if(event.RightIsDown()){
zoom*= 1.0f+(lastX-x+lastY-y)/100.0f;
zoom= clamp(zoom, 0.1f, 10.0f);
onPaint(paintEvent);
}
lastX= x;
lastY= y;
}
void MainWindow::onMenuFileLoad(wxCommandEvent &event){
string fileName;
wxFileDialog fileDialog(this);
fileDialog.SetWildcard("G3D files (*.g3d)|*.g3d");
if(fileDialog.ShowModal()==wxID_OK){
delete model;
Model *tmpModel= new ModelGl();
renderer->loadTheModel(tmpModel, fileDialog.GetPath().c_str());
model= tmpModel;
GetStatusBar()->SetStatusText(getModelInfo().c_str());
}
}
void MainWindow::onMenuModeNormals(wxCommandEvent &event){
renderer->toggleNormals();
menuMode->Check(miModeNormals, renderer->getNormals());
}
void MainWindow::onMenuModeWireframe(wxCommandEvent &event){
renderer->toggleWireframe();
menuMode->Check(miModeWireframe, renderer->getWireframe());
}
void MainWindow::onMenuModeGrid(wxCommandEvent &event){
renderer->toggleGrid();
menuMode->Check(miModeGrid, renderer->getGrid());
}
void MainWindow::onMenuSpeedSlower(wxCommandEvent &event){
speed/= 1.5f;
}
void MainWindow::onMenuSpeedFaster(wxCommandEvent &event){
speed*= 1.5f;
}
void MainWindow::onMenuColorRed(wxCommandEvent &event){
playerColor= Renderer::pcRed;
menuCustomColor->Check(miColorRed, true);
menuCustomColor->Check(miColorBlue, false);
menuCustomColor->Check(miColorYellow, false);
menuCustomColor->Check(miColorGreen, false);
}
void MainWindow::onMenuColorBlue(wxCommandEvent &event){
playerColor= Renderer::pcBlue;
menuCustomColor->Check(miColorRed, false);
menuCustomColor->Check(miColorBlue, true);
menuCustomColor->Check(miColorYellow, false);
menuCustomColor->Check(miColorGreen, false);
}
void MainWindow::onMenuColorYellow(wxCommandEvent &event){
playerColor= Renderer::pcYellow;
menuCustomColor->Check(miColorRed, false);
menuCustomColor->Check(miColorBlue, false);
menuCustomColor->Check(miColorYellow, true);
menuCustomColor->Check(miColorGreen, false);
}
void MainWindow::onMenuColorGreen(wxCommandEvent &event){
playerColor= Renderer::pcGreen;
menuCustomColor->Check(miColorRed, false);
menuCustomColor->Check(miColorBlue, false);
menuCustomColor->Check(miColorYellow, false);
menuCustomColor->Check(miColorGreen, true);
}
void MainWindow::onTimer(wxTimerEvent &event){
wxPaintEvent paintEvent;
anim= anim+speed;
if(anim>1.0f){
anim-= 1.f;
}
onPaint(paintEvent);
}
string MainWindow::getModelInfo(){
string str;
if(model!=NULL){
str+= "Meshes: "+intToStr(model->getMeshCount());
str+= ", Vertices: "+intToStr(model->getVertexCount());
str+= ", Triangles: "+intToStr(model->getTriangleCount());
str+= ", Version: "+intToStr(model->getFileVersion());
}
return str;
}
BEGIN_EVENT_TABLE(MainWindow, wxFrame)
EVT_TIMER(-1, MainWindow::onTimer)
EVT_CLOSE(MainWindow::onClose)
EVT_MENU(miFileLoad, MainWindow::onMenuFileLoad)
EVT_MENU(miModeWireframe, MainWindow::onMenuModeWireframe)
EVT_MENU(miModeNormals, MainWindow::onMenuModeNormals)
EVT_MENU(miModeGrid, MainWindow::onMenuModeGrid)
EVT_MENU(miSpeedFaster, MainWindow::onMenuSpeedFaster)
EVT_MENU(miSpeedSlower, MainWindow::onMenuSpeedSlower)
EVT_MENU(miColorRed, MainWindow::onMenuColorRed)
EVT_MENU(miColorBlue, MainWindow::onMenuColorBlue)
EVT_MENU(miColorYellow, MainWindow::onMenuColorYellow)
EVT_MENU(miColorGreen, MainWindow::onMenuColorGreen)
END_EVENT_TABLE()
// =====================================================
// class GlCanvas
// =====================================================
GlCanvas::GlCanvas(MainWindow * mainWindow):
wxGLCanvas(mainWindow, -1, wxDefaultPosition)
{
this->mainWindow = mainWindow;
}
void GlCanvas::onMouseMove(wxMouseEvent &event){
mainWindow->onMouseMove(event);
}
void GlCanvas::onPaint(wxPaintEvent &event){
mainWindow->onPaint(event);
}
BEGIN_EVENT_TABLE(GlCanvas, wxGLCanvas)
EVT_MOTION(GlCanvas::onMouseMove)
EVT_PAINT(GlCanvas::onPaint)
END_EVENT_TABLE()
// ===============================================
// class App
// ===============================================
bool App::OnInit(){
string modelPath;
if(argc==2){
modelPath= argv[1];
}
mainWindow= new MainWindow(modelPath);
mainWindow->Show();
return true;
}
int App::MainLoop(){
try{
return wxApp::MainLoop();
}
catch(const exception &e){
wxMessageDialog(NULL, e.what(), "Exception", wxOK | wxICON_ERROR).ShowModal();
return 0;
}
}
int App::OnExit(){
return 0;
}
}}//end namespace
IMPLEMENT_APP(Shared::G3dViewer::App)

View File

@ -1,129 +0,0 @@
#ifndef _SHADER_G3DVIEWER_MAIN_H_
#define _SHADER_G3DVIEWER_MAIN_H_
#include <string>
#include <wx/wx.h>
#include <wx/timer.h>
#include <wx/glcanvas.h>
#include "renderer.h"
#include "util.h"
#include "window.h"
using Shared::Platform::Window;
using Shared::Platform::MouseState;
using std::string;
namespace Shared{ namespace G3dViewer{
class GlCanvas;
// ===============================
// class MainWindow
// ===============================
class MainWindow: public wxFrame{
private:
DECLARE_EVENT_TABLE()
public:
static const string versionString;
static const string winHeader;
enum MenuId{
miFileLoad,
miModeWireframe,
miModeNormals,
miModeGrid,
miSpeedSlower,
miSpeedFaster,
miColorRed,
miColorBlue,
miColorYellow,
miColorGreen
};
private:
GlCanvas *glCanvas;
Renderer *renderer;
wxTimer *timer;
wxMenuBar *menu;
wxMenu *menuFile;
wxMenu *menuMode;
wxMenu *menuSpeed;
wxMenu *menuCustomColor;
Model *model;
string modelPath;
float speed;
float anim;
float rotX, rotY, zoom;
int lastX, lastY;
Renderer::PlayerColor playerColor;
public:
MainWindow(const string &modelPath);
~MainWindow();
void Notify();
void onPaint(wxPaintEvent &event);
void onClose(wxCloseEvent &event);
void onMenuFileLoad(wxCommandEvent &event);
void onMenuModeNormals(wxCommandEvent &event);
void onMenuModeWireframe(wxCommandEvent &event);
void onMenuModeGrid(wxCommandEvent &event);
void onMenuSpeedSlower(wxCommandEvent &event);
void onMenuSpeedFaster(wxCommandEvent &event);
void onMenuColorRed(wxCommandEvent &event);
void onMenuColorBlue(wxCommandEvent &event);
void onMenuColorYellow(wxCommandEvent &event);
void onMenuColorGreen(wxCommandEvent &event);
void onMouseMove(wxMouseEvent &event);
void onTimer(wxTimerEvent &event);
string getModelInfo();
};
// =====================================================
// class GlCanvas
// =====================================================
class GlCanvas: public wxGLCanvas{
private:
DECLARE_EVENT_TABLE()
public:
GlCanvas(MainWindow *mainWindow);
void onMouseMove(wxMouseEvent &event);
void onPaint(wxPaintEvent &event);
private:
MainWindow *mainWindow;
};
// ===============================
// class App
// ===============================
class App: public wxApp{
private:
MainWindow *mainWindow;
public:
virtual bool OnInit();
virtual int MainLoop();
virtual int OnExit();
};
}}//end namespace
DECLARE_APP(Shared::G3dViewer::App)
#endif

View File

@ -1,272 +0,0 @@
#include "renderer.h"
#include "opengl.h"
#include "texture_gl.h"
#include "graphics_interface.h"
#include "graphics_factory_gl.h"
using namespace Shared::Graphics;
using namespace Shared::Graphics::Gl;
namespace Shared{ namespace G3dViewer{
// ===============================================
// class MeshCallbackTeamColor
// ===============================================
void MeshCallbackTeamColor::execute(const Mesh *mesh){
//team color
if(mesh->getCustomTexture() && teamTexture!=NULL){
//texture 0
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
//set color to interpolation
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_INTERPOLATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_TEXTURE1);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, GL_SRC_ALPHA);
//set alpha to 1
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);
//texture 1
glActiveTexture(GL_TEXTURE1);
glMultiTexCoord2f(GL_TEXTURE1, 0.f, 0.f);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, static_cast<const Texture2DGl*>(teamTexture)->getHandle());
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_PRIMARY_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, GL_SRC_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, GL_PREVIOUS);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, GL_SRC_COLOR);
//set alpha to 1
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, GL_PRIMARY_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA);
glActiveTexture(GL_TEXTURE0);
}
else{
glActiveTexture(GL_TEXTURE1);
glDisable(GL_TEXTURE_2D);
glActiveTexture(GL_TEXTURE0);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
}
// ===============================================
// class Renderer
// ===============================================
Renderer::Renderer(){
normals= false;
wireframe= false;
grid= true;
}
Renderer::~Renderer(){
delete modelRenderer;
delete textureManager;
}
Renderer * Renderer::getInstance(){
static Renderer * renderer = new Renderer();
return renderer;
}
void Renderer::transform(float rotX, float rotY, float zoom){
assertGl();
glMatrixMode(GL_MODELVIEW);
glRotatef(rotY, 1.0f, 0.0f, 0.0f);
glRotatef(rotX, 0.0f, 1.0f, 0.0f);
glScalef(zoom, zoom, zoom);
Vec4f pos(-8.0f, 5.0f, 10.0f, 0.0f);
glLightfv(GL_LIGHT0,GL_POSITION, pos.ptr());
assertGl();
}
void Renderer::init(){
assertGl();
GraphicsFactory *gf= new GraphicsFactoryGl();
GraphicsInterface::getInstance().setFactory(gf);
modelRenderer= gf->newModelRenderer();
textureManager= gf->newTextureManager();
//red tex
customTextureRed= textureManager->newTexture2D();
customTextureRed->getPixmap()->init(1, 1, 3);
customTextureRed->getPixmap()->setPixel(0, 0, Vec3f(1.f, 0.f, 0.f));
//blue tex
customTextureBlue= textureManager->newTexture2D();
customTextureBlue->getPixmap()->init(1, 1, 3);
customTextureBlue->getPixmap()->setPixel(0, 0, Vec3f(0.f, 0.f, 1.f));
//yellow tex
customTextureYellow= textureManager->newTexture2D();
customTextureYellow->getPixmap()->init(1, 1, 3);
customTextureYellow->getPixmap()->setPixel(0, 0, Vec3f(1.f, 1.f, 0.f));
//green
customTextureGreen= textureManager->newTexture2D();
customTextureGreen->getPixmap()->init(1, 1, 3);
customTextureGreen->getPixmap()->setPixel(0, 0, Vec3f(0.f, 0.5f, 0.f));
glClearColor(0.3f, 0.3f, 0.3f, 1.0f);
glEnable(GL_TEXTURE_2D);
glFrontFace(GL_CW);
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.5f);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
Vec4f diffuse= Vec4f(1.0f, 1.0f, 1.0f, 1.0f);
Vec4f ambient= Vec4f(0.3f, 0.3f, 0.3f, 1.0f);
Vec4f specular= Vec4f(0.1f, 0.1f, 0.1f, 1.0f);
glLightfv(GL_LIGHT0,GL_AMBIENT, ambient.ptr());
glLightfv(GL_LIGHT0,GL_DIFFUSE, diffuse.ptr());
glLightfv(GL_LIGHT0,GL_SPECULAR, specular.ptr());
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);
assertGl();
}
void Renderer::reset(int w, int h, PlayerColor playerColor){
assertGl();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60.0f, static_cast<float>(w)/h, 1.0f, 200.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, -1.5, -5);
Texture2D *customTexture;
switch(playerColor){
case pcRed:
customTexture= customTextureRed;
break;
case pcBlue:
customTexture= customTextureBlue;
break;
case pcYellow:
customTexture= customTextureYellow;
break;
case pcGreen:
customTexture= customTextureGreen;
break;
default:
assert(false);
}
meshCallbackTeamColor.setTeamTexture(customTexture);
if(wireframe){
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glDisable(GL_LIGHT0);
}
else{
glEnable(GL_TEXTURE_2D);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
assertGl();
}
void Renderer::renderGrid(){
if(grid){
float i;
assertGl();
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_TEXTURE_2D);
glDisable(GL_LIGHTING);
glBegin(GL_LINES);
glColor3f(1.0f, 1.0f, 1.0f);
for(i=-10.0f; i<=10.0f; i+=1.0f){
glVertex3f(i, 0.0f, 10.0f);
glVertex3f(i, 0.0f, -10.0f);
}
for(i=-10.0f; i<=10.0f; i+=1.0f){
glVertex3f(10.f, 0.0f, i);
glVertex3f(-10.f, 0.0f, i);
}
glEnd();
glPopAttrib();
assertGl();
}
}
void Renderer::toggleNormals(){
normals= normals? false: true;
}
void Renderer::toggleWireframe(){
wireframe= wireframe? false: true;
}
void Renderer::toggleGrid(){
grid= grid? false: true;
}
void Renderer::loadTheModel(Model *model, string file){
model->setTextureManager(textureManager);
model->loadG3d(file);
textureManager->init();
}
void Renderer::renderTheModel(Model *model, float f){
if(model != NULL){
modelRenderer->begin(true, true, !wireframe, &meshCallbackTeamColor);
model->updateInterpolationData(f, true);
modelRenderer->render(model);
if(normals){
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glColor3f(1.0f, 1.0f, 1.0f);
modelRenderer->renderNormalsOnly(model);
glPopAttrib();
}
modelRenderer->end();
}
}
}}//end namespace

View File

@ -1,92 +0,0 @@
#ifndef _SHADER_G3DVIEWER_RENDERER_H_
#define _SHADER_G3DVIEWER_RENDERER_H_
#include "model_renderer.h"
#include "texture_manager.h"
#include "model.h"
#include "texture.h"
using Shared::Graphics::ModelRenderer;
using Shared::Graphics::TextureManager;
using Shared::Graphics::Model;
using Shared::Graphics::Texture2D;
#include "model_renderer.h"
using Shared::Graphics::MeshCallback;
using Shared::Graphics::Mesh;
using Shared::Graphics::Texture;
namespace Shared{ namespace G3dViewer{
// ===============================================
// class MeshCallbackTeamColor
// ===============================================
class MeshCallbackTeamColor: public MeshCallback{
private:
const Texture *teamTexture;
public:
void setTeamTexture(const Texture *teamTexture) {this->teamTexture= teamTexture;}
virtual void execute(const Mesh *mesh);
};
// ===============================
// class Renderer
// ===============================
class Renderer{
public:
static const int windowX= 100;
static const int windowY= 100;
static const int windowW= 640;
static const int windowH= 480;
public:
enum PlayerColor{
pcRed,
pcBlue,
pcYellow,
pcGreen
};
private:
bool wireframe;
bool normals;
bool grid;
ModelRenderer *modelRenderer;
TextureManager *textureManager;
Texture2D *customTextureRed;
Texture2D *customTextureBlue;
Texture2D *customTextureYellow;
Texture2D *customTextureGreen;
MeshCallbackTeamColor meshCallbackTeamColor;
Renderer();
public:
~Renderer();
static Renderer *getInstance();
void init();
void reset(int w, int h, PlayerColor playerColor);
void transform(float rotX, float rotY, float zoom);
void renderGrid();
bool getNormals() const {return normals;}
bool getWireframe() const {return wireframe;}
bool getGrid() const {return grid;}
void toggleNormals();
void toggleWireframe();
void toggleGrid();
void loadTheModel(Model *model, string file);
void renderTheModel(Model *model, float f);
};
}}//end namespace
#endif

View File

@ -1,482 +0,0 @@
// ==============================================================
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Marti<74>o Figueroa
//
// You can redistribute this code 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
// ==============================================================
#include "ai.h"
#include <ctime>
#include "ai_interface.h"
#include "ai_rule.h"
#include "unit_type.h"
#include "unit.h"
#include "program.h"
#include "config.h"
#include "leak_dumper.h"
using namespace Shared::Graphics;
using namespace Shared::Util;
namespace Glest{ namespace Game{
// =====================================================
// class ProduceTask
// =====================================================
ProduceTask::ProduceTask(UnitClass unitClass){
taskClass= tcProduce;
this->unitClass= unitClass;
unitType= NULL;
resourceType= NULL;
}
ProduceTask::ProduceTask(const UnitType *unitType){
taskClass= tcProduce;
this->unitType= unitType;
resourceType= NULL;
}
ProduceTask::ProduceTask(const ResourceType *resourceType){
taskClass= tcProduce;
unitType= NULL;
this->resourceType= resourceType;
}
string ProduceTask::toString() const{
string str= "Produce ";
if(unitType!=NULL){
str+= unitType->getName();
}
return str;
}
// =====================================================
// class BuildTask
// =====================================================
BuildTask::BuildTask(const UnitType *unitType){
taskClass= tcBuild;
this->unitType= unitType;
resourceType= NULL;
forcePos= false;
}
BuildTask::BuildTask(const ResourceType *resourceType){
taskClass= tcBuild;
unitType= NULL;
this->resourceType= resourceType;
forcePos= false;
}
BuildTask::BuildTask(const UnitType *unitType, const Vec2i &pos){
taskClass= tcBuild;
this->unitType= unitType;
resourceType= NULL;
forcePos= true;
this->pos= pos;
}
string BuildTask::toString() const{
string str= "Build ";
if(unitType!=NULL){
str+= unitType->getName();
}
return str;
}
// =====================================================
// class UpgradeTask
// =====================================================
UpgradeTask::UpgradeTask(const UpgradeType *upgradeType){
taskClass= tcUpgrade;
this->upgradeType= upgradeType;
}
string UpgradeTask::toString() const{
string str= "Build ";
if(upgradeType!=NULL){
str+= upgradeType->getName();
}
return str;
}
// =====================================================
// class Ai
// =====================================================
void Ai::init(AiInterface *aiInterface){
this->aiInterface= aiInterface;
startLoc= random.randRange(0, aiInterface->getMapMaxPlayers()-1);
upgradeCount= 0;
minWarriors= minMinWarriors;
randomMinWarriorsReached= false;
//add ai rules
aiRules.resize(14);
aiRules[0]= new AiRuleWorkerHarvest(this);
aiRules[1]= new AiRuleRefreshHarvester(this);
aiRules[2]= new AiRuleScoutPatrol(this);
aiRules[3]= new AiRuleReturnBase(this);
aiRules[4]= new AiRuleMassiveAttack(this);
aiRules[5]= new AiRuleAddTasks(this);
aiRules[6]= new AiRuleProduceResourceProducer(this);
aiRules[7]= new AiRuleBuildOneFarm(this);
aiRules[8]= new AiRuleProduce(this);
aiRules[9]= new AiRuleBuild(this);
aiRules[10]= new AiRuleUpgrade(this);
aiRules[11]= new AiRuleExpand(this);
aiRules[12]= new AiRuleRepair(this);
aiRules[13]= new AiRuleRepair(this);
}
Ai::~Ai(){
deleteValues(tasks.begin(), tasks.end());
deleteValues(aiRules.begin(), aiRules.end());
}
void Ai::update(){
//process ai rules
for(AiRules::iterator it= aiRules.begin(); it!=aiRules.end(); ++it){
if((aiInterface->getTimer() % ((*it)->getTestInterval()*GameConstants::updateFps/1000))==0){
if((*it)->test()){
aiInterface->printLog(3, intToStr(1000*aiInterface->getTimer()/GameConstants::updateFps) + ": Executing rule: " + (*it)->getName() + '\n');
(*it)->execute();
}
}
}
}
// ==================== state requests ====================
int Ai::getCountOfType(const UnitType *ut){
int count= 0;
for(int i=0; i<aiInterface->getMyUnitCount(); ++i){
if(ut == aiInterface->getMyUnit(i)->getType()){
count++;
}
}
return count;
}
int Ai::getCountOfClass(UnitClass uc){
int count= 0;
for(int i=0; i<aiInterface->getMyUnitCount(); ++i){
if(aiInterface->getMyUnit(i)->getType()->isOfClass(uc)){
++count;
}
}
return count;
}
float Ai::getRatioOfClass(UnitClass uc){
if(aiInterface->getMyUnitCount()==0){
return 0;
}
else{
return static_cast<float>(getCountOfClass(uc))/aiInterface->getMyUnitCount();
}
}
const ResourceType *Ai::getNeededResource(){
int amount= -1;
const ResourceType *neededResource= NULL;
const TechTree *tt= aiInterface->getTechTree();
for(int i=0; i<tt->getResourceTypeCount(); ++i){
const ResourceType *rt= tt->getResourceType(i);
const Resource *r= aiInterface->getResource(rt);
if(rt->getClass()!=rcStatic && rt->getClass()!=rcConsumable && (r->getAmount()<amount || amount==-1)){
amount= r->getAmount();
neededResource= rt;
}
}
return neededResource;
}
bool Ai::beingAttacked(Vec2i &pos, Field &field, int radius){
int count= aiInterface->onSightUnitCount();
const Unit *unit;
for(int i=0; i<count; ++i){
unit= aiInterface->getOnSightUnit(i);
if(!aiInterface->isAlly(unit) && unit->isAlive()){
pos= unit->getPos();
field= unit->getCurrField();
if(pos.dist(aiInterface->getHomeLocation())<radius){
aiInterface->printLog(2, "Being attacked at pos "+intToStr(pos.x)+","+intToStr(pos.y)+"\n");
return true;
}
}
}
return false;
}
bool Ai::isStableBase(){
if(getCountOfClass(ucWarrior)>minWarriors){
aiInterface->printLog(4, "Base is stable\n");
return true;
}
else{
aiInterface->printLog(4, "Base is not stable\n");
return false;
}
}
bool Ai::findAbleUnit(int *unitIndex, CommandClass ability, bool idleOnly){
vector<int> units;
*unitIndex= -1;
for(int i=0; i<aiInterface->getMyUnitCount(); ++i){
const Unit *unit= aiInterface->getMyUnit(i);
if(unit->getType()->hasCommandClass(ability)){
if(!idleOnly || !unit->anyCommand() || unit->getCurrCommand()->getCommandType()->getClass()==ccStop){
units.push_back(i);
}
}
}
if(units.empty()){
return false;
}
else{
*unitIndex= units[random.randRange(0, units.size()-1)];
return true;
}
}
bool Ai::findAbleUnit(int *unitIndex, CommandClass ability, CommandClass currentCommand){
vector<int> units;
*unitIndex= -1;
for(int i=0; i<aiInterface->getMyUnitCount(); ++i){
const Unit *unit= aiInterface->getMyUnit(i);
if(unit->getType()->hasCommandClass(ability)){
if(unit->anyCommand() && unit->getCurrCommand()->getCommandType()->getClass()==currentCommand){
units.push_back(i);
}
}
}
if(units.empty()){
return false;
}
else{
*unitIndex= units[random.randRange(0, units.size()-1)];
return true;
}
}
bool Ai::findPosForBuilding(const UnitType* building, const Vec2i &searchPos, Vec2i &outPos){
const int spacing= 1;
for(int currRadius=0; currRadius<maxBuildRadius; ++currRadius){
for(int i=searchPos.x-currRadius; i<searchPos.x+currRadius; ++i){
for(int j=searchPos.y-currRadius; j<searchPos.y+currRadius; ++j){
outPos= Vec2i(i, j);
if(aiInterface->isFreeCells(outPos-Vec2i(spacing), building->getSize()+spacing*2, fLand)){
return true;
}
}
}
}
return false;
}
// ==================== tasks ====================
void Ai::addTask(const Task *task){
tasks.push_back(task);
aiInterface->printLog(2, "Task added: " + task->toString());
}
void Ai::addPriorityTask(const Task *task){
deleteValues(tasks.begin(), tasks.end());
tasks.clear();
tasks.push_back(task);
aiInterface->printLog(2, "Priority Task added: " + task->toString());
}
bool Ai::anyTask(){
return !tasks.empty();
}
const Task *Ai::getTask() const{
if(tasks.empty()){
return NULL;
}
else{
return tasks.front();
}
}
void Ai::removeTask(const Task *task){
aiInterface->printLog(2, "Task removed: " + task->toString());
tasks.remove(task);
delete task;
}
void Ai::retryTask(const Task *task){
tasks.remove(task);
tasks.push_back(task);
}
// ==================== expansions ====================
void Ai::addExpansion(const Vec2i &pos){
//check if there is a nearby expansion
for(Positions::iterator it= expansionPositions.begin(); it!=expansionPositions.end(); ++it){
if((*it).dist(pos)<villageRadius){
return;
}
}
//add expansion
expansionPositions.push_front(pos);
//remove expansion if queue is list is full
if(expansionPositions.size()>maxExpansions){
expansionPositions.pop_back();
}
}
Vec2i Ai::getRandomHomePosition(){
if(expansionPositions.empty() || random.randRange(0, 1) == 0){
return aiInterface->getHomeLocation();
}
return expansionPositions[random.randRange(0, expansionPositions.size()-1)];
}
// ==================== actions ====================
void Ai::sendScoutPatrol(){
Vec2i pos;
int unit;
startLoc= (startLoc+1) % aiInterface->getMapMaxPlayers();
pos= aiInterface->getStartLocation(startLoc);
if(aiInterface->getFactionIndex()!=startLoc){
if(findAbleUnit(&unit, ccAttack, false)){
aiInterface->giveCommand(unit, ccAttack, pos);
aiInterface->printLog(2, "Scout patrol sent to: " + intToStr(pos.x)+","+intToStr(pos.y)+"\n");
}
}
}
void Ai::massiveAttack(const Vec2i &pos, Field field, bool ultraAttack){
int producerWarriorCount=0;
int maxProducerWarriors=random.randRange(1,11);
for(int i=0; i<aiInterface->getMyUnitCount(); ++i){
bool isWarrior;
const Unit *unit= aiInterface->getMyUnit(i);
const AttackCommandType *act= unit->getType()->getFirstAttackCommand(field);
if(act!=NULL && unit->getType()->hasCommandClass(ccProduce))
{
producerWarriorCount++;
}
if(aiInterface->getControlType()==ctCpuMega)
{
if(producerWarriorCount>maxProducerWarriors)
{
if(
unit->getCommandSize()>0 &&
unit->getCurrCommand()->getCommandType()!=NULL && (
unit->getCurrCommand()->getCommandType()->getClass()==ccBuild ||
unit->getCurrCommand()->getCommandType()->getClass()==ccMorph ||
unit->getCurrCommand()->getCommandType()->getClass()==ccProduce
)
)
{
isWarrior=false;
}
else
{
isWarrior=!unit->getType()->hasCommandClass(ccHarvest);
}
}
else
{
isWarrior= !unit->getType()->hasCommandClass(ccHarvest) && !unit->getType()->hasCommandClass(ccProduce);
}
}
else
{
isWarrior= !unit->getType()->hasCommandClass(ccHarvest) && !unit->getType()->hasCommandClass(ccProduce);
}
bool alreadyAttacking= unit->getCurrSkill()->getClass()==scAttack;
if(!alreadyAttacking && act!=NULL && (ultraAttack || isWarrior)){
aiInterface->giveCommand(i, act, pos);
}
}
if(aiInterface->getControlType()==ctCpuEasy)
{
minWarriors+= 1;
}
else if(aiInterface->getControlType()==ctCpuMega)
{
minWarriors+= 3;
if(minWarriors>maxMinWarriors-1 || randomMinWarriorsReached)
{
randomMinWarriorsReached=true;
minWarriors=random.randRange(maxMinWarriors-10, maxMinWarriors*2);
}
}
else if(minWarriors<maxMinWarriors){
minWarriors+= 3;
}
aiInterface->printLog(2, "Massive attack to pos: "+ intToStr(pos.x)+", "+intToStr(pos.y)+"\n");
}
void Ai::returnBase(int unitIndex){
Vec2i pos;
CommandResult r;
int fi;
fi= aiInterface->getFactionIndex();
pos= Vec2i(
random.randRange(-villageRadius, villageRadius), random.randRange(-villageRadius, villageRadius)) +
getRandomHomePosition();
r= aiInterface->giveCommand(unitIndex, ccMove, pos);
//aiInterface->printLog(1, "Order return to base pos:" + intToStr(pos.x)+", "+intToStr(pos.y)+": "+rrToStr(r)+"\n");
}
void Ai::harvest(int unitIndex){
const ResourceType *rt= getNeededResource();
if(rt!=NULL){
const HarvestCommandType *hct= aiInterface->getMyUnit(unitIndex)->getType()->getFirstHarvestCommand(rt);
Vec2i resPos;
if(hct!=NULL && aiInterface->getNearestSightedResource(rt, aiInterface->getHomeLocation(), resPos)){
resPos= resPos+Vec2i(random.randRange(-2, 2), random.randRange(-2, 2));
aiInterface->giveCommand(unitIndex, hct, resPos);
//aiInterface->printLog(4, "Order harvest pos:" + intToStr(resPos.x)+", "+intToStr(resPos.y)+": "+rrToStr(r)+"\n");
}
}
}
}}//end namespace

View File

@ -1,189 +0,0 @@
// ==============================================================
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Marti<74>o Figueroa
//
// You can redistribute this code 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
// ==============================================================
#ifndef _GLEST_GAME_AI_H_
#define _GLEST_GAME_AI_H_
#include <vector>
#include <list>
#include "world.h"
#include "commander.h"
#include "command.h"
#include "random.h"
using std::deque;
using std::vector;
using std::list;
using Shared::Util::Random;
namespace Glest{ namespace Game{
class AiInterface;
class AiRule;
// =====================================================
// class Task
//
/// An action that has to be performed by the IA
// =====================================================
enum TaskClass{
tcProduce,
tcBuild,
tcUpgrade
};
class Task{
protected:
TaskClass taskClass;
public:
virtual ~Task(){}
TaskClass getClass() const {return taskClass;}
virtual string toString() const= 0;
};
// ==================== ProduceTask ====================
class ProduceTask: public Task{
private:
UnitClass unitClass;
const UnitType *unitType;
const ResourceType *resourceType;
public:
ProduceTask(UnitClass unitClass);
ProduceTask(const UnitType *unitType);
ProduceTask(const ResourceType *resourceType);
UnitClass getUnitClass() const {return unitClass;}
const UnitType *getUnitType() const {return unitType;}
const ResourceType *getResourceType() const {return resourceType;}
virtual string toString() const;
};
// ==================== BuildTask ====================
class BuildTask: public Task{
private:
const UnitType *unitType;
const ResourceType *resourceType;
bool forcePos;
Vec2i pos;
public:
BuildTask(const UnitType *unitType= NULL);
BuildTask(const ResourceType *resourceType);
BuildTask(const UnitType *unitType, const Vec2i &pos);
const UnitType *getUnitType() const {return unitType;}
const ResourceType *getResourceType() const {return resourceType;}
bool getForcePos() const {return forcePos;}
Vec2i getPos() const {return pos;}
virtual string toString() const;
};
// ==================== UpgradeTask ====================
class UpgradeTask: public Task{
private:
const UpgradeType *upgradeType;
public:
UpgradeTask(const UpgradeType *upgradeType= NULL);
const UpgradeType *getUpgradeType() const {return upgradeType;}
virtual string toString() const;
};
// ===============================
// class AI
//
/// Main AI class
// ===============================
class Ai{
private:
static const int harvesterPercent= 30;
static const int maxBuildRadius= 40;
static const int minMinWarriors= 7;
static const int maxMinWarriors= 20;
static const int minStaticResources= 10;
static const int minConsumableResources= 20;
static const int maxExpansions= 2;
static const int villageRadius= 15;
public:
enum ResourceUsage{
ruHarvester,
ruWarrior,
ruBuilding,
ruUpgrade
};
private:
typedef vector<AiRule*> AiRules;
typedef list<const Task*> Tasks;
typedef deque<Vec2i> Positions;
private:
AiInterface *aiInterface;
AiRules aiRules;
int startLoc;
bool randomMinWarriorsReached;
int upgradeCount;
Tasks tasks;
Positions expansionPositions;
Random random;
public:
int minWarriors;
~Ai();
void init(AiInterface *aiInterface);
void update();
//state requests
AiInterface *getAiInterface() const {return aiInterface;}
Random* getRandom() {return &random;}
int getCountOfType(const UnitType *ut);
int getCountOfClass(UnitClass uc);
float getRatioOfClass(UnitClass uc);
const ResourceType *getNeededResource();
bool isStableBase();
bool findPosForBuilding(const UnitType* building, const Vec2i &searchPos, Vec2i &pos);
bool findAbleUnit(int *unitIndex, CommandClass ability, bool idleOnly);
bool findAbleUnit(int *unitIndex, CommandClass ability, CommandClass currentCommand);
bool beingAttacked(Vec2i &pos, Field &field, int radius);
//tasks
void addTask(const Task *task);
void addPriorityTask(const Task *task);
bool anyTask();
const Task *getTask() const;
void removeTask(const Task *task);
void retryTask(const Task *task);
//expansions
void addExpansion(const Vec2i &pos);
Vec2i getRandomHomePosition();
//actions
void sendScoutPatrol();
void massiveAttack(const Vec2i &pos, Field field, bool ultraAttack= false);
void returnBase(int unitIndex);
void harvest(int unitIndex);
};
}}//end namespace
#endif

View File

@ -1,238 +0,0 @@
// ==============================================================
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Marti<74>o Figueroa
//
// You can redistribute this code 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
// ==============================================================
#include "ai_interface.h"
#include "ai.h"
#include "command_type.h"
#include "faction.h"
#include "unit.h"
#include "unit_type.h"
#include "object.h"
#include "game.h"
#include "config.h"
#include "leak_dumper.h"
using namespace Shared::Util;
using namespace Shared::Graphics;
// =====================================================
// class AiInterface
// =====================================================
namespace Glest{ namespace Game{
AiInterface::AiInterface(Game &game, int factionIndex, int teamIndex){
this->world= game.getWorld();
this->commander= game.getCommander();
this->console= game.getConsole();
this->factionIndex= factionIndex;
this->teamIndex= teamIndex;
timer= 0;
//init ai
ai.init(this);
//config
logLevel= Config::getInstance().getInt("AiLog");
redir= Config::getInstance().getBool("AiRedir");
//clear log file
if(logLevel>0){
FILE *f= fopen(getLogFilename().c_str(), "wt");
if(f==NULL){
throw runtime_error("Can't open file: "+getLogFilename());
}
fprintf(f, "%s", "Glest AI log file\n\n");
fclose(f);
}
}
// ==================== main ====================
void AiInterface::update(){
timer++;
ai.update();
}
// ==================== misc ====================
void AiInterface::printLog(int logLevel, const string &s){
if(this->logLevel>=logLevel){
string logString= "(" + intToStr(factionIndex) + ") " + s;
//print log to file
FILE *f= fopen(getLogFilename().c_str(), "at");
if(f==NULL){
throw runtime_error("Can't open file: "+getLogFilename());
}
fprintf(f, "%s\n", logString.c_str());
fclose(f);
//redirect to console
if(redir) {
console->addLine(logString);
}
}
}
// ==================== interaction ====================
CommandResult AiInterface::giveCommand(int unitIndex, CommandClass commandClass, const Vec2i &pos){
Command *c= new Command (world->getFaction(factionIndex)->getUnit(unitIndex)->getType()->getFirstCtOfClass(commandClass), pos);
return world->getFaction(factionIndex)->getUnit(unitIndex)->giveCommand(c);
}
CommandResult AiInterface::giveCommand(int unitIndex, const CommandType *commandType, const Vec2i &pos){
return world->getFaction(factionIndex)->getUnit(unitIndex)->giveCommand(new Command(commandType, pos));
}
CommandResult AiInterface::giveCommand(int unitIndex, const CommandType *commandType, const Vec2i &pos, const UnitType *ut){
return world->getFaction(factionIndex)->getUnit(unitIndex)->giveCommand(new Command(commandType, pos, ut));
}
CommandResult AiInterface::giveCommand(int unitIndex, const CommandType *commandType, Unit *u){
return world->getFaction(factionIndex)->getUnit(unitIndex)->giveCommand(new Command(commandType, u));
}
// ==================== get data ====================
int AiInterface::getMapMaxPlayers(){
return world->getMaxPlayers();
}
Vec2i AiInterface::getHomeLocation(){
return world->getMap()->getStartLocation(world->getFaction(factionIndex)->getStartLocationIndex());
}
Vec2i AiInterface::getStartLocation(int loactionIndex){
return world->getMap()->getStartLocation(loactionIndex);
}
int AiInterface::getFactionCount(){
return world->getFactionCount();
}
int AiInterface::getMyUnitCount() const{
return world->getFaction(factionIndex)->getUnitCount();
}
int AiInterface::getMyUpgradeCount() const{
return world->getFaction(factionIndex)->getUpgradeManager()->getUpgradeCount();
}
int AiInterface::onSightUnitCount(){
int count=0;
Map *map= world->getMap();
for(int i=0; i<world->getFactionCount(); ++i){
for(int j=0; j<world->getFaction(i)->getUnitCount(); ++j){
SurfaceCell *sc= map->getSurfaceCell(Map::toSurfCoords(world->getFaction(i)->getUnit(j)->getPos()));
if(sc->isVisible(teamIndex)){
count++;
}
}
}
return count;
}
const Resource *AiInterface::getResource(const ResourceType *rt){
return world->getFaction(factionIndex)->getResource(rt);
}
const Unit *AiInterface::getMyUnit(int unitIndex){
return world->getFaction(factionIndex)->getUnit(unitIndex);
}
const Unit *AiInterface::getOnSightUnit(int unitIndex){
int count=0;
Map *map= world->getMap();
for(int i=0; i<world->getFactionCount(); ++i){
for(int j=0; j<world->getFaction(i)->getUnitCount(); ++j){
Unit *u= world->getFaction(i)->getUnit(j);
if(map->getSurfaceCell(Map::toSurfCoords(u->getPos()))->isVisible(teamIndex)){
if(count==unitIndex){
return u;
}
else{
count ++;
}
}
}
}
return NULL;
}
const FactionType * AiInterface::getMyFactionType(){
return world->getFaction(factionIndex)->getType();
}
const ControlType AiInterface::getControlType(){
return world->getFaction(factionIndex)->getControlType();
}
const TechTree *AiInterface::getTechTree(){
return world->getTechTree();
}
bool AiInterface::getNearestSightedResource(const ResourceType *rt, const Vec2i &pos, Vec2i &resultPos){
float tmpDist;
float nearestDist= infinity;
bool anyResource= false;
const Map *map= world->getMap();
for(int i=0; i<map->getW(); ++i){
for(int j=0; j<map->getH(); ++j){
Vec2i surfPos= Map::toSurfCoords(Vec2i(i, j));
//if explored cell
if(map->getSurfaceCell(surfPos)->isExplored(teamIndex)){
Resource *r= map->getSurfaceCell(surfPos)->getResource();
//if resource cell
if(r!=NULL && r->getType()==rt){
tmpDist= pos.dist(Vec2i(i, j));
if(tmpDist<nearestDist){
anyResource= true;
nearestDist= tmpDist;
resultPos= Vec2i(i, j);
}
}
}
}
}
return anyResource;
}
bool AiInterface::isAlly(const Unit *unit) const{
return world->getFaction(factionIndex)->isAlly(unit->getFaction());
}
bool AiInterface::reqsOk(const RequirableType *rt){
return world->getFaction(factionIndex)->reqsOk(rt);
}
bool AiInterface::reqsOk(const CommandType *ct){
return world->getFaction(factionIndex)->reqsOk(ct);
}
bool AiInterface::checkCosts(const ProducibleType *pt){
return world->getFaction(factionIndex)->checkCosts(pt);
}
bool AiInterface::isFreeCells(const Vec2i &pos, int size, Field field){
return world->getMap()->isFreeCells(pos, size, field);
}
}}//end namespace

View File

@ -1,93 +0,0 @@
// ==============================================================
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Marti<74>o Figueroa
//
// You can redistribute this code 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
// ==============================================================
#ifndef _GLEST_GAME_AIINTERFACE_H_
#define _GLEST_GAME_AIINTERFACE_H_
#include "world.h"
#include "commander.h"
#include "command.h"
#include "conversion.h"
#include "ai.h"
using Shared::Util::intToStr;
namespace Glest{ namespace Game{
// =====================================================
// class AiInterface
//
/// The AI will interact with the game through this interface
// =====================================================
class AiInterface{
private:
World *world;
Commander *commander;
Console *console;
Ai ai;
int timer;
int factionIndex;
int teamIndex;
//config
bool redir;
int logLevel;
public:
AiInterface(Game &game, int factionIndex, int teamIndex);
//main
void update();
//get
int getTimer() const {return timer;}
int getFactionIndex() const {return factionIndex;}
//misc
void printLog(int logLevel, const string &s);
//interact
CommandResult giveCommand(int unitIndex, CommandClass commandClass, const Vec2i &pos=Vec2i(0));
CommandResult giveCommand(int unitIndex, const CommandType *commandType, const Vec2i &pos, const UnitType* unitType);
CommandResult giveCommand(int unitIndex, const CommandType *commandType, const Vec2i &pos);
CommandResult giveCommand(int unitIndex, const CommandType *commandType, Unit *u= NULL);
//get data
const ControlType getControlType();
int getMapMaxPlayers();
Vec2i getHomeLocation();
Vec2i getStartLocation(int locationIndex);
int getFactionCount();
int getMyUnitCount() const;
int getMyUpgradeCount() const;
int onSightUnitCount();
const Resource *getResource(const ResourceType *rt);
const Unit *getMyUnit(int unitIndex);
const Unit *getOnSightUnit(int unitIndex);
const FactionType *getMyFactionType();
const TechTree *getTechTree();
bool getNearestSightedResource(const ResourceType *rt, const Vec2i &pos, Vec2i &resultPos);
bool isAlly(const Unit *unit) const;
bool isAlly(int factionIndex) const;
bool reqsOk(const RequirableType *rt);
bool reqsOk(const CommandType *ct);
bool checkCosts(const ProducibleType *pt);
bool isFreeCells(const Vec2i &pos, int size, Field field);
private:
string getLogFilename() const {return "ai"+intToStr(factionIndex)+".log";}
};
}}//end namespace
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,314 +0,0 @@
// ==============================================================
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Martiño Figueroa
//
// You can redistribute this code 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
// ==============================================================
#ifndef _GLEST_GAME_AIRULE_H_
#define _GLEST_GAME_AIRULE_H_
#include <string>
#include "vec.h"
#include "skill_type.h"
using std::string;
using Shared::Graphics::Vec2i;
namespace Glest{ namespace Game{
class Ai;
class Unit;
class UnitType;
class ProduceTask;
class BuildTask;
class UpgradeTask;
class ResourceType;
// =====================================================
// class AiRule
//
/// An action that the AI will perform periodically
/// if the test succeeds
// =====================================================
class AiRule{
protected:
Ai *ai;
public:
AiRule(Ai *ai);
virtual ~AiRule() {}
virtual int getTestInterval() const= 0; //in milliseconds
virtual string getName() const= 0;
virtual bool test()= 0;
virtual void execute()= 0;
};
// =====================================================
// class AiRuleWorkerHarvest
// =====================================================
class AiRuleWorkerHarvest: public AiRule{
private:
int stoppedWorkerIndex;
public:
AiRuleWorkerHarvest(Ai *ai);
virtual int getTestInterval() const {return 2000;}
virtual string getName() const {return "Worker stopped => Order worker to harvest";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleRefreshHarvester
// =====================================================
class AiRuleRefreshHarvester: public AiRule{
private:
int workerIndex;
public:
AiRuleRefreshHarvester(Ai *ai);
virtual int getTestInterval() const {return 20000;}
virtual string getName() const {return "Worker reasigned to needed resource";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleScoutPatrol
// =====================================================
class AiRuleScoutPatrol: public AiRule{
public:
AiRuleScoutPatrol(Ai *ai);
virtual int getTestInterval() const {return 10000;}
virtual string getName() const {return "Base is stable => Send scout patrol";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleRepair
// =====================================================
class AiRuleRepair: public AiRule{
private:
int damagedUnitIndex;
public:
AiRuleRepair(Ai *ai);
virtual int getTestInterval() const {return 10000;}
virtual string getName() const {return "Building Damaged => Repair";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleReturnBase
// =====================================================
class AiRuleReturnBase: public AiRule{
private:
int stoppedUnitIndex;
public:
AiRuleReturnBase(Ai *ai);
virtual int getTestInterval() const {return 5000;}
virtual string getName() const {return "Stopped unit => Order return base";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleMassiveAttack
// =====================================================
class AiRuleMassiveAttack: public AiRule{
private:
static const int baseRadius= 25;
private:
Vec2i attackPos;
Field field;
bool ultraAttack;
public:
AiRuleMassiveAttack(Ai *ai);
virtual int getTestInterval() const {return 1000;}
virtual string getName() const {return "Unit under attack => Order massive attack";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleAddTasks
// =====================================================
class AiRuleAddTasks: public AiRule{
public:
AiRuleAddTasks(Ai *ai);
virtual int getTestInterval() const {return 5000;}
virtual string getName() const {return "Tasks empty => Add tasks";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleBuildOneFarm
// =====================================================
class AiRuleBuildOneFarm: public AiRule{
private:
const UnitType *farm;
public:
AiRuleBuildOneFarm(Ai *ai);
virtual int getTestInterval() const {return 10000;}
virtual string getName() const {return "No farms => Build one";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleProduceResourceProducer
// =====================================================
class AiRuleProduceResourceProducer: public AiRule{
private:
static const int minStaticResources= 20;
static const int longInterval= 60000;
static const int shortInterval= 5000;
const ResourceType *rt;
int interval;
public:
AiRuleProduceResourceProducer(Ai *ai);
virtual int getTestInterval() const {return interval;}
virtual string getName() const {return "No resources => Build Resource Producer";}
virtual bool test();
virtual void execute();
};
// =====================================================
// class AiRuleProduce
// =====================================================
class AiRuleProduce: public AiRule{
private:
const ProduceTask *produceTask;
public:
AiRuleProduce(Ai *ai);
virtual int getTestInterval() const {return 2000;}
virtual string getName() const {return "Performing produce task";}
virtual bool test();
virtual void execute();
private:
void produceGeneric(const ProduceTask *pt);
void produceSpecific(const ProduceTask *pt);
};
// =====================================================
// class AiRuleBuild
// =====================================================
class AiRuleBuild: public AiRule{
private:
const BuildTask *buildTask;
public:
AiRuleBuild(Ai *ai);
virtual int getTestInterval() const {return 2000;}
virtual string getName() const {return "Performing build task";}
virtual bool test();
virtual void execute();
private:
void buildGeneric(const BuildTask *bt);
void buildSpecific(const BuildTask *bt);
void buildBestBuilding(const vector<const UnitType*> &buildings);
bool isDefensive(const UnitType *building);
bool isResourceProducer(const UnitType *building);
bool isWarriorProducer(const UnitType *building);
};
// =====================================================
// class AiRuleUpgrade
// =====================================================
class AiRuleUpgrade: public AiRule{
private:
const UpgradeTask *upgradeTask;
public:
AiRuleUpgrade(Ai *ai);
virtual int getTestInterval() const {return 2000;}
virtual string getName() const {return "Performing upgrade task";}
virtual bool test();
virtual void execute();
private:
void upgradeSpecific(const UpgradeTask *upgt);
void upgradeGeneric(const UpgradeTask *upgt);
};
// =====================================================
// class AiRuleExpand
// =====================================================
class AiRuleExpand: public AiRule{
private:
static const int expandDistance= 30;
private:
Vec2i expandPos;
const UnitType *storeType;
public:
AiRuleExpand(Ai *ai);
virtual int getTestInterval() const {return 30000;}
virtual string getName() const {return "Expanding";}
virtual bool test();
virtual void execute();
};
}}//end namespace
#endif

Some files were not shown because too many files have changed in this diff Show More