summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Steffann <steffann@php.net>2000-03-18 23:23:39 +0000
committerSander Steffann <steffann@php.net>2000-03-18 23:23:39 +0000
commitec52ce44a9aadbbdc914d357e3731b8e75869ba1 (patch)
treef43b819ea62f182a6083c032188246fa31ab6687
parent827ad656cb2585d2b9a9cc2d3bb021e8edf34365 (diff)
downloadphp-git-ec52ce44a9aadbbdc914d357e3731b8e75869ba1.tar.gz
A small fix when checking for libjpeg
-rw-r--r--ext/gd/config.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
index c0eb469bab..f80b99fc0e 100644
--- a/ext/gd/config.m4
+++ b/ext/gd/config.m4
@@ -106,6 +106,26 @@ dnl A whole whack of possible places where this might be
AC_ADD_LIBRARY(png)
AC_ADD_LIBRARY(z)
fi
+
+ AC_MSG_CHECKING([for libjpeg (needed by gd-1.8+)])
+ AC_ARG_WITH(jpeg-dir,
+ [ --with-jpeg-dir[=DIR] jpeg dir for gd-1.8+],[
+ AC_MSG_RESULT(yes)
+ if test -z $withval; then
+ withval="/usr/local"
+ fi
+ old_LIBS=$LIBS
+ LIBS="$LIBS -L$withval/lib"
+ AC_CHECK_LIB(jpeg,jpeg_read_header, [LIBS="$LIBS -L$withval/lib -ljpeg"],[AC_MSG_RESULT(no)],)
+ LIBS=$old_LIBS
+ AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
+ LIBS="$LIBS -L$withval/lib -ljpeg"
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(If configure fails try --with-jpeg-dir=<DIR>)
+ ])
+ AC_CHECK_LIB(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])])
+
ac_cv_lib_gd_gdImageLine=yes
else
AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under $withval])