MacArthur, Ian (SELEX GALILEO, UK) wrote:
>
> Hmm, I don't think I understand the change that's been made.
> It seems like the test for "AC_CHECK_LIB(png,png_set_tRNS_to_alpha" has
> been moved inside the test for "AC_ARG_ENABLE(localpng," when it used to
> be done separately, after it? I'm not sure.
Yes, the reason why Fabien changed it was that it didn't work for my
cygwin build with --enable-localpng (see my previous post).
The idea was not to test for the lib, if we know that we use our own.
That looks okay so far.
What I don't understand is: why is the else part not executed, if the
option is defaulted. There must (have) be(en) a reason, why this and the
other lib tests have been coded this way (remember that we did discuss,
why ac_cv_lib_png_png_set_tRNS_to_alpha=no has been set to "no", if
using the builtin lib?).
I think that I must read the autoconf docs before I can understand this
stuff, but I didn't have the time yet, and that's why I didn't try to
fix anything autoconf related.
But: I tested (trial and error) and found that we can (maybe remove the
else part and) add another test (after the "fi"):
if test x$enable_localpng != xyes; then
PNGINC=""
PNG=""
IMAGELIBS="-lpng $IMAGELIBS"
AC_DEFINE(HAVE_LIBPNG)
AC_DEFINE(HAVE_PNG_GET_VALID)
AC_CHECK_LIB(png,png_set_tRNS_to_alpha,
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
AC_CHECK_HEADER(png.h,
AC_DEFINE(HAVE_PNG_H))
fi
This (or similar) should work, but somebody else who knows more about
autoconf should have a look at it, please...
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev