From 60f9107f5a4e68f6a4f22721cc4f43fb8575807f Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Tue, 6 Jan 2004 00:32:46 +0000 Subject: update m4 files release 1.92 --- m4/apache.m4 | 10 +++++++--- m4/mod_ssl.m4 | 43 +++++++++++++++++++++++++++++++++++++++++++ m4/mysql.m4 | 20 ++++++++++---------- 3 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 m4/mod_ssl.m4 (limited to 'm4') diff --git a/m4/apache.m4 b/m4/apache.m4 index 8f0d200..1e29ac7 100644 --- a/m4/apache.m4 +++ b/m4/apache.m4 @@ -5,7 +5,7 @@ AC_DEFUN(CHECK_PATH_APACHE, [dnl AC_ARG_WITH( apxs, - [AC_HELP_STRING([--with-apxs[=DIR]],[Location to APXS binary])], + [AC_HELP_STRING([--with-apxs=PATH],[Location to APXS binary (default: /usr)])], apxs_prefix="$withval", apxs_prefix="/usr" ) @@ -17,7 +17,11 @@ AC_ARG_ENABLE(apachetest, AC_REQUIRE([AC_CANONICAL_TARGET]) PATH="$apxs_prefix:$apxs_prefix/bin:$apxs_prefix/sbin:$PATH" - AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) + if test -x $apxs_prefix && test ! -d $apxs_prefix; then + APXS_BIN=$apxs_prefix + else + AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) + fi min_apache_version=ifelse([$1], ,1.3.1,$1) AC_MSG_CHECKING(for Apache - version >= $min_apache_version) no_apxs="" @@ -96,7 +100,7 @@ int main (int argc, char *argv[]) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) - if test "APXS_BIN" = "no" ; then + if test "$APXS_BIN" = "no" ; then echo "*** The apxs binary installed by apache could not be found" echo "*** If apache is installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or use the --with-apxs configure option" diff --git a/m4/mod_ssl.m4 b/m4/mod_ssl.m4 new file mode 100644 index 0000000..ddd910f --- /dev/null +++ b/m4/mod_ssl.m4 @@ -0,0 +1,43 @@ +dnl CHECK_PATH_MOD_SSL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl Test for mod_ssl and openssl header directory. +dnl +AC_DEFUN(CHECK_PATH_MOD_SSL, +[dnl +AC_ARG_ENABLE( + ssl, + [AC_HELP_STRING([--enable-ssl],[Compile in SSL support])], + ssl_val=yes, + ssl_val=no + ) +AC_ARG_WITH( + ssl-inc, + [AC_HELP_STRING([--with-ssl-inc=DIR],[Location of SSL header files])], + ssl_incdir="$withval", + ssl_incdir="/usr/include" + ) + + if test "$ssl_val" = "yes"; then + ac_save_CFLAGS=$CFLAGS + ac_save_CPPFLAGS=$CPPFLAGS + MOD_SSL_CFLAGS="-I/usr/include/openssl $CFLAGS" + if test "x$ssl_incdir" != "x"; then + MOD_SSL_CFLAGS="-I$ssl_incdir -I$ssl_incdir/openssl $MOD_SSL_CFLAGS" + fi + + CFLAGS="-I$APACHE_INCDIR $MOD_SSL_CFLAGS $CFLAGS" + CPPFLAGS="-I$APACHE_INCDIR $MOD_SSL_CFLAGS $CPPFLAGS" + AC_CHECK_HEADERS([mod_ssl.h], + mod_ssl_h=yes + ) + CFLAGS=$ac_save_CFLAGS + CPPFLAGS=$ac_save_CPPFLAGS + if test "x$mod_ssl_h" = "x"; then + ifelse([$2], , :, [$2]) + else + AC_SUBST(MOD_SSL_CFLAGS) + ifelse([$1], , :, [$1]) + fi + else + ifelse([$2], , :, [$2]) + fi +]) diff --git a/m4/mysql.m4 b/m4/mysql.m4 index c4c4a3b..7892f88 100644 --- a/m4/mysql.m4 +++ b/m4/mysql.m4 @@ -19,18 +19,18 @@ AC_ARG_ENABLE( ac_save_CFLAGS=$CFLAGS ac_save_LDFLAGS=$LDFLAGS if test "x$mysql_prefix" != "x" && test "x$mysql_prefix" != "xyes"; then - MYSQL_LDFLAGS="-L${mysql_prefix}/lib -L${mysql_prefix}/lib/mysql -L${mysql_prefix}/mysql/lib" - MYSQL_CFLAGS="-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${mysql_prefix}/mysql/include" + MYSQL_LDFLAGS="-L${mysql_prefix}/lib -L${mysql_prefix}/lib/mysql -L${mysql_prefix}/mysql/lib" + MYSQL_CFLAGS="-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${mysql_prefix}/mysql/include" else - MYSQL_LDFLAGS="-L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" - MYSQL_CFLAGS="-I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" + MYSQL_LDFLAGS="-L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" + MYSQL_CFLAGS="-I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" fi CFLAGS="$CFLAGS $MYSQL_CFLAGS" LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" AC_CHECK_LIB(m, floor) AC_CHECK_LIB(z, gzclose) with_mysql="yes" - AC_DEFINE(WITH_MYSQL,,[with mysql]) + AC_DEFINE(WITH_MYSQL,1,[Define to 1 if we are compiling with mysql]) AC_CHECK_LIB(mysqlclient, mysql_init, , [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)]) MYSQL_LIBS=$LIBS @@ -48,14 +48,14 @@ AC_ARG_ENABLE( CFLAGS=$ac_save_CFLAGS LDFLAGS=$ac_save_LDFLAGS if test "x$no_mysql" = x; then - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) - echo "*** MySQL could not be found ***" - MYSQL_CFLAGS="" - MYSQL_LDFLAGS="" - MYSQL_LIBS="" + echo "*** MySQL could not be found ***" + MYSQL_CFLAGS="" + MYSQL_LDFLAGS="" + MYSQL_LIBS="" ifelse([$2], , :, [$2]) fi AC_SUBST(MYSQL_LDFLAGS) -- cgit