Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] configure won't find libpng on MinGW
Home

[Freeciv-Dev] configure won't find libpng on MinGW

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Brandon J. Van Every" <vanevery@xxxxxxxxxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] configure won't find libpng on MinGW
From: Andreas Kemnade <akemnade@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 1 Nov 2003 14:44:55 +0100

Brandon J. Van Every writes:
 > Hi, I'm trying to compile Freeciv 1.14.0 stable release on Windows 2000
 > under MinGW, using the native Windows client.
 > 
 > After not getting anywhere with Cygwin, I realized that Cygwin and MinGW
 > aren't the same thing, and so I installed the latest greatest
 > environment from http://www.mingw.org/ .  Then I compiled the latest
 > greatest zlib 1.1.4 from http://www.gzip.org/zlib/ , and the latest
 > greatest libpng 1.2.5 from http://www.libpng.org/pub/png/libpng.html .
 > I went up a learning curve with the use of the -mno-cygwin flag, I
 > figure it is only supposed to be used to generate .DLLs, not for
 > libraries targetted at the UNIX environment.  In other words,
 > use -mno-cygwin for the native Windows client, but not for component
 > libraries?

-mno-cygwin changes the default include path, the default library
path, and the libraries linked in by default so that nothing of the
unix emulation of cygwin is used.

You should never mix things compiled with and without -mno-cygwin.
 > 
 > Anyways, I got zlib and libpng built and installed just fine.  The
 > libpng test and test-config-install work just fine.  My /usr/include
 > looks just fine:
 > 
 > vanevery@VANGOGH ~/freeciv-1.14.0
 > $ ls /usr/include
 > libpng  libpng12  png.h  pngconf.h  zconf.h  zlib.h
 > 
 > However, Freeciv configure will *not* pick up libpng.  configure dies
 > with the following lines.  What gives?
 > 
 > checking png.h usability... no
 > checking png.h presence... no
 > checking for png.h... no
 > configure: error: "You have to install libpng"
 > 
I suspect /usr/include is not in your include search path (due to -mno-cygwin). 
That can be
correct. Look where mingw.h and windows.h are installed. 
Also config.log might give interesting notes about what failed (the
corresponding gcc cmdline)


In doubt, you can still try something like this: 
CC="gcc -mno-cygwin -Ipath/to/your/pngsource/headers 
-Lpath/to/your/pngsource/libs" 

 > 
 > I seem to be using GNU Autoconf 2.56.  The installation instructions say
 > some vague things about Autoconf 2.13 being preferred.  What are the
 > known problems here, if any?  Why should they kill a simple check for a
 > *.h file?  How might they be resolved?

Using autoconf2.56 should not cause your problems.

I don't know how to get relative paths into config.h (e.g. for #define
LOCALEDIR) with autoconf2.5X. That's especially important for the .mo files
needed for l10n. The other data files are no problem because they are
searched in a relative path, too
(FREECIV_DATA_DIR=$prefix/share/freeciv:data:~/.freeciv or something like 
that.).

With autoconf2.13, you can simply use --prefix=. to force relative
paths everywhere in civclient.exe and civserver.exe
Then you can use make DESTDIR=/your/installtion/path/ install
to install everything in the right place.

autoconf2.5X does not allow --prefix=".". 

Are there other possibilities to solve the problem?

Greetings
Andreas Kemnade


[Prev in Thread] Current Thread [Next in Thread]