From dc0495166fc3aabaada5f0234048a4f20017305f Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 29 Feb 2016 17:45:46 +0100 Subject: build-sys: add and use openat build conditionals Signed-off-by: Ruediger Meier --- lib/Makemodule.am | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/Makemodule.am') diff --git a/lib/Makemodule.am b/lib/Makemodule.am index 81504b9a6..34bf1ca6a 100644 --- a/lib/Makemodule.am +++ b/lib/Makemodule.am @@ -17,11 +17,9 @@ libcommon_la_SOURCES = \ lib/md5.c \ lib/pager.c \ lib/path.c \ - lib/procutils.c \ lib/randutils.c \ lib/setproctitle.c \ lib/strutils.c \ - lib/sysfs.c \ lib/timeutils.c \ lib/ttyutils.c \ lib/exec_shell.c \ @@ -41,6 +39,10 @@ if HAVE_CPU_SET_T libcommon_la_SOURCES += lib/cpuset.c endif +if HAVE_OPENAT +libcommon_la_SOURCES += lib/procutils.c +libcommon_la_SOURCES += lib/sysfs.c +endif noinst_LTLIBRARIES += libtcolors.la libtcolors_la_CFLAGS = $(AM_CFLAGS) $(TINFO_CFLAGS) @@ -57,14 +59,12 @@ check_PROGRAMS += \ test_fileutils \ test_ismounted \ test_mangle \ - test_procutils \ test_randutils \ test_strutils \ test_ttyutils - if LINUX if HAVE_CPU_SET_T check_PROGRAMS += test_cpuset @@ -74,6 +74,10 @@ check_PROGRAMS += \ test_pager endif +if HAVE_OPENAT +check_PROGRAMS += test_procutils +endif + test_ttyutils_SOURCES = lib/ttyutils.c test_ttyutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM test_ttyutils_LDADD = $(LDADD) libcommon.la @@ -99,8 +103,10 @@ test_colors_LDADD = $(LDADD) $(TINFO_LIBS) test_randutils_SOURCES = lib/randutils.c test_randutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM +if HAVE_OPENAT test_procutils_SOURCES = lib/procutils.c test_procutils_CFLAGS = $(AM_CFLAGS) -DTEST_PROGRAM +endif if LINUX test_cpuset_SOURCES = lib/cpuset.c -- cgit v1.2.3-55-g7522