From 3065c94f373ed32922374a04923f21d41ca0a726 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 17 Sep 2001 04:03:14 +0000 Subject: Add cross-compilation defaults to most AC_TRY_RUN values. The supplied values are the most "normal" or "common" values found for recent 32 bit machines. This now seems to work to build Python 2.2 for the ARM processor used on the iPAQ. --- configure | 46 +++++++++++++++++++++---------------------- configure.in | 64 ++++++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 68 insertions(+), 42 deletions(-) diff --git a/configure b/configure index cd85362..84e1e60 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.258 +# From configure.in Revision: 1.260 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -1679,7 +1679,7 @@ else ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_opt_olimit_ok=no else cat > conftest.$ac_ext <&2; exit 1; } + ac_cv_olimit_ok=no else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_int=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_long=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_void_p=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_char=1 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_short=2 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_float=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_double=8 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_fpos_t=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_uintptr_t=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_off_t=4 else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_time_t=4 else cat > conftest.$ac_ext <&5 echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_pthread_t=4 else cat > conftest.$ac_ext <&5 echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_pthread_system_supported=no else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_bad_static_forward=no else cat > conftest.$ac_ext <&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_malloc_zero=nonnull else cat > conftest.$ac_ext <&6 if test "$ac_cv_malloc_zero" = null then @@ -6741,7 +6741,7 @@ if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } + ac_cv_sizeof_wchar_t=4 else cat > conftest.$ac_ext <&2; exit 1; } + ac_cv_rshift_extends_sign=yes else cat > conftest.$ac_ext <&2; exit 1; } + ac_cv_broken_nice=no else cat > conftest.$ac_ext <. @@ -504,7 +506,10 @@ main() if (!f) exit(1); fprintf(f, "%d\n", sizeof(off_t)); exit(0); -}], ac_cv_sizeof_off_t=`cat conftestval`, ac_cv_sizeof_off_t=0) +}], +ac_cv_sizeof_off_t=`cat conftestval`, +ac_cv_sizeof_off_t=0, +ac_cv_sizeof_off_t=4) ]) AC_MSG_RESULT($ac_cv_sizeof_off_t) AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t) @@ -530,7 +535,10 @@ main() if (!f) exit(1); fprintf(f, "%d\n", sizeof(time_t)); exit(0); -}], ac_cv_sizeof_time_t=`cat conftestval`, ac_cv_sizeof_time_t=0) +}], +ac_cv_sizeof_time_t=`cat conftestval`, +ac_cv_sizeof_time_t=0, +ac_cv_sizeof_time_t=4) ]) AC_MSG_RESULT($ac_cv_sizeof_time_t) AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t) @@ -557,7 +565,10 @@ if test "$have_pthread_t" = yes ; then if (!f) exit(1); fprintf(f, "%d\n", sizeof(pthread_t)); exit(0); - }], ac_cv_sizeof_pthread_t=`cat conftestval`, ac_cv_sizeof_pthread_t=0) + }], + ac_cv_sizeof_pthread_t=`cat conftestval`, + ac_cv_sizeof_pthread_t=0, + ac_cv_sizeof_pthread_t=4) ]) AC_MSG_RESULT($ac_cv_sizeof_pthread_t) AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t) @@ -993,7 +1004,10 @@ else if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); exit(0); - }], ac_cv_pthread_system_supported=yes, ac_cv_pthread_system_supported=no) + }], + ac_cv_pthread_system_supported=yes, + ac_cv_pthread_system_supported=no, + ac_cv_pthread_system_supported=no) ]) AC_MSG_RESULT($ac_cv_pthread_system_supported) if test "$ac_cv_pthread_system_supported" = "yes"; then @@ -1548,7 +1562,10 @@ int foobar() { static struct s foo = { 1, 2 }; main() { exit(!((int)&foo == foobar())); -}], ac_cv_bad_static_forward=no, ac_cv_bad_static_forward=yes)]) +}], +ac_cv_bad_static_forward=no, +ac_cv_bad_static_forward=yes, +ac_cv_bad_static_forward=no)]) AC_MSG_RESULT($ac_cv_bad_static_forward) if test "$ac_cv_bad_static_forward" = yes then @@ -1710,7 +1727,10 @@ main() { if (p == NULL) exit(1); free(p); exit(0); -}], ac_cv_malloc_zero=nonnull, ac_cv_malloc_zero=null)]) +}], +ac_cv_malloc_zero=nonnull, +ac_cv_malloc_zero=null, +ac_cv_malloc_zero=nonnull)]) # XXX arm cross-compile? AC_MSG_RESULT($ac_cv_malloc_zero) if test "$ac_cv_malloc_zero" = null then @@ -1726,7 +1746,7 @@ wchar_h="no" # determine wchar_t size if test "$wchar_h" = yes then - AC_CHECK_SIZEOF(wchar_t) + AC_CHECK_SIZEOF(wchar_t, 4) fi AC_MSG_CHECKING(what type to use for unicode) @@ -1787,7 +1807,10 @@ int main() { exit(((-1)>>3 == -1) ? 0 : 1); } -], ac_cv_rshift_extends_sign=yes, ac_cv_rshift_extends_sign=no)]) +], +ac_cv_rshift_extends_sign=yes, +ac_cv_rshift_extends_sign=no, +ac_cv_rshift_extends_sign=yes)]) AC_MSG_RESULT($ac_cv_rshift_extends_sign) if test "$ac_cv_rshift_extends_sign" = no then @@ -1823,7 +1846,10 @@ int main() exit(0); exit(1); } -],ac_cv_broken_nice=yes, ac_cv_broken_nice=no)]) +], +ac_cv_broken_nice=yes, +ac_cv_broken_nice=no, +ac_cv_broken_nice=no)]) AC_MSG_RESULT($ac_cv_broken_nice) if test "$ac_cv_broken_nice" = yes then -- cgit v0.12