mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Fix configure's gcc version check. #593
We don't want to test the gcc version on the mac. It is clang underneath and it does not report a version >= 4.8. On High Sierra it reports 4.2.1
This commit is contained in:
parent
e313264305
commit
206ca5710d
@ -177,17 +177,6 @@ AC_DEFUN([AX_JSC_DIRS],[
|
||||
AC_SUBST([MOTIF_HOME])
|
||||
])
|
||||
|
||||
dnl add extra paths to find gcc on RHEL 6 systems
|
||||
PATH="/opt/rh/devtoolset-3/root/usr/bin:${PATH}"
|
||||
dnl add extra paths to find xml headers and X headers on the mac.
|
||||
XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include"
|
||||
CFLAGS="$CFLAGS $XTRAINCPATHS"
|
||||
CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
|
||||
|
||||
dnl look for programs we need to compile and run
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_DEFUN([AX_GCC_VERSION], [
|
||||
GCC_VERSION=""
|
||||
AS_IF([test "x$GCC" = "xyes"],[
|
||||
@ -203,7 +192,32 @@ AC_DEFUN([AX_GCC_VERSION], [
|
||||
])
|
||||
AC_SUBST([GCC_VERSION])
|
||||
])
|
||||
AX_GCC_VERSION
|
||||
|
||||
dnl get the host_os.
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl add extra paths to find gcc on RHEL 6 systems
|
||||
PATH="/opt/rh/devtoolset-3/root/usr/bin:${PATH}"
|
||||
dnl add extra paths to find xml headers and X headers on the mac.
|
||||
XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include"
|
||||
CFLAGS="$CFLAGS $XTRAINCPATHS"
|
||||
CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
|
||||
|
||||
dnl look for programs we need to compile and run
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl do not test gcc version on mac. clang as gcc will return version and it's not >= 4.8
|
||||
TEST_GCC=yes
|
||||
case "${host_os}" in
|
||||
darwin*)
|
||||
TEST_GCC=no
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AS_IF([test "$TEST_GCC" = "yes"],[AX_GCC_VERSION],[])
|
||||
dnl if the compiler is gcc, test for gcc >= 4.8
|
||||
AS_IF([test "x$GCC_VERSION" = "x"],[],
|
||||
[AC_MSG_CHECKING([gcc version >= 4.8])
|
||||
|
189
configure
vendored
189
configure
vendored
@ -635,8 +635,8 @@ CLANG_VERSION
|
||||
LLVM_HOME
|
||||
CLANG
|
||||
LLVM_CONFIG
|
||||
PYTHON_EXTRA_LDFLAGS
|
||||
PYTHON_EXTRA_LIBS
|
||||
PYTHON_EXTRA_LDFLAGS
|
||||
PYTHON_SITE_PKG
|
||||
PYTHON_LIBS
|
||||
PYTHON_CPPFLAGS
|
||||
@ -647,14 +647,6 @@ PTHREAD_CC
|
||||
ax_pthread_config
|
||||
CPP
|
||||
SED
|
||||
host_os
|
||||
host_vendor
|
||||
host_cpu
|
||||
host
|
||||
build_os
|
||||
build_vendor
|
||||
build_cpu
|
||||
build
|
||||
LIBXML
|
||||
MOTIF_HOME
|
||||
X_LIB_DIR
|
||||
@ -691,6 +683,14 @@ LDFLAGS
|
||||
CFLAGS
|
||||
CC
|
||||
AWK
|
||||
host_os
|
||||
host_vendor
|
||||
host_cpu
|
||||
host
|
||||
build_os
|
||||
build_vendor
|
||||
build_cpu
|
||||
build
|
||||
target_alias
|
||||
host_alias
|
||||
build_alias
|
||||
@ -2395,6 +2395,80 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
|
||||
$as_echo_n "checking build system type... " >&6; }
|
||||
if ${ac_cv_build+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_build_alias=$build_alias
|
||||
test "x$ac_build_alias" = x &&
|
||||
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
|
||||
test "x$ac_build_alias" = x &&
|
||||
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
|
||||
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
|
||||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
|
||||
$as_echo "$ac_cv_build" >&6; }
|
||||
case $ac_cv_build in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
|
||||
esac
|
||||
build=$ac_cv_build
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_build
|
||||
shift
|
||||
build_cpu=$1
|
||||
build_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
build_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if ${ac_cv_host+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test "x$host_alias" = x; then
|
||||
ac_cv_host=$ac_cv_build
|
||||
else
|
||||
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
|
||||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
|
||||
$as_echo "$ac_cv_host" >&6; }
|
||||
case $ac_cv_host in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
|
||||
esac
|
||||
host=$ac_cv_host
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_host
|
||||
shift
|
||||
host_cpu=$1
|
||||
host_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
host_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
|
||||
@ -3492,6 +3566,15 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
TEST_GCC=yes
|
||||
case "${host_os}" in
|
||||
darwin*)
|
||||
TEST_GCC=no
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
if test "$TEST_GCC" = "yes"; then :
|
||||
|
||||
GCC_VERSION=""
|
||||
if test "x$GCC" = "xyes"; then :
|
||||
@ -3521,6 +3604,7 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test "x$GCC_VERSION" = "x"; then :
|
||||
|
||||
else
|
||||
@ -5028,77 +5112,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
|
||||
$as_echo_n "checking build system type... " >&6; }
|
||||
if ${ac_cv_build+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_build_alias=$build_alias
|
||||
test "x$ac_build_alias" = x &&
|
||||
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
|
||||
test "x$ac_build_alias" = x &&
|
||||
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
|
||||
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
|
||||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
|
||||
$as_echo "$ac_cv_build" >&6; }
|
||||
case $ac_cv_build in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
|
||||
esac
|
||||
build=$ac_cv_build
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_build
|
||||
shift
|
||||
build_cpu=$1
|
||||
build_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
build_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
|
||||
$as_echo_n "checking host system type... " >&6; }
|
||||
if ${ac_cv_host+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test "x$host_alias" = x; then
|
||||
ac_cv_host=$ac_cv_build
|
||||
else
|
||||
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
|
||||
as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
|
||||
$as_echo "$ac_cv_host" >&6; }
|
||||
case $ac_cv_host in
|
||||
*-*-*) ;;
|
||||
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
|
||||
esac
|
||||
host=$ac_cv_host
|
||||
ac_save_IFS=$IFS; IFS='-'
|
||||
set x $ac_cv_host
|
||||
shift
|
||||
host_cpu=$1
|
||||
host_vendor=$2
|
||||
shift; shift
|
||||
# Remember, the first character of IFS is used to create $*,
|
||||
# except with old shells:
|
||||
host_os=$*
|
||||
IFS=$ac_save_IFS
|
||||
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
|
||||
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
|
||||
if ${ac_cv_path_SED+:} false; then :
|
||||
@ -6199,13 +6212,13 @@ $as_echo "$PYTHON_SITE_PKG" >&6; }
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5
|
||||
$as_echo_n "checking python extra libraries... " >&6; }
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
|
||||
|
||||
|
||||
#
|
||||
@ -6213,13 +6226,13 @@ $as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5
|
||||
$as_echo_n "checking python extra linking flags... " >&6; }
|
||||
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LINKFORSHARED'))"`
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
|
||||
$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
|
||||
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user