diff options
author | Stig Bakken <ssb@php.net> | 1999-04-21 16:23:47 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 1999-04-21 16:23:47 +0000 |
commit | 9b3c1ca2c38c8451f732e425bf6ad5bbcc16cd2b (patch) | |
tree | ec05e0f9b8dbd96cdbc2675b4cb312e2f750c948 /ext/ext_skel | |
parent | 43ed9039494a7484c2e3997ceae191ed6b640a62 (diff) | |
download | php-git-9b3c1ca2c38c8451f732e425bf6ad5bbcc16cd2b.tar.gz |
make config.h.stub as well
Diffstat (limited to 'ext/ext_skel')
-rwxr-xr-x | ext/ext_skel | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/ext/ext_skel b/ext/ext_skel index c9dd2e1144..837145b653 100755 --- a/ext/ext_skel +++ b/ext/ext_skel @@ -1,25 +1,26 @@ #!/bin/sh -EXTNAME="$1" +extname="$1" +EXTNAME=`echo $1|tr a-z A-Z` function givup() { echo $* exit 1 } -if test "$EXTNAME" = ""; then +if test "$extname" = ""; then givup "usage: $0 extension-name" fi -if test -d "$EXTNAME" ; then - givup "Directory $EXTNAME already exists." +if test -d "$extname" ; then + givup "Directory $extname already exists." fi echo "Creating directory" -mkdir $EXTNAME || givup "Cannot create directory $EXTNAME" +mkdir $extname || givup "Cannot create directory $extname" -cd $EXTNAME +cd $extname chmod 755 . echo -n "Creating basic files:" @@ -27,8 +28,8 @@ echo -n "Creating basic files:" echo -n " config.m4" cat >config.m4 <<eof dnl \$Id\$ -dnl config.m4 for extension $EXTNAME -dnl don't forget to call PHP_EXTENSION($EXTNAME) +dnl config.m4 for extension $extname +dnl don't forget to call PHP_EXTENSION($extname) eof @@ -36,9 +37,9 @@ echo -n " setup.stub" cat >setup.stub <<eof # \$Id\$ -define_option with-$EXTNAME '$EXTNAME support?' yesnodir \\ +define_option with-$extname '$extname support?' yesnodir \\ "defs" \\ -' Whether to include $EXTNAME support.' +' Whether to include $extname support.' eof @@ -47,8 +48,8 @@ cat >Makefile.am <<eof # \$Id\$ INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend -noinst_LIBRARIES=libphpext_$EXTNAME.a -libphpext_${EXTNAME}_a_SOURCES=$EXTNAME.c +noinst_LIBRARIES=libphpext_$extname.a +libphpext_${extname}_a_SOURCES=$extname.c eof @@ -60,6 +61,12 @@ Makefile.in Makefile eof +echo -n " config.h.stub" +cat >config.h.stub<<eof +/* define if you want to use the $extname extension */ +/* #undef HAVE_LIB$EXTNAME */ +eof + chmod 644 * echo " [done]." |