From 8af52aaf52f88a34ea39077e88e32ebadac061bb Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 25 May 2015 21:19:56 -0500 Subject: [PATCH] Add ./configure --enable-all-static instead --- Makefile.am | 2 +- configure.ac | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index e9f8b58e..69da0746 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,7 +72,7 @@ jq_SOURCES = main.c version.h jq_LDFLAGS = -static-libtool-libs jq_LDADD = libjq.la -lm -if ENABLE_STATIC +if ENABLE_ALL_STATIC jq_LDFLAGS += -all-static endif diff --git a/configure.ac b/configure.ac index a656eab6..bf236194 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,10 @@ dnl Don't attempt to build the error injection object (if there is no LD_PRELOAD AC_ARG_ENABLE([error-injection], AC_HELP_STRING([--enable-error-injection], [build and test with error injection])) +dnl Enable building all static +AC_ARG_ENABLE([all-static], + AC_HELP_STRING([--enable-all-static], [link jq with static libraries only])) + AS_IF([test "x$enable_docs" != "xno"],[ AC_CHECK_PROGS(bundle_cmd, bundle) @@ -117,7 +121,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_STATIC], [test "x$enable_static" = xyes]) +AM_CONDITIONAL([ENABLE_ALL_STATIC], [test "x$enable_all_static" = xyes]) AC_FIND_FUNC([isatty], [c], [#include ], [0]) AC_FIND_FUNC([_isatty], [c], [#include ], [0])