diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2017-02-27 20:58:28 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2017-02-27 20:58:28 +0300 |
commit | 7f2999d05c6ce60dfe7228260669ca48c6be717f (patch) | |
tree | 32a6255deefabdd4c663fa97e919278e122496d7 /configure.ac | |
parent | 106bab9a3d07ece9b25611b493a58cde8f633016 (diff) | |
download | libatomic_ops-7f2999d05c6ce60dfe7228260669ca48c6be717f.tar.gz |
Allow alternate CC (CROSS_CC) for AC_TRY_COMPILE (configure)
* configure.ac [GCC && CROSS_CC] (CC): Assign to CROSS_CC temporarily
(for AC_TRY_COMPILE); restore original value after last AC_TRY_COMPILE.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9087c59..187b871 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,11 @@ need_asm=false PICFLAG= AC_MSG_CHECKING(for PIC compiler flag) if test "$GCC" = yes; then + old_CC="$CC" + if test -n "$CROSS_CC"; then + CC="$CROSS_CC" + fi + case "$host" in *-*-cygwin* | *-*-mingw*) # Cygwin and Mingw[-w32/64] do not need -fPIC. @@ -72,6 +77,8 @@ extern int quiet; if test "$enable_werror" = yes; then CFLAGS="-Werror $CFLAGS" fi + + CC="$old_CC" else case "$host" in *-*-hpux*) |