summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-03-27 23:33:38 +0000
committerSascha Schumann <sas@php.net>2000-03-27 23:33:38 +0000
commit1f822b98cee27997c440ffe8a9d416b914392ab9 (patch)
treee2b78f144d534d15d90b136924dd9b7a81cb0b3d /ext
parent0cc5c94b37668d225c48e715bf69d3a8309e16d5 (diff)
downloadphp-git-1f822b98cee27997c440ffe8a9d416b914392ab9.tar.gz
Welcome PHP_ARG_ENABLE and PHP_ARG_WITH. They are there to replace the common
AC_MSG_CHECKING, AC_ARG_[ENABLE,WITH], AC_MSG_RESULT trio.
Diffstat (limited to 'ext')
-rw-r--r--ext/dbase/config.m425
-rwxr-xr-xext/ext_skel20
-rw-r--r--ext/filepro/config.m424
-rw-r--r--ext/ftp/config.m421
-rw-r--r--ext/session/config.m434
-rw-r--r--ext/wddx/config.m426
6 files changed, 49 insertions, 101 deletions
diff --git a/ext/dbase/config.m4 b/ext/dbase/config.m4
index b8746c6825..8723b2e9f4 100644
--- a/ext/dbase/config.m4
+++ b/ext/dbase/config.m4
@@ -1,18 +1,13 @@
dnl $Id$
-AC_MSG_CHECKING(whether to include the bundled dbase library)
-AC_ARG_WITH(dbase,
-[ --with-dbase Include the bundled dbase library],
-[
- if test "$withval" = "yes"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(DBASE,1,[ ])
- PHP_EXTENSION(dbase)
- else
- AC_MSG_RESULT(no)
- AC_DEFINE(DBASE,0,[ ])
- fi
-],[
- AC_MSG_RESULT(no)
+AC_ARG_WITH(dbase,[],[enable_dbase=$withval])
+
+PHP_ARG_ENABLE(dbase,whether to enable the bundled dbase library,
+[ --enable-dbase Enable the bundled dbase library])
+
+if test "$PHP_DBASE" = "yes"; then
+ AC_DEFINE(DBASE,1,[ ])
+ PHP_EXTENSION(dbase)
+else
AC_DEFINE(DBASE,0,[ ])
-])
+fi
diff --git a/ext/ext_skel b/ext/ext_skel
index cf5d22242c..7e5fb40501 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -44,27 +44,15 @@ dnl don't forget to call PHP_EXTENSION($extname)
dnl If your extension references something external, use with:
-AC_MSG_CHECKING(whether to include $extname support)
-AC_MSG_WITH($extname,
+PHP_ARG_WITH($extname, for $extname support,
dnl Make sure that the comment is aligned:
-[ --with-$extname Include $extname support.],[
- PHP_$EXTNAME=\$withval
-],[
- PHP_$EXTNAME=no
-])
-AC_MSG_RESULT(\$PHP_$EXTNAME)
+[ --with-$extname Include $extname support])
dnl Otherwise use enable:
-AC_MSG_CHECKING(whether to enable $extname)
-AC_MSG_ENABLE($extname,
+PHP_ARG_ENABLE($extname, whether to enable $extname support,
dnl Make sure that the comment is aligned:
-[ --enable-$extname Include $extname support.],[
- PHP_$EXTNAME=\$enableval
-],[
- PHP_$EXTNAME=no
-])
-AC_MSG_RESULT(\$PHP_$EXTNAME)
+[ --enable-$extname Enable $extname support])
if test "\$PHP_$EXTNAME" != "no"; then
dnl Action..
diff --git a/ext/filepro/config.m4 b/ext/filepro/config.m4
index a0036668b2..cb04525269 100644
--- a/ext/filepro/config.m4
+++ b/ext/filepro/config.m4
@@ -1,17 +1,13 @@
dnl $Id$
-AC_MSG_CHECKING(whether to include the bundled filePro support)
-AC_ARG_WITH(filepro,
-[ --with-filepro Include the bundled read-only filePro support],[
- if test "$withval" != "no"; then
- AC_DEFINE(HAVE_FILEPRO, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(filepro)
- else
- AC_DEFINE(HAVE_FILEPRO, 0, [ ])
- AC_MSG_RESULT(no)
- fi
-],[
+AC_ARG_WITH(filepro,[],[enable_filepro=$withval])
+
+PHP_ARG_ENABLE(filepro,whether to enable the bundled filePro support,
+[ --enable-filepro Enable the bundled read-only filePro support])
+
+if test "$PHP_FILEPRO" = "yes"; then
+ AC_DEFINE(HAVE_FILEPRO, 1, [ ])
+ PHP_EXTENSION(filepro)
+else
AC_DEFINE(HAVE_FILEPRO, 0, [ ])
- AC_MSG_RESULT(no)
-])
+fi
diff --git a/ext/ftp/config.m4 b/ext/ftp/config.m4
index ce5d6af78c..0c29da61d8 100644
--- a/ext/ftp/config.m4
+++ b/ext/ftp/config.m4
@@ -2,17 +2,10 @@ dnl $Id$
dnl config.m4 for extension ftp
dnl don't forget to call PHP_EXTENSION(ftp)
-AC_MSG_CHECKING(for FTP support)
-AC_ARG_WITH(ftp,
-[ --with-ftp Include FTP support.],
-[
- if test "$withval" != "no"; then
- AC_DEFINE(HAVE_FTP,1,[ ])
- PHP_EXTENSION(ftp)
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-],[
- AC_MSG_RESULT(no)
-])
+PHP_ARG_ENABLE(ftp,whether to enable FTP support,
+[ --enable-ftp Enable FTP support])
+
+if test "$PHP_FTP" = "yes"; then
+ AC_DEFINE(HAVE_FTP,1,[Whether you want FTP support])
+ PHP_EXTENSION(ftp)
+fi
diff --git a/ext/session/config.m4 b/ext/session/config.m4
index 11496f4a60..89017871ae 100644
--- a/ext/session/config.m4
+++ b/ext/session/config.m4
@@ -1,31 +1,13 @@
dnl $Id$
-AC_MSG_CHECKING(for mm support)
-AC_ARG_WITH(mm,
-[ --with-mm[=DIR] Include mm support for session storage],[
- PHP_MM=$withval
-],[
- PHP_MM=no
-])
-AC_MSG_RESULT($PHP_MM)
-
-AC_MSG_CHECKING(whether to enable session support)
-AC_ARG_ENABLE(session,
-[ --disable-session Disable session support],[
- PHP_SESSION=$enableval
-],[
- PHP_SESSION=yes
-])
-AC_MSG_RESULT($PHP_SESSION)
-
-AC_MSG_CHECKING(whether to enable transparent session id propagation)
-AC_ARG_ENABLE(trans-sid,
-[ --enable-trans-sid Enable transparent session id propagation],[
- PHP_TRANS_SID=$enableval
-],[
- PHP_TRANS_SID=no
-])
-AC_MSG_RESULT($PHP_TRANS_SID)
+PHP_ARG_WITH(mm,for mm support,
+[ --with-mm[=DIR] Include mm support for session storage])
+
+PHP_ARG_ENABLE(session, whether to enable session support,
+[ --disable-session Disable session support], yes)
+
+PHP_ARG_ENABLE(trans-sid,whether to enable transparent session id propagation,
+[ --enable-trans-sid Enable transparent session id propagation])
if test "$PHP_MM" != "no"; then
for i in /usr/local /usr $PHP_MM; do
diff --git a/ext/wddx/config.m4 b/ext/wddx/config.m4
index 9e599b0c8f..2dbd479ab5 100644
--- a/ext/wddx/config.m4
+++ b/ext/wddx/config.m4
@@ -1,20 +1,14 @@
dnl $Id$
dnl config.m4 for extension wddx
-AC_MSG_CHECKING(whether to include WDDX support)
-AC_ARG_ENABLE(wddx,
-[ --enable-wddx Include WDDX support],[
- if test "$enableval" = "yes"; then
- if test "${enable_xml+set}" != "set" -o "$enable_xml" = "no"; then
- AC_MSG_ERROR(WDDX requires --enable-xml)
- else
- AC_DEFINE(HAVE_WDDX, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(wddx)
- fi
- else
- AC_MSG_RESULT(no)
+PHP_ARG_ENABLE(wddx,whether to enable WDDX support,
+[ --enable-wddx Enable WDDX support])
+
+if test "$PHP_WDDX" = "yes"; then
+ if test "$enable_xml" = "no"; then
+ AC_MSG_WARN(Activating XML)
+ enable_xml=yes
fi
-],[
- AC_MSG_RESULT(no)
-])
+ AC_DEFINE(HAVE_WDDX, 1, [ ])
+ PHP_EXTENSION(wddx)
+fi