Files
smarty/docs/configure.in

146 lines
3.0 KiB
Plaintext
Raw Normal View History

2004-03-18 17:12:45 +00:00
dnl $Id$
dnl autoconf initialisation
AC_INIT()
WORKDIR=`pwd`
AC_SUBST(WORKDIR)
dnl debug output
echo "file versions"
for file in $srcdir/*.in; do
fgrep '$Id' $file | head -1 | sed -e"s/^.*: //g" | sed -e"s/200.\/.*$//g"
done
echo "configure options: $@"
echo "working directory: $WORKDIR"
echo
dnl {{{ check for support programs
dnl {{{ check for nsgmls or onsgmls
AC_ARG_WITH(nsgmls,
[ --with-nsgmls=PATH look for nsgmls or onsgmls executable],[
if test $withval != "yes"; then
AC_MSG_CHECKING([for nsgmls])
if test -x $withval; then
NSGMLS=$withval
AC_MSG_RESULT($NSGMLS)
else
NSGMLS=no
AC_MSG_RESULT(no)
AC_MSG_ERROR([$withval: not an executable file])
fi
else
if test -e ../../phpdoc-tools/jade/nsgmls.exe ; then
AC_MSG_CHECKING([for nsgmls])
NSGMLS=../../phpdoc-tools/jade/nsgmls.exe
AC_MSG_RESULT($NSGMLS)
else
AC_PATH_PROG(ONSGMLS,"onsgmls",no)
if test $ONSGMLS = "no"; then
AC_PATH_PROG(NSGMLS,"nsgmls",no)
else
NSGMLS=$ONSGMLS
fi
fi
fi
],[
if test -e ../../phpdoc-tools/jade/nsgmls.exe ; then
AC_MSG_CHECKING([for nsgmls])
NSGMLS=../../phpdoc-tools/jade/nsgmls.exe
AC_MSG_RESULT($NSGMLS)
else
AC_PATH_PROG(ONSGMLS,"onsgmls",no)
if test $ONSGMLS = "no"; then
AC_PATH_PROG(NSGMLS,"nsgmls",no)
else
NSGMLS=$ONSGMLS
fi
fi
]
)
if test $NSGMLS = "no"; then
AC_MSG_ERROR([can't find nsgmls or onsgmls])
fi
AC_SUBST(NSGMLS)
dnl }}}
dnl }}}
dnl {{{ language specific stuff
AC_MSG_CHECKING(for language)
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
AC_ARG_WITH(lang,
[ --with-lang=LANG choose a language to work with],[
if test "$withval" = "yes"; then
LANG=en
AC_MSG_RESULT([en (default)])
else
if test ! -d "./$withval"; then
AC_MSG_RESULT()
AC_MSG_ERROR(Language \"$withval\" not supported!)
else
LANG=$withval
AC_MSG_RESULT($LANG)
fi
PHP_BUILD_DATE=`date '+%d-%m-%Y'`
fi
],[
LANG=en
AC_MSG_RESULT([en (default)])
])
AC_SUBST(LANG)
AC_SUBST(PHP_BUILD_DATE)
dnl }}}
dnl {{{ makefile targets for configure-generated files
rm -f autogenerated_rules
(
for file in `find . -name "*.in"`; do
case "$file" in
./configure.in)
echo configure: configure.in
printf '\t autoconf'
echo
;;
./manual.xml.in)
;;
*)
echo `dirname $file`/`basename $file .in`: '$(srcdir)'/$file ./config.status
printf '\t CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status'
echo
esac
done
) > autogenerated_rules
AUTOGENERATED_RULES=autogenerated_rules
AC_SUBST_FILE(AUTOGENERATED_RULES)
rm -f autogenerated_rules
dnl }}}
dnl {{{ generate output files
dnl {{{ find all *.in files and process them with AC_OUTPUT
for infile in `find $srcdir -name "*.in"`
do
if test `basename $infile` != "configure.in"
then
outfile=`basename $infile .in`
outdir=`dirname $infile`
outdir=`echo $outdir/ | sed -e"s|$srcdir/||"`
OUTFILES="$OUTFILES ./$outdir$outfile"
fi
done
AC_OUTPUT($OUTFILES)
dnl }}}
dnl }}}