1 dnl Copyright © 1997-2016, The AROS Development Team. All rights reserved.
4 dnl Desc: Autoconf source for configuration file
7 # Note: After file changes, generate configure anew and commit _both_ files.
10 # method of getting shared/non-shared ld/ar tool for target.
12 # ------------------------------------------------------------------------
13 # Here starts the first section of the configure.in file.
14 # ------------------------------------------------------------------------
18 AC_CONFIG_AUX_DIR(scripts/autoconf)
20 # Check what host we are running on.
21 # If a target is not suggested, we use this one.
22 # Note that what we call a target, Autoconf calls a host.
25 # Default versions for the gnu tools we build
26 default_gcc_version="4.6.4"
27 default_binutils_version="2.23.2"
29 # The AROS target is slightly different to the normal GNU style
30 # format. We don't have the middle part, and we reverse the order
31 # of the $(CPU) and $(OS) bits.
33 # Don't strip the version of the target yet, it might be
34 # useful on some systems.
36 AC_MSG_CHECKING([for AROS style target])
38 if test "$target" = "NONE" ; then
39 target=$host_os-$host_cpu
41 if test "$target" = "" ; then
42 target=$host_os-$host_cpu
45 AC_MSG_RESULT($target)
47 if test "$host_os" = "mingw32" ; then
51 # Don't know where else to put this...
52 AC_MSG_CHECKING([building AROS in])
53 AROS_BUILDDIR=`${PWDCMD-pwd}`
54 AROS_BUILDDIR_UNIX=${PWD}
55 AC_MSG_RESULT($AROS_BUILDDIR)
57 AC_MSG_CHECKING([AROS source in])
58 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
60 AC_MSG_RESULT($SRCDIR)
62 # Parse the target field into something useful.
64 target_os=`echo $target | sed 's/^\([^-].*\)-\(.*\)$/\1/'`
65 target_cpu=`echo $target | sed 's/^\([^-].*\)-\(.*\)$/\2/'`
68 # Some debug output, to be removed again.
69 AC_MSG_CHECKING([for target system (debug output)])
70 AC_MSG_RESULT($target_os)
71 AC_MSG_CHECKING([for target cpu (debug output)])
72 AC_MSG_RESULT($target_cpu)
74 dnl --------------------------------------------------------------------
75 dnl Set the default Workbench resolution
76 dnl --------------------------------------------------------------------
77 aros_nominal_width=800
78 aros_nominal_height=600
81 dnl --------------------------------------------------------------------
82 dnl Host Configuration Section
83 dnl --------------------------------------------------------------------
85 dnl The idea here is to find out all the information we need about the
86 dnl host. This means things like tools for building directory structures,
87 dnl copying files around and the like.
89 default_c_compilers="gcc clang cc"
90 AC_ARG_WITH(c-compiler,AC_HELP_STRING([--with-c-compiler=VERSION],[Use specified c compiler for building AROS]),use_c_compiler="$withval",use_c_compiler="")
91 if test "$use_c_compiler" = ""; then
92 host_c_compilers="$default_c_compilers"
94 host_c_compilers="$use_c_compiler"
97 default_cxx_compilers="g++ clang++ c++"
98 AC_ARG_WITH(cxx-compiler,AC_HELP_STRING([--with-cxx-compiler=VERSION],[Use specified c++ compiler building AROS]),use_cxx_compiler="$withval",use_cxx_compiler="")
99 if test "$use_cxx_compiler" = ""; then
100 host_cxx_compilers="$default_cxx_compilers"
102 host_cxx_compilers="$use_cxx_compiler"
106 # The first step is to find the host binaries.
107 # Check for a compiler.
108 # Due to a bug in autoconf check for c++ compiler first.
109 # For mor info see, http://osdir.com/ml/bug-autoconf-gnu/2010-05/msg00001.html.
110 AC_PROG_CXX([${host_cxx_compilers}])
111 AC_PROG_CC([${host_c_compilers}])
112 aros_host_def_cc="$CC"
116 # Check for a compatible awk
117 AC_CHECK_PROGS(AWK,[gawk nawk])
118 AROS_REQUIRED(gawk,$AWK)
119 AROS_PROG(MMAKE,mmake)
121 # Perform some default variable assignments. Note all of these will be
122 # Regenerated from the script, so there is no need to cache them.
124 aros_build_host=$host
128 AROS_TOOL_CCPATH(aros_host_ld,ld)
129 AROS_REQUIRED(ld,$aros_host_ld)
130 aros_host_make="make"
131 aros_host_cflags="$CFLAGS"
132 aros_host_cxxflags="$CXXFLAGS"
133 aros_host_ldflags="$LDFLAGS"
134 aros_host_debug="-g -O0"
135 aros_host_mkdep="\$(SRCDIR)/scripts/mkdep"
136 aros_host_mkargs="--no-print-directory"
137 aros_host_exe_suffix="$EXEEXT"
138 aros_host_lib_suffix=""
140 # Ignore all compliance, AROS ROMs = 0
141 # KickStart v1.0 = 30
142 # KickStart v1.3 = 34
143 # KickStart v2.0 = 37
144 # KickStart v3.0 = 39
145 # KickStart v3.1 = 40
147 aros_amigaos_compliance=0
149 AC_CHECK_PROGS(aros_host_aclocal,[aclocal aclocal19 aclocal-1.9])
150 AC_CHECK_PROGS(aros_host_autoconf,[autoconf autoconf259 autoconf253])
151 AC_CHECK_PROGS(aros_host_autoheader,[autoheader autoheader259 autoheader253])
152 AC_CHECK_PROGS(aros_host_automake,[automake automake19 automake-1.9])
154 AROS_REQUIRED(aclocal/aclocal19/aclocal-1.9, $aros_host_aclocal)
155 AROS_REQUIRED(automake/automake19/automake-1.9, $aros_host_automake)
157 case "$aros_host_cc" in
162 aros_host_cc_pipe="-pipe"
172 aros_kernel_cc_includes=""
173 aros_target_cc_includes=""
176 # ----------------------------------------------------------------------------------------
177 # Host-specific defaults
179 # This is the main host configuration section. It is where the host
180 # can change the values of any variables it needs to change. We do
181 # not look at anything that compiles to the target yet, we'll get
186 aros_host_arch="aros"
187 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
193 aros_host_cpu="x86_64"
199 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
200 aros_host_cpu="$host_cpu"
206 aros_host_arch="linux"
207 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
208 android_build_os="linux-x86"
209 android_tool="android"
210 default_android_sdk="/opt/android-sdk-linux_x86"
216 aros_host_cpu="x86_64"
228 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
229 aros_host_cpu="$host_cpu"
235 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe -I/usr/local/include"
236 aros_host_make="gmake"
237 aros_host_arch="freebsd"
240 aros_host_ldflags="$aros_host_ldflags -L/usr/local/lib -liconv"
242 dnl FreeBSD 5.x (and later) has changed the default object format.
243 dnl The double [[]] is necessary to get around m4's quoting rules.
246 aros_object_format="elf_i386"
250 aros_object_format="elf_i386_fbsd"
257 AC_CHECK_FILE(/usr/include/stddef.h,,
258 AC_MSG_ERROR([XCode incorrectly configured!
259 please run 'xcode-select --install' before
260 re-running configure])
262 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
263 aros_host_arch="darwin"
265 if [[ -z ${SED+x} ]]; then SED="gsed"; fi
266 android_build_os="darwin-x86"
267 android_tool="android"
268 default_android_sdk="/android-sdk-mac_x86"
274 aros_host_cpu="x86_64"
280 AC_MSG_WARN("Unknown CPU for Darwin host -- $host_cpu")
281 aros_host_cpu="$host_cpu"
285 aros_host_ldflags="$aros_host_ldflags -liconv"
290 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
291 aros_host_make="gmake"
292 aros_host_arch="dragonfly"
298 aros_host_cpu="x86_64"
301 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
302 aros_host_cpu="$host_cpu"
308 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
309 aros_host_make="gmake"
310 aros_host_arch="netbsd"
319 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
320 aros_host_cpu="$host_cpu"
323 aros_host_lib_suffix=".0.0"
327 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
328 aros_host_make="gmake"
329 aros_host_arch="openbsd"
335 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
336 aros_host_cpu="$host_cpu"
342 aros_host_arch="solaris"
343 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
349 aros_host_cpu="sparc"
352 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
353 aros_host_cpu="$host_cpu"
359 aros_host_arch="morphos"
365 aros_host_arch="amiga"
371 TOUCH="/gg/bin/touch"
380 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
381 aros_host_cpu="$host_cpu"
387 aros_host_arch="cygwin"
388 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
390 android_build_os="windows"
391 android_tool="android.bat"
392 default_android_sdk="/cygdrive/c/android-sdk-windows-1.6_r1"
399 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
400 aros_host_cpu="$host_cpu"
406 aros_host_arch="mingw32"
407 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
409 android_build_os="windows"
410 android_tool="android.bat"
411 default_android_sdk="/c/android-sdk-windows-1.6_r1"
413 libpng_libextra="-lws2_32"
417 dnl Currently there's neither 64-bit MinGW nor MSYS. Both environments are 32-bit
418 dnl and run under emulation. Consequently, uname reports i386 even on 64-bit systems.
419 dnl Here we attempt to detect Windows home platform by asking gcc about its target.
420 dnl 64-bit gcc will output "x86_64-w64-mingw32" here.
422 AC_MSG_CHECKING([for Windows native gcc target])
423 host_cpu=`gcc -dumpmachine`
424 AC_MSG_RESULT($host_cpu)
435 dnl Native i386 gcc for MinGW32 reports 'mingw32' with -dumpmachine switch
440 aros_host_cpu="x86_64"
441 dnl Dragon's x86_64-w64-mingw32-gcc is a bit broken. It ignores standard $prefix/include
442 dnl directory, so we have to add it explicitly here.
443 aros_host_cflags="$aros_host_cflags -isystem /mingw/include"
447 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
448 aros_host_cpu="$host_cpu"
453 AC_MSG_ERROR([Unsupported host architecture $host])
457 AROS_PROG(aros_host_ar,[ar],[cr])
458 AROS_REQUIRED(ar,$aros_host_ar)
459 AROS_PROG(aros_host_ranlib,ranlib)
460 AROS_REQUIRED(ranlib,$aros_host_ranlib)
461 AROS_PROG(aros_host_strip,strip)
462 AROS_REQUIRED(strip,$aros_host_strip)
464 AROS_PROG(RM,[rm],[-rf])
465 AROS_REQUIRED(rm,$RM)
467 AROS_REQUIRED(cp,$CP)
469 AROS_REQUIRED(mv,$MV)
470 AROS_PROG(ECHO,[echo])
471 AROS_REQUIRED(echo,$ECHO)
472 AROS_PROG(MKDIR,[mkdir],[-p])
473 AROS_REQUIRED(mkdir,$MKDIR)
474 AROS_PROG(TOUCH,[touch])
475 AROS_REQUIRED(touch,$TOUCH)
476 AROS_PROG(SORT,[sort])
477 AROS_REQUIRED(sort,$SORT)
478 AROS_PROG(UNIQ,[uniq])
479 AROS_REQUIRED(uniq,$UNIQ)
480 AROS_PROG(NOP,[true])
481 AROS_REQUIRED(true,$NOP)
483 AROS_REQUIRED(cat,$CAT)
484 AROS_PROG(BISON,[bison])
485 AROS_REQUIRED(bison,$BISON)
486 AROS_PROG(FLEX,[flex])
487 AROS_REQUIRED(flex,$FLEX)
488 AROS_PROG(PNGTOPNM,[pngtopnm])
489 AROS_REQUIRED(pngtopnm,$PNGTOPNM)
490 AROS_PROG(PPMTOILBM,[ppmtoilbm])
491 AROS_REQUIRED(ppmtoilbm,$PPMTOILBM)
493 AROS_REQUIRED(sed,$SED)
494 AROS_PROG(CHMOD,[chmod])
495 AROS_REQUIRED(chmod,$CHMOD)
496 AROS_PROG(PATCH,[patch])
497 AROS_REQUIRED(patch,$PATCH)
501 AC_ARG_ENABLE([libpng-config], [--disable-libpng-config disable libpng-config test and configuration])
502 if test "$enable_libpng_config" != "no"; then
503 AC_CHECK_PROG([arosconfig_use_libpngconfig],[libpng-config],[yes],[no])
505 if test "$arosconfig_use_libpngconfig" = "yes"; then
506 AC_MSG_CHECKING([libpng-config library])
507 libpng_incdir="`libpng-config --cflags`"
508 libpng_libextra="$libpng_libextra `libpng-config --ldflags`"
509 libpng="`libpng-config --libs`"
510 AC_MSG_RESULT($libpng)
512 AC_CHECK_LIB(png, png_read_png, [libpng="-lpng"], [libpng="no"])
513 if test "$libpng_libextra" != ""; then
514 if test "$libpng" != "no"; then
515 libpng_libextra="$libpng_libextra $libpng"
519 AROS_REQUIRED(libpng, $libpng)
521 AC_SUBST(libpng_libextra)
522 AC_SUBST(libpng_incdir)
529 dnl ---------------------------------------------------------------------------
530 dnl Look for things about the host system, good for hosted targets.
531 dnl ---------------------------------------------------------------------------
533 # Check for some includes for the X11 HIDD and the kernel
534 AC_CHECK_HEADERS([sys/ipc.h sys/shm.h \
535 sys/mmap.h sys/mman.h sysexits.h \
536 sys/statfs.h sys/statvfs.h sys/vfs.h sys/param.h \
539 AC_CHECK_HEADERS([sys/mount.h],,,[#include <sys/param.h>])
556 AC_CHECK_MEMBERS(struct tm.tm_gmtoff)
558 # Look for some functions
559 AC_CHECK_FUNCS([getpagesize kqueue statfs statvfs \
560 clone kse_create rfork_thread thr_create sa_register \
561 getcontext makecontext setcontext sigaltstack swapcontext])
565 #-----------------------------------------------------------------------------
568 # GCC 4.1+ has a stack protection feature that requires OS support. Ubuntu has
569 # it switched on by default, and we use the host compiler, so it compiles AROS
570 # code with this enabled resulting in link failures as we don't have support
573 # We use two methods to disable it. For the host compiler (used to compile
574 # some hosted modules), we test to see if the compiler supports stack
575 # protection, and if it does we disable it in AROS_CONFIG_CFLAGS. This should
576 # work on all platforms.
579 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
580 save_cflags="$CFLAGS"
581 CFLAGS="$CFLAGS -fno-stack-protector"
582 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
583 AC_MSG_RESULT($use_no_stack_protector)
584 if test "x-$use_no_stack_protector" = "x-yes" ; then
585 aros_host_cflags="$aros_host_cflags -fno-stack-protector"
587 CFLAGS="$save_cflags"
589 #-----------------------------------------------------------------------------
591 # Disable pointer-signedness warnings if the compiler recognises the option
592 # (this only works for the host compiler at the moment)
594 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
595 save_cflags="$CFLAGS"
596 CFLAGS="$CFLAGS -Wno-pointer-sign"
597 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
598 AC_MSG_RESULT($use_no_sign_warning)
599 if test "x-$use_no_sign_warning" = "x-yes" ; then
600 aros_host_cflags="$aros_host_cflags -Wno-pointer-sign"
602 CFLAGS="$save_cflags"
604 #-----------------------------------------------------------------------------
606 # Check if host compiler supports -fgnu89-inline, can be needed for crosstools.
608 AC_MSG_CHECKING([whether ${CC} accepts -fgnu89-inline])
609 save_cflags="$CFLAGS"
610 CFLAGS="$CFLAGS -fgnu89-inline"
611 AC_TRY_COMPILE(,, use_gnu89_inline="yes", use_gnu89_inline="no")
612 AC_MSG_RESULT($use_gnu89_inline)
613 if test "x-$use_gnu89_inline" = "x-yes" ; then
614 gnu89_inline="-fgnu89-inline"
616 CFLAGS="$save_cflags"
619 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
620 # On GCC >= 4.0 -iquote should be used
622 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
623 CFLAGS="$CFLAGS -iquote."
624 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
625 AC_MSG_RESULT($has_iquote)
626 if test "x-$has_iquote" = "x-yes" ; then
627 host_cflags_iquote=-iquote
628 host_cflags_iquote_end=
630 host_cflags_iquote=-I
631 host_cflags_iquote_end=-I-
634 AC_MSG_NOTICE([Performing target configuration...])
636 dnl --------------------------------------------------------------------
637 dnl Target Configuration Section
638 dnl --------------------------------------------------------------------
640 dnl The target configuration section is responsible for setting up all
641 dnl the paths for includes, and tools required to build AROS to some
642 dnl particular target.
644 aros_nowarn_flags="NOWARN_UNUSED_COMMAND_LINE_ARGUMENT NOWARN_UNKNOWN_WARNING_OPTION NOWARN_POINTER_SIGN NOWARN_PARENTHESES"
646 toolchain_needs_sysroot=no
648 aros_config_cflags="-Wall -Werror-implicit-function-declaration"
649 aros_config_aflags="-Wall -x assembler-with-cpp -c"
650 aros_config_ldflags=""
652 aros_shared_default=yes
654 aros_shared_cflags="-fPIC"
655 aros_shared_aflags=""
656 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
657 aros_kernel_ldflags="-Wl,-rpath,./lib"
659 aros_kernel_ar_flags="cr"
660 aros_target_ar_flags="cr"
661 aros_target_nm_flags="-C -ul"
662 aros_target_strip_flags="--strip-unneeded -R.comment"
667 aros_target_genmap="-Wl,-Map -Xlinker"
669 # Native flavour stuff
670 aros_serial_debug="0"
672 # Palm native flavour stuff
673 aros_palm_debug_hack="0"
676 aros_nesting_supervisor="0"
678 # Collect-aros stuff: "-ius" to ignore undefined symbols
679 ignore_undefined_symbols=""
681 # Check for X11 by default
689 AC_MSG_CHECKING([Which toolchain family to use ...])
690 AC_ARG_WITH(toolchain,AC_HELP_STRING([--with-toolchain=family],[Which toolchain family to crosscompile with (defaults to gnu)]),aros_toolchain="$withval",aros_toolchain="gnu")
691 AC_MSG_RESULT($aros_toolchain)
693 case "$aros_toolchain" in
695 # toolchain_needs_sysroot=yes
696 toolchain_c_compiler="clang"
697 toolchain_cxx_compiler="clang++"
698 toolchain_cpp_preprocessor="clang -E"
700 toolchain_as="llvm-as"
701 toolchain_ar="llvm-ar"
702 toolchain_ranlib="llvm-ranlib"
703 toolchain_nm="llvm-nm"
704 toolchain_strip="true"
705 toolchain_objcopy="llvm-objcopy"
706 toolchain_objdump="llvm-objdump"
709 toolchain_c_compiler="gcc"
710 toolchain_cxx_compiler="g++"
711 toolchain_cpp_preprocessor="cpp"
715 toolchain_ranlib="ranlib"
717 toolchain_strip="strip"
718 toolchain_objcopy="objcopy"
719 toolchain_objdump="objdump"
722 AC_MSG_WARN("Unknown toolchain family!")
723 toolchain_c_compiler="cc"
724 toolchain_cxx_compiler="c++"
725 toolchain_cpp_preprocessor="cpp"
729 toolchain_ranlib="ranlib"
731 toolchain_strip="strip"
732 toolchain_objcopy="objcopy"
733 toolchain_objdump="objdump"
737 #-----------------------------------------------------------------------------
739 AC_MSG_CHECKING([which type of build to do])
740 AC_ARG_ENABLE(build_type,AC_HELP_STRING([--enable-build-type=TYPE],[Select the build type. Available types are: personal, nightly, snapshot, milestone, release. Do NOT use this option unless you know what you are doing! (default=personal)]),build_type=$enableval,build_type="personal")
742 if test "$build_type" = "nightly"; then
743 build_type_string="NIGHTLY"
744 elif test "$build_type" = "snapshot"; then
745 build_type_string="SNAPSHOT"
746 elif test "$build_type" = "milestone"; then
747 build_type_string="MILESTONE"
748 elif test "$build_type" = "release"; then
749 build_type_string="RELEASE"
751 build_type_string="PERSONAL"
752 build_type="personal"
755 aros_config_cflags="$aros_config_cflags -DAROS_BUILD_TYPE=AROS_BUILD_TYPE_$build_type_string"
757 AC_MSG_RESULT($build_type)
759 #-----------------------------------------------------------------------------
760 all_debug_types="messages stack modules mungwall symbols"
762 AC_MSG_CHECKING([which debug types to enable])
763 AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug=list],[Enable different types of debug. Commas or whitespaces can be used to separate the items in the list. Available types of debug are: all, none, messages, stack, mungwall, modules, symbols. If no list is provided then "all" is assumed. (default=none)]),
764 debug="$enableval",debug="")
766 if test "$debug" = "" -o "$debug" = "no"; then
768 elif test "$debug" = "yes"; then
772 if test "$debug" = "all" ; then
773 debug="messages stack modules symbols"
774 for d in $all_debug_types; do
775 export aros_${d}_debug="1"
778 for d in $all_debug_types; do
779 export aros_${d}_debug="0"
783 if test "$debug" != "none"; then
784 debug=`echo $debug | sed s/,/\ /g`
787 for d2 in $all_debug_types; do
788 if test "$d2" = "$d"; then
793 if test "$found" = "0"; then
794 AC_MSG_ERROR([unrecognized debug type "$d". Available types are: all none $all_debug_types])
796 export aros_${d}_debug="1"
800 AC_MSG_RESULT($debug)
802 if test "$aros_messages_debug" = "1"; then
803 aros_messages_debug="-DADEBUG=1 -DMDEBUG=1"
805 aros_messages_debug=""
807 if test "$aros_symbols_debug" = "1"; then
808 aros_symbols_debug="-g"
810 aros_symbols_debug=""
813 # These are the flags to pass when compiling debugged programs
814 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug"
816 aros_debug_ldflags="$aros_symbols_debug"
818 #-----------------------------------------------------------------------------
819 # Checking for distcc and ccache.
821 # Always apply the transforms in this particular order. Basically you should
822 # always run 'ccache distcc compiler' in that order for the best performance.
824 AC_MSG_CHECKING([whether to enable distcc])
825 AC_ARG_ENABLE(distcc,AC_HELP_STRING([--enable-distcc],[Use distcc as a front end to the compiler (default=no).]),distcc="$enableval",distcc="no")
826 if test "$distcc" != "" -a "$distcc" != "no"; then
827 # AC_CHECK_PROG will print out the result in this case
828 AC_PATH_PROG(DISTCC,[distcc],distcc,)
833 AC_MSG_CHECKING([whether to enable ccache])
834 AC_ARG_ENABLE(ccache,AC_HELP_STRING([--enable-ccache],[Use ccache as a front end to the compiler (default=no).]),ccache="$enableval",ccache="no")
835 if test "$ccache" != "" -a "$ccache" != "no"; then
836 # AC_CHECK_PROG will print out the result in this case
837 AC_CHECK_PROG(CCACHE,[ccache],ccache,)
842 #-----------------------------------------------------------------------------
843 AC_MSG_CHECKING([what specific host gcc version to use])
844 AC_ARG_WITH(kernel-gcc-version,AC_HELP_STRING([--with-kernel-gcc-version=VERSION],[Use gcc-VERSION for building bootstrap]),kernel_tool_version="$withval",kernel_tool_version="")
845 if test "$kernel_tool_version" != "" ; then
846 msg_result=$kernel_tool_version
850 AC_MSG_RESULT($msg_result)
852 #-----------------------------------------------------------------------------
853 AC_MSG_CHECKING([what optimization flags to use])
854 AC_ARG_WITH(optimization,AC_HELP_STRING([--with-optimization=FLAGS],[Use optimization flags FLAGS (default=-O2).]),optimization="$withval",optimization="unknown")
855 if test "$optimization" = "unknown"; then
856 dnl default is -O2 for normal builds, -O0 for debug builds
857 if test "$debug" != "none"; then
863 aros_optimization_cflags="$optimization"
864 AC_MSG_RESULT($optimization)
867 #-----------------------------------------------------------------------------
868 AC_MSG_CHECKING([which paranoia flags to use])
869 AC_ARG_WITH(paranoia,AC_HELP_STRING([--with-paranoia=(yes|no|FLAGS)],[Specific compiler warning FLAGS to enable for paranoia builds (default=-Wall -Werror)]),[paranoia_flags="$withval"],[paranoia_flags="$paranoia_default"])
870 if test "$paranoia_flags" = "no"; then
874 if test "$paranoia_flags" = "yes"; then
875 paranoia_flags="-Wall -Werror"
877 msg_result="$paranoia_flags"
879 AC_MSG_RESULT($msg_result)
880 aros_config_cflags="$aros_config_cflags $paranoia_flags"
882 AC_MSG_CHECKING([if we should enable link time optimizations (LTO)])
883 AC_ARG_ENABLE(lto,AC_HELP_STRING([--enable-lto=[yes|no]],[Enable link time optimizations if the target compiler supports them (default=yes)]),
884 aros_config_lto="$enableval",aros_config_lto="yes")
885 if test "$aros_config_lto" != "yes"; then
888 AC_MSG_RESULT($aros_config_lto)
890 #-----------------------------------------------------------------------------
891 AC_MSG_CHECKING([what target variant to enable])
892 AC_ARG_ENABLE(target_variant,AC_HELP_STRING([--enable-target-variant=NAME],[Enable a specific target variant (default=none)]),target_variant=$enableval,target_variant="")
893 if test "$target_variant" = ""; then
894 aros_target_variant=""
895 aros_target_suffix=""
898 aros_target_variant="$target_variant"
899 aros_target_suffix="-$target_variant"
901 AC_MSG_RESULT($enableval)
903 #-----------------------------------------------------------------------------
904 # Target-specific defaults. You can override then on a per-target basis.
906 # Bootloader name. Currently used by PC target.
907 target_bootloader="none"
910 #-----------------------------------------------------------------------------
911 # Additional options for some specific targets
913 case "$aros_target_variant" in
915 AC_MSG_CHECKING([XCode path])
916 AC_ARG_WITH(xcode,AC_HELP_STRING([--with-xcode=PATH],[Specify XCode path for iOS targets (default=/Developer).]),aros_xcode_path="$withval",aros_xcode_path="/Developer")
917 AC_MSG_RESULT($aros_xcode_path)
919 AC_MSG_CHECKING([what iOS SDK version to use])
920 AC_ARG_WITH(sdk-version,AC_HELP_STRING([--with-sdk-version=VERSION],[Use iOS SDK version VERSION (default=4.1).]),aros_sdk_version="$withval",aros_sdk_version="4.1")
921 AC_MSG_RESULT($aros_sdk_version)
926 AC_MSG_CHECKING([Android SDK path])
927 AC_ARG_WITH(sdk,AC_HELP_STRING([--with-sdk=PATH],[Specify Android SDK path (default=$default_android_sdk).]),aros_android_sdk="$withval",aros_android_sdk=$default_android_sdk)
928 AC_MSG_RESULT($aros_android_sdk)
930 AC_MSG_CHECKING([Android NDK path])
931 AC_ARG_WITH(ndk,AC_HELP_STRING([--with-ndk=PATH],[Specify Android NDK path (default=none).]),aros_android_ndk="$withval",aros_android_ndk="none")
932 AC_MSG_RESULT($aros_android_ndk)
934 AC_MSG_CHECKING([what Android SDK version to use])
935 AC_ARG_WITH(sdk-version,AC_HELP_STRING([--with-sdk-version=LEVEL],[Use Android SDK for API LEVEL (default=12).]),aros_sdk_version="$withval",aros_sdk_version="12")
936 AC_MSG_RESULT($aros_sdk_version)
938 aros_android_level=android-$aros_sdk_version
939 if test ! -d $aros_android_sdk/platforms/$aros_android_level; then
940 echo "Platform $aros_android_level is not installed in your SDK"
941 echo "Use --with-sdk-version=<API level number> to select another platform version"
942 echo "You can check what plaform versions are installed in your SDK"
943 echo "by examining contents of $aros_android_sdk/platforms directory"
944 AC_MSG_ERROR([Android platform $aros_android_level is not installed])
947 export PATH="$aros_android_sdk/tools:$PATH"
948 AC_PATH_PROG(android_tool, $android_tool)
949 AROS_REQUIRED(android,$android_tool)
951 if test "$aros_android_ndk" != "none"; then
952 AC_MSG_CHECKING([what Android NDK version to use])
953 AC_ARG_WITH(ndk-version,AC_HELP_STRING([--with-ndk-version=LEVEL],[Use Android NDK for API LEVEL (default=9).]),aros_ndk_version="$withval",aros_ndk_version="9")
954 AC_MSG_RESULT($aros_ndk_version)
957 AC_PATH_PROG(ant, ant)
958 if test "$ant" = ""; then
959 AC_MSG_WARN([Apache Ant is missing, Java bootstrap can't be built automatically])
962 AC_MSG_CHECKING([Build debug or release apk])
963 AC_ARG_WITH(apk-version,AC_HELP_STRING([--with-apk-version=(release|debug)],[Which version of AROSBootstrap.apk to compile. Release version needs key for signing, debug version will only run in emulator. (default=release)]),aros_android_antapk=$withval,aros_android_antapk=release)
964 if test $aros_android_antapk != release -a $aros_android_antapk != debug; then
965 AC_MSG_ERROR([apk-version has to be release or debug])
967 AC_MSG_RESULT($aros_android_antapk)
969 dnl MSYS bash can't run .bat files directly, then need to be started via cmd.exe
970 if test "$host_os" = "mingw32"; then
971 android_tool="cmd //c $android_tool"
979 #-----------------------------------------------------------------------------
980 # External toolchains
981 kernel_tool_prefix="none"
982 aros_tool_prefix="none"
983 elf_tool_prefix="${target_cpu}-elf-"
985 # This is the target configuration switch.
988 aros_target_arch="linux"
989 aros_target_family="unix"
990 case "$target_cpu" in
992 aros_target_cpu="m68k"
993 aros_object_format="m68kelf"
994 aros_flavour="emulcompat"
995 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__linux__"
996 aros_shared_ldflags="-Wl,-T,\$(TOP)/config/linux/m68k/script.so"
997 aros_kernel_ldflags="-Wl,-rpath,./lib,-T,\$(TOP)/config/linux/m68k/script.normal"
998 gcc_target_cpu="mc68000"
1001 aros_target_cpu="i386"
1002 aros_object_format="elf_i386"
1003 aros_flavour="emulation"
1004 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__linux__"
1005 aros_kernel_ldflags="-Wl,-melf_i386"
1006 aros_nominal_depth=8
1007 gcc_target_cpu="i386"
1008 pci_hidd_target="hidd-pci-linux"
1009 android_tool_dir_prefix="x86"
1010 android_tool_prefix="i686-android-linux"
1011 android_ndk_arch="x86"
1014 aros_target_cpu="x86_64"
1015 aros_object_format="elf_x86_64"
1016 aros_flavour="emulation"
1017 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__linux__"
1018 aros_config_cflags="$aros_config_cflags -mcmodel=large -mno-red-zone -fno-omit-frame-pointer"
1019 aros_nominal_depth=8
1020 pci_hidd_target="hidd-pci-linux"
1023 aros_target_cpu="ppc"
1024 aros_object_format="elf32ppc"
1025 aros_flavour="emulation"
1026 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
1027 aros_nominal_depth=8
1028 gcc_target_cpu="ppc"
1031 # Same as powerpc, but I need this for the nightly build to work again.
1032 # Actually, the nightly should be made working with powerpc target.
1033 # That just was too much work for the moment, another week or two.
1035 aros_target_cpu="ppc"
1036 aros_object_format="elf32ppc"
1037 aros_flavour="emulation"
1038 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
1039 aros_nominal_depth=8
1040 gcc_target_cpu="ppc"
1043 aros_target_cpu="aarch64"
1044 target_cpu="aarch64"
1045 aros_object_format="aarch64elf_aros"
1046 aros_flavour="emulation"
1047 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1048 gcc_target_cpu="aarch64"
1049 aros_config_cflags="$aros_config_cflags -fno-strict-aliasing -fno-omit-frame-pointer"
1050 aros_config_aflags="$aros_config_aflags -fno-strict-aliasing"
1051 aros_arch_libs="-laeabi"
1052 gcc_default_float_abi="hard"
1053 kernel_tool_prefix="aarch64-linux-gnueabihf-"
1056 aros_target_cpu="arm"
1058 aros_object_format="armelf_aros"
1059 aros_flavour="emulation"
1060 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1061 gcc_target_cpu="arm"
1062 aros_config_cflags="$aros_config_cflags -fno-strict-aliasing -fno-omit-frame-pointer"
1063 aros_config_aflags="$aros_config_aflags -fno-strict-aliasing"
1064 aros_arch_libs="-laeabi"
1065 gcc_default_float_abi="hard"
1066 android_tool_dir_prefix="arm-linux-androideabi"
1067 android_tool_prefix="arm-linux-androideabi"
1068 android_ndk_arch="arm"
1069 kernel_tool_prefix="arm-linux-gnueabihf-"
1072 aros_target_cpu="arm"
1073 aros_object_format="armelf_aros"
1074 aros_flavour="emulation"
1075 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1076 gcc_target_cpu="arm"
1077 aros_config_cflags="$aros_config_cflags -fno-strict-aliasing -fno-omit-frame-pointer"
1078 aros_config_aflags="$aros_config_aflags -fno-strict-aliasing"
1079 aros_arch_libs="-laeabi"
1080 android_tool_dir_prefix="arm-linux-androideabi"
1081 android_tool_prefix="arm-linux-androideabi"
1082 android_ndk_arch="arm"
1083 kernel_tool_prefix="arm-linux-gnueabi-"
1086 AC_MSG_ERROR("Unknown CPU for Linux -- $target_cpu")
1089 case "$aros_target_variant" in
1092 dnl Not all Linux CPUs are supported by Android
1093 if test "$android_ndk_arch" = ""; then
1094 AC_MSG_ERROR("Unsupported CPU for Android -- $target_cpu")
1097 aros_nominal_width=320
1098 aros_nominal_height=480
1099 if test "$aros_android_ndk" = "none"; then
1100 dnl Use standalone toolchain, don't adjust paths
1101 aros_kernel_cflags="-mandroid"
1102 aros_kernel_ldflags="-mandroid"
1105 dnl In Android NDK toolchains are placed in own directories,
1106 dnl but tool names are not suffixed with version
1107 export PATH="$aros_android_ndk/toolchains/$android_tool_dir_prefix-$kernel_tool_version/prebuilt/$android_build_os/bin:$PATH"
1108 kernel_tool_version=""
1109 aros_android_ndk="$aros_android_ndk/platforms/android-$aros_ndk_version/arch-$android_ndk_arch"
1110 aros_kernel_cflags="--sysroot $aros_android_ndk -mandroid"
1111 aros_kernel_ldflags="--sysroot $aros_android_ndk -mandroid"
1112 CFLAGS="$CFLAGS --sysroot $aros_android_ndk -mandroid"
1113 aros_kernel_includes="-isystem $aros_android_ndk/usr/include"
1116 host_android_gfx=yes
1117 # Disable implicit PIC mode
1118 aros_target_cflags="$aros_target_cflags -fno-pic"
1119 kernel_tool_prefix="$android_tool_prefix-"
1125 aros_target_arch="pc"
1126 aros_shared_default="no"
1127 target_bootloader="grub2"
1128 case "$target_cpu" in
1130 aros_target_cpu="i386"
1132 dnl If somebody hasn't already set the target object
1133 dnl format, then use this value. Mostly to support
1134 dnl FreeBSD cross-compilation.
1135 dnl TODO: Remove when we always use our compiler.
1137 if test "$aros_object_format" = "" ; then
1138 aros_object_format="elf_i386"
1140 aros_flavour="standalone"
1141 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1142 aros_kernel_ldflags="-Wl,-melf_i386"
1143 aros_nominal_width=640
1144 aros_nominal_height=480
1145 gcc_target_cpu="i386"
1148 aros_target_cpu="x86_64"
1150 if test "$aros_object_format" = "" ; then
1151 aros_object_format="elf_x86_64"
1153 aros_flavour="standalone"
1154 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1155 aros_config_cflags="$aros_config_cflags -mcmodel=large -fno-asynchronous-unwind-tables -mno-red-zone -fno-omit-frame-pointer"
1156 aros_kernel_ldflags=""
1157 aros_nominal_width=640
1158 aros_nominal_height=480
1159 case "$aros_target_variant" in
1161 ENABLE_EXECSMP="#define __AROSEXEC_SMP__"
1166 AC_MSG_ERROR("Unknown native CPU -- $target_cpu")
1172 aros_target_arch="prep"
1173 aros_shared_default="no"
1174 aros_target_cpu="ppc"
1175 aros_object_format="elf32ppc"
1176 aros_flavour="ppcnative"
1177 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1178 aros_kernel_ldflags=""
1179 aros_nominal_width=640
1180 aros_nominal_height=480
1181 gcc_target_cpu="ppc"
1185 aros_target_arch="freebsd"
1186 aros_target_family="unix"
1187 aros_target_cpu="i386"
1188 aros_flavour="emulation"
1189 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1190 gcc_target_cpu="i386"
1192 aros_target_strip_flags="-x"
1196 aros_target_arch="darwin"
1197 aros_target_family="unix"
1198 aros_flavour="emulation"
1199 case "$target_cpu" in
1201 aros_ios_platform="iPhoneSimulator"
1202 aros_target_cpu="i386"
1203 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1204 aros_kernel_ldflags=""
1205 aros_macosx_version="10.4"
1206 aros_nominal_depth=8
1207 gcc_target_cpu="i386"
1208 aros_object_format="elf_i386"
1209 aros_kernel_ar_flags="-cr"
1210 aros_target_strip_flags="-x"
1211 kernel_tool_flags="-m32"
1214 aros_target_cpu="x86_64"
1215 aros_object_format="elf_x86_64"
1216 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1217 aros_macosx_version="10.6"
1218 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1219 aros_kernel_cflags="-m64"
1220 aros_kernel_ldflags="-m64"
1221 aros_target_cflags="-mcmodel=large"
1222 aros_nominal_depth=8
1224 aros_kernel_ar_flags="-cr"
1227 aros_kernel_ranlib="ranlib"
1229 aros_kernel_strip="strip"
1230 kernel_tool_prefix="i686-apple-darwin10-"
1233 aros_target_cpu="ppc"
1234 aros_object_format="elf32ppc"
1235 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1236 aros_kernel_ldflags=""
1237 aros_macosx_version="10.0"
1238 aros_nominal_depth=8
1239 gcc_target_cpu="ppc"
1241 aros_kernel_ar_flags="-cr"
1242 aros_kernel_ld="ld -arch ppc"
1243 aros_kernel_as="as -arch ppc"
1244 aros_kernel_ranlib="ranlib -arch ppc"
1245 aros_kernel_nm="nm -arch ppc"
1246 aros_kernel_strip="strip -arch ppc"
1247 kernel_tool_prefix="powerpc-apple-darwin10-"
1250 aros_ios_platform="iPhoneOS"
1251 aros_target_cpu="arm"
1252 aros_object_format="armelf_aros"
1253 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1254 aros_arch_libs="-laeabi"
1255 aros_nominal_depth=8
1256 gcc_target_cpu="arm"
1258 aros_kernel_ar_flags="-cr"
1259 aros_kernel_ld="ld -arch arm"
1260 aros_kernel_ranlib="ranlib -arch arm"
1261 kernel_tool_prefix="arm-apple-darwin10-"
1262 export PATH="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/usr/bin:$PATH"
1265 AC_MSG_ERROR("Unsupported target CPU for darwin hosted flavour -- $target_cpu")
1268 case "$aros_target_variant" in
1270 aros_ios_version="3.0"
1271 aros_nominal_width=320
1272 aros_nominal_height=480
1273 aros_ios_sdk="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/SDKs/$aros_ios_platform$aros_sdk_version.sdk"
1274 kernel_tool_flags="$target_tool_flags -isysroot $aros_ios_sdk"
1275 aros_kernel_includes="-isystem $aros_ios_sdk/usr/include"
1277 # This is here because it may depend on iOS or SDK version
1278 aros_kernel_cflags="$aros_kernel_cflags -miphoneos-version-min=$aros_ios_version"
1279 aros_kernel_ldflags="$aros_kernel_ldflags -miphoneos-version-min=$aros_ios_version"
1280 aros_kernel_objcflags="-fobjc-abi-version=2 -fobjc-legacy-dispatch"
1283 aros_kernel_cflags="$aros_kernel_cflags -mmacosx-version-min=$aros_macosx_version"
1284 aros_kernel_ldflags="$aros_kernel_ldflags -mmacosx-version-min=$aros_macosx_version"
1290 aros_target_arch="dragonfly"
1291 aros_target_family="unix"
1292 aros_flavour="emulation"
1293 case "$target_cpu" in
1295 aros_target_cpu="i386"
1296 aros_object_format="elf_i386"
1297 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__DragonFly__"
1300 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1301 aros_target_cpu="x86_64"
1302 aros_object_format="elf_x86_64"
1303 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__DragonFly__"
1306 AC_MSG_ERROR("Unknown CPU for DragonFly -- $target_cpu")
1312 aros_target_arch="netbsd"
1313 aros_target_family="unix"
1314 case "$target_cpu" in
1316 aros_target_cpu="m68k"
1317 aros_object_format="m68kelf"
1318 aros_flavour="emulcompat"
1319 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__NetBSD__"
1320 gcc_target_cpu="mc68000"
1323 aros_target_cpu="i386"
1324 aros_object_format="elf_i386"
1325 aros_flavour="emulation"
1326 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__NetBSD__"
1327 aros_nominal_depth=8
1328 gcc_target_cpu="i386"
1331 AC_MSG_ERROR("Unknown CPU for NetBSD -- $target_cpu")
1334 aros_target_genmap="-Wl,-M -Xlinker >"
1335 aros_flavour="emulation"
1336 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1340 aros_target_arch="openbsd"
1341 aros_target_family="unix"
1342 case "$target_cpu" in
1344 aros_target_cpu="i386"
1345 aros_object_format="elf_i386"
1346 aros_flavour="emulation"
1347 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__OpenBSD__"
1348 gcc_target_cpu="i386"
1351 AC_MSG_ERROR("Unknown CPU for OpenBSD -- $target_cpu")
1354 aros_target_genmap="-Wl,-M -Xlinker >"
1355 aros_target_nm_flags="-u"
1356 aros_flavour="emulation"
1360 aros_target_arch="solaris"
1361 aros_target_family="unix"
1362 case "$target_cpu" in
1364 aros_target_cpu="i386"
1365 aros_object_format="elf_i386"
1366 aros_flavour="emulation"
1367 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__Solaris__"
1368 aros_nominal_depth=8
1369 gcc_target_cpu="i386"
1372 aros_target_cpu="sparc"
1373 aros_object_format="elf_sparc"
1374 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dsparc -D__Solaris__"
1375 gcc_target_cpu="sparc"
1378 AC_MSG_ERROR("Unknown CPU for Solaris -- $target_cpu")
1381 aros_config_cflags="$aros_config_cflags -D$aros_target_cpu"
1382 aros_flavour="emulation"
1386 aros_target_arch="morphos"
1387 aros_shared_default="no"
1388 aros_target_cpu="ppc"
1389 aros_object_format="elf_ppc"
1390 aros_flavour="nativecompat"
1391 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1392 gcc_target_cpu="ppc"
1396 aros_target_arch="sam440"
1397 aros_shared_default="no"
1398 aros_target_cpu="ppc"
1399 aros_object_format="elf32ppc"
1400 aros_flavour="ppcnative"
1401 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1402 aros_kernel_ldflags=""
1403 aros_nominal_width=1024
1404 aros_nominal_height=768
1405 aros_nominal_depth=24
1406 aros_config_cflags="$aros_config_cflags -mcpu=440fp -mno-toc -fno-asynchronous-unwind-tables"
1407 gcc_target_cpu="powerpc"
1411 aros_target_arch="efika"
1412 aros_shared_default="no"
1413 aros_target_cpu="arm"
1414 aros_object_format="armelf_aros"
1415 aros_flavour="standalone"
1416 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1417 aros_kernel_ldflags=""
1418 aros_nominal_width=1024
1419 aros_nominal_height=600
1420 aros_arch_libs="-laeabi"
1421 gcc_default_cpu="armv7-a"
1422 gcc_default_fpu="vfpv3"
1423 aros_config_cflags="$aros_config_cflags -mtune=cortex-a8 -fno-strict-aliasing -fno-asynchronous-unwind-tables"
1424 aros_config_aflags="$aros_config_aflags -mtune=cortex-a8 -fno-strict-aliasing -fno-asynchronous-unwind-tables"
1425 aros_optimization_cflags="$aros_optimization_cflags -Os"
1426 case "$target_cpu" in
1428 gcc_default_float_abi="hard"
1433 gcc_default_float_abi="softfp"
1436 AC_MSG_ERROR("Unknown CPU for EfikaMX $target_cpu")
1442 aros_target_arch="chrp"
1443 aros_shared_default="no"
1444 aros_target_cpu="ppc"
1445 aros_object_format="elf32ppc"
1446 aros_flavour="ppcnative"
1447 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1448 aros_kernel_ldflags=""
1449 aros_nominal_width=640
1450 aros_nominal_height=480
1451 aros_config_cflags="$aros_config_cflags -mno-toc -fno-asynchronous-unwind-tables"
1452 gcc_target_cpu="powerpc"
1453 case "$aros_target_variant" in
1455 aros_config_cflags="$aros_config_cflags -DBIG_ENDIAN_OHCI=1 -mcpu=603e"
1461 aros_flavour="standalone"
1462 aros_target_arch="raspi"
1464 aros_shared_default="no"
1466 aros_target_mkdep="$aros_target_mkdep -D__GNUC__"
1468 case "$target_cpu" in
1470 aros_target_cpu="aarch64"
1471 gcc_default_cpu="aarch64"
1472 aros_object_format="aarch64elf_aros"
1475 aros_target_cpu="arm"
1476 gcc_default_cpu="armv6zk"
1477 gcc_default_cpu_tune="arm1176jzf-s"
1478 aros_object_format="armelf_aros"
1479 aros_config_cflags="$aros_config_cflags -marm"
1480 aros_config_aflags="$aros_config_aflags -marm"
1481 aros_kernel_cflags="$aros_kernel_cflags -marm"
1482 aros_target_cflags="$aros_kernel_cflags -marm"
1483 aros_target_mkdep="$aros_target_mkdep -Darm"
1484 aros_arch_libs="-laeabi"
1487 aros_target_cpu="arm"
1488 gcc_default_cpu="armv6zk"
1489 gcc_default_cpu_tune="arm1176jzf-s"
1490 aros_object_format="armelf_aros"
1491 aros_config_cflags="$aros_config_cflags -marm"
1492 aros_config_aflags="$aros_config_aflags -marm"
1493 aros_kernel_cflags="$aros_kernel_cflags -marm"
1494 aros_target_cflags="$aros_kernel_cflags -marm"
1495 aros_target_mkdep="$aros_target_mkdep -Darm"
1496 aros_arch_libs="-laeabi"
1499 AC_MSG_ERROR("Unknown CPU for RasPi $target_cpu")
1503 aros_config_cflags="$aros_config_cflags -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions"
1504 aros_config_aflags="$aros_config_aflags -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions"
1505 aros_kernel_cflags="$aros_kernel_cflags -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions"
1506 aros_target_cflags="$aros_kernel_cflags -Wno-error -fno-asynchronous-unwind-tables -fno-exceptions"
1508 case "$aros_target_variant" in
1510 ENABLE_EXECSMP="#define __AROSEXEC_SMP__"
1516 aros_flavour="standalone"
1517 aros_target_arch="stm32f7_discovery"
1518 aros_target_cpu="arm"
1519 aros_target_cpu_mode="thumb2"
1520 aros_object_format="armelf_aros"
1521 aros_shared_default="no"
1523 # stm32f7 has DSP opcode support
1524 gcc_default_cpu="armv7e-m"
1525 # gcc_default_cpu="armv7-m"
1526 gcc_default_cpu_tune="cortex-m7"
1527 gcc_default_fpu="fpv4-sp-d16"
1528 # GCC does not recognize fpv5-sp-d16 which should be the correct one to use, or not...
1529 # gcc_default_fpu="fpv5-sp-d16"
1530 gcc_default_float_abi="hard"
1532 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dthumb"
1536 aros_target_arch="amiga"
1537 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D_AMIGA -DAMIGA"
1538 aros_shared_default="no"
1540 case "$target_cpu" in
1542 AC_ARG_ENABLE(amigaos_compliance,AC_HELP_STRING([--enable-amigaos-compliance=VERSION],[Enforce userspace AmigaOS compliance to a specific KickStart version (default=none).]),aros_amigaos_compliance="$enableval")
1544 aros_target_cpu="m68k"
1545 aros_object_format="m68kelf"
1546 aros_flavour="standcompat"
1547 gcc_target_cpu="m68000"
1548 aros_nowarn_flags="$aros_nowarn_flags NOWARN_VOLATILE_REGISTER_VAR"
1549 aros_config_cflags="$aros_config_cflags -fno-strict-aliasing -ffreestanding -fomit-frame-pointer -fbuiltin -DNOLIBINLINE"
1550 aros_optimization_cflags="$aros_optimization_cflags -Os"
1551 aros_config_aflags="$aros_config_aflags"
1552 aros_target_strip_flags="-R.comment --strip-debug"
1553 aros_nominal_width=640
1554 aros_nominal_height=256
1555 aros_nominal_depth=2
1559 aros_flavour="native"
1560 gcc_target_cpu="ppc"
1563 AC_MSG_ERROR("Unknown CPU for Amiga $target_cpu")
1569 aros_target_arch="mingw32"
1570 aros_shared_default="no"
1571 aros_flavour="emulation"
1572 aros_shared_cflags=""
1573 need_crosstools="yes"
1576 case "$target_cpu" in
1578 aros_target_cpu="i386"
1579 aros_object_format="elf_i386"
1580 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1581 aros_nominal_depth=8
1582 gcc_target_cpu="i386"
1584 kernel_tool_prefix="i386-mingw32-"
1587 aros_target_cpu="x86_64"
1588 aros_object_format="elf_x86_64"
1589 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1590 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1591 aros_nominal_depth=8
1592 kernel_tool_prefix="x86_64-w64-mingw32-"
1595 aros_target_cpu="arm"
1596 aros_object_format="armelf_aros"
1597 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1598 aros_arch_libs="-laeabi"
1599 aros_nominal_depth=8
1600 gcc_target_cpu="arm"
1601 gcc_default_float_abi="soft"
1602 kernel_tool_prefix="arm-mingw32ce-"
1603 aros_nominal_width=160
1604 aros_nominal_height=160
1607 AC_MSG_ERROR("Unknown CPU for Mingw32 -- $target_cpu")
1610 if test $host_os = "cygwin"; then
1611 aros_kernel_cflags="-mno-cygwin"
1615 aros_target_arch="pp"
1616 aros_shared_default="no"
1617 case "$target_cpu" in
1619 aros_target_cpu="m68k"
1620 aros_object_format="m68kelf"
1621 aros_flavour="palmnative"
1622 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1623 aros_nominal_width=160
1624 aros_nominal_height=160
1625 aros_nominal_depth=1
1626 aros_target_ar_flags="cru"
1627 aros_compiler_libs="-lgcc1"
1628 aros_shared_default=no
1629 aros_shared_cflags="-fpic"
1630 aros_shared_aflags=""
1631 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1632 aros_kernel_ldflags="-Wl,-rpath,./lib"
1633 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug"
1634 aros_debug_aflags=""
1635 aros_debug_ldflags="$aros_symbols_debug"
1636 aros_mungwall_debug="0"
1637 aros_modules_debug="0"
1638 gcc_target_cpu="mc68000"
1639 ignore_undefined_symbols="-ius"
1642 AC_MSG_ERROR("Unknown CPU for PalmPilot -- $target_cpu")
1648 aros_target_arch="mac"
1649 aros_shared_default="no"
1650 case "$target_cpu" in
1652 aros_target_cpu="m68k"
1653 aros_object_format="m68kelf"
1654 aros_flavour="mac68knative"
1655 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1656 aros_nominal_width=512
1657 aros_nominal_height=384
1658 aros_nominal_depth=8
1659 aros_target_ar_flags="cru"
1660 aros_compiler_libs="-lgcc1"
1661 aros_shared_default=no
1662 aros_shared_cflags="-fpic"
1663 aros_shared_aflags=""
1664 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1665 aros_kernel_ldflags="-Wl,-rpath,./lib"
1666 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug"
1667 aros_debug_aflags=""
1668 aros_debug_ldflags="$aros_symbols_debug"
1669 aros_mungwall_debug="0"
1670 aros_modules_debug="0"
1671 gcc_target_cpu="mc68000"
1672 ignore_undefined_symbols="-ius"
1675 AC_MSG_ERROR("Unknown CPU for Mac68k -- $target_cpu")
1681 AC_MSG_ERROR([Unsupported target architecture $target])
1685 #-----------------------------------------------------------------------------
1686 crosstools_guess="yes"
1687 aros_target_toolchain="no"
1688 aros_config_sysroot=""
1689 aros_kernel_sysroot=""
1691 AC_MSG_CHECKING([Kernel toolchain prefix])
1692 AC_ARG_WITH(kernel-toolchain-prefix,AC_HELP_STRING([--with-kernel-toolchain-prefix=...],[Specify crosscompile toolchain prefix for kernel objects]),[kernel_tool_prefix="$withval"])
1693 AC_MSG_RESULT($kernel_tool_prefix)
1695 AC_MSG_CHECKING([ELF toolchain prefix])
1696 AC_ARG_WITH(elf-toolchain-prefix,AC_HELP_STRING([--with-elf-toolchain-prefix=...],[Specify crosscompile toolchain prefix to wrap for AROS objects]),[elf_tool_prefix="$withval"
1697 crosstools_guess="no"])
1698 AC_MSG_RESULT($elf_tool_prefix)
1700 AC_MSG_CHECKING([AROS toolchain prefix])
1701 AC_ARG_WITH(aros-toolchain,AC_HELP_STRING([--with-aros-toolchain=PREFIX],[Specify prebuilt AROS toolchain. Use yes for default name]),[aros_tool_prefix="$withval"
1702 crosstools_guess="no"])
1703 if test "$aros_tool_prefix" = "yes" ; then
1704 aros_tool_prefix=$aros_target_cpu-aros-
1706 AC_MSG_RESULT($aros_tool_prefix)
1708 #-----------------------------------------------------------------------------
1709 # Checking if we should build crosstools..
1710 AC_MSG_CHECKING([whether to build crosstools])
1711 AC_ARG_ENABLE(crosstools,AC_HELP_STRING([--disable-crosstools],[Do not build cross-compiler toolchain]),crosstools="$enableval",crosstools="$crosstools_guess")
1712 AC_MSG_RESULT($crosstools)
1714 if test "${crosstools}" = "yes"; then
1715 if test "${crosstools_guess}" = "no"; then
1716 AC_MSG_ERROR([Cannot build external toolchain if an external ELF or AROS toolchain is specified])
1720 if test "${crosstools}" = "yes" || test "${crosstools_guess}" = "no"; then
1721 aros_target_toolchain="yes"
1724 AC_MSG_CHECKING([where to install the crosstools binaries])
1725 AC_ARG_WITH(aros-toolchain-install,AC_HELP_STRING([--with-aros-toolchain-install=DIR],[Where to install or search for cross tools binaries]),[aros_toolchain_install=$withval])
1726 if test "x$aros_toolchain_install" = "x"; then
1727 AROS_CROSSTOOLSDIR="$AROS_BUILDDIR_UNIX/bin/$aros_host_arch-$aros_host_cpu/tools/crosstools"
1729 AROS_CROSSTOOLSDIR="$aros_toolchain_install"
1730 PATH="$AROS_CROSSTOOLSDIR:$PATH"
1731 if test "$crosstools_guess" = "no" ; then
1732 toolchain_needs_sysroot=yes
1734 if test "x-$aros_flavour" != "x-emulation" -a "x-$aros_flavour" != "x-emulcompat" ; then
1735 aros_kernel_sysroot = $aros_config_sysroot
1739 AC_MSG_RESULT($AROS_CROSSTOOLSDIR)
1741 AC_MSG_CHECKING([If we need to use --sysroot])
1742 if test "$toolchain_needs_sysroot" = "yes" ; then
1743 aros_config_sysroot="--sysroot $AROS_BUILDDIR_UNIX/bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development"
1745 AC_MSG_RESULT($toolchain_needs_sysroot)
1747 #-----------------------------------------------------------------------------
1748 if test "$aros_toolchain" = "gnu" ; then
1749 AC_MSG_CHECKING([what specific target binutils version to use])
1751 AC_ARG_WITH(binutils-version,AC_HELP_STRING([--with-binutils-version=VERSION],[Use binutils-VERSION for building AROS]),use_binutils_version="$withval",use_binutils_version="")
1752 if test "$use_binutils_version" = ""; then
1753 target_binutils_version="$default_binutils_version"
1755 target_binutils_version="$use_binutils_version"
1757 if test "$aros_toolchain" = "gnu" ; then
1758 AC_MSG_RESULT($target_binutils_version)
1762 # Helper to identify gcc version
1763 AC_DEFUN([CROSS_GCC_VERSION], [
1764 target_gcc_version=""
1765 AC_CACHE_CHECK([gcc version],[ax_cv_gcc_version],[
1766 ax_cv_gcc_version="`$AROS_CROSSTOOLSDIR/${aros_tool_prefix}${toolchain_cpp_preprocessor} -dumpversion`"
1767 AS_IF([test "x$ax_cv_gcc_version" = "x"],[
1768 ax_cv_gcc_version=""
1771 target_gcc_version=$ax_cv_gcc_version
1772 AC_SUBST([target_gcc_version])
1775 #-----------------------------------------------------------------------------
1776 if test "$aros_toolchain" = "gnu" ; then
1777 AC_MSG_CHECKING([what specific target gcc version to use])
1779 AC_ARG_WITH(gcc-version,AC_HELP_STRING([--with-gcc-version=VERSION],[Compile gcc-VERSION for AROS]),use_gcc_version="$withval",use_gcc_version="")
1780 if test "$use_gcc_version" = ""; then
1781 if test "${crosstools}" = "no"; then
1782 if test "x$aros_toolchain_install" != "x"; then
1786 if test "$use_gcc_version" = ""; then
1787 target_gcc_version="$default_gcc_version"
1790 target_gcc_version="$use_gcc_version"
1792 if test "$aros_toolchain" = "gnu" ; then
1793 AC_MSG_RESULT($target_gcc_version)
1795 GCC_VERSION_MAJOR=$(echo $target_gcc_version | cut -d'.' -f1)
1796 GCC_VERSION_MINOR=$(echo $target_gcc_version | cut -d'.' -f2)
1797 GCC_VERSION_PATCH=$(echo $target_gcc_version | cut -d'.' -f3)
1799 gcc_fix_bitfields="false"
1800 if test "$GCC_VERSION_MAJOR" -gt "4" ; then
1801 gcc_fix_bitfields="true"
1803 if test "$GCC_VERSION_MAJOR" -gt "3" ; then
1804 if test "$GCC_VERSION_MINOR" -gt "6" ; then
1805 gcc_fix_bitfields="true"
1810 if test "$gcc_fix_bitfields" = "true" ; then
1811 case "$aros_target_cpu" in
1813 aros_kernel_cflags="$aros_kernel_cflags -mno-ms-bitfields"
1814 aros_target_cflags="$aros_target_cflags -mno-ms-bitfields"
1817 aros_kernel_cflags="$aros_kernel_cflags -mno-ms-bitfields"
1818 aros_target_cflags="$aros_target_cflags -mno-ms-bitfields"
1824 AC_MSG_CHECKING([whether to enable Objective-C suppport])
1825 AC_ARG_ENABLE(objc,AC_HELP_STRING([--enable-objc],[Enable Objectve-C support (default=no)]),objc="$enableval",objc="no")
1826 AC_MSG_RESULT($objc)
1827 if test "x$objc" = "xyes"; then
1830 objc_target="no-objc"
1833 AC_MSG_CHECKING([whether to enable Java suppport])
1834 AC_ARG_ENABLE(java,AC_HELP_STRING([--enable-java],[Enable Java support (default=no)]),java="$enableval",java="no")
1835 AC_MSG_RESULT($java)
1836 if test "x$java" != "xno"; then
1839 java_target="no-java"
1842 spec_obj_format="-m $aros_object_format"
1843 # Now process extra architecture-specific options.
1844 # Currently this is implemented only for ARM. We can specify which minimum CPU and FPU to use,\
1845 # as well as floating-point ABI.
1846 case "$aros_target_cpu" in
1848 dnl x86_64 can build 32 or 64bit code
1849 spec_obj_format="%{!m32:-m elf_x86_64} %{m32:-m elf_i386}"
1852 dnl ARM defaults are: armv6 + vfp (unless overriden in per-target section above)
1853 if test "$gcc_default_cpu" = ""; then
1854 gcc_default_cpu="armv6"
1856 if test "$gcc_default_fpu" = ""; then
1857 gcc_default_fpu="vfp"
1859 if test "$gcc_default_float_abi" = ""; then
1860 if test "$target_cpu" = "armhf"; then
1861 gcc_default_float_abi="hard"
1863 gcc_default_float_abi="softfp"
1867 AC_MSG_CHECKING([Which minimum CPU to use])
1868 AC_ARG_WITH(cpu,AC_HELP_STRING([--with-cpu=<spec>],[Specify minumum CPU (default=$gcc_default_cpu).]),aros_gcc_cpu="$withval",aros_gcc_cpu=$gcc_default_cpu)
1869 AC_MSG_RESULT($aros_gcc_cpu)
1871 AC_MSG_CHECKING([Which minimum FPU to use])
1872 AC_ARG_WITH(fpu,AC_HELP_STRING([--with-fpu=<spec>],[Specify minumum FPU (default=$gcc_default_fpu).]),aros_gcc_fpu="$withval",aros_gcc_fpu=$gcc_default_fpu)
1873 AC_MSG_RESULT($aros_gcc_fpu)
1875 AC_MSG_CHECKING([Which floating point ABI to use])
1876 AC_ARG_WITH(float,AC_HELP_STRING([--with-float=<spec>],[Specify floating point ABI (default=$gcc_default_float_abi).]),aros_gcc_float_abi="$withval",aros_gcc_float_abi=$gcc_default_float_abi)
1877 AC_MSG_RESULT($aros_gcc_float_abi)
1879 AC_MSG_CHECKING([Which ARM mode to use])
1880 if test "$aros_target_cpu_mode" = ""; then
1881 aros_target_cpu_mode="arm32"
1882 AC_MSG_RESULT([Defaulting to $aros_target_cpu_mode])
1884 AC_MSG_RESULT([$aros_target_cpu_mode])
1887 case "$aros_target_cpu_mode" in
1889 gcc_default_mode="arm"
1890 aros_isa_flags="-m$gcc_default_mode -mthumb-interwork -march=$aros_gcc_cpu -mfpu=$aros_gcc_fpu -mfloat-abi=$aros_gcc_float_abi"
1893 AC_MSG_ERROR([ARM 64-bit mode is unsupported])
1896 AC_MSG_ERROR([Thumb1 16-bit mode is unsupported])
1899 AC_MSG_ERROR([Thumb1 16-bit mode is unsupported])
1902 gcc_default_mode="thumb"
1903 # Do not specify -mthumb-interwork as it may add extra code to support arm/thumb interwork
1904 aros_isa_flags="-m$gcc_default_mode -march=$aros_gcc_cpu -mfpu=$aros_gcc_fpu -mfloat-abi=$aros_gcc_float_abi"
1907 AC_MSG_ERROR([Unsupported ARM mode specified $aros_target_cpu_mode])
1911 aros_config_cflags="$aros_config_cflags -fno-asynchronous-unwind-tables -fno-exceptions"
1912 aros_config_aflags="$aros_config_aflags -fno-asynchronous-unwind-tables -fno-exceptions"
1915 aros_isa_flags="-m32 -march=i486"
1916 aros_kernel_cflags="$aros_kernel_cflags $aros_isa_flags"
1917 aros_kernel_ldflags="$aros_kernel_ldflags -m32"
1921 # Some architectures may need custom ELF specs.
1922 if test -f $SRCDIR/config/${aros_object_format}-specs.in; then
1923 elf_specs_in=config/${aros_object_format}-specs.in
1925 elf_specs_in=config/elf-specs.in
1928 # Some compilers (ppc-elf-gcc is known to) have CPU defines in specs
1929 # Since we override specs, we may need to put these defines there
1930 if test "$gcc_target_cpu" != ""; then
1931 gcc_target_cpu="-D__${gcc_target_cpu}__"
1934 AC_MSG_CHECKING([where to download sourcecode for external ports])
1935 AC_ARG_WITH(portssources,AC_HELP_STRING([--with-portssources=DIR],[Where to download sourcecode for external ports]),with_portssrcdir=$withval,with_portssrcdir="default")
1936 if test "$with_portssrcdir" = "default"; then
1937 AROS_PORTSSRCDIR="$AROS_BUILDDIR_UNIX/bin/Sources"
1939 AROS_PORTSSRCDIR="$with_portssrcdir"
1941 AC_MSG_RESULT($AROS_PORTSSRCDIR)
1943 AC_MSG_CHECKING([which bootloader to use])
1944 AC_ARG_WITH(bootloader,AC_HELP_STRING([--with-bootloader=NAME],[Use a specific bootloader]),target_bootloader=$withval,target_bootloader=$target_bootloader)
1945 if test "$target_bootloader" = "none"; then
1946 aros_target_bootloader=""
1948 aros_target_bootloader="$target_bootloader"
1950 AC_MSG_RESULT($target_bootloader)
1952 AC_MSG_CHECKING([which icon-set to use])
1953 AC_ARG_WITH(iconset,AC_HELP_STRING([--with-iconset=NAME],[Use a specific Icon-set (default=Gorilla).]),target_iconset=$withval,target_iconset="default")
1954 if test "$target_iconset" = "default"; then
1955 aros_target_iconset="Gorilla"
1956 target_iconset="default (Gorilla)"
1958 aros_target_iconset="$target_iconset"
1960 AC_MSG_RESULT($target_iconset)
1962 AC_MSG_CHECKING([which GUI Theme to use])
1963 AC_ARG_WITH(theme,AC_HELP_STRING([--with-theme=NAME],[Use a specific GUI Theme]),target_guitheme=$withval,target_guitheme="default")
1964 if test "$target_guitheme" = "default"; then
1965 aros_target_guitheme="Ice"
1967 aros_target_guitheme="$target_guitheme"
1969 AC_MSG_RESULT($aros_target_guitheme)
1971 # Find out if we are cross-compiling (i.e. if we can't use the host compiler
1975 dnl The first case is simple. If we are compiling for another CPU, we are cross-compiling for sure
1976 if test "$aros_host_cpu" != "$aros_target_cpu" ; then
1980 dnl x86-64 toolchains can also produce i386 binaries, given -m32 flag.
1981 dnl The flag itself is given in per-target section, because some targets require to pass it
1982 dnl in a different manner, otherwise some tests fail.
1983 dnl TODO: Justify this.
1984 if test "$aros_host_cpu" == "x86_64" ; then
1985 if test "$aros_target_cpu" == "i386" ; then
1990 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
1991 dnl For a hosted build we are cross-compiling if host OS differs from build OS.
1992 dnl TODO: This might get a little bit more tricky if we ever cross-compile ARM-Android-hosted
1993 dnl AROS on ARM Linux, or even vice versa (Linux-hosted ARM AROS building on ARM Android).
1994 dnl ARM ABIs of Linux and Android are not compatible (despite very close), so host_cc can't be
1995 dnl used to build bootstrap for target arch in either case.
1996 dnl For us Android is not a separate OS, but a variant of Linux, so both systems will be
1997 dnl identified as 'linux'. If this ever involves, we'll have to implement some additional check,
1998 dnl perhaps introducing aros_host_variant
1999 if test "$aros_host_arch" != "$aros_target_arch" ; then
2003 dnl For a native build we only care if our host_cc can produce static ELF files. If so, we can use
2004 dnl it as kernel_cc. If not, (e. g. we are on Windows or Darwin), we need a crosscompiler.
2005 if test "$host_cc_elf" = "no" ; then
2010 if test "$cross_compiling" = "no" ; then
2011 kernel_tool_prefix=""
2012 if test "$host_cc_elf" = "yes" ; then
2017 if test "$kernel_tool_version" != ""; then
2018 kernel_tool_version="-$kernel_tool_version"
2021 #######################################################################
2022 ## Compute what toolchains to use, and their paths ##
2023 #######################################################################
2025 # This takes, as input:
2026 # crosstools {yes,no}
2027 # kernel_tool_version {"",[version]}
2028 # target_tool_version {"",[version]}
2029 # kernel_tool_prefix {none,[some-arch-os-]}
2031 # target_tool_prefix ${aros_target_cpu}-aros-
2032 # aros_tool_prefix ${aros_target_cpu}-aros-
2035 # aros_kernel_{cpp,cc,ar,ld,as,ranlib,nm,strip}
2036 # Where the 'kernel' binaries are located
2037 # orig_target_{cpp,cc,ar,ld,as,ranlib,nm,strip}
2038 # Where the 'target' binaries are located
2039 # (not the symlink farm - that is aros_target_*!)
2042 # if crosstools then
2043 # if kernel_tools_prefix = "no-kernel-prefix-"
2044 # aros_kernel_* = crosstools cc paths
2045 # aros_kernel_cc = elf cc wrapper around crosstools cc
2047 # VALIDATE(${kernel_tools_prefix}*)
2048 # aros_kernel_* = ${kernel_tools_prefix}*
2049 # if ${kernel_tools_prefix}cc is an AROS gcc
2050 # aros_kernel_cc = ${kernel_tools_prefix}cc
2052 # aros_kernel_cc = elf cc wrapper around ${kernel_tools_prefix}cc
2056 # orig_target_* = aros built crosstools
2057 # orig_target_cc = elf cc wrapper around crosstools cc
2059 # VALIDATE(${kernel_tools_prefix}*)
2061 # orig_target_* = aros_kernel_*
2062 # if aros_kernel_cc is an AROS gcc
2063 # orig_target_cc = aros_kernel_cc
2065 # orig_target_cc = aros cc wrapper around aros_kernel_cc
2069 if test "$aros_toolchain" = "gnu" ; then
2070 target_tool_prefix="${aros_target_cpu}-aros-"
2071 elif test "$aros_toolchain" = "llvm" ; then
2072 target_tool_prefix="bin/"
2075 if test "$kernel_tool_prefix" != "" ; then
2076 AC_MSG_CHECKING([which kernel tools])
2077 AC_MSG_RESULT([$kernel_tool_prefix]);
2080 if test "$kernel_tool_prefix" = "none" ; then
2081 dnl ELF wrapper can be used only for native bootstrap
2082 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2083 AC_MSG_ERROR([--with-kernel-toolchain-prefix= is required for this arch])
2086 # Kernel tools required - find them
2087 # Note that 'normally', aros_kernel_* overrides will be
2088 # empty, unless specified in the per-arch sections above.
2089 if test "x$aros_kernel_cpp" = "x"; then
2090 aros_kernel_cpp=${kernel_tool_prefix}${CPP}
2092 AROS_BUILDCMD(aros_kernel_cpp,$aros_kernel_cpp,${kernel_tool_version})
2093 AROS_TOOL_KERNEL(aros_kernel_cpp,cpp,$aros_kernel_cpp)
2094 AROS_REQUIRED(cpp,$aros_kernel_cpp)
2096 if test "x$aros_kernel_cc" = "x"; then
2097 aros_kernel_cc=${kernel_tool_prefix}${CC}
2099 AROS_BUILDCMD(aros_kernel_cc,$aros_kernel_cc,${kernel_tool_version})
2100 AROS_TOOL_KERNEL(aros_kernel_cc,cc,$aros_kernel_cc)
2101 AROS_REQUIRED(cc,$aros_kernel_cc)
2103 if test "x$aros_kernel_cxx" = "x"; then
2104 aros_kernel_cxx=${kernel_tool_prefix}${CXX}
2106 AROS_BUILDCMD(aros_kernel_cxx,$aros_kernel_cxx,${kernel_tool_version})
2107 AROS_TOOL_KERNEL(aros_kernel_cxx,cxx,$aros_kernel_cxx)
2108 # If it's set, make sure it's really there
2109 if test "x$aros_kernel_cxx" != "x" ; then
2110 AROS_REQUIRED(cxx,$aros_kernel_cxx)
2112 AROS_TOOL_KERNEL(aros_kernel_ld,ld,$aros_kernel_ld)
2113 AROS_REQUIRED(ld,$aros_kernel_ld)
2114 AROS_TOOL_KERNEL(aros_kernel_as,as,$aros_kernel_as)
2115 AROS_REQUIRED(as,$aros_kernel_as)
2116 AROS_TOOL_KERNEL(aros_kernel_ar,ar,$aros_kernel_ar)
2117 AROS_REQUIRED(ar,$aros_kernel_ar)
2118 AROS_TOOL_KERNEL(aros_kernel_ranlib,ranlib,$aros_kernel_ranlib)
2119 AROS_REQUIRED(ranlib,$aros_kernel_ranlib)
2120 AROS_TOOL_KERNEL(aros_kernel_nm,nm,$aros_kernel_nm)
2121 AROS_REQUIRED(nm,$aros_kernel_nm)
2122 AROS_TOOL_KERNEL(aros_kernel_strip,strip,$aros_kernel_strip)
2123 AROS_REQUIRED(strip,$aros_kernel_strip)
2125 # Objcopy and objdump are not required for the kernel
2126 # toolchain on many architectures.
2127 # So we'll look for them, but not make them strictly required.
2128 AROS_TOOL_KERNEL(aros_kernel_objcopy,objcopy,$aros_kernel_objcopy)
2129 AROS_TOOL_KERNEL(aros_kernel_objdump,objdump,$aros_kernel_objdump)
2130 if test "x${crosstools}" != "xyes" ; then
2131 AROS_REQUIRED(objcopy,$aros_kernel_objcopy)
2132 AROS_REQUIRED(objdump,$aros_kernel_objdump)
2136 AC_MSG_CHECKING([which target tools to use])
2137 if test "$aros_target_toolchain" = "yes"; then
2138 if test "$aros_toolchain" = "llvm" ; then
2141 msg_result=$target_tool_prefix
2143 AC_MSG_RESULT([$msg_result])
2144 # We are building AROS crosstools
2145 tmp_tool_prefix="$AROS_CROSSTOOLSDIR/${target_tool_prefix}"
2146 orig_target_cc="${tmp_tool_prefix}${toolchain_c_compiler}${target_tool_version}"
2147 orig_target_cxx="${tmp_tool_prefix}${toolchain_cxx_compiler}${target_tool_version}"
2148 orig_target_cpp="${tmp_tool_prefix}${toolchain_cpp_preprocessor}"
2149 orig_target_ld="${tmp_tool_prefix}${toolchain_ld}"
2150 orig_target_as="${tmp_tool_prefix}${toolchain_as}"
2151 orig_target_ar="${tmp_tool_prefix}${toolchain_ar}"
2152 orig_target_ranlib="${tmp_tool_prefix}${toolchain_ranlib}"
2153 orig_target_nm="${tmp_tool_prefix}${toolchain_nm}"
2154 orig_target_strip="${tmp_tool_prefix}${toolchain_strip}"
2155 orig_target_objcopy="${tmp_tool_prefix}${toolchain_objcopy}"
2156 orig_target_objdump="${tmp_tool_prefix}${toolchain_objdump}"
2158 # Determine whether AROS or ELF tools should be used
2159 if test "$aros_tool_prefix" = "none"; then
2160 aros_tool_prefix="${elf_tool_prefix}"
2163 AC_MSG_RESULT([$aros_tool_prefix])
2164 # We are *not* building AROS crosstools - use the AROS or ELF tools
2165 AROS_TOOL_TARGET(orig_target_cpp,cpp,${aros_tool_prefix}${toolchain_cpp_preprocessor}${target_tool_version})
2166 AROS_REQUIRED(cpp,$orig_target_cpp)
2167 AROS_TOOL_TARGET(orig_target_cc,gcc,${aros_tool_prefix}${toolchain_c_compiler}${target_tool_version})
2168 AROS_REQUIRED(cc,$orig_target_cc)
2169 AROS_TOOL_TARGET(orig_target_cxx,g++,${aros_tool_prefix}${toolchain_cxx_compiler}${target_tool_version})
2170 AROS_REQUIRED(cxx,$orig_target_cxx)
2171 AROS_TOOL_TARGET(orig_target_ld,gcc,${aros_tool_prefix}${toolchain_ld})
2172 AROS_REQUIRED(ld,$orig_target_ld)
2173 AROS_TOOL_TARGET(orig_target_as,as,aros_tool_prefix}${toolchain_as})
2174 AROS_REQUIRED(as,$orig_target_as)
2175 AROS_TOOL_TARGET(orig_target_ar,ar,${aros_tool_prefix}${toolchain_ar})
2176 AROS_REQUIRED(ar,$orig_target_ar)
2177 AROS_TOOL_TARGET(orig_target_ranlib,ar,${aros_tool_prefix}${toolchain_ranlib})
2178 AROS_REQUIRED(ranlib,$orig_target_ranlib)
2179 AROS_TOOL_TARGET(orig_target_nm,nm,${aros_tool_prefix}${toolchain_nm})
2180 AROS_REQUIRED(nm,$orig_target_nm)
2181 AROS_TOOL_TARGET(orig_target_strip,strip,${aros_tool_prefix}${toolchain_strip})
2182 AROS_REQUIRED(strip,$orig_target_strip)
2183 AROS_TOOL_TARGET(orig_target_objcopy,objcopy,${aros_tool_prefix}${toolchain_objcopy})
2184 AROS_REQUIRED(objcopy,$orig_target_objcopy)
2185 AROS_TOOL_TARGET(orig_target_objdump,objdump,${aros_tool_prefix}${toolchain_objdump})
2186 AROS_REQUIRED(objdump,$orig_target_objdump)
2189 if test "$kernel_tool_prefix" = "none" ; then
2190 # No kernel tools specified
2191 # Assume target tools == kernel tools with ELF wrapper
2192 aros_kernel_cc=$orig_target_cc
2193 aros_kernel_cxx=$orig_target_cxx
2194 aros_kernel_cpp=$orig_target_cpp
2195 aros_kernel_ld=$orig_target_ld
2196 aros_kernel_as=$orig_target_as
2197 aros_kernel_ar=$orig_target_ar
2198 aros_kernel_ranlib=$orig_target_ranlib
2199 aros_kernel_nm=$orig_target_nm
2200 aros_kernel_strip=$orig_target_strip
2201 aros_kernel_objcopy=$orig_target_objcopy
2202 aros_kernel_objdump=$orig_target_objdump
2203 use_kernel_cc_wrapper=yes
2206 # At this point, all aros_kernel_* and aros_target_*
2207 # tools should be set up correctly
2209 CC="$aros_kernel_cc $kernel_tool_flags"
2210 CPP="$aros_kernel_cpp"
2212 #-----------------------------------------------------------------------------
2214 # Find all the tools we need to compile. This could be cross-compiling
2215 # though! If that is the case we use the GNU form of the target and
2216 # simply add this to the front of the binary name. This is rather simple,
2217 # but it should work under most circumstances.
2219 # The default tools are to use the same as the host, but only if the
2220 # host and target CPU are the same. With GCC this is normally enough.
2224 aros_shared_ld="$aros_host_ld"
2226 aros_target_mkdep="$aros_host_mkdep"
2228 # The default tools executables to be linked to.
2229 if test "$rescomp" != ""; then
2230 AC_PATH_PROG(aros_kernel_rescomp,${kernel_tool_prefix}$rescomp)
2231 AROS_REQUIRED($rescomp,$aros_kernel_rescomp)
2234 # Set up the sources for the symlink farm
2235 if test "$crosstools" = "yes"; then
2236 crosstools_target=tools-crosstools
2239 aros_kernel_cc="$aros_kernel_cc $kernel_tool_flags"
2240 aros_kernel_ar="$aros_kernel_ar $aros_kernel_ar_flags"
2242 aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/host/config"
2243 aros_targetcfg_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/config"
2244 aros_inc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/include/aros"
2245 aros_gendir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen"
2246 aros_geninc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/include/aros"
2247 aros_tools_dir="bin/${aros_host_arch}-${aros_host_cpu}/tools"
2248 aros_scripts_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/scripts"
2250 # aros_cc_pre is a variable that is added to the front of the compiler name
2251 # in the generated aros-gcc shell script. We need this to enable the cache
2252 # to work across cleaned builds. Also, support DISTCC using the correct
2253 # environment variable.
2256 if test "x${DISTCC}" != "x" ; then
2257 if test "x${CCACHE}" != "x" ; then
2258 aros_cc_pre="env CCACHE_PREFIX=${DISTCC} ${CCACHE} "
2260 aros_cc_pre="${DISTCC} "
2263 if test "x${CCACHE}" != "x" ; then
2264 aros_cc_pre="${CCACHE} "
2268 AC_SUBST(aros_target_nostdinc_cflags,-nostdinc)
2269 AC_SUBST(aros_target_nostartup_ldflags,-nostartfiles)
2270 AC_SUBST(aros_target_nix_ldflags,-nix)
2271 AC_SUBST(aros_target_detach_ldflags,-detach)
2272 AC_SUBST(aros_target_nostdlib_ldflags,-nostdlib)
2275 AC_SUBST(aros_toolchain)
2276 if test "$aros_target_toolchain" != "yes"; then
2277 prefix="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-"
2278 if test "$GCC" = "yes"; then
2279 aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-`
2282 # We do not know which c compiler version we are going to build and what we need to know
2283 # here is different for different versions so this will be set later during the
2284 # build of crosstools.
2285 if test "$aros_toolchain" = "gnu" ; then
2286 prefix="$AROS_CROSSTOOLSDIR/${aros_target_cpu}-aros-"
2287 elif test "$aros_toolchain" = "llvm" ; then
2288 prefix="$AROS_CROSSTOOLSDIR/bin/"
2290 aros_target_cc_path=@aros_target_cc_path@
2292 aros_target_cpp="${prefix}${toolchain_cpp_preprocessor}"
2293 aros_target_cc="${prefix}${toolchain_c_compiler}"
2294 aros_target_cxx="${prefix}${toolchain_cxx_compiler}"
2295 aros_target_as="${prefix}${toolchain_as}"
2296 aros_target_ld="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_ld}"
2297 aros_target_ar="${prefix}${toolchain_ar} $aros_target_ar_flags"
2298 aros_target_objcopy="${prefix}${toolchain_objcopy}"
2299 aros_target_objdump="${prefix}${toolchain_objdump}"
2300 aros_target_ranlib="${prefix}${toolchain_ranlib} $aros_target_ranlib_flags"
2301 aros_target_nm="${prefix}${toolchain_nm} $aros_target_nm_flags"
2302 aros_target_strip="${prefix}${toolchain_strip}"
2303 aros_plain_nm="${prefix}${toolchain_nm}"
2304 aros_plain_ar="${prefix}${toolchain_ar}"
2306 AC_ARG_ENABLE(includes,
2307 AC_HELP_STRING([--enable-includes=dir],[Alternative system include directory]),
2308 [aros_target_incl=$enable_includes], [aros_target_incl=`$aros_kernel_cc -print-sysroot`/`$aros_kernel_cc --print-sysroot-headers-suffix 2>/dev/null || echo usr/include`])
2310 if test "$aros_kernel_includes" = ""; then
2311 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2312 aros_kernel_includes="-isystem $aros_target_incl"
2316 if test "$aros_kernel_includes" != "" ; then
2317 dnl find out about the kernel cc's include path
2318 AC_MSG_CHECKING([for the kernel compiler's include path])
2319 if test "$aros_kernel_cc_includes" = "" ; then
2320 # Try to guess where the directory is.
2321 aros_kernel_cc_includes=`dirname \`${aros_kernel_cc} ${aros_kernel_cflags} -print-libgcc-file-name\``/include
2322 if test -d $aros_kernel_cc_includes; then
2323 # Check if there is also an include-fixed directory and add it
2324 # to kernel compiler's include path as it may contain some of
2325 # the headers we need.
2326 if test -d "$aros_kernel_cc_includes"-fixed; then
2327 aros_kernel_cc_includes+=" -isystem $aros_kernel_cc_includes"-fixed
2329 # Check for specific includes directory. Needed for Ubuntu 11.10 and Debian
2335 host_cpu_glibc=${host_cpu}
2338 if test -d "/usr/include/${host_cpu_glibc}-linux-gnu"; then
2339 aros_kernel_cc_includes+=" -isystem /usr/include/${host_cpu_glibc}-linux-gnu"
2342 # The directory doesn't exist, we need to do some more work.
2343 aros_kernel_cc_includes=${PWD}/${aros_gendir}/cc_include
2345 # These are the headers we're looking for.
2346 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
2347 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
2351 for h in $headers; do
2352 # Which other headers are needed by each of the above?
2353 deps=$(echo "#include <$h>" | \
2354 $aros_kernel_cc -E -M - 2>/dev/null | \
2355 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
2357 # Copy all the needed headers to a directory beneath gendir.
2360 dir=${aros_kernel_cc_includes}$(echo $(dirname $d) | \
2361 sed -n "s,^.*/include\(/.*\),\1,p")
2362 ! test -d $dir && mkdir -p $dir
2363 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
2368 AC_MSG_RESULT($aros_kernel_cc_includes)
2369 # Adding -nostdinc to kernel includes as they are always used together.
2370 aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes"
2373 if test "$crosstools" != "yes"; then
2374 dnl find out about the target cc's include path
2375 AC_MSG_CHECKING([for the target compiler's include path])
2376 if test "$aros_target_cc_includes" = "" ; then
2377 #try to guess where the directory is
2378 aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include
2379 if ! test -d $aros_target_cc_includes; then
2380 #the directory doesn't exist, we need to do some more work
2381 aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include
2383 #these are the headers we're looking for
2384 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
2385 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
2389 for h in $headers; do
2390 #which other headers each of the above headers needs?
2391 deps=$(echo "#include <$h>" | \
2392 $orig_target_cc -E -M - 2>/dev/null | \
2393 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
2395 #copy all the needed headers to a directory beneath gendir
2398 dir=${aros_target_cc_includes}$(echo $(dirname $d) | \
2399 sed -n "s,^.*/include\(/.*\),\1,p")
2400 ! test -d $dir && mkdir -p $dir
2401 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
2406 AC_MSG_RESULT($aros_target_cc_includes)
2408 # We do not know which c compiler version we are going to build and what we need to know
2409 # here is different for different versions so this will be set later during the
2410 # build of crosstools.
2411 aros_target_cc_includes=@aros_target_cc_includes@
2415 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
2416 # On GCC >= 4.0 -iquote should be used
2420 save_cflags="$CFLAGS"
2422 kernel_cflags_iquote=$host_cflags_iquote
2423 kernel_cflags_iquote_end=$host_cflags_iquote_end
2424 if test "x-$cross_compiling" = "x-yes"; then
2425 CC="$aros_kernel_cc"
2426 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
2427 if test "x-$crosstools" != "x-yes"; then
2428 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
2430 # we do know it is supported for the smallest version of gcc we are going to build
2431 # we assume it's also supported by later versions
2432 use_no_stack_protector=yes
2434 AC_MSG_RESULT($use_no_stack_protector)
2435 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
2436 if test "x-$crosstools" != "x-yes"; then
2437 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
2439 # we do know it is supported for the smallest version of gcc we are going to build
2440 # we assume it's also supported by later versions
2443 AC_MSG_RESULT($has_iquote)
2444 if test "x-$has_iquote" = "x-yes" ; then
2445 kernel_cflags_iquote=-iquote
2446 kernel_cflags_iquote_end=
2448 kernel_cflags_iquote=-I
2449 kernel_cflags_iquote_end=-I-
2452 if test "x-$use_no_stack_protector" = "x-yes" ; then
2453 aros_kernel_cflags="$aros_kernel_cflags -fno-stack-protector"
2456 #-----------------------------------------------------------------------------
2458 # Check if we can explicitly choose older version of symbol hashing
2460 CFLAGS="save_cflags -Wl,--hash-style=sysv"
2461 CC="$aros_kernel_cc"
2462 AC_MSG_CHECKING([whether ${CC} accepts -Wl,--hash-style=sysv])
2463 AC_TRY_LINK(,, use_hash_style="yes", use_hash_style="no")
2464 AC_MSG_RESULT($use_hash_style)
2465 if test "x-$use_hash_style" = "x-yes" ; then
2466 aros_kernel_cflags="$aros_kernel_cflags -Wl,--hash-style=sysv"
2469 CFLAGS="$save_cflags"
2471 AC_SUBST(host_cflags_iquote)
2472 AC_SUBST(host_cflags_iquote_end)
2473 AC_SUBST(kernel_cflags_iquote)
2474 AC_SUBST(kernel_cflags_iquote_end)
2477 dnl Check if user specified --with-resolution=XRESxYRESxDEPTH
2478 AC_MSG_CHECKING([for default resolution of WBScreen])
2479 AC_ARG_WITH(resolution,AC_HELP_STRING([--with-resolution=XRESxYRESxDEPTH],[Default resolution of the initial WorkbenchScreen]),resolution=$withval,resolution=none)
2480 # We require an argument, so map --with/--without ("yes"/"no") to "none" specified
2481 if test "$resolution" = "yes" ; then
2484 if test "$resolution" = "no" ; then
2487 if test "$resolution" != "none" ; then
2488 aros_nominal_width=`echo $resolution | cut -d'x' -f1`
2489 aros_nominal_height=`echo $resolution | cut -d'x' -f2`
2490 aros_nominal_depth=`echo $resolution | cut -d'x' -f3`
2492 AC_MSG_RESULT($aros_nominal_width x $aros_nominal_height x $aros_nominal_depth)
2493 aros_cv_nominal_width=$aros_nominal_width
2494 aros_cv_nominal_height=$aros_nominal_height
2495 aros_cv_nominal_depth=$aros_nominal_depth
2497 dnl See if the user wants the serial debug output for native flavour
2498 AC_MSG_CHECKING([whether serial debug is enabled])
2499 AC_ARG_WITH(serial-debug,AC_HELP_STRING([--with-serial-debug],[Enable serial debug output in native (default=no)]),serial_debug=$withval,serial_debug=none)
2500 if test "$aros_serial_debug" = 0 ; then
2501 serial_debug_forced=""
2502 if test "$serial_debug" = "yes" ; then
2505 if test "$serial_debug" = "no" ; then
2509 serial_debug_forced="(forced)"
2510 serial_debug=$aros_serial_debug
2512 if test "$serial_debug" != "none" ; then
2513 aros_serial_debug=$serial_debug
2514 AC_MSG_RESULT($serial_debug_forced on port $serial_debug)
2519 dnl See if the user wants the palm debug output hack for palm native flavour
2520 AC_MSG_CHECKING([whether palm debug hack is enabled])
2521 AC_ARG_ENABLE(palm_debug_hack,AC_HELP_STRING([--enable-palm-debug-hack],[Enable palm debug output hack in palm native (default=no)]),palm_debug_hack="yes",palm_debug_hack="no")
2522 if test "$palm_debug_hack" = "yes" ; then
2523 aros_palm_debug_hack="1"
2525 AC_MSG_RESULT($palm_debug_hack)
2527 dnl See if dev wants the usb3.0 code
2528 AC_MSG_CHECKING([whether usb3.0 code is enabled])
2529 AC_ARG_ENABLE(usb30_code,AC_HELP_STRING([--enable-usb30-code],[Enable usb3.0 code (default=no)]),usb30_code="yes",usb30_code="no")
2530 if test "$usb30_code" = "yes" ; then
2531 aros_config_cflags="$aros_config_cflags -DAROS_USB30_CODE"
2532 aros_kernel_cflags="$aros_kernel_cflags -DAROS_USB30_CODE"
2534 AC_MSG_RESULT($usb30_code)
2536 dnl See if the user wants nesting supervisor activated for unix flavour
2537 AC_MSG_CHECKING([whether nesting supervisor support is enabled])
2538 AC_ARG_ENABLE(nesting_supervisor,AC_HELP_STRING([--enable-nesting-supervisor],[Enable nesting supervisor support in unix (default=no)]),nesting_supervisor="yes",nesting_supervisor="no")
2539 if test "$nesting_supervisor" = "yes" ; then
2540 aros_nesting_supervisor="1"
2542 AC_MSG_RESULT($nesting_supervisor)
2544 dnl See if the user wants to disable MMU support
2545 dnl This can be overriden on per-target basis,
2546 dnl set $aros_enable_mmu to "yes" or "no" to do this
2547 if test "$aros_enable_mmu" = "" ; then
2548 AC_MSG_CHECKING([whether MMU support is enabled])
2549 dnl Enabled by default
2550 AC_ARG_ENABLE(mmu,AC_HELP_STRING([--disable-mmu],[Disable MMU support (default=enabled)]),aros_enable_mmu=$enableval,aros_enable_mmu="yes")
2551 if test "$aros_enable_mmu" = "" ; then
2552 aros_enable_mmu="yes"
2554 AC_MSG_RESULT($aros_enable_mmu)
2556 if test "$aros_enable_mmu" = "no" ; then
2563 dnl things specifically required for hosted flavours
2564 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2566 if test "x-$need_dlopen" != "x-no" ; then
2569 dnl some kind of dynamic library access system is required for hostlib.resource
2570 AC_CHECK_FUNC(dlopen, have_dl="yes", have_dl="no")
2571 if test "x-$have_dl" = "x-no" ; then
2572 AC_CHECK_LIB(dl, dlopen, [have_dl="yes"
2573 aros_host_ldflags="$aros_host_ldflags -ldl"],
2576 if test "x-$have_dl" = "x-no" ; then
2577 AC_MSG_ERROR([dlopen() dynamic linker functions not available])
2584 AC_ARG_ENABLE(x11_hidd, AC_HELP_STRING([--enable-x11-hidd],
2585 [build X11 hidd for hosted (default=auto)]),
2586 x11_hidd="$enableval",
2587 x11_hidd="$need_x11")
2588 case "x-$x11_hidd" in
2589 x-yes|x-no|x-auto) ;;
2590 *) x11_hidd="$need_x11" ;;
2596 if test "x-$x11_hidd" != "x-no" ; then
2602 if test "x-$no_x" = "x-yes" ; then
2605 if test "x-$x11_hidd" != "x-auto" ; then
2606 dnl and they explicitly asked for it, bail out
2607 AC_MSG_ERROR([X11 libs/headers not found, cannot build X11 hidd as requested])
2611 dnl found it, setup the metatarget
2615 aros_host_x11_cflags="$X_CFLAGS"
2616 aros_host_x11_ldflags="$X_LIBS -lX11"
2618 dnl setup shared memory extensions
2619 AC_ARG_ENABLE(x11_shm, AC_HELP_STRING([--enable-x11-shm],
2620 [use X11 shared memory (default=auto)]),
2621 x11_hidd_shm="$enableval",
2622 x11_hidd_shm="auto")
2623 case "x-$x11_hidd_shm" in
2624 x-yes|x-no|x-auto) ;;
2625 *) x11_hidd_shm="auto" ;;
2631 if test "x-$x11_hidd_shm" != "x-no" ; then
2633 dnl system shm headers
2634 AC_CHECK_HEADERS(sys/ipc.h)
2635 AC_CHECK_HEADERS(sys/shm.h)
2638 if test "x-$ac_cv_header_sys_ipc_h" = "x-yes" -a "x-$ac_cv_header_sys_shm_h" = "x-yes" ; then
2640 dnl make sure X libs have shm functions
2641 save_cflags="$CFLAGS"
2642 save_ldflags="$LDFLAGS"
2643 CFLAGS="$CFLAGS $X_CFLAGS"
2644 LDFLAGS="$LDFLAGS $X_LIBS"
2645 AC_CHECK_LIB(Xext, XShmQueryExtension, have_xshm=yes)
2646 CFLAGS="$save_cflags"
2647 LDFLAGS="$save_ldflags"
2651 dnl detection done, prepare output
2652 if test "x-$have_xshm" = "x-yes" ; then
2655 elif test "x-$x11_hidd_shm" = "x-yes" ; then
2656 dnl they explicitly asked for it, but we can't do it
2657 AC_MSG_ERROR([X11 has no support for shared memory, cannot enable it as requested])
2659 dnl otherwise just disable it
2664 dnl setup vidmode (fullscreen) extensions
2665 AC_ARG_ENABLE(x11_vidmode, AC_HELP_STRING([--enable-x11-vidmode],
2666 [use X11 vidmode extension (default=auto)]),
2667 x11_hidd_vidmode="$enableval",
2668 x11_hidd_vidmode="auto")
2669 case "x-$x11_hidd_vidmode" in
2670 x-yes|x-no|x-auto) ;;
2671 *) x11_hidd_vidmode="auto" ;;
2677 if test "x-$x11_hidd_vidmode" != "x-no" ; then
2679 dnl make sure X libs have vidmode functions
2680 save_cflags="$CFLAGS"
2681 save_ldflags="$LDFLAGS"
2682 CFLAGS="$CFLAGS $X_CFLAGS"
2683 LDFLAGS="$LDFLAGS $X_LIBS"
2684 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, have_vidmode=yes)
2685 CFLAGS="$save_cflags"
2686 LDFLAGS="$save_ldflags"
2689 dnl detection done, prepare output
2690 if test "x-$have_vidmode" = "x-yes" ; then
2691 dnl we can do vidmode
2692 DO_VIDMODE_SUPPORT="1"
2693 elif test "x-$x11_hidd_vidmode" = "x-yes" ; then
2694 dnl they explicitly asked for it, but we can't do it
2695 AC_MSG_ERROR([X11 vidmode extension not available, cannot enable it as requested])
2697 dnl otherwise just disable it
2698 DO_VIDMODE_SUPPORT="0"
2704 AC_ARG_ENABLE(sdl_hidd, AC_HELP_STRING([--enable-sdl-hidd],
2705 [build SDL hidd for hosted (default=auto)]),
2706 sdl_hidd="$enableval",
2708 case "x-$sdl_hidd" in
2709 x-yes|x-no|x-auto) ;;
2710 *) sdl_hidd="auto" ;;
2714 if test "x-$sdl_hidd" != "x-no" ; then
2718 AM_PATH_SDL($SDL_VERSION, [have_sdl="yes"],
2721 if test "x-$have_sdl" != "x-yes" ; then
2724 if test "x-$sdl_hidd" != "x-auto" ; then
2725 dnl and they explicitly asked for it, bail out
2726 AC_MSG_ERROR([SDL libs/headers not found, cannot build SDL hidd as requested])
2730 dnl found it, enable the build
2732 aros_host_sdl_cflags=$SDL_CFLAGS
2733 aros_host_sdl_libs=$SDL_LIBS
2740 dnl See if the user wants dbus.library
2741 AC_MSG_CHECKING([whether building of dbus.library is enabled])
2742 AC_ARG_ENABLE(dbus,AC_HELP_STRING([--enable-dbus],[Enable DBUS support via dbus.library (default=no)]),dbus="yes",dbus="no")
2743 if test "$dbus" = "yes" ; then
2745 DBUS_CFLAGS=`pkg-config --cflags dbus-1`
2746 DBUS_LIBFLAGS=`pkg-config --libs dbus-1`
2747 KERNEL_DBUS_KOBJ=kernel-dbus-kobj
2748 KERNEL_DBUS_INCLUDES=kernel-dbus-includes
2752 AC_MSG_RESULT($dbus)
2754 if test "$use_kernel_cc_wrapper" = "yes" ; then
2755 aros_kernel_cc="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-${toolchain_c_compiler}"
2758 dnl --------------------------------------------------------------------
2759 dnl Configuration Output Section
2760 dnl --------------------------------------------------------------------
2765 AC_SUBST(aros_flavour)
2766 AC_SUBST(aros_flavour_uc)
2767 AC_SUBST(aros_target_toolchain)
2768 AC_SUBST(aros_build_host)
2769 AC_SUBST(AROS_BUILDDIR)
2770 AC_SUBST(AROS_BUILDDIR_UNIX)
2772 AC_SUBST(AROS_CROSSTOOLSDIR)
2773 AC_SUBST(AROS_PORTSSRCDIR)
2775 # Compatability with other Amiga-like operation systems
2776 AC_SUBST(aros_amigaos_compliance)
2779 AC_SUBST(aros_cc_pre)
2780 AC_SUBST(aros_host_strip)
2781 AC_SUBST(aros_host_arch)
2782 AC_SUBST(aros_host_cpu)
2783 AC_SUBST(aros_host_cpp)
2784 AC_SUBST(aros_host_def_cc)
2785 AC_SUBST(aros_host_cc)
2786 AC_SUBST(aros_host_cxx)
2787 AC_SUBST(aros_host_ar)
2788 AC_SUBST(aros_host_ranlib)
2789 AC_SUBST(aros_host_ld)
2790 AC_SUBST(aros_host_make)
2791 AC_SUBST(aros_host_cflags)
2792 AC_SUBST(aros_host_cxxflags)
2793 AC_SUBST(gnu89_inline)
2794 AC_SUBST(aros_host_ldflags)
2795 AC_SUBST(aros_host_debug)
2796 AC_SUBST(aros_host_mkdep)
2797 AC_SUBST(aros_host_mkargs)
2798 AC_SUBST(aros_host_exe_suffix)
2799 AC_SUBST(aros_host_lib_suffix)
2800 AC_SUBST(aros_tools_dir)
2801 AC_SUBST(aros_host_aclocal)
2802 AC_SUBST(aros_host_autoconf)
2803 AC_SUBST(aros_host_autoheader)
2804 AC_SUBST(aros_host_automake)
2808 AC_SUBST(aros_target_guitheme)
2809 AC_SUBST(aros_target_iconset)
2810 AC_SUBST(aros_target_bootloader)
2811 AC_SUBST(aros_target_arch)
2812 AC_SUBST(aros_target_family)
2813 AC_SUBST(aros_target_cpu)
2814 AC_SUBST(aros_target_cpu_mode)
2815 AC_SUBST(aros_target_variant)
2816 AC_SUBST(aros_target_suffix)
2817 AC_SUBST(aros_target_ar)
2818 AC_SUBST(aros_target_ranlib)
2819 AC_SUBST(aros_plain_nm)
2820 AC_SUBST(aros_plain_ar)
2821 AC_SUBST(aros_kernel_ar)
2822 AC_SUBST(aros_kernel_ranlib)
2823 AC_SUBST(orig_target_cc)
2824 AC_SUBST(aros_target_cc)
2825 AC_SUBST(aros_kernel_cc)
2826 AC_SUBST(orig_target_cxx)
2827 AC_SUBST(aros_target_cxx)
2828 AC_SUBST(aros_kernel_cxx)
2829 AC_SUBST(orig_target_cpp)
2830 AC_SUBST(aros_target_cpp)
2831 AC_SUBST(aros_kernel_cpp)
2832 AC_SUBST(orig_target_as)
2833 AC_SUBST(aros_target_as)
2834 AC_SUBST(aros_kernel_as)
2835 AC_SUBST(orig_target_ld)
2836 AC_SUBST(aros_target_ld)
2837 AC_SUBST(aros_kernel_ld)
2838 AC_SUBST(aros_target_cc_includes)
2839 AC_SUBST(aros_target_cc_path)
2840 AC_SUBST(aros_target_objdump)
2841 AC_SUBST(aros_target_objcopy)
2842 AC_SUBST(aros_target_strip)
2843 AC_SUBST(aros_target_nm)
2844 AC_SUBST(aros_kernel_rescomp)
2845 AC_SUBST(aros_shared_default)
2846 AC_SUBST(aros_shared_ld)
2847 AC_SUBST(aros_object_format)
2848 AC_SUBST(spec_obj_format)
2849 AC_SUBST(aros_compiler_libs)
2850 AC_SUBST(aros_arch_libs)
2852 AC_SUBST(aros_shared_cflags)
2853 AC_SUBST(aros_shared_aflags)
2854 AC_SUBST(aros_shared_ldflags)
2856 AC_SUBST(aros_config_sysroot)
2857 AC_SUBST(aros_nowarn_flags)
2858 AC_SUBST(aros_config_cflags)
2859 AC_SUBST(aros_config_aflags)
2860 AC_SUBST(aros_config_ldflags)
2862 AC_SUBST(aros_kernel_sysroot)
2863 AC_SUBST(aros_kernel_cflags)
2864 AC_SUBST(aros_kernel_includes)
2865 AC_SUBST(aros_kernel_objcflags)
2866 AC_SUBST(aros_kernel_ldflags)
2867 AC_SUBST(aros_target_cflags)
2868 AC_SUBST(aros_debug_cflags)
2869 AC_SUBST(aros_debug_aflags)
2870 AC_SUBST(aros_debug_ldflags)
2871 AC_SUBST(aros_target_genmap)
2872 AC_SUBST(aros_target_strip_flags)
2873 AC_SUBST(aros_config_lto)
2874 AC_SUBST(aros_optimization_cflags)
2875 AC_SUBST(aros_isa_flags)
2877 AC_SUBST(crosstools_target)
2878 AC_SUBST(crosstools_cxx_target)
2880 # Hosted Graphics Related
2881 AC_SUBST(host_x_gfx)
2882 AC_SUBST(host_sdl_gfx)
2883 AC_SUBST(host_android_gfx)
2885 AC_SUBST(pci_hidd_target)
2887 AC_SUBST(aros_nominal_width)
2888 AC_SUBST(aros_nominal_height)
2889 AC_SUBST(aros_nominal_depth)
2890 AC_SUBST(DO_XSHM_SUPPORT)
2891 AC_SUBST(DO_VIDMODE_SUPPORT)
2893 AC_SUBST(aros_host_x11_cflags)
2894 AC_SUBST(aros_host_x11_ldflags)
2895 AC_SUBST(aros_host_sdl_cflags)
2896 AC_SUBST(aros_host_sdl_libs)
2898 # Native version related
2899 AC_SUBST(aros_serial_debug)
2900 AC_SUBST(ENABLE_EXECSMP)
2902 # Palm native version related
2903 AC_SUBST(aros_palm_debug_hack)
2905 # Unix/Hosted version related
2906 AC_SUBST(aros_nesting_supervisor)
2909 AC_SUBST(aros_enable_mmu)
2912 AC_SUBST(aros_ios_platform)
2913 AC_SUBST(aros_ios_version)
2914 AC_SUBST(aros_ios_sdk)
2916 # ARM default GCC target related
2917 AC_SUBST(gcc_default_cpu)
2918 AC_SUBST(gcc_default_cpu_tune)
2919 AC_SUBST(gcc_default_fpu)
2920 AC_SUBST(gcc_default_float_abi)
2921 AC_SUBST(gcc_default_mode)
2924 AC_SUBST(android_tool)
2925 AC_SUBST(aros_android_level)
2926 AC_SUBST(aros_android_antapk)
2929 AC_SUBST(ENABLE_DBUS)
2930 AC_SUBST(DBUS_CFLAGS)
2931 AC_SUBST(DBUS_LIBFLAGS)
2932 AC_SUBST(KERNEL_DBUS_KOBJ)
2933 AC_SUBST(KERNEL_DBUS_INCLUDES)
2936 AC_SUBST(ENABLE_X11)
2939 AC_SUBST(aros_debug)
2940 AC_SUBST(aros_mungwall_debug)
2941 AC_SUBST(aros_stack_debug)
2942 AC_SUBST(aros_modules_debug)
2944 # Collect-aros stuff: "-ius" to ignore undefined symbols
2945 AC_SUBST(ignore_undefined_symbols)
2947 # C compiler related
2948 AC_SUBST(gcc_target_cpu)
2949 AC_SUBST(target_binutils_version)
2950 AC_SUBST(target_gcc_version)
2952 #ObjC compiler related
2953 AC_SUBST(objc_target)
2956 AC_SUBST(java_target)
2959 AC_SUBST(aros_usb30_code)
2961 dnl Prepare for output, make up all the generated patches
2962 case "$aros_flavour" in
2963 emulation) aros_flavour_uc="AROS_FLAVOUR_EMULATION"
2964 aros_flavour="emulation" ;;
2965 emulcompat) aros_flavour_uc="(AROS_FLAVOUR_EMULATION|AROS_FLAVOUR_BINCOMPAT)"
2966 aros_flavour="emulation" ;;
2967 standalone) aros_flavour_uc="AROS_FLAVOUR_STANDALONE"
2968 aros_flavour="standalone";;
2969 standcompat) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2970 aros_flavour="standalone";;
2971 native) aros_flavour_uc="AROS_FLAVOUR_NATIVE"
2972 aros_flavour="native" ;;
2973 nativecompat) aros_flavour_uc="(AROS_FLAVOUR_NATIVE|AROS_FLAVOUR_BINCOMPAT)"
2974 aros_flavour="native" ;;
2975 linklib) aros_flavour_uc="AROS_FLAVOUR_LINKLIB"
2976 aros_flavour="linklib" ;;
2977 palmnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2978 aros_flavour="palmnative" ;;
2979 mac68knative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2980 aros_flavour="mac68knative" ;;
2981 ppcnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2982 aros_flavour="ppcnative" ;;
2985 if test ! -d ${aros_inc_dir} ; then
2986 ${MKDIR} ${aros_inc_dir}
2988 if test ! -d ${aros_geninc_dir} ; then
2989 ${MKDIR} ${aros_geninc_dir}
2991 if test ! -d ${aros_hostcfg_dir} ; then
2992 ${MKDIR} ${aros_hostcfg_dir}
2994 if test ! -d ${aros_targetcfg_dir} ; then
2995 ${MKDIR} ${aros_targetcfg_dir}
2997 if test ! -d ${aros_tools_dir} ; then
2998 ${MKDIR} ${aros_tools_dir}
3000 if test ! -d ${aros_scripts_dir} ; then
3001 ${MKDIR} ${aros_scripts_dir}
3004 AC_CONFIG_HEADERS(${aros_geninc_dir}/host-conf.h:config/host-conf.h.in)
3006 # Generic build tools (metamake, etc)
3007 AC_CONFIG_COMMANDS([genmf-executable-support],
3008 [chmod a+x ${aros_tools_dir}/genmf.py],
3009 [aros_tools_dir=${aros_tools_dir}]
3014 ${aros_inc_dir}/config.h:config/config.h.in
3015 ${aros_geninc_dir}/config.h:config/config.h.in
3016 ${aros_hostcfg_dir}/host.cfg:config/host.cfg.in
3017 ${aros_targetcfg_dir}/target.cfg:config/target.cfg.in
3018 ${aros_targetcfg_dir}/build.cfg:config/build.cfg.in
3020 ${aros_targetcfg_dir}/make.defaults:config/make.defaults.in
3021 ${aros_tools_dir}/genmf.py:tools/genmf/genmf.py
3022 tools/collect-aros/env.h
3026 AC_CONFIG_COMMANDS([binutils-support],
3028 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3030 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
3032 chmod a+x ${prefix2}-ld
3034 ln -sf $orig_target_as$aros_host_exe_suffix ${prefix2}-as$aros_host_exe_suffix
3035 ln -sf $orig_target_nm$aros_host_exe_suffix ${prefix2}-nm$aros_host_exe_suffix
3036 ln -sf $orig_target_ar$aros_host_exe_suffix ${prefix2}-ar$aros_host_exe_suffix
3037 ln -sf $orig_target_ranlib$aros_host_exe_suffix ${prefix2}-ranlib$aros_host_exe_suffix
3038 ln -sf $orig_target_objcopy$aros_host_exe_suffix ${prefix2}-objcopy$aros_host_exe_suffix
3039 ln -sf $orig_target_objdump$aros_host_exe_suffix ${prefix2}-objdump$aros_host_exe_suffix
3040 ln -sf $orig_target_strip$aros_host_exe_suffix ${prefix2}-strip$aros_host_exe_suffix
3043 aros_host_exe_suffix=${aros_host_exe_suffix}
3044 aros_tools_dir=${aros_tools_dir}
3045 aros_target_cpu=${aros_target_cpu}
3046 aros_target_arch=${aros_target_arch}
3047 aros_target_suffix=${aros_target_suffix}
3048 orig_target_nm=${orig_target_nm}
3049 orig_target_as=${orig_target_as}
3050 orig_target_ar=${orig_target_ar}
3051 orig_target_ranlib=${orig_target_ranlib}
3052 orig_target_objdump=${orig_target_objdump}
3053 orig_target_objcopy=${orig_target_objcopy}
3054 orig_target_strip=${orig_target_strip}
3055 aros_kernel_ld=${aros_kernel_ld}
3059 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-ld:scripts/aros-ld.in
3062 # Bare Elf support script and spec
3063 if test "${use_kernel_cc_wrapper}" = "yes"; then
3064 AC_CONFIG_COMMANDS([elf-compiler-support],
3066 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3068 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf
3070 chmod a+x ${prefix2}-gcc
3072 ln -sf $aros_kernel_ld$aros_host_exe_suffix ${prefix2}-ld$aros_host_exe_suffix
3075 aros_host_exe_suffix=${aros_host_exe_suffix}
3076 aros_tools_dir=${aros_tools_dir}
3077 aros_target_cpu=${aros_target_cpu}
3078 aros_target_arch=${aros_target_arch}
3079 aros_target_suffix=${aros_target_suffix}
3080 aros_kernel_ld=${aros_kernel_ld}
3084 ${aros_targetcfg_dir}/elf-specs:${elf_specs_in}
3085 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-gcc:scripts/elf-gcc.in
3089 # Host compiler support scripts and spec
3090 if test "${aros_target_toolchain}" = "no"; then
3091 AC_CONFIG_COMMANDS([host-compiler-wrapper-support],
3093 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3095 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
3097 chmod a+x ${prefix2}-${toolchain_c_compiler} ${prefix2}-${toolchain_cxx_compiler} ${prefix2}-${toolchain_cpp_preprocessor}
3100 aros_host_exe_suffix=${aros_host_exe_suffix}
3101 aros_tools_dir=${aros_tools_dir}
3102 aros_target_cpu=${aros_target_cpu}
3103 aros_target_arch=${aros_target_arch}
3104 aros_target_suffix=${aros_target_suffix}
3108 ${aros_targetcfg_dir}/specs:config/specs.in
3109 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_cpp_preprocessor}:scripts/aros-${toolchain_cpp_preprocessor}.in
3110 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_c_compiler}:scripts/aros-${toolchain_c_compiler}.in
3111 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_cxx_compiler}:scripts/aros-${toolchain_cxx_compiler}.in
3116 if test "$aros_target_variant" == "android"; then
3117 AC_CONFIG_FILES(${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in)
3121 AC_CONFIG_FILES(${aros_targetcfg_dir}/conf.cmake:config/conf.cmake.in)
3125 dnl This is in order to not define SHARED_CFLAGS sometimes
3126 dnl We don't always do aros_shared_ar, aros_shared_cflags
3128 #XXX compatability...
3129 aros_shared_ar="$aros_shared_ld $aros_shared_ldflags -o"
3131 if test -n "$aros_shared_cflags" ; then
3132 echo "SHARED_CFLAGS := $aros_shared_cflags" >> ${aros_hostcfg_dir}/host.cfg
3133 echo "SHARED_AR := $aros_shared_ar" >> ${aros_hostcfg_dir}/host.cfg