From 4be86f6c14dac9029423544856ccdc0132bb06a5 Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Fri, 31 Jan 2003 15:06:45 +0000 Subject: [PATCH] "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) --- ext/mcrypt/config.m4 | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) 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 ]) -- 2.50.1