$OpenBSD: patch-configure,v 1.25 2012/08/30 14:28:22 ajacoutot Exp $

Our crypt(3) is in libc.

--- configure.orig	Wed Aug  8 16:35:42 2012
+++ configure	Wed Aug 29 10:06:28 2012
@@ -17292,7 +17292,7 @@ if test "${ac_cv_lib_intl_strftime+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -17325,7 +17325,7 @@ $as_echo "$ac_cv_lib_intl_strftime" >&6; }
 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
 
-LIBS="-lintl $LIBS"
+LIBS="-lintl -liconv $LIBS"
 fi
 
 fi
@@ -18713,74 +18713,12 @@ rm -f core conftest.err conftest.$ac_objext \
 
 LIBS=$LIBS_system
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt" >&5
-$as_echo_n "checking for crypt... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
- int main() {
-  char crypt();  crypt();
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
-$as_echo_n "checking for crypt in -lcrypt... " >&6; }
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $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 crypt ();
-int
-main ()
-{
-return crypt ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_lib_crypt_crypt=yes
-else
-  ac_cv_lib_crypt_crypt=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_crypt_crypt" >&5
-$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
-if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBCRYPT 1
 _ACEOF
 
-  LIBS="-lcrypt $LIBS"
 
-else
-  as_fn_error $? "required library libcrypt missing or unusable" "$LINENO" 5
-fi
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CRYPT_LIBS=$LIBS
-LIBS=$LIBS_system
-
-
 # Only specific links with uuid and dl, clients only with crypto and ssl for ssl connections
 SSL_LIBS=
 # TODO: version of ssl check??
@@ -18791,7 +18729,7 @@ if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then 
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl  $LIBS"
+LIBS="-lssl -lcrypto $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -19298,7 +19236,7 @@ if test "${ac_cv_lib_intl_gettext+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
+LIBS="-lintl -liconv $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
