cvs: /php3 configure.in
| From: | Kristian K�hntopp | Date: | Mon, 22 Nov 1999 00:12:24 +0000 |
| Subject: | cvs: /php3 configure.in | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12893@lists.php.net to get a copy of this message | ||
kk Sun Nov 21 19:12:24 1999 EDT
Modified files:
/php3 configure.in
Log:
- Improved autoconf support for recode module (configure.in).
- Note: Still no autoconf support for HAVE_BROKEN_RECODE.
Index: php3/configure.in
diff -u php3/configure.in:1.476 php3/configure.in:1.477
--- php3/configure.in:1.476 Sun Nov 21 18:06:30 1999
+++ php3/configure.in Sun Nov 21 19:12:24 1999
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.476 1999/11/21 23:06:30 kk Exp $
+dnl $Id: configure.in,v 1.477 1999/11/22 00:12:24 kk Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
@@ -2895,17 +2895,45 @@
AC_MSG_CHECKING(whether to include GNU recode support)
AC_ARG_WITH(recode,
-[ --without-recode Don't include GNU recode functions],[
- if test "$withval" = "yes"; then
- AC_DEFINE(HAVE_RECODE, 1)
- AC_ADD_LIBRARY(recode)
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
+[ --with-recode[=DIR] Include GNU recode support.],
+[
+ if test "$withval" = "yes"; then
+ if test -f /usr/include/recode.h; then
+ withval=/usr
+ elif test -f /usr/local/include/recode.h; then
+ withval=/usr/local
+ elif test -f /opt/include/recode.h; then
+ withval=/opt
+ fi
+ fi
+ if test "$withval" != "no" && test "$withval" !=
"yes"; then
+ RECODE_DIR=$withval
+ if test -f $RECODE_DIR/include/recode/recode.h; then
+ RECODE_INC_DIR=$RECODE_DIR/include/recode
+ else
+ RECODE_INC_DIR=$withval/include
+ fi
+
+ if test ! -f $RECODE_INC_DIR/recode.h; then
+ AC_MSG_ERROR(could not find recode.h in $RECODE_INC_DIR !)
+ fi
+
+ AC_EXPAND_PATH($RECODE_DIR, RECODE_DIR)
+ if test -f "$RECODE_DIR/lib/librecode.a" ; then
+ AC_ADD_LIBRARY_WITH_PATH(recode, $RECODE_DIR/lib)
+ elif test -f "$RECODE_DIR/lib/librecode.so"; then
+ AC_ADD_LIBRARY_WITH_PATH(recode, $RECODE_DIR/lib)
+ else
+ AC_MSG_ERROR(could not find librecode.a or librecode.so in $RECODE_DIR/lib)
+ fi
+ AC_ADD_INCLUDE($RECODE_INC_DIR)
+ AC_DEFINE(HAVE_RECODE)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
],[
- AC_DEFINE(HAVE_RECODE, 0)
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(whether to enable dmalloc support)