aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-20 11:08:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-20 11:08:49 +0000
commit25739250c4330d9b04177f8e47476f2e2f99864f (patch)
treec73301077cfe270a393e26263b1870ac530aa863 /configure.in
parent4fa766a6f0ac30e2ca4f6c490f2d4b81fd98724c (diff)
enabled GPGME and OpenSSL support by default. Use pkg-config to detect OpenSSL.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@355 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in43
1 files changed, 27 insertions, 16 deletions
diff --git a/configure.in b/configure.in
index 94edc193..d6a3d717 100644
--- a/configure.in
+++ b/configure.in
@@ -97,8 +97,8 @@ AC_SUBST(faqdir)
dnl GPGME is used to support OpenPGP
AC_ARG_ENABLE(gpgme,
- [ --enable-gpgme Enable GnuPG support using GPGME [default=no]],
- [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=no])
+ [ --disable-gpgme Disable GnuPG support using GPGME],
+ [ac_cv_enable_gpgme=$enableval], [ac_cv_enable_gpgme=yes])
AC_MSG_CHECKING([whether to use GPGME])
if test $ac_cv_enable_gpgme = yes; then
AC_MSG_RESULT(yes)
@@ -112,7 +112,7 @@ fi
dnl for JPilot support in addressbook
dnl no check for libraries; these are dynamically loaded
AC_ARG_ENABLE(jpilot,
- [ --enable-jpilot Enable JPilot support [default=no]],
+ [ --enable-jpilot Enable JPilot support [[default=no]]],
[ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=no])
AC_MSG_CHECKING([whether to use JPilot])
if test "$ac_cv_enable_jpilot" = yes; then
@@ -138,7 +138,7 @@ fi
dnl for LDAP support in addressbook
dnl no check for libraries; dynamically loaded
AC_ARG_ENABLE(ldap,
- [ --enable-ldap Enable LDAP support [default=no]],
+ [ --enable-ldap Enable LDAP support [[default=no]]],
[ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=no])
AC_MSG_CHECKING([whether to use LDAP])
if test "$ac_cv_enable_ldap" = yes; then
@@ -181,21 +181,32 @@ fi
dnl Check for OpenSSL
AC_ARG_ENABLE(ssl,
- [ --enable-ssl Enable SSL support using OpenSSL [default=no]],
- [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=no])
+ [ --disable-ssl Disable SSL support using OpenSSL],
+ [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=yes])
AC_MSG_CHECKING([whether to use OpenSSL])
if test $ac_cv_enable_ssl = yes; then
AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([if openssl is available])
- LIBS="$LIBS -lssl -lcrypto"
- AC_TRY_LINK([
+ dnl First check with pkg-config
+ PKG_CHECK_MODULES(OPENSSL, openssl, [:], [:])
+ if test "x$OPENSSL_LIBS" != "x"; then
+ CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+ LIBS="$LIBS $OPENSSL_LIBS"
+ AC_MSG_CHECKING([if openssl is available])
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.)
+ else
+ dnl If pkg-config fails, run compile/link test.
+ AC_MSG_CHECKING([if openssl is available])
+ LIBS="$LIBS -lssl -lcrypto"
+ AC_TRY_LINK([
#include <openssl/opensslv.h>
-], [ return OPENSSL_VERSION_NUMBER; ],
- [ AC_MSG_RESULT(yes)
- AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
- [ AC_MSG_RESULT(no)
- LIBS="$ac_save_LIBS"
- ac_cv_enable_ssl=no ])
+], [ return OPENSSL_VERSION_NUMBER; ],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ],
+ [ AC_MSG_RESULT(no)
+ LIBS="$ac_save_LIBS"
+ ac_cv_enable_ssl=no ])
+ fi
else
AC_MSG_RESULT(no)
fi
@@ -212,7 +223,7 @@ AC_CHECK_LIB(xpg4, setlocale)
dnl for GThread support (currently disabled)
dnl AC_ARG_ENABLE(threads,
-dnl [ --enable-threads Enable multithread support [default=no]],
+dnl [ --enable-threads Enable multithread support [[default=no]]],
dnl [use_threads=$enableval], [use_threads=no])
AC_MSG_CHECKING([whether to use threads])