aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorScott James Remnant <scott@netsplit.com>2009-05-14 13:03:25 +0100
committerTheodore Ts'o <tytso@mit.edu>2009-06-29 00:36:45 -0400
commit39fd3d4f13d39cd59ea51350c80423c57b25b5dd (patch)
tree7a081e349dbdf4202fbf0e07c3f6cff8b082bc6d /configure.in
parent1b600bfa48cf55571e342208d6baa1c832f34bb1 (diff)
downloade2fsprogs-39fd3d4f13d39cd59ea51350c80423c57b25b5dd.tar.gz
e2fsprogs-39fd3d4f13d39cd59ea51350c80423c57b25b5dd.tar.xz
e2fsprogs-39fd3d4f13d39cd59ea51350c80423c57b25b5dd.zip
configure.in: add --disable-libuuid option
Add an option to switch between the private (in-tree) libuuid and public (in-system installed) library. The private version is still enabled by default. Signed-off-by: Scott James Remnant <scott@netsplit.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 781519c2..30cfc2b6 100644
--- a/configure.in
+++ b/configure.in
@@ -379,6 +379,57 @@ TEST_IO_CMT=
)
AC_SUBST(TEST_IO_CMT)
dnl
+dnl handle --disable-libuuid
+dnl
+PKG_PROG_PKG_CONFIG
+LIBUUID=
+DEPLIBUUID=
+STATIC_LIBUUID=
+DEPSTATIC_LIBUUID=
+PROFILED_LIBUUID=
+DEPPROFILED_LIBUUID=
+UUID_CMT=
+AC_ARG_ENABLE([libuuid],
+[ --disable-libuuid do not build private uuid library],
+if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+ 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])
+ UUID_CMT=#
+ AC_MSG_RESULT([Disabling private uuid library])
+else
+ LIBUUID='$(LIB)/libuuid'$LIB_EXT
+ DEPLIBUUID=$LIBUUID
+ STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+ PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+ AC_MSG_RESULT([Enabling private uuid library])
+fi
+,
+LIBUUID='$(LIB)/libuuid'$LIB_EXT
+DEPLIBUUID=$LIBUUID
+STATIC_LIBUUID='$(LIB)/libuuid'$STATIC_LIB_EXT
+DEPSTATIC_LIBUUID=$STATIC_LIBUUID
+PROFILED_LIBUUID='$(LIB)/libuuid'$PROFILED_LIB_EXT
+DEPPROFILED_LIBUUID=$PROFILED_LIBUUID
+AC_MSG_RESULT([Enabling private uuid library by default])
+)
+AC_SUBST(LIBUUID)
+AC_SUBST(DEPLIBUUID)
+AC_SUBST(STATIC_LIBUUID)
+AC_SUBST(DEPSTATIC_LIBUUID)
+AC_SUBST(PROFILED_LIBUUID)
+AC_SUBST(DEPPROFILED_LIBUUID)
+AC_SUBST(UUID_CMT)
+dnl
dnl handle --disable-libblkid
dnl
PKG_PROG_PKG_CONFIG