* configure.ac
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 3 Aug 2004 18:39:17 +0000 (18:39 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 3 Aug 2004 18:39:17 +0000 (18:39 +0000)
* m4/openssl.m4                 ** REMOVE **
        use pkg-config to get OpenSSL CFLAGS and LIBS
        (OpenSSL 0.9.7 is required now)

ChangeLog.claws
configure.ac
m4/openssl.m4 [deleted file]

index 96463a7..ace747e 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-03 [christoph]
+
+       * configure.ac
+       * m4/openssl.m4                 ** REMOVE **
+               use pkg-config to get OpenSSL CFLAGS and LIBS
+               (OpenSSL 0.9.7 is required now)
+
 2004-08-02 [paul]      0.9.12cvs40
 
        * AUTHORS
index c386fc5..8c4b698 100644 (file)
@@ -235,7 +235,14 @@ else
 fi
 
 dnl Check for OpenSSL
-AM_PATH_OPENSSL
+AC_ARG_ENABLE(openssl,
+       [  --enable-openssl    Attempt to use OpenSSL for SSL support.],
+       [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
+if test x"$ac_cv_enable_openssl" = xyes; then
+       PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
+fi
+AC_SUBST(OPENSSL_CFLAGS)
+AC_SUBST(OPENSSL_LIBS)
 
 dnl password encryption
 OLDLIBS=$LIBS
@@ -459,12 +466,12 @@ if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
        PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.4.2 gtkmathview < 0.5, :, ac_cv_enable_mathml_viewer_plugin=no)
 
        if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
-               AC_SUBST(GTK_MATH_VIEW_CFLAGS)
-               AC_SUBST(GTK_MATH_VIEW_LIBS)
 
                PLUGINS="mathml-viewer $PLUGINS"
        fi
 fi
+AC_SUBST(GTK_MATH_VIEW_CFLAGS)
+AC_SUBST(GTK_MATH_VIEW_LIBS)
 AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
 
 dnl --- Image Viewer ---
@@ -527,13 +534,13 @@ if test x"$ac_cv_enable_clamav_plugin" = xyes; then
        AC_CHECK_HEADERS(clamav.h, :, ac_cv_enable_clamav_plugin=no)
        if test x"$ac_cv_enable_clamav_plugin" = xyes; then
                CLAMAV_LIBS="${clamav_lib}"
-               AC_SUBST(CLAMAV_LIBS)
 
                PLUGINS="clamav $PLUGINS"
        else
                AC_MSG_NOTICE([clamav library not found, will not build clamav plugin])
        fi
 fi
+AC_SUBST(CLAMAV_LIBS)
 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
 
 dnl ****************************
diff --git a/m4/openssl.m4 b/m4/openssl.m4
deleted file mode 100644 (file)
index fea4649..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-dnl ******************************
-dnl OpenSSL
-dnl ******************************
-
-AC_DEFUN([AM_PATH_OPENSSL],
-[dnl
-       USE_OPENSSL=0
-
-       AC_ARG_ENABLE(openssl, [  --enable-openssl        Attempt to use OpenSSL for SSL support.],
-               [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=no])
-
-       dnl detect OpenSSL
-       if test "x${ac_cv_enable_openssl}" != "xno"; then
-               AC_ARG_WITH(openssl-includes, [  --with-openssl-includes=PREFIX     Location of OpenSSL includes.],
-                       with_openssl_includes="$withval", with_openssl_includes="/usr/include")
-               have_openssl_includes="no"
-               if test "x${with_openssl_includes}" != "xno"; then
-                       CPPFLAGS_save="$CPPFLAGS"
-               
-                       AC_MSG_CHECKING(for OpenSSL includes)
-                       AC_MSG_RESULT("")
-               
-                       CPPFLAGS="$CPPFLAGS -I$with_openssl_includes"
-                       AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h, [ openssl_includes="yes" ])
-                       CPPFLAGS="$CPPFLAGS_save"
-               
-                       if test "x{$openssl_includes}" != "xno" -a "x{$openssl_includes}" != "x"; then
-                               have_openssl_includes="yes"
-                               OPENSSL_CFLAGS="-I$with_openssl_includes"
-                       else
-                               OPENSSL_CFLAGS=""
-                       fi
-               else
-                       AC_MSG_CHECKING(for OpenSSL includes)
-                       AC_MSG_RESULT(no)
-               fi
-       
-               AC_ARG_WITH(openssl-libs, [  --with-openssl-libs=PREFIX         Location of OpenSSL libs.],
-                       with_openssl_libs="$withval")
-               if test "x${with_openssl_libs}" != "xno" -a "x${have_openssl_includes}" != "xno"; then
-                       case $with_openssl_libs in
-                       ""|-L*) ;;
-                       *) with_openssl_libs="-L$with_openssl_libs" ;;
-                       esac
-       
-                       AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl", DL_LIBS="")
-                       AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs,
-                       [
-                               LIBS_save="$LIBS"
-                               LIBS="$LIBS $with_openssl_libs -lssl -lcrypto $DL_LIBS"
-                               AC_TRY_LINK_FUNC(SSL_read, openssl_libs="yes", openssl_libs="no")
-                               LIBS="$LIBS_save"
-                       ])
-                       if test "x${openssl_libs}" != "xno"; then
-                               AC_DEFINE(USE_OPENSSL, 1, [Define if you use OpenSSL to support SSL])
-                               USE_OPENSSL=1
-                               msg_ssl="yes (OpenSSL)"
-                               OPENSSL_LIBS="$with_openssl_libs -lssl -lcrypto $DL_LIBS"
-                       else
-                               OPENSSL_CFLAGS=""
-                               OPENSSL_LIBS=""
-                       fi
-               else
-                       AC_MSG_CHECKING(for OpenSSL libraries)
-                       AC_MSG_RESULT(no)
-               fi
-       else
-               OPENSSL_CFLAGS=""
-               OPENSSL_LIBS=""
-               ac_cv_enable_openssl="no"
-       fi
-
-       AC_SUBST(OPENSSL_CFLAGS)
-       AC_SUBST(OPENSSL_LIBS)
-])
\ No newline at end of file