From: Ivan Maidanski Date: Thu, 23 Mar 2017 08:38:38 +0000 (+0300) Subject: Support CFLAGS_EXTRA when checking for inline and dladdr (configure) X-Git-Tag: v7.4.6~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10fa7eb7cb8f5690f6bb76b06d2194f260846e38;p=gc 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). --- diff --git a/configure.ac b/configure.ac index 9eb7f4fd..95b2cfa3 100644 --- a/configure.ac +++ b/configure.ac @@ -166,7 +166,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 @@ -743,12 +746,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 ], [{ 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.])