[w3m-dev 04242] Re: Compile error when --without-ssl

Hiroyuki Ito <[email protected]> Mon, 21 May 2007 22:22:56 +0900 (JST)
Newsgroups gmane.comp.web.w3m.devel
Message-ID <[email protected]>

> --without-ssl 
>  configure  USE_DIGEST_AUTH  undef 
> 

digest_auth  ssl digest_auth 
 ssl 
AC_W3M_DIGEST_AUTH  AC_W3M_SSL 


autoconf configure 
 aclocal.m4  configure.ac 




Index: aclocal.m4
===================================================================
RCS file: /cvsroot/w3m/w3m/aclocal.m4,v
retrieving revision 1.43
diff -u -r1.43 aclocal.m4
--- aclocal.m4	7 Apr 2006 13:21:11 -0000	1.43
+++ aclocal.m4	21 May 2007 13:10:39 -0000
@@ -295,18 +295,6 @@
  AC_DEFINE_UNQUOTED(KEYBIND, $enable_keymap)])
 #
 # ----------------------------------------------------------------
-# AC_W3M_DIGEST_AUTH
-# ----------------------------------------------------------------
-AC_DEFUN([AC_W3M_DIGEST_AUTH],
-[AC_SUBST(USE_DIGEST_AUTH)
- AC_MSG_CHECKING(if digest auth is enabled)
- AC_ARG_ENABLE(digest_auth,
- [  --disable-digest-auth		disable digest auth],,
- [enable_digest_auth="yes"])
- test x"$enable_digest_auth" = xyes && AC_DEFINE(USE_DIGEST_AUTH)
- AC_MSG_RESULT($enable_digest_auth)])
-#
-# ----------------------------------------------------------------
 # AC_W3M_MIGEMO
 # ----------------------------------------------------------------
 AC_DEFUN([AC_W3M_MIGEMO],
@@ -487,9 +475,9 @@
  fi])
 #
 # ----------------------------------------------------------------
-# AC_W3M_SSL
+# AC_W3M_SSL_DIGEST_AUTH
 # ----------------------------------------------------------------
-AC_DEFUN([AC_W3M_SSL],
+AC_DEFUN([AC_W3M_SSL_DIGEST_AUTH],
 [AC_SUBST(USE_SSL)
 AC_SUBST(USE_SSL_VERIFY)
 AC_MSG_CHECKING(if SSL is suported)
@@ -531,7 +519,19 @@
     test x"$enable_sslverify" = xyes && AC_DEFINE(USE_SSL_VERIFY)
     AC_MSG_RESULT($enable_sslverify)
   fi
-fi])
+fi
+AC_SUBST(USE_DIGEST_AUTH)
+AC_MSG_CHECKING(if digest auth is enabled)
+AC_ARG_ENABLE(digest_auth,
+ [  --disable-digest-auth		disable digest auth],,
+ [enable_digest_auth="yes"])
+if test x"$enable_digest_auth" = xyes -a x"$w3m_ssl" = xfound; then
+  AC_DEFINE(USE_DIGEST_AUTH)
+else
+  enable_digest_auth="no"
+fi
+AC_MSG_RESULT($enable_digest_auth)
+])
 #
 # ----------------------------------------------------------------
 # AC_W3M_ALARM
Index: configure.ac
===================================================================
RCS file: /cvsroot/w3m/w3m/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- configure.ac	8 Apr 2006 11:15:57 -0000	1.4
+++ configure.ac	21 May 2007 13:10:39 -0000
@@ -69,7 +69,6 @@
 AC_W3M_ALARM
 
 AC_W3M_COOKIE
-AC_W3M_DIGEST_AUTH
 AC_W3M_NNTP
 AC_W3M_GOPHER
 
@@ -89,7 +88,7 @@
 done
 
 AC_W3M_IPv6
-AC_W3M_SSL
+AC_W3M_SSL_DIGEST_AUTH
 
 dnl Checks for libraries.
 AC_CHECK_FUNC(sqrt,,[AC_CHECK_LIB(m, sqrt)])