]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: Re-check for another UUID library only when previous check failed.
authorAlexander Traud <pabstraud@compuserve.com>
Thu, 8 Mar 2018 15:04:29 +0000 (16:04 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Thu, 8 Mar 2018 15:07:08 +0000 (09:07 -0600)
As a side-effect, this avoids the ambiguous output:
 checking for uuid_generate_random... no
which was printed always previously.

ASTERISK-25586
Reported by: John Nemeth

Change-Id: I6d541dfcf453932a9856c5e251aa22e0e6c233c9

configure
configure.ac

index 3442d5724808a281b919a40a63aec368cead2469..0159e8db0bd364b41d8248a6ac29df7990851b01 100755 (executable)
--- a/configure
+++ b/configure
@@ -13574,6 +13574,10 @@ _ACEOF
 fi
 
 
+if test "x$LIBUUID_LIB" != "x" ; then
+  UUID_INCLUDE="$LIBUUID_INCLUDE"
+  UUID_LIB="$LIBUUID_LIB"
+else
 
 if test "x${PBX_E2FSUUID}" != "x1" -a "${USE_E2FSUUID}" != "no"; then
    pbxlibdir=""
@@ -13670,7 +13674,11 @@ _ACEOF
 fi
 
 
-for ac_func in uuid_generate_random
+  if test "x$E2FSUUID_LIB" != "x" ; then
+    UUID_INCLUDE="$E2FSUUID_INCLUDE"
+    UUID_LIB="$E2FSUUID_LIB"
+  else
+    for ac_func in uuid_generate_random
 do :
   ac_fn_c_check_func "$LINENO" "uuid_generate_random" "ac_cv_func_uuid_generate_random"
 if test "x$ac_cv_func_uuid_generate_random" = xyes; then :
@@ -13683,18 +13691,13 @@ else
 fi
 done
 
-
-if test "x$LIBUUID_LIB" != "x" ; then
-  UUID_INCLUDE="$LIBUUID_INCLUDE"
-  UUID_LIB="$LIBUUID_LIB"
-elif test "x$E2FSUUID_LIB" != "x" ; then
-  UUID_INCLUDE="$E2FSUUID_INCLUDE"
-  UUID_LIB="$E2FSUUID_LIB"
-elif test "x$SYSUUID" != "x" ; then
-  UUID_INCLUDE=""
-  UUID_LIB=""
-else
-  as_fn_error $? "*** uuid support not found (this typically means the uuid development package is missing)" "$LINENO" 5
+    if test "x$SYSUUID" != "x" ; then
+      UUID_INCLUDE=""
+      UUID_LIB=""
+    else
+      as_fn_error $? "*** uuid support not found (this typically means the uuid development package is missing)" "$LINENO" 5
+    fi
+  fi
 fi
 
 
index d9148c0191b6f7fca0b77ff97bb2b0074d5bd0d3..a8b7c8a7da509c7329bcd93725320f56ece37f3f 100644 (file)
@@ -601,20 +601,23 @@ AC_SUBST(EDITLINE_LIB)
 #  * -le2fs-uuid on OpenBSD
 #  * in libsystem on OS X
 AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [])
-AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h], [])
-AC_CHECK_FUNCS([uuid_generate_random], [SYSUUID=true], [SYSUUID=""])
-
 if test "x$LIBUUID_LIB" != "x" ; then
   UUID_INCLUDE="$LIBUUID_INCLUDE"
   UUID_LIB="$LIBUUID_LIB"
-elif test "x$E2FSUUID_LIB" != "x" ; then
-  UUID_INCLUDE="$E2FSUUID_INCLUDE"
-  UUID_LIB="$E2FSUUID_LIB"
-elif test "x$SYSUUID" != "x" ; then
-  UUID_INCLUDE=""
-  UUID_LIB=""
 else
-  AC_MSG_ERROR([*** uuid support not found (this typically means the uuid development package is missing)])
+  AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h], [])
+  if test "x$E2FSUUID_LIB" != "x" ; then
+    UUID_INCLUDE="$E2FSUUID_INCLUDE"
+    UUID_LIB="$E2FSUUID_LIB"
+  else
+    AC_CHECK_FUNCS([uuid_generate_random], [SYSUUID=true], [SYSUUID=""])
+    if test "x$SYSUUID" != "x" ; then
+      UUID_INCLUDE=""
+      UUID_LIB=""
+    else
+      AC_MSG_ERROR([*** uuid support not found (this typically means the uuid development package is missing)])
+    fi
+  fi
 fi
 AC_SUBST(UUID_INCLUDE)
 AC_SUBST(UUID_LIB)