AC_MSG_CHECKING, AC_ARG_[ENABLE,WITH], AC_MSG_RESULT trio.
dnl
dnl This file contains local autoconf functions.
+AC_DEFUN(PHP_ARG_WITH,[
+AC_MSG_CHECKING($2)
+AC_ARG_WITH($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]withval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
+AC_MSG_RESULT([$]PHP_[]translit($1,a-z-,A-Z_))
+])
+
+AC_DEFUN(PHP_ARG_ENABLE,[
+AC_MSG_CHECKING($2)
+AC_ARG_ENABLE($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]enableval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
+AC_MSG_RESULT([$]PHP_[]translit($1,a-z-,A-Z_))
+])
+
AC_DEFUN(PHP_MODULE_PTR,[
EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1,"
])
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
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..
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
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
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
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