From d37fe74804b94065259703509b4b3dc3f53c30a5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 28 Apr 2016 03:15:10 +0300 Subject: Rename static configure flag, look like clang have issues with this flag enabled. --- configure.ac | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bec3c79..11d8ca1 100644 --- a/configure.ac +++ b/configure.ac @@ -35,24 +35,24 @@ AC_ARG_ENABLE( AM_CONDITIONAL(ENABLE_SANITIZE, test x$enable_sanitize = xyes) AC_ARG_ENABLE( - [static], + [static-build], AC_HELP_STRING( - [--enable-static], + [--enable-static-build], [ Enables or Disables Statick Linking (STATIC is disabled by default) ] ), [ - enable_static="$enableval" + enable_static_build="$enableval" case $enableval in "no");; "yes");; - *) AC_MSG_ERROR([[invalid argument --enable-static=$disableval... stopping]]);; + *) AC_MSG_ERROR([[invalid argument --enable-static-build=$disableval... stopping]]);; esac ], - [enable_static="no"] + [enable_static_build="no"] ) -AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes) +AM_CONDITIONAL(ENABLE_STATIC_BUILD, test x$enable_static_build = xyes) AC_ARG_ENABLE( [gprof], @@ -94,6 +94,28 @@ AC_ARG_ENABLE( ) AM_CONDITIONAL(ENABLE_WERROR, test x$enable_werror = xyes) +OLD_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -rdynamic" +AC_MSG_CHECKING([whether $CC accepts -rdynamic]) +AC_LINK_IFELSE( + [AC_LANG_SOURCE([ + int main(int argc, char **argv) + { + return 0; + } + ])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + LDFLAGS="$OLD_LDFLAGS" + ], + [ + AC_MSG_RESULT([guessing no]) + ] +) + AC_DEFUN([AC_CHECK_COMPILER_WFLAG], [ AC_MSG_CHECKING([whether $CC supports -W$1]) -- cgit v1.2.3-70-g09d2