summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-02-23 17:22:41 +0100
committerUlf Hermann <[email protected]>2017-04-27 15:56:33 +0000
commit121d248c1da7f2130a2edde6d158f116c89ed407 (patch)
treead7a348a88db648da6e2df366d89fcb7b7436a1c /configure.ac
parentf10810fff6fda147f9c07fea0e1b33a7c4d79ad1 (diff)
Add gnulib modules to replace missing libc functionality
This enables us to build a fully featured elfutils package on systems with reduced C libraries, such as windows. All the modules are built into libgnu.a, which is then linked into all binaries if --enable-gnulib is given on the configure line. Change-Id: I743fd22172bc85d9f10dcc3dad8eb921f462b554 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3c35dac5..a5aea7fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,16 @@ AS_IF([test "$use_locks" = yes],
AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+AC_ARG_ENABLE([gnulib],
+AS_HELP_STRING([--enable-gnulib],
+ [use gnulib modules to replace functionality missing from libc. This affects the license choices for the resulting binaries.]),
+ use_gnulib=$enableval, use_gnulib=no)
+AM_CONDITIONAL(USE_GNULIB, test "$use_gnulib" = yes)
+
AC_PROG_CC
+
+gl_EARLY
+
AC_PROG_RANLIB
AC_PROG_YACC
AM_PROG_LEX
@@ -389,8 +398,12 @@ dnl Check if we have <linux/bpf.h> for EM_BPF disassembly.
AC_CHECK_HEADERS(linux/bpf.h)
AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"])
+gl_INIT
+
dnl The directories with content.
+AC_CONFIG_FILES([libgnu/Makefile])
+
dnl Documentation.
dnl Commented out for now.
dnl AC_CONFIG_FILES([doc/Makefile])