]> granicus.if.org Git - jq/commitdiff
Add -all-static when --enable-static
authorNicolas Williams <nico@cryptonector.com>
Mon, 18 May 2015 17:07:29 +0000 (12:07 -0500)
committerNicolas Williams <nico@cryptonector.com>
Mon, 18 May 2015 17:07:29 +0000 (12:07 -0500)
Makefile.am
configure.ac

index 1030bbbddc1220862e791ca7f2f92d00ae136cad..69da07466ad0dcf830c2e89fe590de9815efe94a 100644 (file)
@@ -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
index b24b6a1605d3835c440b903672bdb30d120e9ac1..f3e7892f5a075788a2beb606042b98affbc4b7e2 100644 (file)
@@ -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 <unistd.h>], [0])
 AC_FIND_FUNC([_isatty], [c], [#include <io.h>], [0])