[asterisk-commits] dlee: branch dlee/ari-authn r392970 - in /team/dlee/ari-authn: ./ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 26 11:38:52 CDT 2013


Author: dlee
Date: Wed Jun 26 11:38:50 2013
New Revision: 392970

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392970
Log:
Fixed configure script for Linux

Modified:
    team/dlee/ari-authn/configure.ac
    team/dlee/ari-authn/main/utils.c
    team/dlee/ari-authn/makeopts.in

Modified: team/dlee/ari-authn/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-authn/configure.ac?view=diff&rev=392970&r1=392969&r2=392970
==============================================================================
--- team/dlee/ari-authn/configure.ac (original)
+++ team/dlee/ari-authn/configure.ac Wed Jun 26 11:38:50 2013
@@ -2153,21 +2153,21 @@
 # * -lcrypt on *NIX
 # * in libsystem on OS X
 AST_EXT_LIB_CHECK([LIBCRYPT], [crypt], [crypt], [crypt.h])
-AC_CHECK_FUNCS([crypt], [SYSCRYPT=true], [SYSCRYPT=""])
-
-if test "x$LIBCRYPT" != "x" ; then
+AC_CHECK_FUNC([crypt], [SYSCRYPT=true], [SYSCRYPT=""])
+
+if test "x$LIBCRYPT_LIB" != "x" ; then
     CRYPT_LIB="$LIBCRYPT_LIB"
+    AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the `crypt' function.])
 elif test "x$SYSCRYPT" != "x" ; then
     CRYPT_LIB=""
+    AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the `crypt' function.])
 fi
 
 AC_SUBST(CRYPT_LIB)
 
-# Check for crypt_r support
-save_LIBS="$LIBS"
-LIBS="$CRYPT_LIB $LIBS"
-AC_CHECK_FUNCS([crypt_r])
-LIBS="$save_LIBS"
+# Find crypt_r support
+AC_CHECK_LIB([crypt], [crypt_r],
+    [AC_DEFINE([HAVE_CRYPT_R], [1], [Define to 1 if you have the `crypt_r' function.])])
 
 AST_EXT_LIB_CHECK([CRYPTO], [crypto], [AES_encrypt], [openssl/aes.h])
 

Modified: team/dlee/ari-authn/main/utils.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-authn/main/utils.c?view=diff&rev=392970&r1=392969&r2=392970
==============================================================================
--- team/dlee/ari-authn/main/utils.c (original)
+++ team/dlee/ari-authn/main/utils.c Wed Jun 26 11:38:50 2013
@@ -37,6 +37,9 @@
 #include <sys/stat.h>
 #include <sys/syscall.h>
 #include <unistd.h>
+#if defined(HAVE_CRYPT_R)
+#include <crypt.h>
+#endif
 #if defined(__APPLE__)
 #include <mach/mach.h>
 #elif defined(HAVE_SYS_THR_H)
@@ -2299,6 +2302,7 @@
 
 int ast_crypt_validate(const char *key, const char *expected)
 {
+	ast_log(LOG_WARNING, "crypt() support not available; cannot validate password\n");
 	return 0;
 }
 

Modified: team/dlee/ari-authn/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-authn/makeopts.in?view=diff&rev=392970&r1=392969&r2=392970
==============================================================================
--- team/dlee/ari-authn/makeopts.in (original)
+++ team/dlee/ari-authn/makeopts.in Wed Jun 26 11:38:50 2013
@@ -281,7 +281,6 @@
 OPENSSL_INCLUDE=@OPENSSL_INCLUDE@
 OPENSSL_LIB=@OPENSSL_LIB@
 
-CRYPT_INCLUDE=@CRYPT_INCLUDE@
 CRYPT_LIB=@CRYPT_LIB@
 
 CRYPTO_INCLUDE=@CRYPTO_INCLUDE@




More information about the asterisk-commits mailing list