From 8b4c48698e50180b160ec79cccf1ebc8c6d34a18 Mon Sep 17 00:00:00 2001 From: weissms Date: Sat, 14 May 2011 15:18:46 +0000 Subject: [PATCH] Made work --enable-crosstools so the generated cross tool chain can compile all target code. Added --with-crosstools to specify a directory where the generated cross tool chain is placed or searched for. If a cross gcc is found there it is used like a preinstalled cross tool chain. If none of both configure options is given everything behaves like before. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@38683 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- Makefile.in | 21 +- config/make.cfg.in | 2 +- config/target.cfg.in | 11 +- configure | 654 ++++++++++++--------- configure.in | 209 +++++-- mmakefile | 1 + tools/collect-aros/env.h.in | 8 +- tools/collect-aros/mmakefile | 11 +- tools/crosstools/mmakefile.src | 124 ++-- .../libs/mesa/src/aros/arosmesa/mmakefile.src | 2 +- workbench/libs/mesa/src/aros/glu/mmakefile.src | 2 +- 11 files changed, 632 insertions(+), 413 deletions(-) rewrite tools/crosstools/mmakefile.src (63%) diff --git a/Makefile.in b/Makefile.in index 2d9e7ea118..186589238c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,7 +25,7 @@ ifneq (,$(findstring s,$(MAKEFLAGS))) MMAKE_OPTIONS += -q endif -all: tools +all: crosstools @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.AROS makedirs: @@ -46,6 +46,13 @@ tools : makedirs mmake $(TOOLLIB) $(GENMF) $(ARCHTOOL) $(ELF2HUNK) \ $(COLLECT-AROS) $(AFSLIB) $(COPYTOAFS) \ $(FD2INLINE) $(FD2PRAGMA) $(SFDC) $(SETREV) +crosstools : tools +ifneq ($(CROSSTOOLS_TARGET),) + @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$(CROSSTOOLS_TARGET) +else + @$(NOP) +endif + $(TOOLLIB) : $(wildcard $(SRCDIR)/tools/toollib/*.[ch]) @$(ECHO) Building toollib... @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/toollib SRCDIR=$(SRCDIR) TOP=$(TOP) CURDIR=toollib @@ -171,12 +178,16 @@ $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/confi @$(NOP) # targets which do not generate files or for which a file/directory exists -.PHONY: default all makedirs tools docs clean arch-clean dist-clean install \ +.PHONY: default all makedirs tools crosstools docs clean arch-clean dist-clean install \ $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts \ - test kernel boot workbench compiler contrib sdk mmake + test kernel boot workbench compiler contrib sdk mmake query # Workaround for bug in make v3.81 (should normally be handled by .DEFAULT) -install test kernel boot workbench compiler contrib sdk : tools +install test kernel boot workbench compiler contrib sdk : crosstools + @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@ + +# Bypass crosstools target. +query : tools @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@ # Map MetaTargets to make targets : Call mmake with AROS.target @@ -184,6 +195,6 @@ install test kernel boot workbench compiler contrib sdk : tools # Calling standard main targets, but is usable as a shortcut for MetaMake # if it was not installed globally .DEFAULT : - @$(MAKE) $(MKARGS) tools + @$(MAKE) $(MKARGS) crosstools @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@ diff --git a/config/make.cfg.in b/config/make.cfg.in index 1902a4f9b0..cc65b1d6b5 100644 --- a/config/make.cfg.in +++ b/config/make.cfg.in @@ -28,7 +28,7 @@ include $(GENDIR)/config/target.cfg include $(HOSTGENDIR)/config/host.cfg # Cross tools installation directory. -CROSSTOOLSDIR := $(TOOLDIR)/crosstools +CROSSTOOLSDIR := @AROS_CROSSTOOLSDIR@ # Files downloaded from the net are put here PORTSSOURCEDIR := @AROS_PORTSSRCDIR@ diff --git a/config/target.cfg.in b/config/target.cfg.in index 151e4576a2..498cd13f3a 100644 --- a/config/target.cfg.in +++ b/config/target.cfg.in @@ -87,11 +87,12 @@ CC := $(TARGET_CC) AS := $(TARGET_AS) # Optional components -X11_HIDD_TARGET := @x11_hidd_target@ -SDL_HIDD_TARGET := @sdl_hidd_target@ -PCI_HIDD_TARGET := @pci_hidd_target@ -OSS_LIBRARY_TARGET := @oss_library_target@ -CROSSTOOLS_TARGET := @crosstools_target@ +X11_HIDD_TARGET := @x11_hidd_target@ +SDL_HIDD_TARGET := @sdl_hidd_target@ +PCI_HIDD_TARGET := @pci_hidd_target@ +OSS_LIBRARY_TARGET := @oss_library_target@ +CROSSTOOLS_TARGET := @crosstools_target@ +CROSSTOOLS_CXX_TARGET := @crosstools_cxx_target@ HOST_X11_CFLAGS := $(addprefix -I,@aros_host_x11_includes@) HOST_X11_LIBS := $(addprefix -L,@aros_host_x11_libdirs@) -lX11 diff --git a/configure b/configure index 49c550fe2d..41f12328a5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,7 +89,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -215,18 +214,11 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -634,6 +626,7 @@ oss_library_target pci_hidd_target sdl_hidd_target x11_hidd_target +crosstools_cxx_target crosstools_target aros_target_strip_flags aros_target_genmap @@ -695,6 +688,7 @@ aros_host_cpu aros_host_arch aros_cc_pre AROS_PORTSSRCDIR +AROS_CROSSTOOLSDIR SRCDIR AROS_BUILDDIR_UNIX AROS_BUILDDIR @@ -847,6 +841,7 @@ with_ios_sdk with_sdk with_ndk with_android_version +with_crosstools with_aros_gcc with_portssources with_bootloader @@ -877,7 +872,6 @@ LDFLAGS LIBS CPPFLAGS CPP -CPPFLAGS XMKMF' @@ -1283,7 +1277,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac @@ -1549,6 +1543,7 @@ Optional Packages: (default=$default_android_ndk). --with-android-version=VERSION Use Android platform VERSION (default=2.2). + --with-crosstools=DIR Where to install or search for cross tools binaries --with-aros-gcc=VERSION Use aros-gcc-VERSION for building AROS --with-portssources=DIR Where to download sourcecode for external ports --with-bootloader=NAME Use a specific bootloader @@ -1639,7 +1634,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1685,7 +1680,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1722,7 +1717,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1735,10 +1730,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1801,7 +1796,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1810,7 +1805,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel @@ -1851,7 +1846,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1865,7 +1860,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1883,7 +1878,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile @@ -1928,7 +1923,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1942,7 +1937,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : +if eval "test \"\${$4+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1986,7 +1981,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_member @@ -2001,7 +1996,7 @@ ac_fn_c_check_decl () as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2032,7 +2027,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_decl @@ -2045,7 +2040,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2086,7 +2081,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type @@ -2098,7 +2093,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2153,7 +2148,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func cat >config.log <<_ACEOF @@ -2161,7 +2156,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2419,7 +2414,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -2551,7 +2546,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { $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 : +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -2567,7 +2562,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2585,7 +2580,7 @@ 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 : +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -2600,7 +2595,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2642,15 +2637,15 @@ if test "$host_os" = "mingw32" ; then fi #don't know where else to put this... -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Building AROS in .. " >&5 -$as_echo_n "checking Building AROS in .. ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking building AROS in" >&5 +$as_echo_n "checking building AROS in... " >&6; } AROS_BUILDDIR=`${PWDCMD-pwd}` AROS_BUILDDIR_UNIX=${PWD} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AROS_BUILDDIR" >&5 $as_echo "$AROS_BUILDDIR" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking AROS Source in .. " >&5 -$as_echo_n "checking AROS Source in .. ... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking AROS source in" >&5 +$as_echo_n "checking AROS source in... " >&6; } srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` SRCDIR=${srcpwd} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SRCDIR" >&5 @@ -2679,7 +2674,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2719,7 +2714,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2772,7 +2767,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2812,7 +2807,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2871,7 +2866,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2915,7 +2910,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2970,7 +2965,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3085,7 +3080,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3128,7 +3123,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3187,7 +3182,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -3198,7 +3193,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3239,7 +3234,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3249,7 +3244,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3286,7 +3281,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3364,7 +3359,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3465,7 +3460,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : +if test "${ac_cv_prog_cc_c99+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no @@ -3640,7 +3635,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3736,7 +3731,7 @@ fi esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if ${ac_cv_prog_cc_stdc+:} false; then : + if test "${ac_cv_prog_cc_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 fi @@ -3764,7 +3759,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3880,7 +3875,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -3897,7 +3892,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3940,7 +3935,7 @@ fi set dummy mmake; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MMAKE+:} false; then : +if test "${ac_cv_prog_MMAKE+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$MMAKE"; then @@ -3984,7 +3979,7 @@ if test "$GCC" = "yes"; then set dummy `basename $aros_gcc_ld`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_host_ld+:} false; then : +if test "${ac_cv_path_aros_host_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_host_ld in @@ -4026,7 +4021,7 @@ if test "$aros_host_ld" = ""; then set dummy ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_host_ld+:} false; then : +if test "${ac_cv_path_aros_host_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_host_ld in @@ -4082,7 +4077,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_aclocal+:} false; then : +if test "${ac_cv_prog_aros_host_aclocal+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_aclocal"; then @@ -4124,7 +4119,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_autoconf+:} false; then : +if test "${ac_cv_prog_aros_host_autoconf+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_autoconf"; then @@ -4166,7 +4161,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_autoheader+:} false; then : +if test "${ac_cv_prog_aros_host_autoheader+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_autoheader"; then @@ -4208,7 +4203,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_automake+:} false; then : +if test "${ac_cv_prog_aros_host_automake+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_automake"; then @@ -4527,7 +4522,7 @@ esac set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_ar+:} false; then : +if test "${ac_cv_prog_aros_host_ar+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_ar"; then @@ -4567,7 +4562,7 @@ fi set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_ranlib+:} false; then : +if test "${ac_cv_prog_aros_host_ranlib+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_ranlib"; then @@ -4607,7 +4602,7 @@ fi set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_aros_host_strip+:} false; then : +if test "${ac_cv_prog_aros_host_strip+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$aros_host_strip"; then @@ -4648,7 +4643,7 @@ fi set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RM+:} false; then : +if test "${ac_cv_prog_RM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RM"; then @@ -4688,7 +4683,7 @@ fi set dummy cp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CP+:} false; then : +if test "${ac_cv_prog_CP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CP"; then @@ -4728,7 +4723,7 @@ fi set dummy mv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MV+:} false; then : +if test "${ac_cv_prog_MV+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$MV"; then @@ -4768,7 +4763,7 @@ fi set dummy echo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ECHO+:} false; then : +if test "${ac_cv_prog_ECHO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ECHO"; then @@ -4808,7 +4803,7 @@ fi set dummy mkdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MKDIR+:} false; then : +if test "${ac_cv_prog_MKDIR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$MKDIR"; then @@ -4848,7 +4843,7 @@ fi set dummy touch; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_TOUCH+:} false; then : +if test "${ac_cv_prog_TOUCH+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$TOUCH"; then @@ -4888,7 +4883,7 @@ fi set dummy sort; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_SORT+:} false; then : +if test "${ac_cv_prog_SORT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$SORT"; then @@ -4928,7 +4923,7 @@ fi set dummy uniq; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_UNIQ+:} false; then : +if test "${ac_cv_prog_UNIQ+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$UNIQ"; then @@ -4968,7 +4963,7 @@ fi set dummy true; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NOP+:} false; then : +if test "${ac_cv_prog_NOP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NOP"; then @@ -5008,7 +5003,7 @@ fi set dummy cat; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CAT+:} false; then : +if test "${ac_cv_prog_CAT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CAT"; then @@ -5048,7 +5043,7 @@ fi set dummy bison; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_BISON+:} false; then : +if test "${ac_cv_prog_BISON+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$BISON"; then @@ -5088,7 +5083,7 @@ fi set dummy flex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FLEX+:} false; then : +if test "${ac_cv_prog_FLEX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$FLEX"; then @@ -5128,7 +5123,7 @@ fi set dummy pngtopnm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PNGTOPNM+:} false; then : +if test "${ac_cv_prog_PNGTOPNM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$PNGTOPNM"; then @@ -5168,7 +5163,7 @@ fi set dummy ppmtoilbm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PPMTOILBM+:} false; then : +if test "${ac_cv_prog_PPMTOILBM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$PPMTOILBM"; then @@ -5208,7 +5203,7 @@ fi set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_SED+:} false; then : +if test "${ac_cv_prog_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$SED"; then @@ -5248,7 +5243,7 @@ fi set dummy chmod; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CHMOD+:} false; then : +if test "${ac_cv_prog_CHMOD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CHMOD"; then @@ -5288,7 +5283,7 @@ fi set dummy patch; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PATCH+:} false; then : +if test "${ac_cv_prog_PATCH+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$PATCH"; then @@ -5356,7 +5351,7 @@ fi # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.5... " >&6; } -if ${am_cv_pathless_PYTHON+:} false; then : +if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -5388,7 +5383,7 @@ $as_echo "$am_cv_pathless_PYTHON" >&6; } set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHON+:} false; then : +if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -5436,7 +5431,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if ${am_cv_python_version+:} false; then : +if test "${am_cv_python_version+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` @@ -5455,7 +5450,7 @@ $as_echo "$am_cv_python_version" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if ${am_cv_python_platform+:} false; then : +if test "${am_cv_python_platform+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` @@ -5469,7 +5464,7 @@ $as_echo "$am_cv_python_platform" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if ${am_cv_python_pythondir+:} false; then : +if test "${am_cv_python_pythondir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || @@ -5486,7 +5481,7 @@ $as_echo "$am_cv_python_pythondir" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if ${am_cv_python_pyexecdir+:} false; then : +if test "${am_cv_python_pyexecdir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || @@ -5521,7 +5516,7 @@ CMP=cmp { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5584,7 +5579,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5651,7 +5646,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5799,7 +5794,7 @@ for ac_header in sys/mount.h do : ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "#include " -if test "x$ac_cv_header_sys_mount_h" = xyes; then : +if test "x$ac_cv_header_sys_mount_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_MOUNT_H 1 _ACEOF @@ -5814,7 +5809,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval \${$as_ac_Header+:} false; then : +if eval "test \"\${$as_ac_Header+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5854,7 +5849,7 @@ done if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -5888,11 +5883,11 @@ for ac_lib in '' dir; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : + if test "${ac_cv_search_opendir+set}" = set; then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no @@ -5911,7 +5906,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if ${ac_cv_search_opendir+:} false; then : +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -5945,11 +5940,11 @@ for ac_lib in '' x; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_opendir+:} false; then : + if test "${ac_cv_search_opendir+set}" = set; then : break fi done -if ${ac_cv_search_opendir+:} false; then : +if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no @@ -5969,7 +5964,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if ${ac_cv_header_stat_broken+:} false; then : +if test "${ac_cv_header_stat_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6011,7 +6006,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6123,7 +6118,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : +if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6164,7 +6159,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : +if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6198,7 +6193,7 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : +if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 @@ -6211,7 +6206,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -6231,7 +6226,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : +if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -6245,7 +6240,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : +if test "${ac_cv_struct_tm+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6282,7 +6277,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -6298,7 +6293,7 @@ $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = xyes; then : +if test "x$ac_cv_have_decl_tzname" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -6310,7 +6305,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if ${ac_cv_var_tzname+:} false; then : +if test "${ac_cv_var_tzname+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6346,7 +6341,7 @@ $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes; then : +if test "x$ac_cv_type_off_t" = x""yes; then : else @@ -6357,7 +6352,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : +if test "x$ac_cv_type_pid_t" = x""yes; then : else @@ -6368,7 +6363,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = x""yes; then : else @@ -6380,7 +6375,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if ${ac_cv_type_uid_t+:} false; then : +if test "${ac_cv_type_uid_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6410,7 +6405,7 @@ fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "$ac_includes_default" -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_GMTOFF 1 @@ -6463,7 +6458,7 @@ done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes; then : +if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -6473,7 +6468,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if ${ac_cv_func_mmap_fixed_mapped+:} false; then : +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -6886,8 +6881,6 @@ aros_debug_cflags="$aros_symbols_debug $aros_messages_debug" aros_debug_aflags="" aros_debug_ldflags="$aros_symbols_debug" -aros_crosstools="no" - #----------------------------------------------------------------------------- # Checking if we should build crosstools.. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build crosstools" >&5 @@ -6899,14 +6892,8 @@ else crosstools="no" fi -if test "$crosstools" != "" -a "$crosstools" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - aros_crosstools="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $crosstools" >&5 +$as_echo "$crosstools" >&6; } #----------------------------------------------------------------------------- # Checking for distcc and ccache. @@ -6929,7 +6916,7 @@ if test "$distcc" != "" -a "$distcc" != "no"; then set dummy distcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DISTCC+:} false; then : +if test "${ac_cv_path_DISTCC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DISTCC in @@ -6986,7 +6973,7 @@ if test "$ccache" != "" -a "$ccache" != "no"; then set dummy ccache; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CCACHE+:} false; then : +if test "${ac_cv_prog_CCACHE+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CCACHE"; then @@ -7110,7 +7097,11 @@ target_bootloader="none" # Prefix for toolchain used to build bootstrap. For hosted ports, this should be a toolchain for target host OS. # (i. e. when building mingw32-i386 port this should be set to "i386-mingw32-"). # For native ports this toolchain is used to build a bootloader and second-level bootstrap (if present). -target_tool_prefix=${target_cpu}-elf- +if test "$crosstools" != "yes"; then + target_tool_prefix=${target_cpu}-elf- +else + target_tool_prefix=${target_cpu}-aros- +fi #----------------------------------------------------------------------------- # Additional options for some specific targets @@ -7203,7 +7194,7 @@ $as_echo "$aros_android_version" >&6; } set dummy $android_tool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_android_tool+:} false; then : +if test "${ac_cv_path_android_tool+set}" = set; then : $as_echo_n "(cached) " >&6 else case $android_tool in @@ -7817,6 +7808,30 @@ case "$target_os" in esac #----------------------------------------------------------------------------- +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install or search for cross tools binaries" >&5 +$as_echo_n "checking where to install or search for cross tools binaries... " >&6; } + +# Check whether --with-crosstools was given. +if test "${with_crosstools+set}" = set; then : + withval=$with_crosstools; with_crosstools=$withval +else + with_crosstools="default" +fi + +if test "$with_crosstools" = "default"; then + AROS_CROSSTOOLSDIR="$AROS_BUILDDIR_UNIX/bin/$aros_host_arch-$aros_host_cpu/tools/crosstools" +else + AROS_CROSSTOOLSDIR="$with_crosstools" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AROS_CROSSTOOLSDIR" >&5 +$as_echo "$AROS_CROSSTOOLSDIR" >&6; } + +if test "$crosstools" != "yes" -a "$with_crosstools" != "default"; then + use_aros_gcc=yes + PATH=$AROS_CROSSTOOLSDIR:$PATH + target_tool_prefix=${target_cpu}-aros- +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what specific AROS gcc version to use" >&5 $as_echo_n "checking what specific AROS gcc version to use... " >&6; } @@ -7838,12 +7853,12 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $aros_gcc_version" >&5 $as_echo "$aros_gcc_version" >&6; } -if test "$aros_gcc_version" != "none"; then - if test "$aros_gcc_version" != "default"; then +if test "$aros_gcc_version" != "none" -o "$crosstools" = "yes"; then + if test "$aros_gcc_version" != "default" -a "$aros_gcc_version" != "none"; then aros_target_cc="$aros_target_cpu-aros-gcc-$aros_gcc_version" aros_target_cxx="$aros_target_cpu-aros-g++-$aros_gcc_version" else - aros_target_cc="$aros_target_cpu-aros-gcc" + aros_target_cc="$aros_target_cpu-aros-gcc" aros_target_cxx="$aros_target_cpu-aros-g++" fi @@ -7863,8 +7878,8 @@ if test "$gcc_target_cpu" != ""; then gcc_target_cpu="-D__${gcc_target_cpu}__" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Where to download sourcecode for external ports" >&5 -$as_echo_n "checking Where to download sourcecode for external ports... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to download sourcecode for external ports" >&5 +$as_echo_n "checking where to download sourcecode for external ports... " >&6; } # Check whether --with-portssources was given. if test "${with_portssources+set}" = set; then : @@ -7957,6 +7972,11 @@ if test "$aros_host_arch" == "darwin" ; then fi fi +# I want to have this information in configure output, although it might be +# misleading, e.g. for darwin hosted you cannot compile target code without a +# cross compiler, but here it says no. +echo "checking wether we are (AROS style) cross compiling... $cross_compiling" + # Set prefix for target compiler etc. if we're cross-compiling # (should possibly be earlier but needs to be after AC_PROG_CC) if test "$cross_compiling" = "yes" ; then @@ -7966,11 +7986,12 @@ if test "$cross_compiling" = "yes" ; then CC="$CC-$target_tool_version" CPP="$CC-$target_tool_version" fi - # Extract the first word of "$CC", so it can be a program name with args. + if test "$crosstools" != "yes" ; then + # Extract the first word of "$CC", so it can be a program name with args. set dummy $CC; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CC+:} false; then : +if test "${ac_cv_path_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CC in @@ -8006,9 +8027,12 @@ $as_echo "no" >&6; } fi - if test "$CC" = ""; then + if test "$CC" = ""; then as_fn_error $? "gcc is required to build AROS. Please install and run configure again." "$LINENO" 5 fi + else + CC=$AROS_CROSSTOOLSDIR/$CC + fi fi CC="$CC $target_tool_flags" @@ -8019,8 +8043,9 @@ CC="$CC $target_tool_flags" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -Wno-pointer-sign" >&5 $as_echo_n "checking whether ${CC} accepts -Wno-pointer-sign... " >&6; } save_cflags="$CFLAGS" -CFLAGS="$CFLAGS -Wno-pointer-sign" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "$crosstools" != "yes" ; then + CFLAGS="$CFLAGS -Wno-pointer-sign" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8037,6 +8062,11 @@ else use_no_sign_warning="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + use_no_sign_warning=yes +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_no_sign_warning" >&5 $as_echo "$use_no_sign_warning" >&6; } if test "x-$use_no_sign_warning" = "x-yes" ; then @@ -8072,7 +8102,7 @@ if test "$rescomp" != ""; then set dummy $rescomp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_kernel_rescomp+:} false; then : +if test "${ac_cv_path_aros_kernel_rescomp+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_kernel_rescomp in @@ -8121,7 +8151,7 @@ if test "$aros_kernel_ld" = ""; then set dummy ${target_tool_prefix}ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_kernel_ld+:} false; then : +if test "${ac_cv_path_aros_kernel_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_kernel_ld in @@ -8164,7 +8194,7 @@ fi set dummy `basename $aros_gcc_ld`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_kernel_ld+:} false; then : +if test "${ac_cv_path_aros_kernel_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_kernel_ld in @@ -8206,7 +8236,7 @@ if test "$aros_kernel_ld" = ""; then set dummy ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_kernel_ld+:} false; then : +if test "${ac_cv_path_aros_kernel_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_kernel_ld in @@ -8249,7 +8279,7 @@ else set dummy $aros_kernel_ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_kernel_ld+:} false; then : +if test "${ac_cv_path_aros_kernel_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_kernel_ld in @@ -8307,7 +8337,7 @@ if test "$aros_target_as" = ""; then set dummy ${target_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_as_ln+:} false; then : +if test "${ac_cv_path_aros_target_as_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_as_ln in @@ -8350,7 +8380,7 @@ fi set dummy `basename $aros_gcc_as`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_as_ln+:} false; then : +if test "${ac_cv_path_aros_target_as_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_as_ln in @@ -8392,7 +8422,7 @@ if test "$aros_target_as_ln" = ""; then set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_as_ln+:} false; then : +if test "${ac_cv_path_aros_target_as_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_as_ln in @@ -8435,7 +8465,7 @@ else set dummy $aros_target_as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_as_ln+:} false; then : +if test "${ac_cv_path_aros_target_as_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_as_ln in @@ -8483,7 +8513,7 @@ if test "$aros_target_ar" = ""; then set dummy ${target_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ar_ln+:} false; then : +if test "${ac_cv_path_aros_target_ar_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ar_ln in @@ -8526,7 +8556,7 @@ fi set dummy `basename $aros_gcc_ar`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ar_ln+:} false; then : +if test "${ac_cv_path_aros_target_ar_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ar_ln in @@ -8568,7 +8598,7 @@ if test "$aros_target_ar_ln" = ""; then set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ar_ln+:} false; then : +if test "${ac_cv_path_aros_target_ar_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ar_ln in @@ -8611,7 +8641,7 @@ else set dummy $aros_target_ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ar_ln+:} false; then : +if test "${ac_cv_path_aros_target_ar_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ar_ln in @@ -8659,7 +8689,7 @@ if test "$aros_target_nm" = ""; then set dummy ${target_tool_prefix}nm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_nm_ln+:} false; then : +if test "${ac_cv_path_aros_target_nm_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_nm_ln in @@ -8702,7 +8732,7 @@ fi set dummy `basename $aros_gcc_nm`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_nm_ln+:} false; then : +if test "${ac_cv_path_aros_target_nm_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_nm_ln in @@ -8744,7 +8774,7 @@ if test "$aros_target_nm_ln" = ""; then set dummy nm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_nm_ln+:} false; then : +if test "${ac_cv_path_aros_target_nm_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_nm_ln in @@ -8787,7 +8817,7 @@ else set dummy $aros_target_nm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_nm_ln+:} false; then : +if test "${ac_cv_path_aros_target_nm_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_nm_ln in @@ -8835,7 +8865,7 @@ if test "$aros_target_objcopy" = ""; then set dummy ${target_tool_prefix}objcopy; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objcopy_ln+:} false; then : +if test "${ac_cv_path_aros_target_objcopy_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objcopy_ln in @@ -8878,7 +8908,7 @@ fi set dummy `basename $aros_gcc_objcopy`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objcopy_ln+:} false; then : +if test "${ac_cv_path_aros_target_objcopy_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objcopy_ln in @@ -8920,7 +8950,7 @@ if test "$aros_target_objcopy_ln" = ""; then set dummy objcopy; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objcopy_ln+:} false; then : +if test "${ac_cv_path_aros_target_objcopy_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objcopy_ln in @@ -8963,7 +8993,7 @@ else set dummy $aros_target_objcopy; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objcopy_ln+:} false; then : +if test "${ac_cv_path_aros_target_objcopy_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objcopy_ln in @@ -9011,7 +9041,7 @@ if test "$aros_target_objdump" = ""; then set dummy ${target_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objdump_ln+:} false; then : +if test "${ac_cv_path_aros_target_objdump_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objdump_ln in @@ -9054,7 +9084,7 @@ fi set dummy `basename $aros_gcc_objdump`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objdump_ln+:} false; then : +if test "${ac_cv_path_aros_target_objdump_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objdump_ln in @@ -9096,7 +9126,7 @@ if test "$aros_target_objdump_ln" = ""; then set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objdump_ln+:} false; then : +if test "${ac_cv_path_aros_target_objdump_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objdump_ln in @@ -9139,7 +9169,7 @@ else set dummy $aros_target_objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_objdump_ln+:} false; then : +if test "${ac_cv_path_aros_target_objdump_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_objdump_ln in @@ -9187,7 +9217,7 @@ if test "$aros_target_ranlib" = ""; then set dummy ${target_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ranlib_ln+:} false; then : +if test "${ac_cv_path_aros_target_ranlib_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ranlib_ln in @@ -9230,7 +9260,7 @@ fi set dummy `basename $aros_gcc_ranlib`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ranlib_ln+:} false; then : +if test "${ac_cv_path_aros_target_ranlib_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ranlib_ln in @@ -9272,7 +9302,7 @@ if test "$aros_target_ranlib_ln" = ""; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ranlib_ln+:} false; then : +if test "${ac_cv_path_aros_target_ranlib_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ranlib_ln in @@ -9315,7 +9345,7 @@ else set dummy $aros_target_ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ranlib_ln+:} false; then : +if test "${ac_cv_path_aros_target_ranlib_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ranlib_ln in @@ -9363,7 +9393,7 @@ if test "$aros_target_strip" = ""; then set dummy ${target_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_strip_ln+:} false; then : +if test "${ac_cv_path_aros_target_strip_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_strip_ln in @@ -9406,7 +9436,7 @@ fi set dummy `basename $aros_gcc_strip`; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_strip_ln+:} false; then : +if test "${ac_cv_path_aros_target_strip_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_strip_ln in @@ -9448,7 +9478,7 @@ if test "$aros_target_strip_ln" = ""; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_strip_ln+:} false; then : +if test "${ac_cv_path_aros_target_strip_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_strip_ln in @@ -9491,7 +9521,7 @@ else set dummy $aros_target_strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_strip_ln+:} false; then : +if test "${ac_cv_path_aros_target_strip_ln+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_strip_ln in @@ -9537,7 +9567,7 @@ fi set dummy $aros_target_cxx; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_cxx+:} false; then : +if test "${ac_cv_path_aros_target_cxx+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_cxx in @@ -9578,18 +9608,31 @@ fi fi fi else - aros_target_cxx="" + aros_target_cc=$AROS_CROSSTOOLSDIR/$aros_target_cc + aros_target_cxx=$AROS_CROSSTOOLSDIR/$aros_target_cxx + aros_target_as_ln=$AROS_CROSSTOOLSDIR/$aros_target_as + aros_target_ar_ln=$AROS_CROSSTOOLSDIR/$aros_target_ar + aros_target_nm_ln=$AROS_CROSSTOOLSDIR/$aros_target_nm + aros_target_objcopy_ln=$AROS_CROSSTOOLSDIR/$aros_target_objcopy + aros_target_objdump_ln=$AROS_CROSSTOOLSDIR/$aros_target_objdump + aros_target_ranlib_ln=$AROS_CROSSTOOLSDIR/$aros_target_ranlib + aros_target_strip_ln=$AROS_CROSSTOOLSDIR/$aros_target_strip + + aros_kernel_ld=$AROS_CROSSTOOLSDIR/$aros_target_ld + + crosstools_target=tools-crosstools fi orig_target_cc=$aros_kernel_cc orig_target_ld=$aros_kernel_ld -if test "$aros_target_cc" != ""; then - # Extract the first word of "$aros_target_cc", so it can be a program name with args. +if test "$crosstools" != "yes"; then + if test "$aros_target_cc" != ""; then + # Extract the first word of "$aros_target_cc", so it can be a program name with args. set dummy $aros_target_cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_cc+:} false; then : +if test "${ac_cv_path_aros_target_cc+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_cc in @@ -9625,17 +9668,17 @@ $as_echo "no" >&6; } fi - if test "$aros_target_cc" = ""; then + if test "$aros_target_cc" = ""; then as_fn_error $? "gcc is required to build AROS. Please install and run configure again." "$LINENO" 5 fi - orig_target_cc=$aros_target_cc -fi -if test "$aros_target_ld" != ""; then - # Extract the first word of "$aros_target_ld", so it can be a program name with args. + orig_target_cc=$aros_target_cc + fi + if test "$aros_target_ld" != ""; then + # Extract the first word of "$aros_target_ld", so it can be a program name with args. set dummy $aros_target_ld; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_aros_target_ld+:} false; then : +if test "${ac_cv_path_aros_target_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else case $aros_target_ld in @@ -9671,15 +9714,19 @@ $as_echo "no" >&6; } fi - if test "$aros_target_ld" = ""; then + if test "$aros_target_ld" = ""; then as_fn_error $? "ld is required to build AROS. Please install and run configure again." "$LINENO" 5 fi + orig_target_ld=$aros_target_ld + fi +else + orig_target_cc=$aros_target_cc orig_target_ld=$aros_target_ld fi # Build crosstools if we have no C++ - temporary thing -if test "$aros_target_cxx" = ""; then - crosstools_target=tools-crosstools +if test "$aros_target_cxx" = "" -a "$crosstools" != "yes"; then + crosstools_cxx_target=tools-crosstools fi aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/config" @@ -9722,8 +9769,15 @@ aros_target_nostdlib_ldflags=-nostdlib # Target tools -if test "$GCC" = "yes"; then - aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-` +if test "$crosstools" != "yes"; then + if test "$GCC" = "yes"; then + aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-` + fi +else + # We do not know which gcc version we are going to build and what we need to know + # here is different for different versions so this will be set later during the + # build of crosstools. + aros_target_cc_path=@aros_target_cc_path@ fi aros_target_cc="${prefix}-gcc" aros_target_as="${prefix}-as" @@ -9802,40 +9856,47 @@ $as_echo "$aros_kernel_cc_includes" >&6; } aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the target compiler's include path" >&5 +if test "$crosstools" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the target compiler's include path" >&5 $as_echo_n "checking for the target compiler's include path... " >&6; } -if test "$aros_target_cc_includes" = "" ; then - #try to guess where the directory is - aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include - if ! test -d $aros_target_cc_includes; then - #the directory doesn't exist, we need to do some more work - aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include - - #these are the headers we're looling for - headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \ - stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \ - zutil.h" - - dirs= - for h in $headers; do - #which other headers each of the above headers needs? - deps=$(echo "#include <$h>" | \ - $orig_target_cc -E -M - 2>/dev/null | \ - sed 's/^.*://; s/\\$/ /g; s/[ \t]\+/ /g') - - #copy all the needed headers to a directory beneath gendir - for d in $deps; do - h=$(basename $d) - dir=${aros_target_cc_includes}$(echo $(dirname $d) | \ + if test "$aros_target_cc_includes" = "" ; then + #try to guess where the directory is + aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include + if ! test -d $aros_target_cc_includes; then + #the directory doesn't exist, we need to do some more work + aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include + + #these are the headers we're looking for + headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \ + stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \ + zutil.h" + + dirs= + for h in $headers; do + #which other headers each of the above headers needs? + deps=$(echo "#include <$h>" | \ + $orig_target_cc -E -M - 2>/dev/null | \ + sed 's/^.*://; s/\\$/ /g; s/[ \t]\+/ /g') + + #copy all the needed headers to a directory beneath gendir + for d in $deps; do + h=$(basename $d) + dir=${aros_target_cc_includes}$(echo $(dirname $d) | \ sed -n "s,^.*/include\(/.*\),\1,p") - ! test -d $dir && mkdir -p $dir - ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; } + ! test -d $dir && mkdir -p $dir + ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; } + done done - done + fi fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aros_target_cc_includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $aros_target_cc_includes" >&5 $as_echo "$aros_target_cc_includes" >&6; } +else + # We do not know which gcc version we are going to build and what we need to know + # here is different for different versions so this will be set later during the + # build of crosstools. + aros_target_cc_includes=@aros_target_cc_includes@ +fi # # For GCC < 4.0 -I- is used for giving the search path for '#include "..."' @@ -9847,7 +9908,8 @@ save_cflags="$CFLAGS" CFLAGS="-iquote." { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -iquote" >&5 $as_echo_n "checking whether ${CC} accepts -iquote... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "x-$crosstools" != "x-yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9864,6 +9926,11 @@ else has_iquote="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_iquote" >&5 $as_echo "$has_iquote" >&6; } if test "x-$has_iquote" = "x-yes" ; then @@ -9879,7 +9946,8 @@ if test "x-$cross_compiling" = "x-yes"; then CC="$aros_kernel_cc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -fno-stack-protector" >&5 $as_echo_n "checking whether ${CC} accepts -fno-stack-protector... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x-$crosstools" != "x-yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9896,11 +9964,17 @@ else use_no_stack_protector="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + use_no_stack_protector=yes + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_no_stack_protector" >&5 $as_echo "$use_no_stack_protector" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -iquote" >&5 $as_echo_n "checking whether ${CC} accepts -iquote... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x-$crosstools" != "x-yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9917,6 +9991,11 @@ else has_iquote="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_iquote" >&5 $as_echo "$has_iquote" >&6; } if test "x-$has_iquote" = "x-yes" ; then @@ -9933,7 +10012,8 @@ if test "$orig_target_cc" != "$aros_kernel_cc"; then CC="$orig_target_cc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -iquote" >&5 $as_echo_n "checking whether ${CC} accepts -iquote... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x-$crosstools" != "x-yes"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9950,6 +10030,11 @@ else has_iquote="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes + fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_iquote" >&5 $as_echo "$has_iquote" >&6; } if test "x-$has_iquote" = "x-yes" ; then @@ -10123,7 +10208,7 @@ if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" if test "x-$need_dlopen" != "x-no" ; then ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = x""yes; then : have_dl="yes" else have_dl="no" @@ -10132,7 +10217,7 @@ fi if test "x-$have_dl" = "x-no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10166,7 +10251,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : have_dl="yes" aros_host_ldflags="$aros_host_ldflags -ldl" else @@ -10211,8 +10296,8 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -10430,7 +10515,7 @@ fi for ac_header in sys/ipc.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ipc_h" = xyes; then : +if test "x$ac_cv_header_sys_ipc_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_IPC_H 1 _ACEOF @@ -10442,7 +10527,7 @@ done for ac_header in sys/shm.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_shm_h" = xyes; then : +if test "x$ac_cv_header_sys_shm_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SHM_H 1 _ACEOF @@ -10458,7 +10543,7 @@ done CFLAGS="$CFLAGS $x_cflags" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXext" >&5 $as_echo_n "checking for XShmQueryExtension in -lXext... " >&6; } -if ${ac_cv_lib_Xext_XShmQueryExtension+:} false; then : +if test "${ac_cv_lib_Xext_XShmQueryExtension+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10492,7 +10577,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmQueryExtension" >&5 $as_echo "$ac_cv_lib_Xext_XShmQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShmQueryExtension" = xyes; then : +if test "x$ac_cv_lib_Xext_XShmQueryExtension" = x""yes; then : have_xshm=yes fi @@ -10529,7 +10614,7 @@ fi CFLAGS="$CFLAGS $x_cflags" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeQueryExtension in -lXxf86vm" >&5 $as_echo_n "checking for XF86VidModeQueryExtension in -lXxf86vm... " >&6; } -if ${ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension+:} false; then : +if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10563,7 +10648,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&5 $as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" = xyes; then : +if test "x$ac_cv_lib_Xxf86vm_XF86VidModeQueryExtension" = x""yes; then : have_vidmode=yes fi @@ -10642,7 +10727,7 @@ fi set dummy sdl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_SDL_CONFIG+:} false; then : +if test "${ac_cv_path_SDL_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SDL_CONFIG in @@ -10866,7 +10951,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : +if test "x$ac_cv_header_sys_soundcard_h" = x""yes; then : fi @@ -10910,6 +10995,7 @@ $as_echo "$dbus" >&6; } + # Host related @@ -10990,6 +11076,7 @@ $as_echo "$dbus" >&6; } + # Graphics Related @@ -11167,21 +11254,10 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then + test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi + cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -11213,7 +11289,7 @@ LTLIBOBJS=$ac_ltlibobjs -: "${CONFIG_STATUS=./config.status}" +: ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -11314,7 +11390,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -11622,7 +11697,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11688,7 +11763,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -11847,7 +11922,7 @@ do "tools/collect-aros/env.h") CONFIG_FILES="$CONFIG_FILES tools/collect-aros/env.h" ;; "${aros_gendir}/arch/all-android/bootstrap/app/default.properties") CONFIG_FILES="$CONFIG_FILES ${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -11870,10 +11945,9 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= ac_tmp= + tmp= trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -11881,13 +11955,12 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" + test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11909,7 +11982,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF @@ -11937,7 +12010,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -11985,7 +12058,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && +cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -12017,7 +12090,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -12051,7 +12124,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || +cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -12063,8 +12136,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -12165,7 +12238,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12184,7 +12257,7 @@ do for ac_f do case $ac_f in - -) ac_f="$ac_tmp/stdin";; + -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -12193,7 +12266,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -12219,8 +12292,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -12345,22 +12418,21 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$ac_tmp/stdin" + rm -f "$tmp/stdin" case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12371,20 +12443,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ + mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; diff --git a/configure.in b/configure.in index 40805541de..c43847a6f1 100644 --- a/configure.in +++ b/configure.in @@ -45,12 +45,12 @@ if test "$host_os" = "mingw32" ; then fi #don't know where else to put this... -AC_MSG_CHECKING([Building AROS in .. ]) +AC_MSG_CHECKING([building AROS in]) AROS_BUILDDIR=`${PWDCMD-pwd}` AROS_BUILDDIR_UNIX=${PWD} AC_MSG_RESULT($AROS_BUILDDIR) -AC_MSG_CHECKING([AROS Source in .. ]) +AC_MSG_CHECKING([AROS source in]) srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}` SRCDIR=${srcpwd} AC_MSG_RESULT($SRCDIR) @@ -645,18 +645,11 @@ aros_debug_cflags="$aros_symbols_debug $aros_messages_debug" aros_debug_aflags="" aros_debug_ldflags="$aros_symbols_debug" -aros_crosstools="no" - #----------------------------------------------------------------------------- # Checking if we should build crosstools.. AC_MSG_CHECKING([whether to build crosstools]) AC_ARG_ENABLE(crosstools,AC_HELP_STRING([--enable-crosstools],[Build cross-compiler toolchains if necessary (default=no).]),crosstools="$enableval",crosstools="no") -if test "$crosstools" != "" -a "$crosstools" != "no"; then - AC_MSG_RESULT(yes) - aros_crosstools="yes" -else - AC_MSG_RESULT(no) -fi +AC_MSG_RESULT($crosstools) #----------------------------------------------------------------------------- # Checking for distcc and ccache. @@ -734,7 +727,11 @@ target_bootloader="none" # Prefix for toolchain used to build bootstrap. For hosted ports, this should be a toolchain for target host OS. # (i. e. when building mingw32-i386 port this should be set to "i386-mingw32-"). # For native ports this toolchain is used to build a bootloader and second-level bootstrap (if present). -target_tool_prefix=${target_cpu}-elf- +if test "$crosstools" != "yes"; then + target_tool_prefix=${target_cpu}-elf- +else + target_tool_prefix=${target_cpu}-aros- +fi #----------------------------------------------------------------------------- # Additional options for some specific targets @@ -1353,6 +1350,21 @@ case "$target_os" in esac #----------------------------------------------------------------------------- +AC_MSG_CHECKING([where to install or search for cross tools binaries]) +AC_ARG_WITH(crosstools,AC_HELP_STRING([--with-crosstools=DIR],[Where to install or search for cross tools binaries]),with_crosstools=$withval,with_crosstools="default") +if test "$with_crosstools" = "default"; then + AROS_CROSSTOOLSDIR="$AROS_BUILDDIR_UNIX/bin/$aros_host_arch-$aros_host_cpu/tools/crosstools" +else + AROS_CROSSTOOLSDIR="$with_crosstools" +fi +AC_MSG_RESULT($AROS_CROSSTOOLSDIR) + +if test "$crosstools" != "yes" -a "$with_crosstools" != "default"; then + use_aros_gcc=yes + PATH=$AROS_CROSSTOOLSDIR:$PATH + target_tool_prefix=${target_cpu}-aros- +fi + AC_MSG_CHECKING([what specific AROS gcc version to use]) AC_ARG_WITH(aros-gcc,AC_HELP_STRING([--with-aros-gcc=VERSION],[Use aros-gcc-VERSION for building AROS]),aros_gcc_version="$withval",aros_gcc_version="$use_aros_gcc") case "$aros_gcc_version" in @@ -1365,12 +1377,12 @@ no) esac AC_MSG_RESULT($aros_gcc_version) -if test "$aros_gcc_version" != "none"; then - if test "$aros_gcc_version" != "default"; then +if test "$aros_gcc_version" != "none" -o "$crosstools" = "yes"; then + if test "$aros_gcc_version" != "default" -a "$aros_gcc_version" != "none"; then aros_target_cc="$aros_target_cpu-aros-gcc-$aros_gcc_version" aros_target_cxx="$aros_target_cpu-aros-g++-$aros_gcc_version" else - aros_target_cc="$aros_target_cpu-aros-gcc" + aros_target_cc="$aros_target_cpu-aros-gcc" aros_target_cxx="$aros_target_cpu-aros-g++" fi @@ -1390,7 +1402,7 @@ if test "$gcc_target_cpu" != ""; then gcc_target_cpu="-D__${gcc_target_cpu}__" fi -AC_MSG_CHECKING([Where to download sourcecode for external ports]) +AC_MSG_CHECKING([where to download sourcecode for external ports]) AC_ARG_WITH(portssources,AC_HELP_STRING([--with-portssources=DIR],[Where to download sourcecode for external ports]),with_portssrcdir=$withval,with_portssrcdir="default") if test "$with_portssrcdir" = "default"; then AROS_PORTSSRCDIR="$AROS_BUILDDIR_UNIX/bin/Sources" @@ -1450,6 +1462,11 @@ if test "$aros_host_arch" == "darwin" ; then fi fi +# I want to have this information in configure output, although it might be +# misleading, e.g. for darwin hosted you cannot compile target code without a +# cross compiler, but here it says no. +echo "checking wether we are (AROS style) cross compiling... $cross_compiling" + # Set prefix for target compiler etc. if we're cross-compiling # (should possibly be earlier but needs to be after AC_PROG_CC) if test "$cross_compiling" = "yes" ; then @@ -1460,8 +1477,12 @@ if test "$cross_compiling" = "yes" ; then CC="$CC-$target_tool_version" CPP="$CC-$target_tool_version" fi - AC_PATH_PROG(CC,$CC) - AROS_REQUIRED(gcc,$CC) + if test "$crosstools" != "yes" ; then + AC_PATH_PROG(CC,$CC) + AROS_REQUIRED(gcc,$CC) + else + CC=$AROS_CROSSTOOLSDIR/$CC + fi fi CC="$CC $target_tool_flags" @@ -1471,8 +1492,14 @@ CC="$CC $target_tool_flags" AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign]) save_cflags="$CFLAGS" -CFLAGS="$CFLAGS -Wno-pointer-sign" -AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no") +if test "$crosstools" != "yes" ; then + CFLAGS="$CFLAGS -Wno-pointer-sign" + AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no") +else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + use_no_sign_warning=yes +fi AC_MSG_RESULT($use_no_sign_warning) if test "x-$use_no_sign_warning" = "x-yes" ; then aros_config_cflags="$aros_config_cflags -Wno-pointer-sign" @@ -1541,27 +1568,43 @@ if test "$crosstools" != "yes"; then AROS_REQUIRED(c++,$aros_target_cxx) fi else - dnl Cancel preinstalled C++ compiler because it will be built as part of crosstools - aros_target_cxx="" + aros_target_cc=$AROS_CROSSTOOLSDIR/$aros_target_cc + aros_target_cxx=$AROS_CROSSTOOLSDIR/$aros_target_cxx + aros_target_as_ln=$AROS_CROSSTOOLSDIR/$aros_target_as + aros_target_ar_ln=$AROS_CROSSTOOLSDIR/$aros_target_ar + aros_target_nm_ln=$AROS_CROSSTOOLSDIR/$aros_target_nm + aros_target_objcopy_ln=$AROS_CROSSTOOLSDIR/$aros_target_objcopy + aros_target_objdump_ln=$AROS_CROSSTOOLSDIR/$aros_target_objdump + aros_target_ranlib_ln=$AROS_CROSSTOOLSDIR/$aros_target_ranlib + aros_target_strip_ln=$AROS_CROSSTOOLSDIR/$aros_target_strip + + aros_kernel_ld=$AROS_CROSSTOOLSDIR/$aros_target_ld + + crosstools_target=tools-crosstools fi orig_target_cc=$aros_kernel_cc orig_target_ld=$aros_kernel_ld -if test "$aros_target_cc" != ""; then - AC_PATH_PROG(aros_target_cc,$aros_target_cc) - AROS_REQUIRED(gcc,$aros_target_cc) +if test "$crosstools" != "yes"; then + if test "$aros_target_cc" != ""; then + AC_PATH_PROG(aros_target_cc,$aros_target_cc) + AROS_REQUIRED(gcc,$aros_target_cc) + orig_target_cc=$aros_target_cc + fi + if test "$aros_target_ld" != ""; then + AC_PATH_PROG(aros_target_ld,$aros_target_ld) + AROS_REQUIRED(ld,$aros_target_ld) + orig_target_ld=$aros_target_ld + fi +else orig_target_cc=$aros_target_cc -fi -if test "$aros_target_ld" != ""; then - AC_PATH_PROG(aros_target_ld,$aros_target_ld) - AROS_REQUIRED(ld,$aros_target_ld) orig_target_ld=$aros_target_ld fi # Build crosstools if we have no C++ - temporary thing -if test "$aros_target_cxx" = ""; then - crosstools_target=tools-crosstools +if test "$aros_target_cxx" = "" -a "$crosstools" != "yes"; then + crosstools_cxx_target=tools-crosstools fi aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/config" @@ -1599,8 +1642,15 @@ AC_SUBST(aros_target_detach_ldflags,-detach) AC_SUBST(aros_target_nostdlib_ldflags,-nostdlib) # Target tools -if test "$GCC" = "yes"; then - aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-` +if test "$crosstools" != "yes"; then + if test "$GCC" = "yes"; then + aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-` + fi +else + # We do not know which gcc version we are going to build and what we need to know + # here is different for different versions so this will be set later during the + # build of crosstools. + aros_target_cc_path=@aros_target_cc_path@ fi aros_target_cc="${prefix}-gcc" aros_target_as="${prefix}-as" @@ -1674,39 +1724,46 @@ if test "$aros_kernel_includes" != "" ; then aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes" fi -dnl find out about the target cc's include path -AC_MSG_CHECKING([for the target compiler's include path]) -if test "$aros_target_cc_includes" = "" ; then - #try to guess where the directory is - aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include - if ! test -d $aros_target_cc_includes; then - #the directory doesn't exist, we need to do some more work - aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include +if test "$crosstools" != "yes"; then + dnl find out about the target cc's include path + AC_MSG_CHECKING([for the target compiler's include path]) + if test "$aros_target_cc_includes" = "" ; then + #try to guess where the directory is + aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include + if ! test -d $aros_target_cc_includes; then + #the directory doesn't exist, we need to do some more work + aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include - #these are the headers we're looling for - headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \ - stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \ - zutil.h" - - dirs= - for h in $headers; do - #which other headers each of the above headers needs? - deps=$(echo "#include <$h>" | \ - $orig_target_cc -E -M - 2>/dev/null | \ - sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g') + #these are the headers we're looking for + headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \ + stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \ + zutil.h" + + dirs= + for h in $headers; do + #which other headers each of the above headers needs? + deps=$(echo "#include <$h>" | \ + $orig_target_cc -E -M - 2>/dev/null | \ + sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g') - #copy all the needed headers to a directory beneath gendir - for d in $deps; do - h=$(basename $d) - dir=${aros_target_cc_includes}$(echo $(dirname $d) | \ + #copy all the needed headers to a directory beneath gendir + for d in $deps; do + h=$(basename $d) + dir=${aros_target_cc_includes}$(echo $(dirname $d) | \ sed -n "s,^.*/include\(/.*\),\1,p") - ! test -d $dir && mkdir -p $dir - ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; } + ! test -d $dir && mkdir -p $dir + ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; } + done done - done + fi fi + AC_MSG_RESULT($aros_target_cc_includes) +else + # We do not know which gcc version we are going to build and what we need to know + # here is different for different versions so this will be set later during the + # build of crosstools. + aros_target_cc_includes=@aros_target_cc_includes@ fi -AC_MSG_RESULT($aros_target_cc_includes) # # For GCC < 4.0 -I- is used for giving the search path for '#include "..."' @@ -1717,7 +1774,13 @@ save_cc="$CC" save_cflags="$CFLAGS" CFLAGS="-iquote." AC_MSG_CHECKING([whether ${CC} accepts -iquote]) -AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") +if test "x-$crosstools" != "x-yes"; then + AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") +else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes +fi AC_MSG_RESULT($has_iquote) if test "x-$has_iquote" = "x-yes" ; then host_cflags_iquote=-iquote @@ -1731,10 +1794,22 @@ kernel_cflags_iquote_end=$host_cflags_iquote_end if test "x-$cross_compiling" = "x-yes"; then CC="$aros_kernel_cc" AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector]) - AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no") + if test "x-$crosstools" != "x-yes"; then + AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no") + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + use_no_stack_protector=yes + fi AC_MSG_RESULT($use_no_stack_protector) AC_MSG_CHECKING([whether ${CC} accepts -iquote]) - AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") + if test "x-$crosstools" != "x-yes"; then + AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes + fi AC_MSG_RESULT($has_iquote) if test "x-$has_iquote" = "x-yes" ; then kernel_cflags_iquote=-iquote @@ -1749,7 +1824,13 @@ aros_cflags_iquote_end=$kernel_cflags_iquote_end if test "$orig_target_cc" != "$aros_kernel_cc"; then CC="$orig_target_cc" AC_MSG_CHECKING([whether ${CC} accepts -iquote]) - AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") + if test "x-$crosstools" != "x-yes"; then + AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no") + else + # we do know it is supported for the smallest version of gcc we are going to build + # we assume it's also supported by later versions + has_iquote=yes + fi AC_MSG_RESULT($has_iquote) if test "x-$has_iquote" = "x-yes" ; then aros_cflags_iquote=-iquote @@ -2073,6 +2154,7 @@ AC_SUBST(aros_flavour_uc) AC_SUBST(AROS_BUILDDIR) AC_SUBST(AROS_BUILDDIR_UNIX) AC_SUBST(SRCDIR) +AC_SUBST(AROS_CROSSTOOLSDIR) AC_SUBST(AROS_PORTSSRCDIR) # Host related @@ -2154,6 +2236,7 @@ AC_SUBST(aros_target_genmap) AC_SUBST(aros_target_strip_flags) AC_SUBST(crosstools_target) +AC_SUBST(crosstools_cxx_target) # Graphics Related AC_SUBST(x11_hidd_target) diff --git a/mmakefile b/mmakefile index 552ee2e1c3..c960cc0033 100644 --- a/mmakefile +++ b/mmakefile @@ -39,6 +39,7 @@ query : @$(ECHO) "TARGET_CC : $(TARGET_CC)" @$(ECHO) "TARGET_CFLAGS : $(TARGET_CFLAGS)" @$(ECHO) "TARGET_LDFLAGS : $(TARGET_LDFLAGS)" + @$(ECHO) "TARGET_CXX : $(TARGET_CXX)" @$(ECHO) @$(ECHO) "SRCDIR : $(SRCDIR)" @$(ECHO) "GENDIR : $(GENDIR)" diff --git a/tools/collect-aros/env.h.in b/tools/collect-aros/env.h.in index 8e665d0a1c..2cf4e7fa24 100644 --- a/tools/collect-aros/env.h.in +++ b/tools/collect-aros/env.h.in @@ -8,10 +8,10 @@ #define OBJDUMP_NAME "/Development/bin/objdump" #endif #ifdef _CROSS_ -#define LD_NAME "@AROS_BUILDDIR@/bin/@aros_host_arch@-@aros_host_cpu@/tools/crosstools/@aros_target_cpu@-aros-ld" -#define STRIP_NAME "@AROS_BUILDDIR@/bin/@aros_host_arch@-@aros_host_cpu@/tools/crosstools/@aros_target_cpu@-aros-strip" -#define NM_NAME "@AROS_BUILDDIR@/bin/@aros_host_arch@-@aros_host_cpu@/tools/crosstools/@aros_target_cpu@-aros-nm" -#define OBJDUMP_NAME "@AROS_BUILDDIR@/bin/@aros_host_arch@-@aros_host_cpu@/tools/crosstools/@aros_target_cpu@-aros-objdump" +#define LD_NAME "@AROS_CROSSTOOLSDIR@/@aros_target_cpu@-aros-ld" +#define STRIP_NAME "@AROS_CROSSTOOLSDIR@/@aros_target_cpu@-aros-strip" +#define NM_NAME "@AROS_CROSSTOOLSDIR@/@aros_target_cpu@-aros-nm" +#define OBJDUMP_NAME "@AROS_CROSSTOOLSDIR@/@aros_target_cpu@-aros-objdump" #endif /* Under Windows we can't use paths provided by configure because they are UNIX-style and we don't use MSYS */ diff --git a/tools/collect-aros/mmakefile b/tools/collect-aros/mmakefile index da4600c23a..f3411a2f49 100644 --- a/tools/collect-aros/mmakefile +++ b/tools/collect-aros/mmakefile @@ -11,12 +11,17 @@ development-collect-aros-quick : USER_CFLAGS="-nix -O2 -D_HAVE_LIBIBERTY_ -D_NATIVE_" HOST_LDFLAGS="-lbfd -liberty -lz" $(STRIP) $(AROS_DEVELOPMENT)/bin/collect-aros +collect-aros-installflag := $(CROSSTOOLSDIR)/.installflag-collect-aros + #MM tools-crosstools-collect-aros : tools-crosstools-binutils .PHONY : tools-crosstools-collect-aros tools-crosstools-collect-aros : tools-crosstools-collect-aros-quick #MM tools-crosstools-collect-aros-quick : - $(MAKE) COLLECT-AROS=$(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros USER_CFLAGS="-D_CROSS_" - $(HOST_STRIP) $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros - $(CP) $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-collect-aros + @$(IF) ! $(TEST) -f $(collect-aros-installflag) ; then \ + $(MAKE) COLLECT-AROS=$(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros USER_CFLAGS="-D_CROSS_" \ + && $(HOST_STRIP) $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros \ + && $(CP) $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros/bin/collect-aros $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-collect-aros \ + && $(TOUCH) $(CROSSTOOLSDIR) $(collect-aros-installflag) ; \ + fi diff --git a/tools/crosstools/mmakefile.src b/tools/crosstools/mmakefile.src dissimilarity index 63% index 5e1ca8718d..26fc1dac16 100644 --- a/tools/crosstools/mmakefile.src +++ b/tools/crosstools/mmakefile.src @@ -1,39 +1,85 @@ -include $(TOP)/config/make.cfg - -BINUTILS_VERSION = 2.20.1 - -GCC_LANGUAGES = c,c++ - -ifeq ($(AROS_TARGET_CPU), arm) - # FIXME: Update patch to work with --with-sysroot - GCC_VERSION = 4.4.2 - GCC_EXTRA_OPTS := \ - --target=$(AROS_TARGET_CPU)-aros --bindir=$(CROSSTOOLSDIR) --enable-languages=$(GCC_LANGUAGES) \ - --enable-long-long --enable-version-specific-runtime-libs \ - --with-headers=$(AROS_DEVELOPMENT)/include --with-libs=$(AROS_DEVELOPMENT)/lib -else - GCC_VERSION = 4.2.4 - GCC_EXTRA_OPTS := \ - --target=$(AROS_TARGET_CPU)-aros --bindir=$(CROSSTOOLSDIR) --enable-languages=$(GCC_LANGUAGES) \ - --enable-long-long --enable-version-specific-runtime-libs --enable-sjlj-exceptions \ - --with-sysroot=$(AROS_DEVELOPMENT) -endif - -GNU_REPOSITORY := gnu:// - -#MM- tools-crosstools : tools-crosstools-gcc -#MM- tools-crosstools-gcc : tools-crosstools-binutils tools-crosstools-collect-aros - -%fetch_and_build mmake=tools-crosstools-binutils package=binutils version=$(BINUTILS_VERSION) compiler=host \ - package_repo="$(GNU_REPOSITORY)/binutils" \ - patch=yes \ - prefix="$(CROSSTOOLSDIR)" \ - extraoptions="--target=$(AROS_TARGET_CPU)-aros -bindir=$(CROSSTOOLSDIR) --with-sysroot=$(AROS_DEVELOPMENT) --disable-werror" - -HOST_CFLAGS := $(HOST_CFLAGS) $(HOST_GNU89_INLINE) - -%fetch_and_build mmake=tools-crosstools-gcc package=gcc version=$(GCC_VERSION) compiler=host \ - package_repo="$(GNU_REPOSITORY)/gcc/gcc-$(GCC_VERSION)" \ - patch=yes \ - prefix="$(CROSSTOOLSDIR)" \ - extraoptions="$(GCC_EXTRA_OPTS)" +include $(TOP)/config/make.cfg + +BINUTILS_VERSION = 2.20.1 + +GCC_LANGUAGES = c,c++ + +GCC_EXTRA_OPTS = \ + --target=$(AROS_TARGET_CPU)-aros --bindir=$(CROSSTOOLSDIR) --enable-languages=$(GCC_LANGUAGES) \ + --enable-long-long --enable-version-specific-runtime-libs + +ifeq ($(AROS_TARGET_CPU), arm) + # FIXME: Update patch to work with --with-sysroot then set GCC_INCLUDES and GCC_PATH for --enable-crosstools + GCC_VERSION = 4.4.2 + GCC_EXTRA_OPTS += --with-headers=$(AROS_DEVELOPMENT)/include --with-libs=$(AROS_DEVELOPMENT)/lib +else + GCC_VERSION = 4.2.4 + GCC_EXTRA_OPTS += --enable-sjlj-exceptions --with-sysroot=$(AROS_DEVELOPMENT) + GCC_INCLUDES = $(CROSSTOOLSDIR)/lib/gcc/$(AROS_TARGET_CPU)-aros/$(GCC_VERSION)/include + GCC_PATH = `LANG=en_US $(CROSSTOOLSDIR)/$(AROS_TARGET_CPU)-aros-gcc -print-search-dirs | grep "programs: =" | cut -c 12-` +endif + +GNU_REPOSITORY := gnu:// + +binutils-installflag := $(CROSSTOOLSDIR)/.installflag-binutils-$(BINUTILS_VERSION) +gcc-installflag := $(CROSSTOOLSDIR)/.installflag-gcc-$(GCC_VERSION) + +#MM- tools-crosstools : tools-crosstools-$(AROS_TARGET_CPU) + +# m68k build is disabled, since there is no AROS cross compiler yet, just m68k-elf cross compiler +##MM- tools-crosstools-m68k : tools-crosstools-gcc crosstools-gcc +#MM- tools-crosstools-i386 : tools-crosstools-gcc crosstools-gcc +#MM- tools-crosstools-x86_64 : tools-crosstools-gcc crosstools-gcc +#MM- tools-crosstools-ppc : tools-crosstools-gcc crosstools-gcc +# arm still needs linklibs be build before, can be removed after patch is updated to work with --with-sysroot +#MM- tools-crosstools-arm : linklibs-core tools-crosstools-gcc crosstools-gcc + +#MM tools-crosstools-gcc : tools-crosstools-binutils tools-crosstools-collect-aros compiler-includes compiler-clib-includes + +# We intentionally bypass the usual fetch_and_build macro below and call mmakefile and gcc makefile +# targets directly. This is in order to not build the linklibs-core target during binutils and gcc +# builds because we want these static linker libraries be generated by the cross tool chain we are building +# right here. Additionally, we also want to maintain our own install flag files inside the directory +# specified by --with-crosstools. This directory may even reside outside of the usual aros build directory +# and can be reused between complete rebuilds. + +#MM +tools-crosstools-binutils : + @$(IF) ! $(TEST) -d $(CROSSTOOLSDIR) \ + || ! $(TEST) -f $(binutils-installflag) \ + || $(TEST) "$(AROS_DEVELOPMENT)" != "$(shell $(CAT) 2>/dev/null $(binutils-installflag))" ; then \ + $(RM) $(HOSTGENDIR)/$(CURDIR)/binutils/.files-touched \ + && $(MAKE) -f ./mmakefile crosstools-binutils--fetch \ + && $(MAKE) -f ./mmakefile crosstools-binutils--build_and_install-quick \ + && $(ECHO) $(AROS_DEVELOPMENT) > $(binutils-installflag) ; \ + fi + +%fetch_and_build mmake=crosstools-binutils package=binutils version=$(BINUTILS_VERSION) compiler=host \ + package_repo="$(GNU_REPOSITORY)/binutils" \ + patch=yes \ + prefix="$(CROSSTOOLSDIR)" \ + extraoptions="--target=$(AROS_TARGET_CPU)-aros -bindir=$(CROSSTOOLSDIR) --with-sysroot=$(AROS_DEVELOPMENT) --disable-werror" + +HOST_CFLAGS := $(HOST_CFLAGS) $(HOST_GNU89_INLINE) + +#MM +tools-crosstools-gcc : + @$(SED) -i -e "s|@aros_target_cc_includes@|$(GCC_INCLUDES)|g" $(GENDIR)/config/specs + @$(IF) ! $(TEST) -f $(gcc-installflag) \ + || $(TEST) "$(AROS_DEVELOPMENT)" != "$(shell $(CAT) 2>/dev/null $(gcc-installflag))" ; then \ + $(RM) $(HOSTGENDIR)/$(CURDIR)/gcc/.files-touched \ + && $(MAKE) -f ./mmakefile crosstools-gcc--fetch \ + && $(MAKE) -f ./mmakefile crosstools-gcc--configure \ + && $(MAKE) -C $(HOSTGENDIR)/$(CURDIR)/gcc all-gcc \ + && $(MAKE) -j1 -C $(HOSTGENDIR)/$(CURDIR)/gcc install-gcc \ + && $(ECHO) $(AROS_DEVELOPMENT) > $(gcc-installflag) ; \ + fi + @$(IF) $(TEST) -f $(gcc-installflag); then \ + $(SED) -i -e "s|@aros_target_cc_path@|$(GCC_PATH)|g" $(TOOLDIR)/$(AROS_TARGET_CPU)-$(AROS_TARGET_ARCH)$(AROS_TARGET_SUFFIX)-aros-ld ; \ + fi + +%fetch_and_build mmake=crosstools-gcc package=gcc version=$(GCC_VERSION) compiler=host \ + package_repo="$(GNU_REPOSITORY)/gcc/gcc-$(GCC_VERSION)" \ + patch=yes \ + prefix="$(CROSSTOOLSDIR)" \ + extraoptions="$(GCC_EXTRA_OPTS)" diff --git a/workbench/libs/mesa/src/aros/arosmesa/mmakefile.src b/workbench/libs/mesa/src/aros/arosmesa/mmakefile.src index 4b5bef5f8f..6487576096 100644 --- a/workbench/libs/mesa/src/aros/arosmesa/mmakefile.src +++ b/workbench/libs/mesa/src/aros/arosmesa/mmakefile.src @@ -162,7 +162,7 @@ $(CXX_SOURCES) : workbench-libs-mesa-module-cpp-gendir workbench-libs-mesa-module-cpp-gendir : @$(MKDIR) $(OBJDIR)/cpp -#MM- workbench-libs-mesa-module-cpp : $(CROSSTOOLS_TARGET) +#MM- workbench-libs-mesa-module-cpp : $(CROSSTOOLS_CXX_TARGET) #MM workbench-libs-mesa-module-cpp : $(CXX_SOURCES) diff --git a/workbench/libs/mesa/src/aros/glu/mmakefile.src b/workbench/libs/mesa/src/aros/glu/mmakefile.src index d14a9b7c3d..46bccac8d3 100644 --- a/workbench/libs/mesa/src/aros/glu/mmakefile.src +++ b/workbench/libs/mesa/src/aros/glu/mmakefile.src @@ -165,7 +165,7 @@ $(CPP_SOURCES) : workbench-libs-glu-module-cpp-gendir workbench-libs-glu-module-cpp-gendir : @$(MKDIR) $(OBJDIR)/cpp -#MM- workbench-libs-glu-module-cpp : $(CROSSTOOLS_TARGET) +#MM- workbench-libs-glu-module-cpp : $(CROSSTOOLS_CXX_TARGET) #MM workbench-libs-glu-module-cpp : $(CC_SOURCES) $(CPP_SOURCES) -- 2.11.4.GIT