linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure.in: fix external libblkid test for static link
@ 2014-06-11 10:08 Baruch Siach
  2014-06-11 10:14 ` Baruch Siach
  2014-07-05  4:31 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Baruch Siach @ 2014-06-11 10:08 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4, Baruch Siach

External libblkid needs -luuid when linking statically. Use pkg-config to
determine it correctly. Adding --static doesn't heart even for dynamic
linking.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 configure.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.in b/configure.in
index 448a2926776a..ec6068320878 100644
--- a/configure.in
+++ b/configure.in
@@ -551,7 +551,7 @@ then
 		[LIBBLKID=`$PKG_CONFIG --libs blkid`;
 		 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
 		[AC_MSG_ERROR([external blkid library not found])],
-		[$LIBBLKID])
+		[`$PKG_CONFIG --static --libs blkid`])
 	BLKID_CMT=#
 	AC_MSG_RESULT([Disabling private blkid library])
 else
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] configure.in: fix external libblkid test for static link
  2014-06-11 10:08 [PATCH] configure.in: fix external libblkid test for static link Baruch Siach
@ 2014-06-11 10:14 ` Baruch Siach
  2014-07-05  4:31 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2014-06-11 10:14 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

Hi Ted,

On Wed, Jun 11, 2014 at 01:08:33PM +0300, Baruch Siach wrote:
> External libblkid needs -luuid when linking statically. Use pkg-config to
> determine it correctly. Adding --static doesn't heart even for dynamic

s/heart/hurt/

baruch

> linking.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  configure.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.in b/configure.in
> index 448a2926776a..ec6068320878 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -551,7 +551,7 @@ then
>  		[LIBBLKID=`$PKG_CONFIG --libs blkid`;
>  		 STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
>  		[AC_MSG_ERROR([external blkid library not found])],
> -		[$LIBBLKID])
> +		[`$PKG_CONFIG --static --libs blkid`])
>  	BLKID_CMT=#
>  	AC_MSG_RESULT([Disabling private blkid library])
>  else
> -- 

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] configure.in: fix external libblkid test for static link
  2014-06-11 10:08 [PATCH] configure.in: fix external libblkid test for static link Baruch Siach
  2014-06-11 10:14 ` Baruch Siach
@ 2014-07-05  4:31 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2014-07-05  4:31 UTC (permalink / raw)
  To: Baruch Siach; +Cc: linux-ext4

On Wed, Jun 11, 2014 at 01:08:33PM +0300, Baruch Siach wrote:
> External libblkid needs -luuid when linking statically. Use pkg-config to
> determine it correctly. Adding --static doesn't heart even for dynamic
> linking.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Thanks for reporting this; I fixed this a slightly different and
simpler way.

       	   	     	     	   	  - Ted

commit 2d7583bd42a884d9d9fe6413a9f1a8356e7bb803
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Sat Jul 5 00:27:02 2014 -0400

    configure.in: fix external libblkid test for static link
    
    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>

diff --git a/configure b/configure
index a41e008..87fd2f3 100755
--- 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.  */
 
diff --git a/configure.in b/configure.in
index 4f7e613..3ca5d63 100644
--- a/configure.in
+++ b/configure.in
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-05  4:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11 10:08 [PATCH] configure.in: fix external libblkid test for static link Baruch Siach
2014-06-11 10:14 ` Baruch Siach
2014-07-05  4:31 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).