[Devel] [PATCH 3/8] configure.ac: check for libuuid, set LIBS
Kir Kolyshkin
kir at openvz.org
Tue Jun 2 15:50:21 PDT 2015
This commit:
* adds a check for libuuid presence, so configure fails with a
helpful error message is libuiid devel package is not installed
* uses UUID_LIBS instead of hardcoded value in Makefiles
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
configure.ac | 2 ++
lib/Makefile.am | 2 +-
src/Makefile.am | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2681fb5..efc1a11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,8 @@ AC_C_INLINE
PKG_CHECK_MODULES([XML], [libxml-2.0 > 2.6.16], ,
AC_MSG_ERROR([Please install libxml2 devel package]))
+PKG_CHECK_MODULES([UUID], [uuid], ,
+ AC_MSG_ERROR([Please install libuuid devel package]))
# Compiler settings
#CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-qual -Winline -Wextra"
diff --git a/lib/Makefile.am b/lib/Makefile.am
index def1d5a..23f5215 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -71,5 +71,5 @@ libvzctl2_la_SOURCES = bitmap.c \
# 5. If any interfaces have been added since the last public release, then increment age.
# 6. If any interfaces have been removed since the last public release, then set age to 0.
libvzctl2_la_LDFLAGS = -version-info 2:1:0 -Wl,--version-script=version.map
-libvzctl2_la_LIBADD = $(XML_LIBS) -lvzevent -lutil -lploop -lcrypt -luuid
+libvzctl2_la_LIBADD = $(XML_LIBS) -lvzevent -lutil -lploop -lcrypt $(UUID_LIBS)
diff --git a/src/Makefile.am b/src/Makefile.am
index dd9839f..afcf385 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,7 +12,7 @@ exec_wrapdir=$(pkglibdir)
exec_wrap_PROGRAMS = exec_wrap
-VZCTL_LIBS = $(top_builddir)/lib/libvzctl2.la -lpthread -luuid
+VZCTL_LIBS = $(top_builddir)/lib/libvzctl2.la -lpthread $(UUID_LIBS)
exec_wrap_SOURCES = exec_wrap.c
--
1.9.3
More information about the Devel
mailing list