2
0
Fork 0

Fix autobuild openssl handling

This commit is contained in:
Stefan Bühler 2009-09-11 22:36:24 +02:00
parent b696fcbe0d
commit c8d60eacd8
2 changed files with 13 additions and 3 deletions

View File

@ -98,7 +98,7 @@ if test "$WITH_LUA" != "no"; then
USE_LUA=true
fi
AM_CONDITIONAL(USE_LUA, test "$USE_LUA" = "true")
AM_CONDITIONAL([USE_LUA], [test "$USE_LUA" = "true"])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@ -193,15 +193,23 @@ if test "x$use_openssl" = "xyes"; then
AC_CHECK_HEADERS([openssl/ssl.h])
OLDLIBS="$LIBS"
AC_CHECK_LIB(crypto, BIO_f_base64, [
AC_CHECK_LIB(ssl, SSL_new, [ OPENSSL_LIBS="$OPENSSL_LIBS -lssl -lcrypto"
AC_DEFINE(HAVE_LIBSSL, [], [Have libssl]) ], [], [ -lcrypto "$DL_LIB" ])
AC_CHECK_LIB(ssl, SSL_new, [
OPENSSL_LIBS="$OPENSSL_LIBS -lssl -lcrypto"
have_openssl=yes
AC_DEFINE(HAVE_OPENSSL, [], [Have openssl])
], [], [ -lcrypto "$DL_LIB" ])
], [], [])
LIBS="$OLDLIBS"
if test "x$have_openssl" != "xyes"; then
AC_MSG_ERROR(Couldn't find openssl)
fi
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
fi
AM_CONDITIONAL([USE_OPENSSL], [test "x$have_openssl" = "xyes"])
# check for extra compiler options (warning options)
if test "${GCC}" = "yes"; then

View File

@ -58,10 +58,12 @@ libmod_fortune_la_SOURCES = mod_fortune.c
libmod_fortune_la_LDFLAGS = $(common_ldflags)
libmod_fortune_la_LIBADD = $(common_libadd)
if USE_OPENSSL
install_libs += libmod_openssl.la
libmod_openssl_la_SOURCES = mod_openssl.c
libmod_openssl_la_LDFLAGS = $(common_ldflags) $(OPENSSL_LIBS)
libmod_openssl_la_LIBADD = $(common_libadd)
endif
install_libs += libmod_redirect.la
libmod_redirect_la_SOURCES = mod_redirect.c