cvs: php4 / acinclude.m4

From: Date: Wed, 20 Mar 2002 12:08:30 +0000
Subject: cvs: php4 / acinclude.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10476@lists.php.net to get a copy of this message
sas Wed Mar 20 07:08:30 2002 EDT Modified files: /php4 acinclude.m4 Log: Avoid duplicate tests and make third parameter truly optional. Index: php4/acinclude.m4 diff -u php4/acinclude.m4:1.170 php4/acinclude.m4:1.171 --- php4/acinclude.m4:1.170 Wed Mar 20 06:59:48 2002 +++ php4/acinclude.m4 Wed Mar 20 07:08:30 2002 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.170 2002/03/20 11:59:48 sas Exp $ +dnl $Id: acinclude.m4,v 1.171 2002/03/20 12:08:30 sas Exp $ dnl dnl This file contains local autoconf functions. @@ -1362,23 +1362,24 @@ found_iconv=yes ], [ - iconv_lib_name=iconv for i in $PHP_ICONV /usr/local /usr; do - if test -r $i/include/giconv.h || test -r $i/include/iconv.h; then + if test -r $i/include/giconv.h; then ICONV_DIR=$i - if test -r $i/include/giconv.h; then - iconv_lib_name=giconv - fi + iconv_lib_name=giconv break - fi + elif test -r $i/include/iconv.h; then + ICONV_DIR=$i + iconv_lib_name=iconv + break + fi done if test -z "$ICONV_DIR"; then - AC_MSG_ERROR(Please specify the location of iconv with --with-iconv) + AC_MSG_ERROR([Please specify the location of iconv with --with-iconv]) fi - if test -f $ICONV_DIR/lib/lib${iconv_lib_name}.a || - test -f $ICONV_DIR/lib/lib${iconv_lib_name}.$SHLIB_SUFFIX_NAME + if test -f $ICONV_DIR/lib/lib$iconv_lib_name.a || + test -f $ICONV_DIR/lib/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME then PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [ found_iconv=yes @@ -1394,13 +1395,12 @@ fi ]) - if test "$found_iconv" = "no"; then - $3 - else + if test "$found_iconv" = "yes"; then if test -n "$ICONV_DIR"; then PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/lib, $1) PHP_ADD_INCLUDE($ICONV_DIR/include) fi $2 +ifelse([$3],[],,[else $3]) fi ])

« previous php.cvs (#10476) next »