summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2019-01-18 14:18:22 +0100
committerMark Wielaard <mark@klomp.org>2019-01-31 23:51:17 +0100
commitb63007ed58d23afdd64a4e77a447a12b64c5bced (patch)
tree75243cab4b80cd2bb2fffc5558e202a454240461 /configure.ac
parentfe7d3f3635e66fe8ec1fde91f886857b0dea7d22 (diff)
configure: Add new --enable-install-elfh option.
We explicitly test (with system-elf-libelf) that our include headers work with the system elf.h header. But it might be helpful to install the elf.h file for a private install. Our elf.h header really is just a copy of the latest glibc elf.h. But it might be newer and include more constants than the system installed elf.h. Add a new configure option --enable-install-elfh to install elf.h. But warn when it is enabled for the default /usr or /usr/local prefix because it might clash with the glibc/system elf.h header in that case. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b89b8679..7d4e69d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,6 +323,11 @@ if test "$use_valgrind" = yes; then
fi
AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
+AC_ARG_ENABLE([install-elfh],
+AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]),
+ [install_elfh=$enableval], [install_elfh=no])
+AM_CONDITIONAL(INSTALL_ELFH, test "$install_elfh" = yes)
+
AM_CONDITIONAL(BUILD_STATIC, [dnl
test "$use_gprof" = yes -o "$use_gcov" = yes])
@@ -658,6 +663,7 @@ AC_MSG_NOTICE([
NOT RECOMMENDED FEATURES (should all be no)
Experimental thread safety : ${use_locks}
+ install elf.h : ${install_elfh}
OTHER FEATURES
Deterministic archives by default : ${default_ar_deterministic}
@@ -673,3 +679,9 @@ AC_MSG_NOTICE([
use rpath in tests : ${tests_use_rpath}
test biarch : ${utrace_cv_cc_biarch}
])
+
+if test "$install_elfh" = yes; then
+ if test "${prefix}" = "/usr/local" -o "${prefix}" = "/usr"; then
+ AC_MSG_WARN([installing elf.h in ${includedir} might conflict with glibc/system elf.h])
+ fi
+fi