[ejabberd] AM_WITH_OPENSSL fix

Leif Johansson leifj at it.su.se
Mon Oct 25 22:48:08 MSD 2004


The AM_WITH_OPENSSL does not correctly detect headers in non-standard
prefixes.

	MVH leifj
-------------- next part --------------
Index: aclocal.m4
===================================================================
RCS file: /home/cvs/ejabberd/src/aclocal.m4,v
retrieving revision 1.3
diff -u -r1.3 aclocal.m4
--- aclocal.m4	26 Sep 2004 20:46:42 -0000	1.3
+++ aclocal.m4	25 Oct 2004 18:45:44 -0000
@@ -205,12 +205,16 @@
         SSL_LIBS="-L$ssl_prefix/lib -lcrypto"
         AC_CHECK_LIB(ssl, SSL_new, [ have_openssl=yes ], [ have_openssl=no ], [ $SSL_LIBS $SSL_CFLAGS ])
         if test x"$have_openssl" = xyes; then
-            AC_CHECK_HEADERS($ssl_prefix/include/openssl/ssl.h, have_openssl_h=yes)
+            save_CPPFLAGS=$CPPFLAGS
+            CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
+            AC_CHECK_HEADERS(openssl/ssl.h, have_openssl_h=yes)
+            CPPFLAGS=$save_CPPFLAGS
             if test x"$have_openssl_h" = xyes; then
                 have_openssl=yes
                 printf "openssl found in $ssl_prefix\n";
                 SSL_LIBS="-L$ssl_prefix/lib -lssl -lcrypto"
-                SSL_CFLAGS="-I$ssl_prefix/include/openssl -DHAVE_SSL"
+                CPPFLAGS="-I$ssl_prefix/lib $CPPFLAGS"
+                SSL_CFLAGS="-DHAVE_SSL"
                 break
             fi
         fi


More information about the ejabberd mailing list