summaryrefslogtreecommitdiff
path: root/ext/ext_skel
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-03-27 22:52:48 +0000
committerSascha Schumann <sas@php.net>2000-03-27 22:52:48 +0000
commit0cc5c94b37668d225c48e715bf69d3a8309e16d5 (patch)
tree47d7cfacb81553f6f836d19b3a7388327740361a /ext/ext_skel
parent31803785fdc705f474cca4ff3d4dd8b3b781946f (diff)
downloadphp-git-0cc5c94b37668d225c48e715bf69d3a8309e16d5.tar.gz
Generate better skeleton config.m4
Diffstat (limited to 'ext/ext_skel')
-rwxr-xr-xext/ext_skel30
1 files changed, 28 insertions, 2 deletions
diff --git a/ext/ext_skel b/ext/ext_skel
index 9da91d3304..cf5d22242c 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -42,8 +42,34 @@ dnl \$Id\$
dnl config.m4 for extension $extname
dnl don't forget to call PHP_EXTENSION($extname)
-PHP_EXTENSION($extname)
-
+dnl If your extension references something external, use with:
+
+AC_MSG_CHECKING(whether to include $extname support)
+AC_MSG_WITH($extname,
+dnl Make sure that the comment is aligned:
+[ --with-$extname Include $extname support.],[
+ PHP_$EXTNAME=\$withval
+],[
+ PHP_$EXTNAME=no
+])
+AC_MSG_RESULT(\$PHP_$EXTNAME)
+
+dnl Otherwise use enable:
+
+AC_MSG_CHECKING(whether to enable $extname)
+AC_MSG_ENABLE($extname,
+dnl Make sure that the comment is aligned:
+[ --enable-$extname Include $extname support.],[
+ PHP_$EXTNAME=\$enableval
+],[
+ PHP_$EXTNAME=no
+])
+AC_MSG_RESULT(\$PHP_$EXTNAME)
+
+if test "\$PHP_$EXTNAME" != "no"; then
+ dnl Action..
+ PHP_EXTENSION($extname)
+fi
eof
$ECHO_N " Makefile.in$ECHO_C"