1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00

make config.h.stub as well

This commit is contained in:
Stig Bakken
1999-04-21 16:23:47 +00:00
parent 43ed903949
commit 9b3c1ca2c3
+19 -12
View File
@@ -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]."