From e1f1685ffa734404558ff9aab6375b352823ec8d Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Thu, 28 Mar 2013 01:14:53 +0100 Subject: [PATCH] Do not link statically if profiling is enabled. --- configure.ac | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index adff32f..3479056 100644 --- a/configure.ac +++ b/configure.ac @@ -846,22 +846,17 @@ AM_CONDITIONAL(OPENMP,test "x$enable_openmp" = "xyes") ############################################################################# # Build static code? # ############################################################################# -if test "x$enable_profiling" = "xyes"; then - AC_MSG_NOTICE([Link executables statically.]) +AC_MSG_CHECKING(whether to link executables statically) +AC_ARG_ENABLE([static_link], + AS_HELP_STRING([--enable-static-link], + [link executables statically (default=no)]), + [static_link="$enableval"], + [static_link="no"]) +if test "x$static_link" = "xyes"; then + AC_MSG_RESULT(yes) LIB_LINK_OPTION="-all-static" else - AC_MSG_CHECKING(whether to link executables statically) - AC_ARG_ENABLE([static_link], - AS_HELP_STRING([--enable-static-link], - [link executables statically (default=no)]), - [static_link="$enableval"], - [static_link="no"]) - if test "x$static_link" = "xyes"; then - AC_MSG_RESULT(yes) - LIB_LINK_OPTION="-all-static" - else - AC_MSG_RESULT(no) - fi + AC_MSG_RESULT(no) fi AC_SUBST(LIB_LINK_OPTION) -- libgit2 0.21.4