pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/fetch/files Beside a missing , in the inner autoco...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb059b9bde9b
branches:  trunk
changeset: 569037:fb059b9bde9b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jan 04 16:50:43 2010 +0000

description:
Beside a missing , in the inner autoconf test, it looks like doing a
check twice with AC_CHECK_LIB (without and with OTHER-LIBRARIES) doesn't
work due to caching. So give up and just check separately for
-lssl/-lcrypto and hope for the best.

diffstat:

 net/fetch/files/configure    |  95 ++++++++++++++++++++-----------------------
 net/fetch/files/configure.ac |   7 +-
 2 files changed, 48 insertions(+), 54 deletions(-)

diffs (133 lines):

diff -r b5a1e9c48de3 -r fb059b9bde9b net/fetch/files/configure
--- a/net/fetch/files/configure Mon Jan 04 16:35:52 2010 +0000
+++ b/net/fetch/files/configure Mon Jan 04 16:50:43 2010 +0000
@@ -3626,6 +3626,51 @@
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_read in -lssl" >&5
+$as_echo_n "checking for SSL_read in -lssl... " >&6; }
+if test "${ac_cv_lib_ssl_SSL_read+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl -lcrypto $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char SSL_read ();
+int
+main ()
+{
+return SSL_read ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_ssl_SSL_read=yes
+else
+  ac_cv_lib_ssl_SSL_read=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_read" >&5
+$as_echo "$ac_cv_lib_ssl_SSL_read" >&6; }
+if test "x$ac_cv_lib_ssl_SSL_read" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSSL 1
+_ACEOF
+
+  LIBS="-lssl $LIBS"
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fetchGet in -lfetch" >&5
 $as_echo_n "checking for fetchGet in -lfetch... " >&6; }
 if test "${ac_cv_lib_fetch_fetchGet+set}" = set; then :
@@ -3669,56 +3714,6 @@
 
   LIBS="-lfetch $LIBS"
 
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fetchGet in -lfetch" >&5
-$as_echo_n "checking for fetchGet in -lfetch... " >&6; }
-if test "${ac_cv_lib_fetch_fetchGet+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfetch  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char fetchGet ();
-int
-main ()
-{
-return fetchGet ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_fetch_fetchGet=yes
-else
-  ac_cv_lib_fetch_fetchGet=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fetch_fetchGet" >&5
-$as_echo "$ac_cv_lib_fetch_fetchGet" >&6; }
-if test "x$ac_cv_lib_fetch_fetchGet" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBFETCH 1
-_ACEOF
-
-  LIBS="-lfetch $LIBS"
-
-else
-   -lssl -lcrypto
-fi
-
-
 fi
 
 
diff -r b5a1e9c48de3 -r fb059b9bde9b net/fetch/files/configure.ac
--- a/net/fetch/files/configure.ac      Mon Jan 04 16:35:52 2010 +0000
+++ b/net/fetch/files/configure.ac      Mon Jan 04 16:50:43 2010 +0000
@@ -1,4 +1,4 @@
-dnl $NetBSD: configure.ac,v 1.2 2009/11/19 22:55:53 joerg Exp $
+dnl $NetBSD: configure.ac,v 1.3 2010/01/04 16:50:43 joerg Exp $
 
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
@@ -15,9 +15,8 @@
 AC_CHECK_FUNCS([getpass getpassphrase setproctitle])
 AC_CHECK_LIB(socket, socket)
 AC_CHECK_LIB(nsl, gethostbyname)
-AC_CHECK_LIB(fetch, fetchGet, [], [
-    AC_CHECK_LIB(fetch, fetchGet, [], [] [-lssl -lcrypto])
-])
+AC_CHECK_LIB(ssl, SSL_read, [], [], [-lcrypto])
+AC_CHECK_LIB(fetch, fetchGet)
 
 case "$host_os" in
 netbsd)



Home | Main Index | Thread Index | Old Index