- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
config.{guess,sub}. Don't use uname calls for cross builds.
This commit is contained in:
parent
abdb5528c0
commit
df2aecbf61
|
@ -116,7 +116,7 @@ Build
|
||||||
- Issue #14324: Fix configure tests for cross builds.
|
- Issue #14324: Fix configure tests for cross builds.
|
||||||
|
|
||||||
- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
|
- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
|
||||||
config.{guess,sub}.
|
config.{guess,sub}. Don't use uname calls for cross builds.
|
||||||
|
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -3150,6 +3150,25 @@ fi
|
||||||
$as_echo_n "checking MACHDEP... " >&6; }
|
$as_echo_n "checking MACHDEP... " >&6; }
|
||||||
if test -z "$MACHDEP"
|
if test -z "$MACHDEP"
|
||||||
then
|
then
|
||||||
|
# avoid using uname for cross builds
|
||||||
|
if test "$cross_compiling" = yes; then
|
||||||
|
# ac_sys_system and ac_sys_release are only used for setting
|
||||||
|
# `define_xopen_source' in the case statement below. For the
|
||||||
|
# current supported cross builds, this macro is not adjusted.
|
||||||
|
case "$host" in
|
||||||
|
*-*-linux*)
|
||||||
|
ac_sys_system=Linux
|
||||||
|
;;
|
||||||
|
*-*-cygwin*)
|
||||||
|
ac_sys_system=Cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# for now, limit cross builds to known configurations
|
||||||
|
MACHDEP="unknown"
|
||||||
|
as_fn_error $? "cross build not supported for $host" "$LINENO" 5
|
||||||
|
esac
|
||||||
|
ac_sys_release=
|
||||||
|
else
|
||||||
ac_sys_system=`uname -s`
|
ac_sys_system=`uname -s`
|
||||||
if test "$ac_sys_system" = "AIX" \
|
if test "$ac_sys_system" = "AIX" \
|
||||||
-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
|
-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
|
||||||
|
@ -3157,19 +3176,20 @@ then
|
||||||
else
|
else
|
||||||
ac_sys_release=`uname -r`
|
ac_sys_release=`uname -r`
|
||||||
fi
|
fi
|
||||||
ac_md_system=`echo $ac_sys_system |
|
fi
|
||||||
tr -d '/ ' | tr '[A-Z]' '[a-z]'`
|
ac_md_system=`echo $ac_sys_system |
|
||||||
ac_md_release=`echo $ac_sys_release |
|
tr -d '/ ' | tr '[A-Z]' '[a-z]'`
|
||||||
tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
|
ac_md_release=`echo $ac_sys_release |
|
||||||
MACHDEP="$ac_md_system$ac_md_release"
|
tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
|
||||||
|
MACHDEP="$ac_md_system$ac_md_release"
|
||||||
|
|
||||||
case $MACHDEP in
|
case $MACHDEP in
|
||||||
linux*) MACHDEP="linux";;
|
linux*) MACHDEP="linux";;
|
||||||
cygwin*) MACHDEP="cygwin";;
|
cygwin*) MACHDEP="cygwin";;
|
||||||
darwin*) MACHDEP="darwin";;
|
darwin*) MACHDEP="darwin";;
|
||||||
irix646) MACHDEP="irix6";;
|
irix646) MACHDEP="irix6";;
|
||||||
'') MACHDEP="unknown";;
|
'') MACHDEP="unknown";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
|
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
|
||||||
|
@ -3305,12 +3325,6 @@ $as_echo "$MACHDEP" >&6; }
|
||||||
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
|
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
|
||||||
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
|
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
|
|
||||||
$as_echo_n "checking machine type as reported by uname -m... " >&6; }
|
|
||||||
ac_sys_machine=`uname -m`
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
|
|
||||||
$as_echo "$ac_sys_machine" >&6; }
|
|
||||||
|
|
||||||
# checks for alternative programs
|
# checks for alternative programs
|
||||||
|
|
||||||
# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
|
# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
|
||||||
|
@ -5733,7 +5747,7 @@ $as_echo "$ac_cv_disable_unused_result_warning" >&6; }
|
||||||
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
|
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
|
||||||
# support. Without this, treatment of subnormals doesn't follow
|
# support. Without this, treatment of subnormals doesn't follow
|
||||||
# the standard.
|
# the standard.
|
||||||
case $ac_sys_machine in
|
case $host in
|
||||||
alpha*)
|
alpha*)
|
||||||
BASECFLAGS="$BASECFLAGS -mieee"
|
BASECFLAGS="$BASECFLAGS -mieee"
|
||||||
;;
|
;;
|
||||||
|
|
40
configure.ac
40
configure.ac
|
@ -292,6 +292,25 @@ AC_SUBST(MACHDEP)
|
||||||
AC_MSG_CHECKING(MACHDEP)
|
AC_MSG_CHECKING(MACHDEP)
|
||||||
if test -z "$MACHDEP"
|
if test -z "$MACHDEP"
|
||||||
then
|
then
|
||||||
|
# avoid using uname for cross builds
|
||||||
|
if test "$cross_compiling" = yes; then
|
||||||
|
# ac_sys_system and ac_sys_release are only used for setting
|
||||||
|
# `define_xopen_source' in the case statement below. For the
|
||||||
|
# current supported cross builds, this macro is not adjusted.
|
||||||
|
case "$host" in
|
||||||
|
*-*-linux*)
|
||||||
|
ac_sys_system=Linux
|
||||||
|
;;
|
||||||
|
*-*-cygwin*)
|
||||||
|
ac_sys_system=Cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# for now, limit cross builds to known configurations
|
||||||
|
MACHDEP="unknown"
|
||||||
|
AC_MSG_ERROR([cross build not supported for $host])
|
||||||
|
esac
|
||||||
|
ac_sys_release=
|
||||||
|
else
|
||||||
ac_sys_system=`uname -s`
|
ac_sys_system=`uname -s`
|
||||||
if test "$ac_sys_system" = "AIX" \
|
if test "$ac_sys_system" = "AIX" \
|
||||||
-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
|
-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
|
||||||
|
@ -299,19 +318,20 @@ then
|
||||||
else
|
else
|
||||||
ac_sys_release=`uname -r`
|
ac_sys_release=`uname -r`
|
||||||
fi
|
fi
|
||||||
ac_md_system=`echo $ac_sys_system |
|
fi
|
||||||
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
ac_md_system=`echo $ac_sys_system |
|
||||||
ac_md_release=`echo $ac_sys_release |
|
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
||||||
tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
|
ac_md_release=`echo $ac_sys_release |
|
||||||
MACHDEP="$ac_md_system$ac_md_release"
|
tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
|
||||||
|
MACHDEP="$ac_md_system$ac_md_release"
|
||||||
|
|
||||||
case $MACHDEP in
|
case $MACHDEP in
|
||||||
linux*) MACHDEP="linux";;
|
linux*) MACHDEP="linux";;
|
||||||
cygwin*) MACHDEP="cygwin";;
|
cygwin*) MACHDEP="cygwin";;
|
||||||
darwin*) MACHDEP="darwin";;
|
darwin*) MACHDEP="darwin";;
|
||||||
irix646) MACHDEP="irix6";;
|
irix646) MACHDEP="irix6";;
|
||||||
'') MACHDEP="unknown";;
|
'') MACHDEP="unknown";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
|
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
|
||||||
|
@ -439,10 +459,6 @@ AC_SUBST(EXPORT_MACOSX_DEPLOYMENT_TARGET)
|
||||||
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
|
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
|
||||||
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
|
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
|
||||||
|
|
||||||
AC_MSG_CHECKING(machine type as reported by uname -m)
|
|
||||||
ac_sys_machine=`uname -m`
|
|
||||||
AC_MSG_RESULT($ac_sys_machine)
|
|
||||||
|
|
||||||
# checks for alternative programs
|
# checks for alternative programs
|
||||||
|
|
||||||
# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
|
# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
|
||||||
|
@ -1010,7 +1026,7 @@ yes)
|
||||||
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
|
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
|
||||||
# support. Without this, treatment of subnormals doesn't follow
|
# support. Without this, treatment of subnormals doesn't follow
|
||||||
# the standard.
|
# the standard.
|
||||||
case $ac_sys_machine in
|
case $host in
|
||||||
alpha*)
|
alpha*)
|
||||||
BASECFLAGS="$BASECFLAGS -mieee"
|
BASECFLAGS="$BASECFLAGS -mieee"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue