summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-28 03:15:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-28 03:15:10 +0300
commitd37fe74804b94065259703509b4b3dc3f53c30a5 (patch)
tree4692e68597aa2fa0ddee2b1c5e8509e53b3d227c /configure.ac
parent743d6dc3bd60dad0db53b19eacea333933d2f094 (diff)
downloadevol-hercules-d37fe74804b94065259703509b4b3dc3f53c30a5.tar.gz
evol-hercules-d37fe74804b94065259703509b4b3dc3f53c30a5.tar.bz2
evol-hercules-d37fe74804b94065259703509b4b3dc3f53c30a5.tar.xz
evol-hercules-d37fe74804b94065259703509b4b3dc3f53c30a5.zip
Rename static configure flag, look like clang have issues with this flag enabled.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 28 insertions, 6 deletions
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])