From 8d6d7ac732c00839b39af2fdf050751ad80e2f5e Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Thu, 29 Apr 2004 17:12:36 +0000 Subject: moved m4 files to separate repository --- m4/apache.m4 | 186 ---------------------------------------------------------- m4/mod_ssl.m4 | 50 ---------------- m4/mysql.m4 | 64 -------------------- 3 files changed, 300 deletions(-) delete mode 100644 m4/apache.m4 delete mode 100644 m4/mod_ssl.m4 delete mode 100644 m4/mysql.m4 (limited to 'm4') diff --git a/m4/apache.m4 b/m4/apache.m4 deleted file mode 100644 index ef9ce90..0000000 --- a/m4/apache.m4 +++ /dev/null @@ -1,186 +0,0 @@ -dnl TEST_APACHE_VERSION(RELEASE, [MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for Apache -dnl -AC_DEFUN(TEST_APACHE_VERSION, -[dnl - AC_REQUIRE([AC_CANONICAL_TARGET]) - releasetest=$1 - min_apache_version="$2" - no_apache="" - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $APACHE_CFLAGS" - if test $releasetest -eq 20; then - CFLAGS="$CFLAGS -I$APU_INCDIR -I$APR_INCDIR" - fi - - AC_TRY_RUN([ -#include -#include -#include -#include "httpd.h" - -#ifndef AP_SERVER_BASEREVISION - #define AP_SERVER_BASEREVISION SERVER_BASEREVISION -#endif - -char* my_strdup (char *str) -{ - char *new_str; - - if (str) { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } else - new_str = NULL; - - return new_str; -} - -int main (int argc, char *argv[]) -{ - int major1, minor1, micro1; - int major2, minor2, micro2; - char *tmp_version; - - { FILE *fp = fopen("conf.apachetest", "a"); if ( fp ) fclose(fp); } - - tmp_version = my_strdup("$min_apache_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major1, &minor1, µ1) != 3) { - printf("%s, bad version string\n", "$min_apache_version"); - exit(1); - } - tmp_version = my_strdup(AP_SERVER_BASEREVISION); - if (sscanf(tmp_version, "%d.%d.%d", &major2, &minor2, µ2) != 3) { - printf("%s, bad version string\n", AP_SERVER_BASEREVISION); - exit(1); - } - if ((major2 > major1) || - ((major2 == major1) && (minor2 > minor1)) || - ((major2 == major1) && (minor2 == minor1) && (micro2 >= micro1))) - { - exit(0); - } else { - /*printf("\n*** This module requires apache version %d.%d.%d or greater\n", - major1, minor1, micro1); - printf("*** I found version %d.%d.%d. Please verify the installation directory\n", - major2, minor2, micro2); - printf("*** of apache with the --with-apxs configure option.\n");*/ - exit(1); - } -} - -],, no_apache=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$no_apache" = x ; then - ifelse([$3], , :, [$3]) - else - if test -f conf.apachetest ; then - : - else - echo "*** Could not run Apache test program, checking why..." - CFLAGS="$CFLAGS APACHE_CFLAGS" - AC_TRY_LINK([ -#include -#include "httpd.h" - -int main(int argc, char *argv[]) -{ return 0; } -#undef main -#define main K_and_R_C_main -], [ return 0; ], - [ echo "*** The test program compiled, but failed to run. Check config.log" ], - [ echo "*** The test program failed to compile or link. Check config.log" ]) - CFLAGS="$ac_save_CFLAGS" - fi - ifelse([$4], , :, [$4]) - fi - rm -f conf.apachetest -]) - -dnl CHECK_PATH_APACHE([MINIMUM13-VERSION [, MINIMUM20-VERSION [, -dnl ACTION-IF-FOUND13 [, ACTION-IF-FOUND20 [, ACTION-IF-NOT-FOUND]]]) -dnl Test for Apache apxs -dnl -AC_DEFUN(CHECK_PATH_APACHE, -[dnl -AC_ARG_WITH( - apxs, - [AC_HELP_STRING([--with-apxs=PATH],[Location to APXS binary (default: /usr)])], - apxs_prefix="$withval", - apxs_prefix="/usr" - ) -AC_ARG_ENABLE( - apachetest, - [AC_HELP_STRING([--disable-apachetest],[Do not try to compile and run apache version test program])], - , - enable_apachetest=yes - ) - - PATH="$apxs_prefix:$apxs_prefix/bin:$apxs_prefix/sbin:$PATH" - if test -x $apxs_prefix -a ! -d $apxs_prefix; then - APXS_BIN=$apxs_prefix - else - AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) - fi - min_apache13_version=ifelse([$1], ,no,$1) - min_apache20_version=ifelse([$2], ,no,$2) - no_apxs="" - if test "$APXS_BIN" = "no"; then - AC_MSG_ERROR([*** The apxs binary installed by apache could not be found!]) - AC_MSG_ERROR([*** If apache is installed in PREFIX, make sure PREFIX/bin is in]) - AC_MSG_ERROR([*** your path, or use the --with-apxs configure option]) - else - APACHE_INCDIR=`$APXS_BIN -q INCLUDEDIR` - APR_INCDIR=`$APXS_BIN -q APR_INCLUDEDIR` - APU_INCDIR=`$APXS_BIN -q APU_INCLUDEDIR` - APACHE_CPPFLAGS=`$APXS_BIN -q CPPFLAGS` - APACHE_CPPFLAGS="$APACHE_CPPFLAGS -I$APACHE_INCDIR" - APACHE_CFLAGS=`$APXS_BIN -q CFLAGS` - APACHE_CFLAGS="$APACHE_CFLAGS -I$APACHE_INCDIR" - APACHE_MODDIR=`$APXS_BIN -q LIBEXECDIR` - - if test "x$enable_apachetest" = "xyes" ; then - if test "$min_apache20_version" != "no"; then - AC_MSG_CHECKING(for Apache 2.0 version >= $min_apache20_version) - TEST_APACHE_VERSION(20,$min_apache20_version, - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_APACHE20,1,[Define to 1 if we are compiling with Apache 2.0.x]) - APACHE_VERSION="2.0" - APXS_EXTENSION=.la - APACHE_CFLAGS="$APACHE_CFLAGS -I$APU_INCDIR -I$APR_INCDIR" - APACHE_CPPFLAGS="$APACHE_CPPFLAGS -I$APU_INCDIR -I$APR_INCDIR" - APACHE_DEFS="-DWITH_APACHE20" - ifelse([$4], , , $4), - AC_MSG_RESULT(no) - if test "x$min_apache13_version" = "xno"; then - ifelse([$5], , , $5) - fi - ) - fi - if test "$min_apache13_version" != "no" -a "x$APACHE_VERSION" = "x"; then - AC_MSG_CHECKING(for Apache 1.3 version >= $min_apache13_version) - TEST_APACHE_VERSION(13,$min_apache13_version, - AC_MSG_RESULT(yes) - AC_DEFINE(WITH_APACHE13,1,[Define to 1 if we are compiling with Apache 1.3.x]) - APACHE_VERSION="1.3" - APXS_EXTENSION=.so - APACHE_CFLAGS="-g $APACHE_CFLAGS" - APACHE_DEFS="-DWITH_APACHE13" - ifelse([$3], , , $3), - AC_MSG_RESULT(no) - ifelse([$5], , , $5) - ) - fi - fi - AC_SUBST(APACHE_DEFS) - AC_SUBST(APACHE_CFLAGS) - AC_SUBST(APACHE_CPPFLAGS) - AC_SUBST(APACHE_INCDIR) - AC_SUBST(APR_INCDIR) - AC_SUBST(APU_INCDIR) - AC_SUBST(APACHE_MODDIR) - AC_SUBST(APACHE_VERSION) - AC_SUBST(APXS_EXTENSION) - fi -]) diff --git a/m4/mod_ssl.m4 b/m4/mod_ssl.m4 deleted file mode 100644 index c431bce..0000000 --- a/m4/mod_ssl.m4 +++ /dev/null @@ -1,50 +0,0 @@ -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", - ) -AC_ARG_WITH( - db-inc, - [AC_HELP_STRING([--with-db-inc=DIR],[Location of DB header files])], - db_incdir="$withval", - db_incdir="/usr/include/db1" - ) - - if test "x$ssl_val" = "xyes"; then - ac_save_CFLAGS=$CFLAGS - ac_save_CPPFLAGS=$CPPFLAGS - MOD_SSL_CFLAGS="-I/usr/include/openssl" - if test "x$ssl_incdir" != "x"; then - MOD_SSL_CFLAGS="-I$ssl_incdir -I$ssl_incdir/openssl $MOD_SSL_CFLAGS" - fi - if test "x$db_incdir" != "x"; then - MOD_SSL_CFLAGS="-I$db_incdir $MOD_SSL_CFLAGS" - fi - CFLAGS="$APACHE_CFLAGS $APACHE_CPPFLAGS $MOD_SSL_CFLAGS $CFLAGS" - CPPFLAGS="$APACHE_CFLAGS $APACHE_CPPFLAGS $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 deleted file mode 100644 index 7892f88..0000000 --- a/m4/mysql.m4 +++ /dev/null @@ -1,64 +0,0 @@ -dnl CHECK_PATH_MYSQL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUNT]]) -dnl Check for MySQL Libs -dnl -AC_DEFUN(CHECK_PATH_MYSQL, -[dnl -AC_ARG_WITH( - mysql, - [AC_HELP_STRING([--with-mysql],[Path to MySQL client library])], - mysql_prefix="$withval", - - ) -AC_ARG_ENABLE( - mysqltest, - [AC_HELP_STRING([--disble-mysqltest],[Do not try to compile and run mysql test program])], - , - enable_apachetest=yes) - - AC_REQUIRE([AC_CANONICAL_TARGET]) - 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" - 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" - 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,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 - AC_CHECK_FUNCS(mysql_real_escape_string) - AC_MSG_CHECKING(whether mysql clients can run) - AC_TRY_RUN([ - #include - #include - int main(void) - { - MYSQL *a = mysql_init(NULL); - return 0; - } - ], , no_mysql=yes,[echo $ac_n "cross compiling; assumed OK.... $ac_c"]) - CFLAGS=$ac_save_CFLAGS - LDFLAGS=$ac_save_LDFLAGS - if test "x$no_mysql" = x; then - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT(no) - echo "*** MySQL could not be found ***" - MYSQL_CFLAGS="" - MYSQL_LDFLAGS="" - MYSQL_LIBS="" - ifelse([$2], , :, [$2]) - fi - AC_SUBST(MYSQL_LDFLAGS) - AC_SUBST(MYSQL_CFLAGS) - AC_SUBST(MYSQL_LIBS) -]) -- cgit