summaryrefslogtreecommitdiff
path: root/ext/mcrypt
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-08-14 19:17:16 +0000
committerSascha Schumann <sas@php.net>2000-08-14 19:17:16 +0000
commit51fe68fd5156be3330c98ab64643b996722cad15 (patch)
treecf955e9c9843f6314eb038b02121953a2ba8047d /ext/mcrypt
parent159abaa9008643dc5e0df27d48e02be1140c78ee (diff)
downloadphp-git-51fe68fd5156be3330c98ab64643b996722cad15.tar.gz
Fix check for libmcrypt in non-system library paths.
Fix case where neither libmcrypt 2.4.x and 2.2.x were found. Fix library order (scope limited to static libraries)
Diffstat (limited to 'ext/mcrypt')
-rw-r--r--ext/mcrypt/config.m412
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4
index 67ed516c39..649817a76e 100644
--- a/ext/mcrypt/config.m4
+++ b/ext/mcrypt/config.m4
@@ -19,19 +19,23 @@ if test "$PHP_MCRYPT" != "no"; then
AC_ADD_INCLUDE($MCRYPT_DIR/include)
PHP_SUBST(MCRYPT_SHARED_LIBADD)
- AC_CHECK_LIB(mcrypt, init_mcrypt, [ AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ]) ])
+ old_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$ld_runpath_switch$MCRYPT_DIR/lib -L$MCRYPT_DIR/lib"
+ AC_CHECK_LIB(mcrypt, init_mcrypt)
old_LIBS=$LIBS
LIBS="$LIBS -lltdl"
AC_CHECK_LIB(mcrypt, mcrypt_module_open, [LIBS="$LIBS -lltdl"],[ ],)
LIBS=$old_LIBS
- AC_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
+ LDFLAGS="$old_LDFLAGS"
if test "$ac_cv_lib_mcrypt_init_mcrypt" = "yes"; then
AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ])
- fi
- if test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then
+ elif test "$ac_cv_lib_mcrypt_mcrypt_module_open" = "yes"; then
AC_ADD_LIBRARY(ltdl)
AC_DEFINE(HAVE_LIBMCRYPT24,1,[ ])
+ else
+ AC_MSG_ERROR(Sorry, I was not able to diagnose which libmcrypt version you have installed.)
fi
+ AC_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib, MCRYPT_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
PHP_EXTENSION(mcrypt, $ext_shared)