From: Melvyn Sopacua Date: Fri, 31 Jan 2003 15:06:45 +0000 (+0000) Subject: "The ugly patch" X-Git-Tag: php-4.3.2RC1~364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4be86f6c14dac9029423544856ccdc0132bb06a5;p=php "The ugly patch" 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) --- diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4 index bae44a3d4b..042833fd55 100644 --- a/ext/mcrypt/config.m4 +++ b/ext/mcrypt/config.m4 @@ -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 ])