if test "x$use_gd" = "x"; then
# see if we can use the external gd lib
- save_CPPFLAGS=$CPPFLAGS
- save_LDFLAGS=$LDFLAGS
- AC_ARG_WITH(gdincludedir,
- [AS_HELP_STRING([--with-gdincludedir=DIR],[use GD includes from DIR])],
- GDLIB_CFLAGS="-I$withval")
- CPPFLAGS="$CPPFLAGS $GDLIB_CFLAGS"
- AC_ARG_WITH(gdlibdir,
- [AS_HELP_STRING([--with-gdlibdir=DIR],[use GD libraries from DIR])],
- [GD_LDFLAGS="-L$withval"])
- GDLIB_LIBS="$GD_LDFLAGS -lgd $GDLIB_LIBS"
- LDFLAGS="$LDFLAGS $GDLIB_LIBS"
- AC_CHECK_HEADER(gd.h,,[
- AC_MSG_WARN(Optional GD library not available - no gd.h)
- use_gd="No (gd headers not found)"
- ])
- if test "x$use_gd" = "x"; then
- AC_CHECK_LIB(gd,main,[
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ AC_ARG_WITH(gdincludedir,
+ [AS_HELP_STRING([--with-gdincludedir=DIR],[use GD includes from DIR])],
+ GDLIB_CFLAGS="-I$withval")
+ CPPFLAGS="$CPPFLAGS $GDLIB_CFLAGS"
+ AC_ARG_WITH(gdlibdir,
+ [AS_HELP_STRING([--with-gdlibdir=DIR],[use GD libraries from DIR])],
+ [GD_LDFLAGS="-L$withval"])
+ GDLIB_LIBS="$GD_LDFLAGS -lgd $GDLIB_LIBS"
+ LDFLAGS="$LDFLAGS $GDLIB_LIBS"
+ AC_CHECK_HEADER(gd.h,,[
+ AC_MSG_WARN(Optional GD library not available - no gd.h)
+ use_gd="No (gd headers not found)"
+ ])
+ if test "x$use_gd" = "x"; then
+ AC_CHECK_LIB(gd,main,[
AC_DEFINE_UNQUOTED(HAVE_LIBGD,1,[Define if you have the GD library])
- use_gd="Yes"
+ use_gd="Yes"
],[
AC_MSG_WARN(Optional GD library not available)
use_gd="No (library not found)"
])
- fi
- LDFLAGS=$save_LDFLAGS
- CPPFLAGS=$save_CPPFLAGS
+ fi
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
fi
AC_SUBST([GDLIB_CFLAGS])
AC_SUBST([GDLIB_LIBS])