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 | |
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-- | ChangeLog | 6 | ||||
-rw-r--r-- | acinclude.m4 | 36 | ||||
-rw-r--r-- | aclocal.m4 | 94 | ||||
-rwxr-xr-x | configure | 136 |
4 files changed, 219 insertions, 53 deletions
@@ -1,3 +1,7 @@ +2003-10-01 Akira TAGOH <at@gclab.org> + + * acinclude.m4 (AC_W3M_SSL): use PKG_CHECK_MODULES + 2003-09-29 Fumitoshi UKAI <ukai@debian.or.jp> * Makefile.in (distclean): remove posubst @@ -8108,4 +8112,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.876 2003/09/29 16:34:08 ukai Exp $ +$Id: ChangeLog,v 1.877 2003/09/30 15:42:38 ukai Exp $ 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"], @@ -499,23 +499,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"], @@ -1611,6 +1613,64 @@ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + # gettext.m4 serial 20 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION W3M W3M_LANG AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB PERL NKF MAN build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os W3M_TARGET W3M_LIBS USE_M17N USE_UNICODE WCTARGET WCCFLAGS DISPLAY_CHARSET SYSTEM_CHARSET DOCUMENT_CHARSET POSUBST POLANG MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB INTLTARGET NLSTARGET USE_COLOR USE_ANSI_COLOR USE_BG_COLOR USE_IMAGE USE_W3MIMG_X11 USE_W3MIMG_FB W3MIMGDISPLAY_SETUID INSTALL_W3MIMGDISPLAY USE_GDKPIXBUF USE_IMLIB USE_IMLIB2 IMGTARGETS IMGOBJS IMGX11CFLAGS IMGX11LDFLAGS IMGFBCFLAGS IMGFBLDFLAGS USE_XFACE uncompface KEYMAP_FILE HELP_FILE KEYBIND USE_MENU USE_MOUSE USE_HISTORY USE_ALARM USE_COOKIE USE_DIGEST_AUTH USE_NNTP USE_GOPHER INET6 USE_DICT USE_HELP_CGI USE_EXTERNAL_URI_LOADER USE_W3MMAILER USE_MIGEMO DEF_MIGEMO_COMMAND DEF_EDITOR DEF_MAILER DEF_EXT_BROWSER USE_SSL USE_SSL_VERIFY USE_W3M USE_SYSMOUSE AUXBIN_TARGETS EGREP USE_BINMODE_STREAM HAVE_SYS_ERRLIST HAVE_SIGSETJMP RETSIGTYPE SIGNAL_RETURN RC_DIR DOCDIRS CURRENT_VERSION LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE VERSION W3M W3M_LANG AWK CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB PERL NKF MAN build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os W3M_TARGET W3M_LIBS USE_M17N USE_UNICODE WCTARGET WCCFLAGS DISPLAY_CHARSET SYSTEM_CHARSET DOCUMENT_CHARSET POSUBST POLANG MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB INTLTARGET NLSTARGET USE_COLOR USE_ANSI_COLOR USE_BG_COLOR USE_IMAGE USE_W3MIMG_X11 USE_W3MIMG_FB W3MIMGDISPLAY_SETUID INSTALL_W3MIMGDISPLAY USE_GDKPIXBUF USE_IMLIB USE_IMLIB2 IMGTARGETS IMGOBJS IMGX11CFLAGS IMGX11LDFLAGS IMGFBCFLAGS IMGFBLDFLAGS USE_XFACE uncompface KEYMAP_FILE HELP_FILE KEYBIND USE_MENU USE_MOUSE USE_HISTORY USE_ALARM USE_COOKIE USE_DIGEST_AUTH USE_NNTP USE_GOPHER INET6 USE_DICT USE_HELP_CGI USE_EXTERNAL_URI_LOADER USE_W3MMAILER USE_MIGEMO DEF_MIGEMO_COMMAND DEF_EDITOR DEF_MAILER DEF_EXT_BROWSER USE_SSL USE_SSL_VERIFY PKG_CONFIG SSL_CFLAGS SSL_LIBS USE_W3M USE_SYSMOUSE AUXBIN_TARGETS EGREP USE_BINMODE_STREAM HAVE_SYS_ERRLIST HAVE_SIGSETJMP RETSIGTYPE SIGNAL_RETURN RC_DIR DOCDIRS CURRENT_VERSION LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -5737,25 +5737,122 @@ if test x"$with_ssl" != xno; then #define USE_SSL 1 _ACEOF - echo "$as_me:$LINENO: checking for SSL library/header" >&5 -echo $ECHO_N "checking for SSL library/header... $ECHO_C" >&6 - test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" - echo "$as_me:$LINENO: result: $with_ssl" >&5 -echo "${ECHO_T}$with_ssl" >&6 - 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" + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for openssl" >&5 +echo $ECHO_N "checking for openssl... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "openssl" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking SSL_CFLAGS" >&5 +echo $ECHO_N "checking SSL_CFLAGS... $ECHO_C" >&6 + SSL_CFLAGS=`$PKG_CONFIG --cflags "openssl"` + echo "$as_me:$LINENO: result: $SSL_CFLAGS" >&5 +echo "${ECHO_T}$SSL_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking SSL_LIBS" >&5 +echo $ECHO_N "checking SSL_LIBS... $ECHO_C" >&6 + SSL_LIBS=`$PKG_CONFIG --libs "openssl"` + echo "$as_me:$LINENO: result: $SSL_LIBS" >&5 +echo "${ECHO_T}$SSL_LIBS" >&6 + else + SSL_CFLAGS="" + SSL_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + SSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` + 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" + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" fi - done + fi + + if test $succeeded = yes; then + : + else + + echo "$as_me:$LINENO: checking for SSL library/header" >&5 +echo $ECHO_N "checking for SSL library/header... $ECHO_C" >&6 + test x"$with_ssl" = xyes && with_ssl="/usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local" + echo "$as_me:$LINENO: result: $with_ssl" >&5 +echo "${ECHO_T}$with_ssl" >&6 + 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 + + fi + echo "$as_me:$LINENO: checking for SSL_new in -lssl" >&5 echo $ECHO_N "checking for SSL_new in -lssl... $ECHO_C" >&6 if test "${ac_cv_lib_ssl_SSL_new+set}" = set; then @@ -9926,6 +10023,9 @@ s,@DEF_MAILER@,$DEF_MAILER,;t t s,@DEF_EXT_BROWSER@,$DEF_EXT_BROWSER,;t t s,@USE_SSL@,$USE_SSL,;t t s,@USE_SSL_VERIFY@,$USE_SSL_VERIFY,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@SSL_CFLAGS@,$SSL_CFLAGS,;t t +s,@SSL_LIBS@,$SSL_LIBS,;t t s,@USE_W3M@,$USE_W3M,;t t s,@USE_SYSMOUSE@,$USE_SYSMOUSE,;t t s,@AUXBIN_TARGETS@,$AUXBIN_TARGETS,;t t |