[Freeciv-Dev] Re: (PR#4130) Compile problems on Solaris 9
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Mike Kaufman wrote:
> I have this problem on my linux box as well. Here's my fix:
> Index: configure.ac
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
> retrieving revision 1.43
> diff -u -r1.43 configure.ac
> --- configure.ac 2003/05/13 21:10:32 1.43
> +++ configure.ac 2003/05/18 00:41:23
> @@ -346,8 +346,8 @@
> You may need to install a zlib \"development\" package.]))
>
> dnl Check for libpng
> - AC_CHECK_LIB(png, png_read_image, [X_LIBS="$X_LIBS -lpng"],
> - AC_MSG_ERROR([Could not find PNG library (libpng).]), [-lz])
> + AC_CHECK_LIB(png, png_read_image, [X_LIBS="$X_LIBS -lpng -lm"],
> + AC_MSG_ERROR([Could not find PNG library (libpng).]), [-lm -lz])
> AC_CHECK_HEADER(png.h, ,
> AC_MSG_ERROR([libpng found but not png.h.
> You may need to install a libpng \"development\" package.]))
Two possible problems:
1. If libm isn't present at all, you'll be told that you need libpng.
2. If libm isn't needed, you'll link against it unnecessarily.
The only really bad situation would be where #1 and #2 were both true:
i.e., on platforms that don't use libm at all. Is this ever the case?
Who is familiar with libpng?
The patch is at least better than the current situation, which we *know*
fails sometime. So if we can't do any better it should go in.
jason
|
|