cvs: /php4/ext ext_skel
| From: | Sascha Schumann | Date: | Mon, 27 Mar 2000 22:53:18 +0000 |
| Subject: | cvs: /php4/ext ext_skel | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12696@lists.php.net to get a copy of this message | ||
sas Mon Mar 27 14:53:18 2000 EDT
Modified files:
/php4/ext ext_skel
Log:
Generate better skeleton config.m4
Index: php4/ext/ext_skel
diff -u php4/ext/ext_skel:1.13 php4/ext/ext_skel:1.14
--- php4/ext/ext_skel:1.13 Wed Dec 29 20:07:16 1999
+++ php4/ext/ext_skel Mon Mar 27 14:52:48 2000
@@ -42,8 +42,34 @@
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"