@@ -3150,26 +3150,46 @@ fi
31503150$as_echo_n " checking MACHDEP... " >&6 ; }
31513151if test -z " $MACHDEP "
31523152then
3153+ # avoid using uname for cross builds
3154+ if test " $cross_compiling " = yes; then
3155+ # ac_sys_system and ac_sys_release are only used for setting
3156+ # `define_xopen_source' in the case statement below. For the
3157+ # current supported cross builds, this macro is not adjusted.
3158+ case " $host " in
3159+ * -* -linux* )
3160+ ac_sys_system=Linux
3161+ ;;
3162+ * -* -cygwin* )
3163+ ac_sys_system=Cygwin
3164+ ;;
3165+ * )
3166+ # for now, limit cross builds to known configurations
3167+ MACHDEP=" unknown"
3168+ as_fn_error $? " cross build not supported for $host " " $LINENO " 5
3169+ esac
3170+ ac_sys_release=
3171+ else
31533172 ac_sys_system=` uname -s`
31543173 if test " $ac_sys_system " = " AIX" \
31553174 -o " $ac_sys_system " = " UnixWare" -o " $ac_sys_system " = " OpenUNIX" ; then
31563175 ac_sys_release=` uname -v`
31573176 else
31583177 ac_sys_release=` uname -r`
31593178 fi
3160- ac_md_system=` echo $ac_sys_system |
3161- tr -d ' / ' | tr ' [A-Z]' ' [a-z]' `
3162- ac_md_release=` echo $ac_sys_release |
3163- tr -d ' / ' | sed ' s/^[A-Z]\.//' | sed ' s/\..*//' `
3164- MACHDEP=" $ac_md_system$ac_md_release "
3179+ fi
3180+ ac_md_system=` echo $ac_sys_system |
3181+ tr -d ' / ' | tr ' [A-Z]' ' [a-z]' `
3182+ ac_md_release=` echo $ac_sys_release |
3183+ tr -d ' / ' | sed ' s/^[A-Z]\.//' | sed ' s/\..*//' `
3184+ MACHDEP=" $ac_md_system$ac_md_release "
31653185
3166- case $MACHDEP in
3186+ case $MACHDEP in
31673187 linux* ) MACHDEP=" linux" ;;
31683188 cygwin* ) MACHDEP=" cygwin" ;;
31693189 darwin* ) MACHDEP=" darwin" ;;
31703190 irix646) MACHDEP=" irix6" ;;
31713191 ' ' ) MACHDEP=" unknown" ;;
3172- esac
3192+ esac
31733193fi
31743194
31753195# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
@@ -3305,12 +3325,6 @@ $as_echo "$MACHDEP" >&6; }
33053325CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
33063326EXPORT_MACOSX_DEPLOYMENT_TARGET=' #'
33073327
3308- { $as_echo " $as_me :${as_lineno-$LINENO } : checking machine type as reported by uname -m" >&5
3309- $as_echo_n " checking machine type as reported by uname -m... " >&6 ; }
3310- ac_sys_machine=` uname -m`
3311- { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_sys_machine " >&5
3312- $as_echo " $ac_sys_machine " >&6 ; }
3313-
33143328# checks for alternative programs
33153329
33163330# 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; }
57335747 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
57345748 # support. Without this, treatment of subnormals doesn't follow
57355749 # the standard.
5736- case $ac_sys_machine in
5750+ case $host in
57375751 alpha* )
57385752 BASECFLAGS=" $BASECFLAGS -mieee"
57395753 ;;
0 commit comments