summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2011-03-16 17:39:54 +0100
committerKarel Zak2011-03-16 17:39:54 +0100
commitb98ae9c2e85e67b8efa588d4e7c61ccfafba66dd (patch)
treee8d8d0e07eaf756ab7a71e09e3a9903e5a94bc8c
parentbuild-sys: don't support external (e2fsprogs) libblkid (diff)
downloadkernel-qcow2-util-linux-b98ae9c2e85e67b8efa588d4e7c61ccfafba66dd.tar.gz
kernel-qcow2-util-linux-b98ae9c2e85e67b8efa588d4e7c61ccfafba66dd.tar.xz
kernel-qcow2-util-linux-b98ae9c2e85e67b8efa588d4e7c61ccfafba66dd.zip
build-sys: clean up partx Makefile
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac26
-rw-r--r--partx/Makefile.am11
3 files changed, 22 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index 38207b7d5..edf2dbfae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,7 +41,7 @@ if BUILD_HWCLOCK
SUBDIRS += hwclock
endif
-if LINUX
+if BUILD_PARTX
SUBDIRS += partx
endif
diff --git a/configure.ac b/configure.ac
index 83cbc7084..d66638d9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -367,6 +367,22 @@ AC_ARG_ENABLE([fsck],
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
+AC_ARG_ENABLE([partx],
+ AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
+ [], enable_partx=check
+)
+build_partx=yes
+if test "x$enable_partx" = xcheck; then
+ if test "x$linux_os" = xno; then
+ AC_MSG_WARN([non-linux system; do not build partx utilities])
+ build_partx=no
+ fi
+elif test "x$enable_partx" = xno; then
+ build_partx=no
+fi
+AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
+
+
AC_ARG_ENABLE([libuuid],
AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
[], enable_libuuid=yes
@@ -419,6 +435,9 @@ else
if test "x$enable_fsck" = xyes; then
AC_MSG_ERROR([libblkid is needed to build util-linux fsck])
fi
+ if test "x$build_partx" = xyes; then
+ AC_MSG_ERROR([libblkid is needed to build util-linux partx])
+ fi
fi
@@ -976,13 +995,6 @@ AC_ARG_ENABLE([mesg],
AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
-AC_ARG_ENABLE([partx],
- AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
- [], enable_partx=no
-)
-AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
-
-
AC_ARG_ENABLE([raw],
AS_HELP_STRING([--enable-raw], [build raw]),
[], enable_raw=no
diff --git a/partx/Makefile.am b/partx/Makefile.am
index a99300d91..67ba7c53e 100644
--- a/partx/Makefile.am
+++ b/partx/Makefile.am
@@ -3,22 +3,15 @@ include $(top_srcdir)/config/include-Makefile.am
usrsbin_exec_PROGRAMS = addpart delpart
dist_man_MANS = addpart.8 delpart.8
-if BUILD_PARTX
-if BUILD_LIBBLKID
usrsbin_exec_PROGRAMS += partx
partx_SOURCES = partx.c partx.h \
$(top_srcdir)/lib/blkdev.c \
$(top_srcdir)/lib/tt.c \
$(top_srcdir)/lib/mbsalign.c \
- $(top_srcdir)/lib/strutils.c
-
-if LINUX
-partx_SOURCES += $(top_srcdir)/lib/linux_version.c
-endif
+ $(top_srcdir)/lib/strutils.c \
+ $(top_srcdir)/lib/linux_version.c
partx_CFLAGS = -I$(ul_libblkid_incdir)
partx_LDADD = $(ul_libblkid_la)
dist_man_MANS += partx.8
-endif
-endif