htpl
view release on metacpan or search on metacpan
configure.in view on Meta::CPAN
dnl Process this file with autoconf to produce a configure script.
AC_INIT(htpl.c)
clear
cat <<EOM
Welcome to HTPL installation.
EOM
dnl Checks for programs.
AC_LANG_C
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AB_PROG_PERL(5.005, , exit)
AB_CHECK_EMBEDDED_PERL([
OBJEMBED="htpl-xsi.c htpl-perl.c"
DEFEMBED=-D__PERLEMBED__
[
PL="$CCFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
]
], [OBJEMBED=
DEFEMBED=
PL=
])
dnl Checks for libraries.
dnl Replace `main' with a function in -ldb:
dnl AC_CHECK_LIB(db, main)
dnl Replace `main' with a function in -le:
dnl AC_CHECK_LIB(e, main)
dnl Replace `main' with a function in -lperl:
dnl AC_CHECK_LIB(perl, main)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h unistd.h string.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(getcwd putenv strdup strstr setenv)
AC_ARG_ENABLE(depdb, [ --enable-depdb Include dependency database], [
AC_REQUIRE_CPP
AC_CHECK_HEADER(db_185.h, [
AC_CHECK_LIB(db, dbopen, [ LIBS="$LIBS -ldb"; DEPDBDEF="-D__DEPEND_DB__"
echo "Compiling with dependency database" ], [ exit ])
], [
exit])], DEPDBDEF= )
AC_ARG_WITH(temp, [ --with-temp=TEMP Temp directory], TEMP=$withval, TEMP=/tmp)
AB_CHECK_TEMP($TEMP, , exit)
AC_ARG_WITH(pipe, [ --without-pipe No | code lines], PIPE=$withval, PIPE=yes)
[
if [ "$PIPE" != "no" ] ; then
]
AC_DEFINE(PIPE_CMDS)
[
fi
]
AC_ARG_WITH(sharp, [ --without-sharp No #var# substitution], SHARP=$withval, SHARP=yes)
[
if [ "$SHARP" != "no" ] ; then
]
AC_DEFINE(SHARP_VARS)
[
fi
]
configure.in view on Meta::CPAN
])
HTCONF=$ab_cv_conf
[
if [ -n "$HTTPDROOT" ]; then
DEFAULT=
for candidate in $HTTPDROOT"/logs" /var/log ; do
if [ -d "$candidate" ] ; then
DEFAULT=$candidate"/htpl_log"
break
fi
done
else
DEFAULT=$NEXTDEF"/.htpl.log"
fi
]
AC_CACHE_CHECK(for log file, ab_cv_logfile, [
[
echo ""
echo Enter the name of the system log file
echo -n "Default ["$PREDISP"$DEFAULT] "
read HTLOGS
if [ -z "$HTLOGS" ] ; then
HTLOGS=$DEFAULT
fi
ab_cv_logfile=$HTLOGS
]
])
HTLOGS=$ab_cv_logfile
[
if [ ! -e htpl-author.ego ] ; then
echo Do you want to send me a short message notifying me of the
echo -n "installation at your site? [y] "
read isego
if [ "$isego" = "no" ] || [ "$isego" = "n" ] ; then
EGO=
else
EGO=htpl-author.ego
fi
touch htpl-author.ego
fi
]
CFLAGS=
AC_SUBST(LIBS)
AC_SUBST(PERL)
AC_SUBST(CC)
AC_SUBST(PRERUN)
AC_SUBST(CCPROG)
AC_SUBST(INSTALL)
AC_SUBST(MODMAKE)
AC_SUBST(CPANMAKE)
AC_SUBST(MODINS)
AC_SUBST(PL)
AC_SUBST(OBJEMBED)
AC_SUBST(DEFEMBED)
AC_SUBST(INSTALLDIR)
AC_SUBST(EGO)
AC_SUBST(TEMP)
AC_SUBST(XML)
AC_SUBST(HTDOCS)
AC_SUBST(HTCONF)
AC_SUBST(HTLOGS)
AC_SUBST(DEPDBDEF)
AC_SUBST(MODPERL)
AC_SUBST(MODDIR)
AC_OUTPUT([Makefile htpl-config.pl perl.sh
HTPL-modules/lib/HTML/HTPL/Config.pm
htplp htreporter htplsrvc htpgen htplss],
[ chmod +x htplp htreporter htplsrvc htpgen htplss])
#clear
$PERL -e 'print chr(7);'
echo "Now issue the commands:"
echo "make"
echo "make install"
echo "make build"
echo "You can fetch useful modules from CPAN by issuing the command:"
echo "make CPAN"
( run in 0.965 second using v1.01-cache-2.11-cpan-71847e10f99 )