summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-03-23 11:38:38 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-03-23 11:38:38 +0300
commitee1bc34de304eb6e012750cedd63a534485b5f08 (patch)
treee8001d2234633707f8a087a26ebf7f08914681e5 /configure.ac
parent2897743725b9aa4d200621e301445bcacdbb8d75 (diff)
downloadbdwgc-ee1bc34de304eb6e012750cedd63a534485b5f08.tar.gz
Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
(fix commits 0e175f3, 5dedb24) * configure.ac (AC_C_INLINE, AC_TRY_COMPILE(dladdr)): Add $CFLAGS_EXTRA to CFLAGS temporarily (restore CFLAGS after the check).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2cd79dc7..7561e1fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,7 +167,10 @@ AH_TEMPLATE([GC_DLL],
[Define to build dynamic libraries with only API symbols exposed.])
dnl Check for a flavor of supported inline keyword.
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $CFLAGS_EXTRA"
AC_C_INLINE
+CFLAGS="$old_CFLAGS"
THREADDLLIBS=
need_atomic_ops_asm=false
@@ -778,12 +781,15 @@ AM_CONDITIONAL([KEEP_BACK_PTRS], [test x"$keep_back_ptrs" = xtrue])
# Check for dladdr (used for debugging).
AC_MSG_CHECKING(for dladdr)
have_dladdr=no
+old_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $CFLAGS_EXTRA"
AC_TRY_COMPILE([
#define _GNU_SOURCE 1
#include <dlfcn.h>], [{
Dl_info info;
(void)dladdr("", &info);
}], [ have_dladdr=yes ])
+CFLAGS="$old_CFLAGS"
AC_MSG_RESULT($have_dladdr)
if test x"$have_dladdr" = xyes; then
AC_DEFINE([HAVE_DLADDR], 1, [Define to use 'dladdr' function.])