X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=configure.ac;h=d6edbef4335b9afd9c45718734912197dc8a85d4;hb=9c2c4eca89c1167fe190f9811214f784bbf40d6e;hp=9c55c33f4696af7aa36e04cd9ad06345bece9620;hpb=35e16ee9294f86a44a1803ce118a83be6f2c0be2;p=modchxj%2Fmod_chxj.git diff --git a/configure.ac b/configure.ac index 9c55c33f..d6edbef4 100644 --- a/configure.ac +++ b/configure.ac @@ -159,6 +159,35 @@ fi 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 ================================================== @@ -247,6 +276,7 @@ LIBS="${LIBS} `${APR_CONFIG} --ldflags` `${APR_CONFIG} --libs` " 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`" @@ -307,6 +337,7 @@ AC_SUBST(QDEFS) AC_SUBST(DDEFS) AC_SUBST(LIBS) AC_SUBST(CFLAGS) +AC_SUBST(OPENSSL_PATH) AC_CONFIG_FILES([Makefile src/Makefile support/centos/mod-chxj.spec])