# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([mod_chxj],[0.12.7-1])
+AC_INIT([mod_chxj],[0.12.38],[konn@users.sourceforge.jp])
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([src/mod_chxj.c])
AC_CANONICAL_TARGET
dnl ==================================================
dnl
+dnl OpenSSL
+dnl
+dnl ==================================================
+OPENSSL_PATH=""
+AC_ARG_WITH(openssl,
+ APR_HELP_STRING([--with-openssl=PATH],[Path to OpenSSL (eg. /usr/local/ssl)]),
+[
+ if test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-openssl requires a path])
+ else
+ openssl_prefix=$withval
+
+ if test "x$openssl_prefix" != "x" -a ! -d "$openssl_prefix"; then
+ AC_MSG_ERROR('--with-openssl requires a path to a directory')
+ fi
+
+ CPPFLAGS="${CPPFLAGS} -I${openssl_prefix}/include"
+ LDFLAGS="${LDFLAGS} -L${openssl_prefix}/lib"
+ LDFLAGS="${LDFLAGS} -R${openssl_prefix}/lib"
+ OPENSSL_PATH="--with-openssl ${openssl_prefix}"
+ fi
+])
+
+dnl Look for OpenSSL
+AC_CHECK_HEADER([openssl/opensslv.h], [],
+ [AC_MSG_ERROR([We require OpenSSL; try --with-openssl])])
+
+dnl ==================================================
+dnl
dnl dump log for DEBUG
dnl
dnl ==================================================
LIBS="${LIBS} `${APU_CONFIG} --ldflags` `${APU_CONFIG} --libs` "
LIBS="${LIBS} ${MYSQL_COOKIE_LIBS}"
LIBS="${LIBS} ${MEMCACHE_COOKIE_LIBS} "
+LIBS="${LIBS} -lcrypto -lssl "
CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
CFLAGS="${CFLAGS} `${APR_CONFIG} --includes` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
CFLAGS="${CFLAGS} `${APU_CONFIG} --includes`"
##include "ap_config.h"
##endif
#]])
-AC_CHECK_HEADERS([ap_regex.h],use_pcre_flag="no",use_pcre_flag="yes")
+AC_CHECK_HEADERS([ap_regex.h],use_pcre_flag="no",use_pcre_flag="yes",
+[[#ifdef HAVE_APR_H
+# include "apr.h"
+#endif
+#ifdef HAVE_AP_CONFIG_H
+# include "ap_config.h"
+#endif
+]])
if test "x$use_pcre_flag" = "xyes" ; then
if test "x$with_pcre_config" = "x" ; then
AC_PATH_PROG(PCRE_CONFIG, pcre-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
AC_SUBST(DDEFS)
AC_SUBST(LIBS)
AC_SUBST(CFLAGS)
+AC_SUBST(OPENSSL_PATH)
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile support/centos/mod-chxj.spec])
AC_OUTPUT