diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/apache.m4 | 10 | ||||
-rw-r--r-- | m4/mod_ssl.m4 | 43 | ||||
-rw-r--r-- | m4/mysql.m4 | 20 |
3 files changed, 60 insertions, 13 deletions
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, | |||
5 | [dnl | 5 | [dnl |
6 | AC_ARG_WITH( | 6 | AC_ARG_WITH( |
7 | apxs, | 7 | apxs, |
8 | [AC_HELP_STRING([--with-apxs[=DIR]],[Location to APXS binary])], | 8 | [AC_HELP_STRING([--with-apxs=PATH],[Location to APXS binary (default: /usr)])], |
9 | apxs_prefix="$withval", | 9 | apxs_prefix="$withval", |
10 | apxs_prefix="/usr" | 10 | apxs_prefix="/usr" |
11 | ) | 11 | ) |
@@ -17,7 +17,11 @@ AC_ARG_ENABLE(apachetest, | |||
17 | 17 | ||
18 | AC_REQUIRE([AC_CANONICAL_TARGET]) | 18 | AC_REQUIRE([AC_CANONICAL_TARGET]) |
19 | PATH="$apxs_prefix:$apxs_prefix/bin:$apxs_prefix/sbin:$PATH" | 19 | PATH="$apxs_prefix:$apxs_prefix/bin:$apxs_prefix/sbin:$PATH" |
20 | AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) | 20 | if test -x $apxs_prefix && test ! -d $apxs_prefix; then |
21 | APXS_BIN=$apxs_prefix | ||
22 | else | ||
23 | AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) | ||
24 | fi | ||
21 | min_apache_version=ifelse([$1], ,1.3.1,$1) | 25 | min_apache_version=ifelse([$1], ,1.3.1,$1) |
22 | AC_MSG_CHECKING(for Apache - version >= $min_apache_version) | 26 | AC_MSG_CHECKING(for Apache - version >= $min_apache_version) |
23 | no_apxs="" | 27 | no_apxs="" |
@@ -96,7 +100,7 @@ int main (int argc, char *argv[]) | |||
96 | ifelse([$2], , :, [$2]) | 100 | ifelse([$2], , :, [$2]) |
97 | else | 101 | else |
98 | AC_MSG_RESULT(no) | 102 | AC_MSG_RESULT(no) |
99 | if test "APXS_BIN" = "no" ; then | 103 | if test "$APXS_BIN" = "no" ; then |
100 | echo "*** The apxs binary installed by apache could not be found" | 104 | echo "*** The apxs binary installed by apache could not be found" |
101 | echo "*** If apache is installed in PREFIX, make sure PREFIX/bin is in" | 105 | echo "*** If apache is installed in PREFIX, make sure PREFIX/bin is in" |
102 | echo "*** your path, or use the --with-apxs configure option" | 106 | 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 @@ | |||
1 | dnl CHECK_PATH_MOD_SSL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
2 | dnl Test for mod_ssl and openssl header directory. | ||
3 | dnl | ||
4 | AC_DEFUN(CHECK_PATH_MOD_SSL, | ||
5 | [dnl | ||
6 | AC_ARG_ENABLE( | ||
7 | ssl, | ||
8 | [AC_HELP_STRING([--enable-ssl],[Compile in SSL support])], | ||
9 | ssl_val=yes, | ||
10 | ssl_val=no | ||
11 | ) | ||
12 | AC_ARG_WITH( | ||
13 | ssl-inc, | ||
14 | [AC_HELP_STRING([--with-ssl-inc=DIR],[Location of SSL header files])], | ||
15 | ssl_incdir="$withval", | ||
16 | ssl_incdir="/usr/include" | ||
17 | ) | ||
18 | |||
19 | if test "$ssl_val" = "yes"; then | ||
20 | ac_save_CFLAGS=$CFLAGS | ||
21 | ac_save_CPPFLAGS=$CPPFLAGS | ||
22 | MOD_SSL_CFLAGS="-I/usr/include/openssl $CFLAGS" | ||
23 | if test "x$ssl_incdir" != "x"; then | ||
24 | MOD_SSL_CFLAGS="-I$ssl_incdir -I$ssl_incdir/openssl $MOD_SSL_CFLAGS" | ||
25 | fi | ||
26 | |||
27 | CFLAGS="-I$APACHE_INCDIR $MOD_SSL_CFLAGS $CFLAGS" | ||
28 | CPPFLAGS="-I$APACHE_INCDIR $MOD_SSL_CFLAGS $CPPFLAGS" | ||
29 | AC_CHECK_HEADERS([mod_ssl.h], | ||
30 | mod_ssl_h=yes | ||
31 | ) | ||
32 | CFLAGS=$ac_save_CFLAGS | ||
33 | CPPFLAGS=$ac_save_CPPFLAGS | ||
34 | if test "x$mod_ssl_h" = "x"; then | ||
35 | ifelse([$2], , :, [$2]) | ||
36 | else | ||
37 | AC_SUBST(MOD_SSL_CFLAGS) | ||
38 | ifelse([$1], , :, [$1]) | ||
39 | fi | ||
40 | else | ||
41 | ifelse([$2], , :, [$2]) | ||
42 | fi | ||
43 | ]) | ||
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( | |||
19 | ac_save_CFLAGS=$CFLAGS | 19 | ac_save_CFLAGS=$CFLAGS |
20 | ac_save_LDFLAGS=$LDFLAGS | 20 | ac_save_LDFLAGS=$LDFLAGS |
21 | if test "x$mysql_prefix" != "x" && test "x$mysql_prefix" != "xyes"; then | 21 | if test "x$mysql_prefix" != "x" && test "x$mysql_prefix" != "xyes"; then |
22 | MYSQL_LDFLAGS="-L${mysql_prefix}/lib -L${mysql_prefix}/lib/mysql -L${mysql_prefix}/mysql/lib" | 22 | MYSQL_LDFLAGS="-L${mysql_prefix}/lib -L${mysql_prefix}/lib/mysql -L${mysql_prefix}/mysql/lib" |
23 | MYSQL_CFLAGS="-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${mysql_prefix}/mysql/include" | 23 | MYSQL_CFLAGS="-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${mysql_prefix}/mysql/include" |
24 | else | 24 | else |
25 | 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" | 25 | 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" |
26 | 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" | 26 | 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" |
27 | fi | 27 | fi |
28 | CFLAGS="$CFLAGS $MYSQL_CFLAGS" | 28 | CFLAGS="$CFLAGS $MYSQL_CFLAGS" |
29 | LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" | 29 | LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" |
30 | AC_CHECK_LIB(m, floor) | 30 | AC_CHECK_LIB(m, floor) |
31 | AC_CHECK_LIB(z, gzclose) | 31 | AC_CHECK_LIB(z, gzclose) |
32 | with_mysql="yes" | 32 | with_mysql="yes" |
33 | AC_DEFINE(WITH_MYSQL,,[with mysql]) | 33 | AC_DEFINE(WITH_MYSQL,1,[Define to 1 if we are compiling with mysql]) |
34 | AC_CHECK_LIB(mysqlclient, mysql_init, , | 34 | AC_CHECK_LIB(mysqlclient, mysql_init, , |
35 | [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)]) | 35 | [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)]) |
36 | MYSQL_LIBS=$LIBS | 36 | MYSQL_LIBS=$LIBS |
@@ -48,14 +48,14 @@ AC_ARG_ENABLE( | |||
48 | CFLAGS=$ac_save_CFLAGS | 48 | CFLAGS=$ac_save_CFLAGS |
49 | LDFLAGS=$ac_save_LDFLAGS | 49 | LDFLAGS=$ac_save_LDFLAGS |
50 | if test "x$no_mysql" = x; then | 50 | if test "x$no_mysql" = x; then |
51 | AC_MSG_RESULT(yes) | 51 | AC_MSG_RESULT(yes) |
52 | ifelse([$1], , :, [$1]) | 52 | ifelse([$1], , :, [$1]) |
53 | else | 53 | else |
54 | AC_MSG_RESULT(no) | 54 | AC_MSG_RESULT(no) |
55 | echo "*** MySQL could not be found ***" | 55 | echo "*** MySQL could not be found ***" |
56 | MYSQL_CFLAGS="" | 56 | MYSQL_CFLAGS="" |
57 | MYSQL_LDFLAGS="" | 57 | MYSQL_LDFLAGS="" |
58 | MYSQL_LIBS="" | 58 | MYSQL_LIBS="" |
59 | ifelse([$2], , :, [$2]) | 59 | ifelse([$2], , :, [$2]) |
60 | fi | 60 | fi |
61 | AC_SUBST(MYSQL_LDFLAGS) | 61 | AC_SUBST(MYSQL_LDFLAGS) |