diff options
author | Sascha Schumann <sas@php.net> | 2000-03-27 23:43:00 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-03-27 23:43:00 +0000 |
commit | a97eccaba31b9e52134457cd31a2623355c86016 (patch) | |
tree | 4bacb1579138074721f82143e942ed571fc428b9 /ext/mcrypt/config.m4 | |
parent | 1f822b98cee27997c440ffe8a9d416b914392ab9 (diff) | |
download | php-git-a97eccaba31b9e52134457cd31a2623355c86016.tar.gz |
Use PHP_ARG_WITH
Diffstat (limited to 'ext/mcrypt/config.m4')
-rw-r--r-- | ext/mcrypt/config.m4 | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4 index 5066b4ac44..7bd7c7314d 100644 --- a/ext/mcrypt/config.m4 +++ b/ext/mcrypt/config.m4 @@ -2,30 +2,25 @@ dnl $Id$ dnl config.m4 for extension mcrypt dnl don't forget to call PHP_EXTENSION(mcrypt) -AC_MSG_CHECKING(for mcrypt support) -AC_ARG_WITH(mcrypt, +PHP_ARG_WITH(mcrypt, for mcrypt support, [ --with-mcrypt[=DIR] Include mcrypt support. DIR is the mcrypt - install directory.], -[ - if test "$withval" != "no"; then - for i in /usr/local /usr $withval; do - if test -f $i/include/mcrypt.h; then - MCRYPT_DIR=$i - fi - done - if test "$MCRYPT_DIR" = ""; then - AC_MSG_ERROR(Please reinstall libmcrypt - I cannot find mcrypt.h) - fi - AC_ADD_INCLUDE($MCRYPT_DIR/include) - AC_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib) + install directory.]) - AC_DEFINE(HAVE_LIBMCRYPT,1,[ ]) +if test "$PHP_MCRYPT" != "no"; then + for i in /usr/local /usr $PHP_MCRYPT; do + if test -f $i/include/mcrypt.h; then + MCRYPT_DIR=$i + fi + done - AC_MSG_RESULT(yes) - PHP_EXTENSION(mcrypt) - else - AC_MSG_RESULT(no) + if test -z "$MCRYPT_DIR"; then + AC_MSG_ERROR(Please reinstall libmcrypt - I cannot find mcrypt.h) fi -],[ - AC_MSG_RESULT(no) -]) + + AC_ADD_INCLUDE($MCRYPT_DIR/include) + AC_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/lib) + + AC_DEFINE(HAVE_LIBMCRYPT,1,[ ]) + + PHP_EXTENSION(mcrypt) +fi |