]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: cleanup BUILD_RAW
authorKarel Zak <kzak@redhat.com>
Thu, 27 Oct 2011 10:08:01 +0000 (12:08 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Nov 2011 11:32:49 +0000 (12:32 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
disk-utils/Makefile.am

index 8caeac66d557287af4f161d961ecfc80d6ed636f..5ec5f9de5c1578d75a79b2a919daeca9f4fd9e54 100644 (file)
@@ -151,11 +151,12 @@ AC_CHECK_HEADERS(
        sys/un.h \
        sys/user.h \
        sys/resource.h \
+       linux/raw.h \
        unistd.h ])
 
-AC_CHECK_HEADERS([linux/raw.h],
-                [AM_CONDITIONAL([HAVE_RAW], [true])],
-                [AM_CONDITIONAL([HAVE_RAW], [false])])
+dnl Convert some ac_cv_header_* variables to have_*
+dnl
+have_linux_raw_h=$ac_cv_header_linux_raw_h
 
 AC_CHECK_HEADERS([langinfo.h],
                [AM_CONDITIONAL([HAVE_LANGINFO], [true])],
@@ -970,9 +971,12 @@ AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
 
 AC_ARG_ENABLE([raw],
   AS_HELP_STRING([--enable-raw], [build raw]),
-  [], enable_raw=no
+  [], enable_raw=check
 )
-AM_CONDITIONAL(BUILD_RAW, test "x$enable_raw" = xyes)
+build_raw=yes
+UL_REQUIRES_LINUX([raw])
+UL_REQUIRES_HAVE([raw], [linux_raw_h], [raw.h header file])
+AM_CONDITIONAL(BUILD_RAW, test "x$build_raw" = xyes)
 
 
 AC_ARG_ENABLE([rename],
index 6ca19c6a8dc13c56fc978ec48eb557dffe93a65c..56f4e571ddc26fe90788e786b5a8221165c632e6 100644 (file)
@@ -54,12 +54,10 @@ dist_man_MANS += elvtune.8
 elvtune_SOURCES = elvtune.c $(top_srcdir)/lib/linux_version.c
 endif
 
-if HAVE_RAW
 if BUILD_RAW
 sbin_PROGRAMS += raw
 dist_man_MANS += raw.8
 endif
-endif
 
 if BUILD_CRAMFS
 cramfs_common = $(utils_common) cramfs.h cramfs_common.c