Whamcloud - gitweb
configure.in: fix external libblkid test for static link
authorTheodore Ts'o <tytso@mit.edu>
Sat, 5 Jul 2014 04:27:02 +0000 (00:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 5 Jul 2014 04:30:35 +0000 (00:30 -0400)
External libblkid needs -luuid when linking statically.

Also fix up the bogus other-lib parameter in the libuuid test;
$LIBUUID is the null string, so it doesn't do anything other than
obfuscate the use of AC_CHECK_LIB.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
configure
configure.in

index a41e008..87fd2f3 100755 (executable)
--- a/configure
+++ b/configure
@@ -5264,7 +5264,7 @@ if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid $LIBUUID $LIBS"
+LIBS="-luuid  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5476,7 +5476,7 @@ if ${ac_cv_lib_blkid_blkid_get_cache+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lblkid $LIBBLKID $LIBS"
+LIBS="-lblkid -luuid $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
index 4f7e613..3ca5d63 100644 (file)
@@ -478,8 +478,7 @@ then
        AC_CHECK_LIB(uuid, uuid_generate,
                [LIBUUID=`$PKG_CONFIG --libs uuid`;
                 STATIC_LIBUUID=`$PKG_CONFIG --static --libs uuid`],
-               [AC_MSG_ERROR([external uuid library not found])],
-               [$LIBUUID])
+               [AC_MSG_ERROR([external uuid library not found])])
        UUID_CMT=#
        AC_MSG_RESULT([Disabling private uuid library])
 else
@@ -530,8 +529,7 @@ then
        AC_CHECK_LIB(blkid, blkid_get_cache,
                [LIBBLKID=`$PKG_CONFIG --libs blkid`;
                 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
-               [AC_MSG_ERROR([external blkid library not found])],
-               [$LIBBLKID])
+               [AC_MSG_ERROR([external blkid library not found])], -luuid)
        BLKID_CMT=#
        AC_MSG_RESULT([Disabling private blkid library])
 else