+CC_BASENAME=$(expr "//$CC" : '.*/\(.*\)')
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CC compiler name" >&5
printf %s "checking for CC compiler name... " >&6; }
if test ${ac_cv_cc_name+y}
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
- if test $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then
- ac_cv_cc_name="mpicc"
- fi
+ if test "x$CC_BASENAME" = xmpicc
+then :
+ ac_cv_cc_name=mpicc
+fi
else
ac_cv_cc_name="unknown"
fi
preset_cxx="$CXX"
if test -z "$CXX"
then
- case "$CC" in
+ case "$ac_cv_cc_name" in
gcc) if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
set dummy ${ac_tool_prefix}g++; ac_word=$2
CXX="$ac_cv_path_CXX"
fi
;;
- clang|*/clang) if test -n "$ac_tool_prefix"; then
+ clang) if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
set dummy ${ac_tool_prefix}clang++; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
CXX="$ac_cv_path_CXX"
fi
;;
- icc|*/icc) if test -n "$ac_tool_prefix"; then
+ icc) if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
set dummy ${ac_tool_prefix}icpc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
case $ac_sys_system in
hp*|HP*)
- case $CC in
+ case $ac_cv_cc_name in
cc|*/cc) CC="$CC -Ae";;
esac;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
printf %s "checking for GNU ld... " >&6; }
ac_prog=ld
-if test "$GCC" = yes; then
+if test "$ac_cv_cc_name" = "gcc"; then
ac_prog=`$CC -print-prog-name=ld`
fi
case `"$ac_prog" -V 2>&1 < /dev/null` in
DEF_MAKE_ALL_RULE="profile-opt"
REQUIRE_PGO="yes"
DEF_MAKE_RULE="build_all"
- case $CC in
- *gcc*)
+ if test "x$ac_cv_gcc_compat" = xyes
+then :
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
if test ${ax_cv_check_cflags__Werror__fno_semantic_interposition+y}
:
fi
- ;;
- esac
+
+fi
elif test "$ac_sys_system" = "Emscripten" -o "$ac_sys_system" = "WASI"; then
DEF_MAKE_ALL_RULE="build_wasm"
REQUIRE_PGO="no"
llvm_bin_dir=''
llvm_path="${PATH}"
-if test "${CC}" = "clang"
+if test "${ac_cv_cc_name}" = "clang"
then
clang_bin=`which clang`
# Some systems install clang elsewhere as a symlink to the real path
fi
if test "$Py_LTO" = 'true' ; then
- case $CC in
- *clang*)
+ case $ac_cv_cc_name in
+ clang)
LDFLAGS_NOLTO="-fno-lto"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -flto=thin" >&5
printf %s "checking whether C compiler accepts -flto=thin... " >&6; }
;;
esac
;;
- *emcc*)
+ emcc)
if test "$Py_LTO_POLICY" != "default"; then
as_fn_error $? "emcc supports only default lto." "$LINENO" 5
fi
LTOFLAGS="-flto"
LTOCFLAGS="-flto"
;;
- *gcc*)
+ gcc)
if test $Py_LTO_POLICY = thin
then
as_fn_error $? "thin lto is not supported under gcc compiler." "$LINENO" 5
fi
LLVM_PROF_ERR=no
-# GNU Autoconf recommends the use of expr instead of basename.
-CC_BASENAME=$(expr "//$CC" : '.*/\(.*\)')
-case "$CC_BASENAME" in
- *clang*)
+case "$ac_cv_cc_name" in
+ clang)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
fi
fi
;;
- *gcc*)
- case $ac_sys_system in
- Darwin*)
- PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
- PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
- LLVM_PROF_MERGER=" ${LLVM_PROFDATA} merge -output=\"\$(shell pwd)/code.profclangd\" \"\$(shell pwd)\"/*.profclangr "
- LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
- if test "${LLVM_PROF_FOUND}" = "not-found"
- then
- LLVM_PROF_ERR=yes
- if test "${REQUIRE_PGO}" = "yes"
- then
- as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
- fi
- fi
- ;;
- *)
- PGO_PROF_GEN_FLAG="-fprofile-generate"
- PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
- LLVM_PROF_MERGER="true"
- LLVM_PROF_FILE=""
- ;;
- esac
+ gcc)
+ PGO_PROF_GEN_FLAG="-fprofile-generate"
+ PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
;;
- *icc*)
+ icc)
PGO_PROF_GEN_FLAG="-prof-gen"
PGO_PROF_USE_FLAG="-prof-use"
LLVM_PROF_MERGER="true"
# compiler and platform. BASECFLAGS tweaks need to be made even if the
# user set OPT.
-case $CC in
- *clang*)
- cc_is_clang=1
- ;;
- *)
- if $CC --version 2>&1 | grep -q clang
- then
- cc_is_clang=1
- else
- cc_is_clang=
- fi
-esac
-
save_CFLAGS=$CFLAGS
CFLAGS="-fstrict-overflow -fno-strict-overflow"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fstrict-overflow and -fno-strict-overflow" >&5
then
case $GCC in
yes)
- if test -n "${cc_is_clang}"
+ if test "${ac_cv_cc_name}" != "clang"
then
# bpo-30104: disable strict aliasing to compile correctly dtoa.c,
# see Makefile.pre.in for more information
fi
-case $GCC in
-yes)
+if test "x$ac_cv_gcc_compat" = xyes
+then :
+
CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
# ICC doesn't recognize the option, but only emits a warning
## XXX does it emit an unused result warning and can it be disabled?
- case "$CC_BASENAME" in #(
- *icc*) :
+ case "$ac_cv_cc_name" in #(
+ icc) :
ac_cv_disable_unused_result_warning=no
Darwin*)
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
# used to be here, but non-Apple gcc doesn't accept them.
- if test "${CC}" = gcc
- then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
printf %s "checking which compiler should be used... " >&6; }
- case "${UNIVERSALSDK}" in
- */MacOSX10.4u.sdk)
- # Build using 10.4 SDK, force usage of gcc when the
- # compiler is gcc, otherwise the user will get very
- # confusing error messages when building on OSX 10.6
- CC=gcc-4.0
- CPP=cpp-4.0
- ;;
- esac
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
- fi
LIPO_INTEL64_FLAGS=""
if test "${enable_universalsdk}"
# end of Darwin* tests
;;
esac
- ;;
-*)
+else $as_nop
+
case $ac_sys_system in
OpenUNIX*|UnixWare*)
BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
;;
esac
- ;;
-esac
-case "$CC_BASENAME" in
-*mpicc*)
+fi
+
+case "$ac_cv_cc_name" in
+mpicc)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;
-*icc*)
+icc)
# ICC needs -fp-model strict or floats behave badly
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
;;
-*xlc*)
+xlc)
CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
;;
esac
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
;;
SunOS/5*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDCXXSHARED='$(CXX) -G'
fi ;;
hp*|HP*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
OpenUNIX*|UnixWare*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
if test -z "$CCSHARED"
then
case $ac_sys_system/$ac_sys_release in
- SunOS*) if test "$GCC" = yes;
+ SunOS*) if test "$ac_cv_gcc_compat" = "yes";
then CCSHARED="-fPIC";
elif test `uname -p` = sparc;
then CCSHARED="-xcode=pic32";
else CCSHARED="-Kpic";
fi;;
- hp*|HP*) if test "$GCC" = yes;
+ hp*|HP*) if test "$ac_cv_gcc_compat" = "yes";
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
- if test "$GCC" = "yes"
+ if test "$ac_cv_gcc_compat" = "yes"
then CCSHARED="-fPIC"
else CCSHARED="-KPIC"
fi;;
SCO_SV*)
- if test "$GCC" = "yes"
+ if test "$ac_cv_gcc_compat" = "yes"
then CCSHARED="-fPIC"
else CCSHARED="-Kpic -belf"
fi;;
then
LINKFORSHARED="-Wl,--export-dynamic"
fi;;
- SunOS/5*) case $CC in
- *gcc*)
+ SunOS/5*) if test "$ac_cv_gcc_compat" = "yes"; then
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
then
LINKFORSHARED="-Xlinker --export-dynamic"
- fi;;
- esac;;
+ fi
+ fi
+ ;;
CYGWIN*)
if test $enable_shared = "no"
then
fi
elif test $ac_cv_sizeof_size_t -eq 4; then
if test "$ac_cv_gcc_asm_for_x87" = yes -a "$libmpdec_system" != sunos; then
- case $CC in #(
+ case $ac_cv_cc_name in #(
*gcc*) :
libmpdec_machine=ppro ;; #(
*clang*) :
# Some versions of gcc miscompile inline asm:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
- case $CC in
- *gcc*)
+ case $ac_cv_cc_name in
+ gcc)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
printf %s "checking for gcc ipa-pure-const bug... " >&6; }
saved_cflags="$CFLAGS"
AC_PROG_SED
AC_PROG_EGREP
+dnl GNU Autoconf recommends the use of expr instead of basename.
+AS_VAR_SET([CC_BASENAME], [$(expr "//$CC" : '.*/\(.*\)')])
+
dnl detect compiler name
dnl check for xlc before clang, newer xlc's can use clang as frontend.
dnl check for GCC last, other compilers set __GNUC__, too.
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
- if test $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then
- ac_cv_cc_name="mpicc"
- fi
+ AS_VAR_IF([CC_BASENAME], [mpicc], [ac_cv_cc_name=mpicc])
else
ac_cv_cc_name="unknown"
fi
preset_cxx="$CXX"
if test -z "$CXX"
then
- case "$CC" in
+ case "$ac_cv_cc_name" in
gcc) AC_PATH_TOOL([CXX], [g++], [g++], [notfound]) ;;
cc) AC_PATH_TOOL([CXX], [c++], [c++], [notfound]) ;;
- clang|*/clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;;
- icc|*/icc) AC_PATH_TOOL([CXX], [icpc], [icpc], [notfound]) ;;
+ clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;;
+ icc) AC_PATH_TOOL([CXX], [icpc], [icpc], [notfound]) ;;
esac
if test "$CXX" = "notfound"
then
case $ac_sys_system in
hp*|HP*)
- case $CC in
+ case $ac_cv_cc_name in
cc|*/cc) CC="$CC -Ae";;
esac;;
esac
AC_SUBST([GNULD])
AC_MSG_CHECKING([for GNU ld])
ac_prog=ld
-if test "$GCC" = yes; then
+if test "$ac_cv_cc_name" = "gcc"; then
ac_prog=`$CC -print-prog-name=ld`
fi
case `"$ac_prog" -V 2>&1 < /dev/null` in
DEF_MAKE_ALL_RULE="profile-opt"
REQUIRE_PGO="yes"
DEF_MAKE_RULE="build_all"
- case $CC in
- *gcc*)
+ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
AX_CHECK_COMPILE_FLAG([-fno-semantic-interposition],[
CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
], [], [-Werror])
- ;;
- esac
+ ])
elif test "$ac_sys_system" = "Emscripten" -o "$ac_sys_system" = "WASI"; then
dnl Emscripten does not support shared extensions yet. Build
dnl "python.[js,wasm]", "pybuilddir.txt", and "platform" files.
llvm_bin_dir=''
llvm_path="${PATH}"
-if test "${CC}" = "clang"
+if test "${ac_cv_cc_name}" = "clang"
then
clang_bin=`which clang`
# Some systems install clang elsewhere as a symlink to the real path
],
[AC_MSG_RESULT([no])])
if test "$Py_LTO" = 'true' ; then
- case $CC in
- *clang*)
+ case $ac_cv_cc_name in
+ clang)
LDFLAGS_NOLTO="-fno-lto"
dnl Clang linker requires -flto in order to link objects with LTO information.
dnl Thin LTO is faster and works for object files with full LTO information, too.
;;
esac
;;
- *emcc*)
+ emcc)
if test "$Py_LTO_POLICY" != "default"; then
AC_MSG_ERROR([emcc supports only default lto.])
fi
LTOFLAGS="-flto"
LTOCFLAGS="-flto"
;;
- *gcc*)
+ gcc)
if test $Py_LTO_POLICY = thin
then
AC_MSG_ERROR([thin lto is not supported under gcc compiler.])
fi
LLVM_PROF_ERR=no
-# GNU Autoconf recommends the use of expr instead of basename.
-AS_VAR_SET([CC_BASENAME], [$(expr "//$CC" : '.*/\(.*\)')])
-case "$CC_BASENAME" in
- *clang*)
+case "$ac_cv_cc_name" in
+ clang)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
fi
fi
;;
- *gcc*)
- case $ac_sys_system in
- Darwin*)
- PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
- PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
- LLVM_PROF_MERGER=m4_normalize("
- ${LLVM_PROFDATA} merge
- -output=\"\$(shell pwd)/code.profclangd\"
- \"\$(shell pwd)\"/*.profclangr
- ")
- LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"\$(shell pwd)/code-%p.profclangr\""
- if test "${LLVM_PROF_FOUND}" = "not-found"
- then
- LLVM_PROF_ERR=yes
- if test "${REQUIRE_PGO}" = "yes"
- then
- AC_MSG_ERROR([llvm-profdata is required for a --enable-optimizations build but could not be found.])
- fi
- fi
- ;;
- *)
- PGO_PROF_GEN_FLAG="-fprofile-generate"
- PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
- LLVM_PROF_MERGER="true"
- LLVM_PROF_FILE=""
- ;;
- esac
+ gcc)
+ PGO_PROF_GEN_FLAG="-fprofile-generate"
+ PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
;;
- *icc*)
+ icc)
PGO_PROF_GEN_FLAG="-prof-gen"
PGO_PROF_USE_FLAG="-prof-use"
LLVM_PROF_MERGER="true"
# compiler and platform. BASECFLAGS tweaks need to be made even if the
# user set OPT.
-case $CC in
- *clang*)
- cc_is_clang=1
- ;;
- *)
- if $CC --version 2>&1 | grep -q clang
- then
- cc_is_clang=1
- else
- cc_is_clang=
- fi
-esac
-
dnl Historically, some of our code assumed that signed integer overflow
dnl is defined behaviour via twos-complement.
dnl Set STRICT_OVERFLOW_CFLAGS and NO_STRICT_OVERFLOW_CFLAGS depending on compiler support.
then
case $GCC in
yes)
- if test -n "${cc_is_clang}"
+ if test "${ac_cv_cc_name}" != "clang"
then
# bpo-30104: disable strict aliasing to compile correctly dtoa.c,
# see Makefile.pre.in for more information
AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=3], [CFLAGS_NODIST="$CFLAGS_NODIST -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"], [AC_MSG_WARN([-D_FORTIFY_SOURCE=3 not supported])], [-Werror])
fi
-case $GCC in
-yes)
+AS_VAR_IF([ac_cv_gcc_compat], [yes], [
CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"
PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra])
# ICC doesn't recognize the option, but only emits a warning
## XXX does it emit an unused result warning and can it be disabled?
- AS_CASE(["$CC_BASENAME"],
- [*icc*], [ac_cv_disable_unused_result_warning=no]
+ AS_CASE(["$ac_cv_cc_name"],
+ [icc], [ac_cv_disable_unused_result_warning=no]
[PY_CHECK_CC_WARNING([disable], [unused-result])])
AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
[BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Darwin*)
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
# used to be here, but non-Apple gcc doesn't accept them.
- if test "${CC}" = gcc
- then
- AC_MSG_CHECKING([which compiler should be used])
- case "${UNIVERSALSDK}" in
- */MacOSX10.4u.sdk)
- # Build using 10.4 SDK, force usage of gcc when the
- # compiler is gcc, otherwise the user will get very
- # confusing error messages when building on OSX 10.6
- CC=gcc-4.0
- CPP=cpp-4.0
- ;;
- esac
- AC_MSG_RESULT([$CC])
- fi
+ AC_MSG_CHECKING([which compiler should be used])
+ case "${UNIVERSALSDK}" in
+ */MacOSX10.4u.sdk)
+ # Build using 10.4 SDK, force usage of gcc when the
+ # compiler is gcc, otherwise the user will get very
+ # confusing error messages when building on OSX 10.6
+ CC=gcc-4.0
+ CPP=cpp-4.0
+ ;;
+ esac
+ AC_MSG_RESULT([$CC])
LIPO_INTEL64_FLAGS=""
if test "${enable_universalsdk}"
# end of Darwin* tests
;;
esac
- ;;
-
-*)
+], [
case $ac_sys_system in
OpenUNIX*|UnixWare*)
BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
;;
esac
- ;;
-esac
+])
-case "$CC_BASENAME" in
-*mpicc*)
+case "$ac_cv_cc_name" in
+mpicc)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;
-*icc*)
+icc)
# ICC needs -fp-model strict or floats behave badly
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
;;
-*xlc*)
+xlc)
CFLAGS_NODIST="$CFLAGS_NODIST -qalias=noansi -qmaxmem=-1"
;;
esac
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
;;
SunOS/5*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDCXXSHARED='$(CXX) -G'
fi ;;
hp*|HP*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
OpenUNIX*|UnixWare*)
- if test "$GCC" = "yes" ; then
+ if test "$ac_cv_gcc_compat" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
else
if test -z "$CCSHARED"
then
case $ac_sys_system/$ac_sys_release in
- SunOS*) if test "$GCC" = yes;
+ SunOS*) if test "$ac_cv_gcc_compat" = "yes";
then CCSHARED="-fPIC";
elif test `uname -p` = sparc;
then CCSHARED="-xcode=pic32";
else CCSHARED="-Kpic";
fi;;
- hp*|HP*) if test "$GCC" = yes;
+ hp*|HP*) if test "$ac_cv_gcc_compat" = "yes";
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
- if test "$GCC" = "yes"
+ if test "$ac_cv_gcc_compat" = "yes"
then CCSHARED="-fPIC"
else CCSHARED="-KPIC"
fi;;
SCO_SV*)
- if test "$GCC" = "yes"
+ if test "$ac_cv_gcc_compat" = "yes"
then CCSHARED="-fPIC"
else CCSHARED="-Kpic -belf"
fi;;
then
LINKFORSHARED="-Wl,--export-dynamic"
fi;;
- SunOS/5*) case $CC in
- *gcc*)
+ SunOS/5*) if test "$ac_cv_gcc_compat" = "yes"; then
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
then
LINKFORSHARED="-Xlinker --export-dynamic"
- fi;;
- esac;;
+ fi
+ fi
+ ;;
CYGWIN*)
if test $enable_shared = "no"
then
fi
elif test $ac_cv_sizeof_size_t -eq 4; then
if test "$ac_cv_gcc_asm_for_x87" = yes -a "$libmpdec_system" != sunos; then
- AS_CASE([$CC],
+ AS_CASE([$ac_cv_cc_name],
[*gcc*], [libmpdec_machine=ppro],
[*clang*], [libmpdec_machine=ppro],
[libmpdec_machine=ansi32]
# Some versions of gcc miscompile inline asm:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
- case $CC in
- *gcc*)
+ case $ac_cv_cc_name in
+ gcc)
AC_MSG_CHECKING([for gcc ipa-pure-const bug])
saved_cflags="$CFLAGS"
CFLAGS="-O2"