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: v8.0.0~820 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee1bc34de304eb6e012750cedd63a534485b5f08;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 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 ], [{ 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.])