summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>1999-09-13 17:17:51 +0000
committerStig Bakken <ssb@php.net>1999-09-13 17:17:51 +0000
commit809198b9162cbef4af420e5ae3e74b3c3adcc3f3 (patch)
tree4717873236a3de3ad755df0da3a91d3e1174ef1f
parent95303a4bb270d31cef0e83ee7453c143f1bd7566 (diff)
downloadphp-git-809198b9162cbef4af420e5ae3e74b3c3adcc3f3.tar.gz
Added PHP_WITH_SHARED for checking "shared,*" prefix when configuring
extensions.
-rw-r--r--acinclude.m421
-rw-r--r--configure.in.in4
-rw-r--r--ext/bcmath/config.m46
-rw-r--r--ext/gettext/config.m42
-rw-r--r--ext/icap/config.m42
-rw-r--r--ext/mcal/config.m42
-rw-r--r--ext/mhash/config.m42
-rw-r--r--ext/mysql/config.m4134
-rw-r--r--ext/oci8/config.m42
-rw-r--r--ext/yp/config.m42
10 files changed, 93 insertions, 84 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 4ca1a6342e..1e31ba1c25 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -190,3 +190,24 @@ AC_DEFUN(PHP_SOLARIS_PIC_WEIRDNESS,[
AC_MSG_RESULT(no)
fi
])
+
+dnl
+dnl Checks whether $withval is "shared" or starts with "shared,XXX"
+dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
+dnl from $withval.
+dnl
+AC_DEFUN(PHP_WITH_SHARED,[
+ case $withval in
+ shared)
+ shared=yes
+ withval=yes
+ ;;
+ shared,*)
+ shared=yes
+ withval=`echo $withval | sed -e 's/^shared,//'`
+ ;;
+ *)
+ shared=no
+ ;;
+ esac
+])
diff --git a/configure.in.in b/configure.in.in
index c5d1388884..ad02df3ac3 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -77,7 +77,7 @@ if test -n "$auto_cflags" && test "`uname -s 2>/dev/null`" = "HP-UX"; then
fi
dnl Checks for programs.
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.)
@@ -863,7 +863,7 @@ AC_ARG_ENABLE(url-fopen-wrapper,
DMALLOC_RESULT=no
AC_MSG_CHECKING(whether to enable dmalloc)
AC_ARG_ENABLE(dmalloc,
-[ --enable-dmalloc Enable dmalloc],
+[ --enable-dmalloc Enable dmalloc],
[
if test "$enableval" = "yes" ; then
AC_DEFINE(HAVE_DMALLOC, 1)
diff --git a/ext/bcmath/config.m4 b/ext/bcmath/config.m4
index 18aa4ebea8..960d3863f6 100644
--- a/ext/bcmath/config.m4
+++ b/ext/bcmath/config.m4
@@ -2,9 +2,9 @@ dnl $Id$
AC_MSG_CHECKING(whether to enable bc style precision math functions)
AC_ARG_ENABLE(bcmath,
-[ --enable-bcmath Compile with bc style precision math functions.
- Read README-BCMATH for instructions on how to
- get this module installed. ],
+[ --enable-bcmath Compile with bc style precision math functions.
+ Read README-BCMATH for instructions on how to
+ get this module installed. ],
[
if test "$enableval" = "yes"; then
AC_DEFINE(WITH_BCMATH, 1)
diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4
index 7a55dfb388..b14673527a 100644
--- a/ext/gettext/config.m4
+++ b/ext/gettext/config.m4
@@ -5,7 +5,7 @@ dnl don't forget to call PHP_EXTENSION(gettext)
AC_MSG_CHECKING(whether to include GNU gettext support)
AC_ARG_WITH(gettext,
[ --with-gettext[=DIR] Include GNU gettext support. DIR is the gettext
- install directory, defaults to /usr/local],
+ install directory, defaults to /usr/local],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
diff --git a/ext/icap/config.m4 b/ext/icap/config.m4
index d00d344a3a..c22a52ddc1 100644
--- a/ext/icap/config.m4
+++ b/ext/icap/config.m4
@@ -2,7 +2,7 @@ dnl $Id$
AC_MSG_CHECKING(for ICAP support)
AC_ARG_WITH(icap,
-[ --with-icap[=DIR] Include ICAP support.],
+[ --with-icap[=DIR] Include ICAP support.],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
diff --git a/ext/mcal/config.m4 b/ext/mcal/config.m4
index 1036c185ec..914203e0ac 100644
--- a/ext/mcal/config.m4
+++ b/ext/mcal/config.m4
@@ -2,7 +2,7 @@ dnl $Id$
AC_MSG_CHECKING(for MCAL support)
AC_ARG_WITH(mcal,
-[ --with-mcal[=DIR] Include MCAL support.],
+[ --with-mcal[=DIR] Include MCAL support.],
[
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
diff --git a/ext/mhash/config.m4 b/ext/mhash/config.m4
index 92c03d4abd..34077138d5 100644
--- a/ext/mhash/config.m4
+++ b/ext/mhash/config.m4
@@ -4,7 +4,7 @@ dnl don't forget to call PHP_EXTENSION(mhash)
AC_MSG_CHECKING(for mhash support)
AC_ARG_WITH(mhash,
-[ --with-mhash[=DIR] Include mhash support. DIR is the mhash
+[ --with-mhash[=DIR] Include mhash support. DIR is the mhash
install directory.],
[
if test "$withval" != "no"; then
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4
index bce0671fd5..ceda6acf4b 100644
--- a/ext/mysql/config.m4
+++ b/ext/mysql/config.m4
@@ -8,82 +8,70 @@ AC_ARG_WITH(mysql,
Set DIR to "shared" to build as a dl, or "shared,DIR"
to build as a dl and still specify DIR.],
[
- case $withval in
- shared)
- shared=yes
- withval=yes
- ;;
- shared,*)
- shared=yes
- withval=`echo $withval | sed -e 's/^shared,//'`
- ;;
- *)
- shared=no
- ;;
- esac
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- if test -f /usr/include/mysql/mysql.h; then
- MYSQL_INCDIR=/usr/include/mysql
- if test -d /usr/lib/mysql; then
- MYSQL_LIBDIR=/usr/lib/mysql
- else
- MYSQL_LIBDIR=/usr/lib
- fi
- elif test -f /usr/include/mysql.h; then
- MYSQL_INCDIR=/usr/include
- MYSQL_LIBDIR=/usr/lib
- elif test -f /usr/local/include/mysql/mysql.h; then
- MYSQL_INCDIR=/usr/local/include/mysql
- MYSQL_LIBDIR=/usr/local/lib/mysql
- elif test -f /usr/local/include/mysql.h; then
- MYSQL_INCDIR=/usr/local/include
- MYSQL_LIBDIR=/usr/local/lib
- elif test -f /usr/local/mysql/include/mysql/mysql.h; then
- MYSQL_INCDIR=/usr/local/mysql/include/mysql
- MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Invalid MySQL directory - unable to find mysql.h)
- fi
- else
- if test -f $withval/include/mysql/mysql.h; then
- MYSQL_INCDIR=$withval/include/mysql
- MYSQL_LIBDIR=$withval/lib/mysql
- elif test -f $withval/include/mysql.h; then
- MYSQL_INCDIR=$withval/include
- MYSQL_LIBDIR=$withval/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Invalid MySQL directory - unable to find mysql.h under $withval)
- fi
- fi
- MYSQL_INCLUDE=-I$MYSQL_INCDIR
+ PHP_WITH_SHARED
+ if test "$withval" != "no"; then
+ if test "$withval" = "yes"; then
+ if test -f /usr/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/include/mysql
+ if test -d /usr/lib/mysql; then
+ MYSQL_LIBDIR=/usr/lib/mysql
+ else
+ MYSQL_LIBDIR=/usr/lib
+ fi
+ elif test -f /usr/include/mysql.h; then
+ MYSQL_INCDIR=/usr/include
+ MYSQL_LIBDIR=/usr/lib
+ elif test -f /usr/local/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include/mysql
+ MYSQL_LIBDIR=/usr/local/lib/mysql
+ elif test -f /usr/local/include/mysql.h; then
+ MYSQL_INCDIR=/usr/local/include
+ MYSQL_LIBDIR=/usr/local/lib
+ elif test -f /usr/local/mysql/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/local/mysql/include/mysql
+ MYSQL_LIBDIR=/usr/local/mysql/lib/mysql
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid MySQL directory - unable to find mysql.h)
+ fi
+ else
+ if test -f $withval/include/mysql/mysql.h; then
+ MYSQL_INCDIR=$withval/include/mysql
+ MYSQL_LIBDIR=$withval/lib/mysql
+ elif test -f $withval/include/mysql.h; then
+ MYSQL_INCDIR=$withval/include
+ MYSQL_LIBDIR=$withval/lib
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid MySQL directory - unable to find mysql.h under $withval)
+ fi
+ fi
+ MYSQL_INCLUDE=-I$MYSQL_INCDIR
- AC_DEFINE(HAVE_MYSQL)
- if test "$shared" = "yes"; then
- AC_MSG_RESULT(yes (shared))
- MYSQL_LFLAGS="-L$MYSQL_LIBDIR"
- MYSQL_SHARED="mysql.la"
- else
- AC_MSG_RESULT(yes (static))
- AC_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIBDIR)
- AC_ADD_INCLUDE($MYSQL_INCDIR)
- MYSQL_STATIC="libphpext_mysql.a"
- fi
- PHP_EXTENSION(mysql, $shared)
+ AC_DEFINE(HAVE_MYSQL)
+ if test "$shared" = "yes"; then
+ AC_MSG_RESULT(yes (shared))
+ MYSQL_LFLAGS="-L$MYSQL_LIBDIR"
+ MYSQL_SHARED="mysql.la"
+ else
+ AC_MSG_RESULT(yes (static))
+ AC_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIBDIR)
+ AC_ADD_INCLUDE($MYSQL_INCDIR)
+ MYSQL_STATIC="libphpext_mysql.a"
+ fi
+ PHP_EXTENSION(mysql, $shared)
- dnl check for errmsg.h, which isn't installed by some versions of 3.21
- old_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
- AC_CHECK_HEADERS(errmsg.h mysql.h)
- CPPFLAGS="$old_CPPFLAGS"
- else
- AC_MSG_RESULT(no)
- AC_DEFINE(HAVE_MYSQL, 0)
- fi
+ dnl check for errmsg.h, which isn't installed by some versions of 3.21
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
+ AC_CHECK_HEADERS(errmsg.h mysql.h)
+ CPPFLAGS="$old_CPPFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_MYSQL, 0)
+ fi
],[
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
])
AC_SUBST(MYSQL_STATIC)
AC_SUBST(MYSQL_SHARED)
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
index 53cb495267..3a9451aad3 100644
--- a/ext/oci8/config.m4
+++ b/ext/oci8/config.m4
@@ -21,7 +21,7 @@ AC_DEFUN(AC_ORACLE_VERSION,[
AC_MSG_CHECKING(for Oracle-OCI8 support)
AC_ARG_WITH(oci8,
-[ --with-oci8[=DIR] Include Oracle database support. DIR is Oracle's
+[ --with-oci8[=DIR] Include Oracle database support. DIR is Oracle's
home directory, defaults to \$ORACLE_HOME.],
[
case "$withval" in
diff --git a/ext/yp/config.m4 b/ext/yp/config.m4
index 6fd01b3a1e..981be1b589 100644
--- a/ext/yp/config.m4
+++ b/ext/yp/config.m4
@@ -4,7 +4,7 @@ dnl don't forget to call PHP_EXTENSION(yp)
AC_MSG_CHECKING(whether to include YP support)
AC_ARG_WITH(yp,
-[ --with-yp Include YP support],
+[ --with-yp Include YP support],
[
if test "$withval" = "yes"; then
AC_MSG_RESULT(yes)