]> granicus.if.org Git - php/commitdiff
"The ugly patch"
authorMelvyn Sopacua <msopacua@php.net>
Fri, 31 Jan 2003 15:06:45 +0000 (15:06 +0000)
committerMelvyn Sopacua <msopacua@php.net>
Fri, 31 Jan 2003 15:06:45 +0000 (15:06 +0000)
Make mcrypt compile, when we finally are free of -ltdl. Bug #20926.

# There's a variant, with a config option, but that's an ugly word(tm)

ext/mcrypt/config.m4

index bae44a3d4ba1a80b83c1db71236f5807b1e5ce2e..042833fd554846266416f5fb20838887881340cd 100644 (file)
@@ -29,15 +29,28 @@ if test "$PHP_MCRYPT" != "no"; then
     ])
 
   ],[
-    PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, 
+    unset found
+    unset ac_cv_lib_mcrypt_mcrypt_module_open
+    PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
     [
-      AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ])
-    ],[
-      AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
-    ],[
-      -L$MCRYPT_DIR/lib
-    ])
+      AC_DEFINE(HAVE_LIBMCRYPT24,1,[ ])
 
+      PHP_CHECK_LIBRARY(mcrypt, mcrypt_generic_deinit,
+      [
+        AC_DEFINE(HAVE_MCRYPT_GENERIC_DEINIT,1,[ ])
+      ],[],[
+        -L$MCRYPT_DIR/lib
+      ])
+    ],[
+      PHP_CHECK_LIBRARY(mcrypt, init_mcrypt, 
+      [
+        AC_DEFINE(HAVE_LIBMCRYPT22,1,[ ])
+      ],[
+        AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
+      ],[
+        -L$MCRYPT_DIR/lib
+      ])
+    ],[])
   ],[
     -L$MCRYPT_DIR/lib -lltdl
   ])