From 60f9107f5a4e68f6a4f22721cc4f43fb8575807f Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Tue, 06 Jan 2004 00:32:46 +0000 Subject: update m4 files release 1.92 --- diff --git a/CHANGELOG b/CHANGELOG index c50eb29..9660209 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.4 2004/01/04 03:23:21 urkle Exp $ +$Id: CHANGELOG,v 1.5 2004/01/06 00:32:46 urkle Exp $ TODO: * Port connection portion to other DBMS? Genericize the module? Start with @@ -13,15 +13,19 @@ TODO: * Directive to yes/no create ancillary tables (or just access table) * break module into separate code files separate DB implimentation into sub-modules via provider mechanism + separate module for SSL support * add document building to Makefile.in * backport patch for apache 1.3 * investigate thread safety issues (libmysqlclient_r) -* Get SSL logging working with apache 2.0 CHANGES: -1.92: ? +1.92: 2004-01-05 * fixed compilation issue with mysql 4.x where mysql_error returns const char * -* added mysql import script by Aaron Jenson +* Have SSL support compiling (though not really tested) +* updated configure macros to detect mod_ssl.h +* configure now uses --with-apxs instead of --with-apache +* Added documentation from 1.19b (needs to be update) +* Fixed an issue with dependencies in Makefile.in 1.91: 2003-12-23 * Added checks for MySQL to autoconf diff --git a/Makefile.in b/Makefile.in index e3c7142..7c00d0a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -112,7 +112,7 @@ $(builddir)/.deps: depend depend: $(SOURCES) $(HEADERS) if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \ - $(CC) -MM -MT $(TARGET) -I@APACHE_INCDIR@ $(INCLUDES) -DHAVE_CONFIG_H $(srcdir)/*.c > $(builddir)/.deps || true; \ + $(CC) -MM -I@APACHE_INCDIR@ $(INCLUDES) -DHAVE_CONFIG_H $(srcdir)/*.c > $(builddir)/.deps || true; \ fi include $(builddir)/.deps @@ -128,6 +128,7 @@ $(srcdir)/stamp-h.in: configure.ac aclocal.m4 echo timestamp > $(srcdir)/stamp-h.in config.h: stamp-h + stamp-h: config.h.in config.status ./config.status diff --git a/configure.ac b/configure.ac index 84fbf96..ed8e25d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Required initializer -AC_INIT(mod_log_sql, 1.91) +AC_INIT(mod_log_sql, 1.92) AC_PREREQ(2.53) AC_CONFIG_HEADERS(config.h) @@ -17,6 +17,15 @@ CHECK_PATH_APACHE($APACHE_VERSION, CHECK_PATH_MYSQL(:, AC_MSG_ERROR([*** Mysql client libraries not found!]) ) + +CHECK_PATH_MOD_SSL( + AC_DEFINE(WANT_SSL_LOGGING,,[Define if we want to compile in SSL support.]) + AC_MSG_WARN([*** Compilng with SSL support!]), + AC_MSG_WARN([*** Compiling without SSL support!]) + AC_MSG_WARN([*** enable with --enable-ssl to enable]) + AC_MSG_WARN([*** and --with-ssl-inc with the the directory for SSL headers]) + ) + AC_CHECK_HEADERS(limits.h) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) 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 v0.9.2