diff options
Diffstat (limited to 'm4/mod_ssl.m4')
-rw-r--r-- | m4/mod_ssl.m4 | 43 |
1 files changed, 43 insertions, 0 deletions
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 | ]) | ||