diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-09-30 15:42:38 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-09-30 15:42:38 +0000 |
commit | 742b489496684b3966e1c8907650fbea5b42cf54 (patch) | |
tree | a77cf9845b329bd69e6dcacc1b243ccc6e5af84d /acinclude.m4 | |
parent | distclean (diff) | |
download | w3m-742b489496684b3966e1c8907650fbea5b42cf54.tar.gz w3m-742b489496684b3966e1c8907650fbea5b42cf54.zip |
* acinclude.m4 (AC_W3M_SSL): use PKG_CHECK_MODULES
From: Akira TAGOH <at@gclab.org>
Diffstat (limited to '')
-rw-r--r-- | acinclude.m4 | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e92d7d8..8ec3ac3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -487,23 +487,25 @@ AC_ARG_WITH(ssl, AC_MSG_RESULT($with_ssl) if test x"$with_ssl" != xno; then AC_DEFINE(USE_SSL) - AC_MSG_CHECKING(for SSL library/header) - test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" - AC_MSG_RESULT($with_ssl) - for dir in $with_ssl - do - if test -f "$dir/include/openssl/ssl.h"; then - SSL_CFLAGS="$SSL_CFLAGS -I$dir/include/openssl" - if test "$dir" != "/usr"; then - SSL_CFLAGS="$SSL_CFLAGS -I$dir/include" - fi - elif test "$dir" != "/usr" -a -f "$dir/include/ssl.h"; then - SSL_CFLAGS="$SSL_CFLAGS -I$dir/include" - fi - if test "$dir" != "/usr" -a -f "$dir/lib/libssl.a"; then - SSL_LIBS="$SSL_LIBS -L$dir/lib" - fi - done + PKG_CHECK_MODULES(SSL, openssl,,[ + AC_MSG_CHECKING(for SSL library/header) + test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" + AC_MSG_RESULT($with_ssl) + for dir in $with_ssl + do + if test -f "$dir/include/openssl/ssl.h"; then + SSL_CFLAGS="$SSL_CFLAGS -I$dir/include/openssl" + if test "$dir" != "/usr"; then + SSL_CFLAGS="$SSL_CFLAGS -I$dir/include" + fi + elif test "$dir" != "/usr" -a -f "$dir/include/ssl.h"; then + SSL_CFLAGS="$SSL_CFLAGS -I$dir/include" + fi + if test "$dir" != "/usr" -a -f "$dir/lib/libssl.a"; then + SSL_LIBS="$SSL_LIBS -L$dir/lib" + fi + done + ]) AC_CHECK_LIB(ssl, SSL_new, [w3m_ssl="found"; CFLAGS="$CFLAGS $SSL_CFLAGS" W3M_LIBS="$W3M_LIBS $SSL_LIBS -lssl -lcrypto"], [w3m_ssl="not found"], |