diff options
author | Martin Willi <martin@revosec.ch> | 2014-05-08 16:28:50 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-06-04 15:53:13 +0200 |
commit | 2d42dce4a48f107469f039897c58bf70145268e8 (patch) | |
tree | afa5fd3056eb53594e26df0bf06fe2f2678b25c1 /configure.ac | |
parent | 4ce8b0cae6b2aabe109d17fa419965da848a3ae1 (diff) | |
download | strongswan-2d42dce4a48f107469f039897c58bf70145268e8.tar.bz2 strongswan-2d42dce4a48f107469f039897c58bf70145268e8.tar.xz |
configure: Don't use -rdynamic with the LLVM toolchain
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 67017773a..6e836146b 100644 --- a/configure.ac +++ b/configure.ac @@ -750,7 +750,6 @@ AC_COMPILE_IFELSE( [ AC_MSG_RESULT([no]) openssl_lib=crypto - AC_SUBST(PLUGIN_CFLAGS, [-rdynamic]) ] ) AC_SUBST(OPENSSL_LIB, [-l$openssl_lib]) @@ -767,6 +766,26 @@ AC_COMPILE_IFELSE( [AC_MSG_RESULT([no]); AC_MSG_ERROR([__attribute__((packed)) does not work])] ) +AC_MSG_CHECKING([clang]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [], [[ + #ifndef __clang__ + # error not using LLVM clang + #endif + ]])], + [ + AC_MSG_RESULT([yes]) + ], + [ + AC_MSG_RESULT([no]) + # GCC, but not MinGW requires -rdynamic for plugins + if test x$windows != xtrue; then + AC_SUBST(PLUGIN_CFLAGS, [-rdynamic]) + fi + ] +) + if test x$printf_hooks = xvstr; then AC_CHECK_LIB([vstr],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])],[]) AC_DEFINE([USE_VSTR], [], [use Vstr string library for printf hooks]) |