From cf1306f469d0efb178f567f0b43e9af0435593ca Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 18 May 2015 12:07:29 -0500 Subject: [PATCH] Add -all-static when --enable-static --- Makefile.am | 5 +++++ configure.ac | 1 + 2 files changed, 6 insertions(+) diff --git a/Makefile.am b/Makefile.am index 1030bbb..69da074 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,4 @@ + ### C source files to be built and distributed. LIBJQ_INCS = jq_parser.h builtin.h bytecode.h compile.h exec_stack.h \ @@ -71,6 +72,10 @@ jq_SOURCES = main.c version.h jq_LDFLAGS = -static-libtool-libs jq_LDADD = libjq.la -lm +if ENABLE_ALL_STATIC +jq_LDFLAGS += -all-static +endif + ### Tests (make check) TESTS = tests/all.test diff --git a/configure.ac b/configure.ac index b24b6a1..f3e7892 100644 --- a/configure.ac +++ b/configure.ac @@ -117,6 +117,7 @@ EOF AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" != xno]) AM_CONDITIONAL([ENABLE_ERROR_INJECTION], [test "x$enable_error_injection" = xyes]) +AM_CONDITIONAL([ENABLE_ALL_STATIC], [test "x$enable_static" = xyes]) AC_FIND_FUNC([isatty], [c], [#include ], [0]) AC_FIND_FUNC([_isatty], [c], [#include ], [0]) -- 2.50.0