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

]

dnl AB_PERL_CHECK(Tie::DeepTied, , [ echo You must get Tie-Tools from CPAN to run this package,
dnl echo Try \$CPAN/authors/id/S/SC/SCHOP or use CPAN.pm module for Tie::DeepTied.
dnl exit ]
dnl )

AB_PERL_CHECK(XML::Parser, [
    AB_PERL_CHECK(Parse::Lex, [
       AB_PERL_CHECK(Parse::Yapp, XML=1, )])])

echo -n "Macro file will "
[ if [ -z "$XML" ]; then ]
    echo -n "not "
fi
echo "be compiled"


AC_ARG_ENABLE(modperl, [  --enable-modperl	  Install ModPerl support], [

[
    if [ ! "$UID" = 0 ]; then
        echo "ModPerl support must be installed as superuser"
        exit
    fi
    if [ -n "$DEPDBDEF" ]; then
        echo "Dependency database and ModPerl support can't be used



( run in 2.523 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )