Update of /cvsroot/mod-auth/mod_dbi_pool/m4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7450/m4
Added Files:
apache.m4 libdbi.m4 outoforder.m4
Log Message:
adding m4 files for the build system
--- NEW FILE: libdbi.m4 ---
dnl Check for Apache, APR and APU
dnl CHECK_PATH_LIBDBI()
AC_DEFUN(CHECK_LIBDBI,
[dnl
AC_MSG_CHECKING(for --with-dbi)
AC_ARG_WITH(
dbi,
[AC_HELP_STRING([--with-dbi=PATH],[Path to dbi])],
[
if test -e "$withval/include/dbi/dbi.h"
then
DBI_INCLUDES=$withval/include
DBI_LIB=$withval/lib
AC_MSG_RESULT([found dbi.h])
else
echo
AC_MSG_ERROR([$withval/include/dbi/dbi.h not found ])
fi
],
AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-dbi-include)
AC_ARG_WITH(
dbi-include,
[AC_HELP_STRING([--with-dbi-include=PATH],[Path to dbi headers])],
[
if test -e "$withval/dbi/dbi.h"
then
DBI_INCLUDES=$withval
AC_MSG_RESULT([found dbi.h])
else
echo
AC_MSG_ERROR([$withval/dbi/dbi.h not found ])
fi
],
AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-dbi-libs)
AC_ARG_WITH(
dbi-libs,
[[AC_HELP_STRING([--with-dbi-libs=PATH],[Path to dbi libs])],
[
if test -e "$withval/libdbi.so"
then
DBI_LIB=$withval
AC_MSG_RESULT([found libdbi.so])
else
echo
AC_MSG_ERROR([$withval/libdbi.so not found ])
fi
],
AC_MSG_RESULT(no))
if test -z "$DBI_LIB"; then
test_paths="/usr/lib /usr/local/lib"
for x in $test_paths ; do
AC_MSG_CHECKING(for libdbi.so in $x)
if test -e "${x}/libdbi.so"; then
DBI_LIB=$x
AC_MSG_RESULT([found it!, we'll use this. Use --with-dbi-libs to specify another.])
break
else
AC_MSG_RESULT(no)
fi
done
fi
if test -z "$DBI_INCLUDES"; then
test_paths="/usr/include /usr/local/include"
for x in $test_paths ; do
AC_MSG_CHECKING(for libdbi.so in $x)
if test -e "${x}/libdbi.so"; then
DBI_LIB=$x
AC_MSG_RESULT([found it!, we'll use this. Use --with-dbi-libs to specify another.])
break
else
AC_MSG_RESULT(no)
fi
done
fi
# if no apxs found yet, check /usr/local/apache/sbin
# since it's the default Apache location
if test -z "$APXS_BIN"; then
test_paths="/usr/local/apache/sbin /usr/local/apache/bin /usr/local/apache2/bin"
test_paths="${test_paths} /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin"
for x in $test_paths ; do
AC_MSG_CHECKING(for apxs in $x)
if test -x "${x}/apxs"; then
APXS_BIN="${x}/apxs"
AC_MSG_RESULT([found it! Use --with-apxs to specify another.])
break
else
AC_MSG_RESULT(no)
fi
done
fi
# last resort
if test -z "$APXS_BIN"; then
AC_MSG_CHECKING(for apxs in your PATH)
AC_PATH_PROG(APXS_BIN, apxs)
if test -n "$APXS_BIN"; then
AC_MSG_RESULT([found ${APXS_BIN}. Use --with-apxs to specify another.])
fi
fi
if test -z "$APXS_BIN"; then
AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.])
else
AC_MSG_CHECKING(for Apache module directory)
AP_LIBEXECDIR=`${APXS_BIN} -q LIBEXECDIR`
AC_MSG_RESULT($AP_LIBEXECDIR)
AC_MSG_CHECKING([for Apache include directory])
AP_INCLUDES="-I`${APXS_BIN} -q INCLUDEDIR`"
AC_MSG_RESULT($AP_INCLUDES)
AC_MSG_CHECKING([for apr-config --includes])
APR_BINDIR=`$APXS_BIN -q APR_BINDIR`
APR_INCLUDES="`$APR_BINDIR/apr-config --includes`"
AC_MSG_RESULT($APR_INCLUDES)
AC_MSG_CHECKING([for apu-config --includes])
APU_BINDIR=`$APXS_BIN -q APU_BINDIR`
APU_INCLUDES="`$APU_BINDIR/apu-config --includes`"
AC_MSG_RESULT($APU_INCLUDES)
AC_MSG_CHECKING([for CFLAGS from APXS])
for flag in CFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS NOTEST_CFLAGS; do
APXS_CFLAGS="$APXS_CFLAGS `$APXS_BIN -q $flag`"
done
AC_MSG_RESULT($APXS_CFLAGS)
AC_SUBST(AP_LIBEXECDIR)
AC_SUBST(AP_INCLUDES)
AC_SUBST(APR_INCLUDES)
AC_SUBST(APU_INCLUDES)
AC_SUBST(APXS_CFLAGS)
AC_SUBST(APXS_BIN)
fi
])
--- NEW FILE: outoforder.m4 ---
dnl m4 for utility macros used by all out of order projects
dnl this writes a "config.nice" file which reinvokes ./configure with all
dnl of the arguments. this is different from config.status which simply
dnl regenerates the output files. config.nice is useful after you rebuild
dnl ./configure (via autoconf or autogen.sh)
AC_DEFUN(OOO_CONFIG_NICE,[
echo configure: creating $1
rm -f $1
cat >$1<<EOF
#! /bin/sh
#
# Created by configure
EOF
for arg in [$]0 "[$]@"; do
echo "\"[$]arg\" \\" >> $1
done
echo '"[$]@"' >> $1
chmod +x $1
])
--- NEW FILE: apache.m4 ---
dnl Check for Apache, APR and APU
dnl CHECK_PATH_APACHE()
AC_DEFUN(CHECK_APACHE,
[dnl
AC_MSG_CHECKING(for --with-apxs)
AC_ARG_WITH(
apxs,
[AC_HELP_STRING([--with-apxs=PATH],[Path to apxs])],
[
if test -x "$withval"
then
AC_MSG_RESULT([$withval executable, good])
APXS_BIN=$withval
else
echo
AC_MSG_ERROR([$withval not found or not executable])
fi
],
AC_MSG_RESULT(no))
# if no apxs found yet, check /usr/local/apache/sbin
# since it's the default Apache location
if test -z "$APXS_BIN"; then
test_paths="/usr/local/apache/sbin /usr/local/apache/bin /usr/local/apache2/bin"
test_paths="${test_paths} /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin"
for x in $test_paths ; do
AC_MSG_CHECKING(for apxs in $x)
if test -x "${x}/apxs"; then
APXS_BIN="${x}/apxs"
AC_MSG_RESULT([found it! Use --with-apxs to specify another.])
break
else
AC_MSG_RESULT(no)
fi
done
fi
# last resort
if test -z "$APXS_BIN"; then
AC_MSG_CHECKING(for apxs in your PATH)
AC_PATH_PROG(APXS_BIN, apxs)
if test -n "$APXS_BIN"; then
AC_MSG_RESULT([found ${APXS_BIN}. Use --with-apxs to specify another.])
fi
fi
if test -z "$APXS_BIN"; then
AC_MSG_ERROR([**** apxs was not found, DSO compilation will not be available.])
else
AC_MSG_CHECKING(for Apache module directory)
AP_LIBEXECDIR=`${APXS_BIN} -q LIBEXECDIR`
AC_MSG_RESULT($AP_LIBEXECDIR)
AC_MSG_CHECKING([for Apache include directory])
AP_INCLUDES="-I`${APXS_BIN} -q INCLUDEDIR`"
AC_MSG_RESULT($AP_INCLUDES)
AC_MSG_CHECKING([for apr-config --includes])
APR_BINDIR=`$APXS_BIN -q APR_BINDIR`
APR_INCLUDES="`$APR_BINDIR/apr-config --includes`"
AC_MSG_RESULT($APR_INCLUDES)
AC_MSG_CHECKING([for apu-config --includes])
APU_BINDIR=`$APXS_BIN -q APU_BINDIR`
APU_INCLUDES="`$APU_BINDIR/apu-config --includes`"
AC_MSG_RESULT($APU_INCLUDES)
AC_MSG_CHECKING([for CFLAGS from APXS])
for flag in CFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS NOTEST_CFLAGS; do
APXS_CFLAGS="$APXS_CFLAGS `$APXS_BIN -q $flag`"
done
AC_MSG_RESULT($APXS_CFLAGS)
AC_SUBST(AP_LIBEXECDIR)
AC_SUBST(AP_INCLUDES)
AC_SUBST(APR_INCLUDES)
AC_SUBST(APU_INCLUDES)
AC_SUBST(APXS_CFLAGS)
AC_SUBST(APXS_BIN)
fi
])
|