Autotools: Preliminary configure-scripts

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

Autotools: Preliminary configure-scripts

#1 Post by Yoghurt »

I've uploaded the autoconf-script for both GiGi and FO to

http://dennis.uni-hd.de/FO

Untar them into the GiGi and FreeOrion root-directories.

Theoretically, both GiGi and FreeOrion could be configured for MinGW using MSYS, and cross-compilation from linux should also work.

I kindly ask the MinGW experts to try the script using MSYS, my Windows-box isn't working correctly, so I have problems trying it.

Please send me bug-reports, especially if you are using MinGW

If you have autotools installed, you'll need automake 1.7 autoconf 2.5 and libtool 1.5 - libtool 1.4 won't work if you are trying to cross-compile!

Under Linux, if all the required files are installed, the usual ./configure; make; make install should JustWork (TM), if not, send me a PM.

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#2 Post by Yoghurt »

Just a little information I forgot to mention:
be sure to try ./configure --help to see how you can specify the paths for the needed libraries.

And if libGiGi's 27M are too much for you, do a './configure --disable-debug' before compilation or a 'strip -g', this should remove the debugging symbols and get it down to 2,3M

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#3 Post by Tyreth »

The configure script has this error:

checking for GiGi... Package GiGi was not found in the pkg-config search path.
Perhaps you should add the directory containing `GiGi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'GiGi' found
configure: error: GiGi not found

I used:
./configure --with-gigi=/usr --with-gigi-include=/usr/include/GG --with-gigi-libdir=/usr/lib

(in Linux)

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#4 Post by Yoghurt »

tyreth wrote:The configure script has this error:

checking for GiGi... Package GiGi was not found in the pkg-config search path.
Perhaps you should add the directory containing `GiGi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'GiGi' found
configure: error: GiGi not found

I used:
./configure --with-gigi=/usr --with-gigi-include=/usr/include/GG --with-gigi-libdir=/usr/lib

(in Linux)
I suppose you didn't install GiGi using the configure-scripts. I'd recommend this approch as libtool can link in GiGi's required libraries automatically.

But I've uploaded a new FO-autotools version that should work correctly when pkg-config is installed, but GiGi.pc isn't. In you case, you will probably also have to specify CPPFLAGS="-I/usr/include/GG/net -I/usr/include/GG/dialogs"

Edit: also updated client/human/Makefile.am to include the new file About.cpp (automake doesn't support wildcards)

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#5 Post by Yoghurt »

Are there any objections that I should not commit the autotools stuff into CVS?

I will only add files needed by autotools and friends, not the generated files.

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#6 Post by Yoghurt »


OceanMachine
Pupating Mass
Posts: 95
Joined: Thu Jun 26, 2003 12:09 pm
Location: Chicago

#7 Post by OceanMachine »

I'm using these scripts for the first time to pick up the latest updates. It's having trouble finding Boost. Here's the log:

checking for the Boost C++ libraries, version 1.3.0 or newer... no
checking for main in -lboost_regex... no
checking for main in -lboost_filesystem... no
checking for main in -lboost_signals... no
configure: error: boost libs not found.
** You need the Boost C++ libraries, version 1.3.0 or better,
** as well as the following boost-modules:
** - boost.regex
** - boost.filesystem
** - boost.signals
** download them from http://www.boost.org


My boost is located at /usr/boost_1_30_0/ as per the old Makefile. The GG autotools picked it up fine, but the freeorion ones didn't... Any thoughts on what's going wrong? Is this a script problem, or do I not have things configured properly?
Programming Lead

OceanMachine
Pupating Mass
Posts: 95
Joined: Thu Jun 26, 2003 12:09 pm
Location: Chicago

#8 Post by OceanMachine »

Ok, I lied, after further review I realized it didn't work for GG either :oops: . I got it to work in both cases by copying the runtime libraries into /usr/boost_1_30_0/libs and using the following command-line options:

configure --with-boost-include=/usr/boost_1_30_0 --with-boost-libdir=/usr/boost_1_30_0/libs

Is there a better solution to this?
Programming Lead

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#9 Post by Yoghurt »

OceanMachine wrote:Ok, I lied, after further review I realized it didn't work for GG either :oops: . I got it to work in both cases by copying the runtime libraries into /usr/boost_1_30_0/libs and using the following command-line options:

configure --with-boost-include=/usr/boost_1_30_0 --with-boost-libdir=/usr/boost_1_30_0/libs

Is there a better solution to this?
I fear not, boost-libdir has to be given the complete path to the runtime modules. Even the boost.m4 file that was not written by me seems to require that. I'm not at home right now, I could try to make the scripts more inteligent by searching the strange paths that bjam seems to produce.

Post Reply