acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Acl-devel] [PATCH attr 7/8] build: Only include the compat syscall stub


From: Guillem Jover
Subject: [Acl-devel] [PATCH attr 7/8] build: Only include the compat syscall stubs on Linux systems
Date: Sat, 20 Jul 2019 04:14:41 +0200

These are Linux specific syscalls. Other systems either already have
these function on their libc, or would need different implementations.
This restores the previous behavior before the build system
modernization.

Signed-off-by: Guillem Jover <address@hidden>
---
 configure.ac          |  6 ++++++
 libattr/Makemodule.am | 17 ++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 389d7d4..3c13bb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,7 @@ AC_PREFIX_DEFAULT(/usr)
 AM_INIT_AUTOMAKE([-Wall foreign 1.11 dist-xz subdir-objects])
 AM_SILENT_RULES([yes])
 
+AC_CANONICAL_HOST
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_USE_SYSTEM_EXTENSIONS
@@ -49,6 +50,11 @@ dnl Automatically increment the revision for every release.
 LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
 AC_SUBST(LT_REVISION)
 
+AS_CASE([$host_os],
+       [linux*], [os_linux=yes],
+)
+AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"])
+
 AC_CONFIG_COMMANDS([include/attr],
        [dnl
        rm -rf include/attr
diff --git a/libattr/Makemodule.am b/libattr/Makemodule.am
index 4b3720c..1211aba 100644
--- a/libattr/Makemodule.am
+++ b/libattr/Makemodule.am
@@ -8,19 +8,30 @@ LT_CURRENT = 2
 LT_AGE = 1
 LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
-libattr_la_DEPENDENCIES = exports libattr/libattr.lds
+libattr_la_DEPENDENCIES = \
+       exports
+if OS_LINUX
+libattr_la_DEPENDENCIES += \
+       libattr/libattr.lds
+endif
 libattr_la_SOURCES = \
        libattr/attr_copy_action.c \
        libattr/attr_copy_check.c \
        libattr/attr_copy_fd.c \
        libattr/attr_copy_file.c \
        libattr/libattr.c \
-       libattr/syscalls.c \
        libattr/libattr.h
+if OS_LINUX
+libattr_la_SOURCES += \
+       libattr/syscalls.c
+endif
 libattr_la_CFLAGS = -include libattr/libattr.h
 libattr_la_LDFLAGS = \
        -Wl,--version-script,$(top_srcdir)/exports \
-       -Wl,$(top_srcdir)/libattr/libattr.lds \
        -version-info $(LTVERSION)
+if OS_LINUX
+libattr_la_LDFLAGS += \
+       -Wl,$(top_srcdir)/libattr/libattr.lds
+endif
 
 EXTRA_DIST += libattr/libattr.lds
-- 
2.22.0.657.g960e92d24f




reply via email to

[Prev in Thread] Current Thread [Next in Thread]