1 dnl Copyright © 1997-2011, 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 # The AROS target is slightly different to the normal GNU style
26 # format. We don't have the middle part, and we reverse the order
27 # of the $(CPU) and $(OS) bits.
29 # Don't strip the version of the target yet, it might be
30 # useful on some systems.
32 AC_MSG_CHECKING([for AROS style target])
34 if test "$target" = "NONE" ; then
35 target=$host_os-$host_cpu
37 if test "$target" = "" ; then
38 target=$host_os-$host_cpu
41 AC_MSG_RESULT($target)
43 if test "$host_os" = "mingw32" ; then
47 #don't know where else to put this...
48 AC_MSG_CHECKING([building AROS in])
49 AROS_BUILDDIR=`${PWDCMD-pwd}`
50 AROS_BUILDDIR_UNIX=${PWD}
51 AC_MSG_RESULT($AROS_BUILDDIR)
53 AC_MSG_CHECKING([AROS source in])
54 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
56 AC_MSG_RESULT($SRCDIR)
58 # Parse the target field into something useful.
60 target_os=`echo $target | sed 's/^\([^-]*\)-\(.*\)$/\1/'`
61 target_cpu=`echo $target | sed 's/^\([^-]*\)-\(.*\)$/\2/'`
64 dnl --------------------------------------------------------------------
65 dnl Set the default Workbench resolution
66 dnl --------------------------------------------------------------------
67 aros_default_wbwidth=800
68 aros_default_wbheight=600
69 aros_default_wbdepth=4
71 dnl --------------------------------------------------------------------
72 dnl Host Configuration Section
73 dnl --------------------------------------------------------------------
75 dnl The idea here is to find out all the information we need about the
76 dnl host. This means things like tools for building directory structures,
77 dnl copying files around and the like.
79 # The first step is to find the host binaries.
80 # Check for a compiler.
85 # Check for a compatible awk
86 AC_CHECK_PROGS(AWK,[gawk nawk])
87 AROS_REQUIRED(gawk,$AWK)
88 AROS_PROG(MMAKE,mmake)
90 # Perform some default variable assignments. Note all of these will be
91 # Regenerated from the script, so there is no need to cache them.
94 AROS_TOOL_CCPATH(aros_host_ld,ld)
95 AROS_REQUIRED(ld,$aros_host_ld)
97 aros_host_cflags=$CFLAGS
98 aros_host_ldflags=$LDFLAGS
99 aros_host_debug="-g -O0"
100 aros_host_mkdep="\$(SRCDIR)/scripts/mkdep"
101 aros_host_mkargs="--no-print-directory"
102 aros_host_incl="/usr/include"
103 aros_host_exe_suffix="$EXEEXT"
104 aros_host_lib_suffix=""
106 # Ignore all compliance, AROS ROMs = 0
107 # KickStart v1.0 = 30
108 # KickStart v1.3 = 34
109 # KickStart v2.0 = 37
110 # KickStart v3.0 = 39
111 # KickStart v3.1 = 40
113 aros_amigaos_compliance=0
115 AC_CHECK_PROGS(aros_host_aclocal,[aclocal aclocal19 aclocal-1.9])
116 AC_CHECK_PROGS(aros_host_autoconf,[autoconf autoconf259 autoconf253])
117 AC_CHECK_PROGS(aros_host_autoheader,[autoheader autoheader259 autoheader253])
118 AC_CHECK_PROGS(aros_host_automake,[automake automake19 automake-1.9])
120 AROS_REQUIRED(aclocal/aclocal19/aclocal-1.9, $aros_host_aclocal)
121 AROS_REQUIRED(automake/automake19/automake-1.9, $aros_host_automake)
123 case "$aros_host_cc" in
125 aros_host_cc_pipe="-pipe"
135 aros_kernel_cc_includes=""
136 aros_target_cc_includes=""
138 # ----------------------------------------------------------------------------------------
139 # Host-specific defaults
141 # Override this to "yes" in order to force a specific build to use real AROS crosscompiler
142 # instead of a wrapper script.
143 # Useful for non-ELF hosts (like Windows and Darwin).
144 # Can also be overriden in target section below
147 # This is the main host configuration section. It is where the host
148 # can change the values of any variables it needs to change. We do
149 # not look at anything that compiles to the target yet, we'll get
154 aros_host_arch="aros"
155 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
161 aros_host_cpu="x86_64"
167 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
168 aros_host_cpu="$host_cpu"
174 aros_host_arch="linux"
175 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
176 android_build_os="linux-x86"
177 android_tool="android"
178 default_android_sdk="/opt/android-sdk-linux_x86"
184 aros_host_cpu="x86_64"
196 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
197 aros_host_cpu="$host_cpu"
203 aros_host_cc="$aros_host_cc $aros_host_cc_pipe -I/usr/local/include"
204 aros_host_make="gmake"
205 aros_host_arch="freebsd"
208 aros_host_ldflags="$aros_host_ldflags -L/usr/local/lib -liconv"
210 dnl FreeBSD 5.x (and later) has changed the default object format.
211 dnl The double [[]] is necessary to get around m4's quoting rules.
214 aros_object_format="elf_i386"
218 aros_object_format="elf_i386_fbsd"
225 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
226 aros_host_arch="darwin"
228 android_build_os="darwin-x86"
229 android_tool="android"
230 default_android_sdk="/android-sdk-mac_x86"
236 aros_host_cpu="x86_64"
242 AC_MSG_WARN("Unknown CPU for Darwin host -- $host_cpu")
243 aros_host_cpu="$host_cpu"
247 aros_host_ldflags="$aros_host_ldflags -liconv"
252 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
253 aros_host_make="gmake"
254 aros_host_arch="dragonfly"
260 aros_host_cpu="x86_64"
263 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
264 aros_host_cpu="$host_cpu"
270 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
271 aros_host_make="gmake"
272 aros_host_arch="netbsd"
281 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
282 aros_host_cpu="$host_cpu"
285 aros_host_lib_suffix=".0.0"
289 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
290 aros_host_make="gmake"
291 aros_host_arch="openbsd"
297 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
298 aros_host_cpu="$host_cpu"
304 aros_host_arch="solaris"
305 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
311 aros_host_cpu="sparc"
314 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
315 aros_host_cpu="$host_cpu"
321 aros_host_arch="morphos"
326 aros_host_arch="amiga"
331 TOUCH="/gg/bin/touch"
340 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
341 aros_host_cpu="$host_cpu"
347 aros_host_arch="cygwin"
349 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
350 android_build_os="windows"
351 android_tool="android.bat"
352 default_android_sdk="/cygdrive/c/android-sdk-windows-1.6_r1"
359 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
360 aros_host_cpu="$host_cpu"
366 aros_host_arch="mingw32"
368 aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
369 android_build_os="windows"
370 android_tool="android.bat"
371 default_android_sdk="/c/android-sdk-windows-1.6_r1"
378 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
379 aros_host_cpu="$host_cpu"
384 AC_MSG_ERROR([Unsupported host architecture $host])
388 AROS_PROG(aros_host_ar,[ar],[cr])
389 AROS_REQUIRED(ar,$aros_host_ar)
390 AROS_PROG(aros_host_ranlib,ranlib)
391 AROS_REQUIRED(ranlib,$aros_host_ranlib)
392 AROS_PROG(aros_host_strip,strip)
393 AROS_REQUIRED(strip,$aros_host_strip)
395 AROS_PROG(RM,[rm],[-rf])
396 AROS_REQUIRED(rm,$RM)
398 AROS_REQUIRED(cp,$CP)
400 AROS_REQUIRED(mv,$MV)
401 AROS_PROG(ECHO,[echo])
402 AROS_REQUIRED(echo,$ECHO)
403 AROS_PROG(MKDIR,[mkdir],[-p])
404 AROS_REQUIRED(mkdir,$MKDIR)
405 AROS_PROG(TOUCH,[touch])
406 AROS_REQUIRED(touch,$TOUCH)
407 AROS_PROG(SORT,[sort])
408 AROS_REQUIRED(sort,$SORT)
409 AROS_PROG(UNIQ,[uniq])
410 AROS_REQUIRED(uniq,$UNIQ)
411 AROS_PROG(NOP,[true])
412 AROS_REQUIRED(true,$NOP)
414 AROS_REQUIRED(cat,$CAT)
415 AROS_PROG(BISON,[bison])
416 AROS_REQUIRED(bison,$BISON)
417 AROS_PROG(FLEX,[flex])
418 AROS_REQUIRED(flex,$FLEX)
419 AROS_PROG(PNGTOPNM,[pngtopnm])
420 AROS_REQUIRED(pngtopnm,$PNGTOPNM)
421 AROS_PROG(PPMTOILBM,[ppmtoilbm])
422 AROS_REQUIRED(ppmtoilbm,$PPMTOILBM)
424 AROS_REQUIRED(sed,$SED)
425 AROS_PROG(CHMOD,[chmod])
426 AROS_REQUIRED(chmod,$CHMOD)
427 AROS_PROG(PATCH,[patch])
428 AROS_REQUIRED(patch,$PATCH)
437 dnl ---------------------------------------------------------------------------
438 dnl Look for things about the host system, good for hosted targets.
439 dnl ---------------------------------------------------------------------------
441 # Check for some includes for the X11 HIDD and the kernel
442 AC_CHECK_HEADERS([sys/ipc.h sys/shm.h \
443 sys/mmap.h sys/mman.h sysexits.h \
444 sys/statfs.h sys/statvfs.h sys/vfs.h sys/param.h \
447 AC_CHECK_HEADERS([sys/mount.h],,,[#include <sys/param.h>])
464 AC_CHECK_MEMBERS(struct tm.tm_gmtoff)
466 # Look for some functions
467 AC_CHECK_FUNCS([getpagesize kqueue statfs statvfs \
468 clone kse_create rfork_thread thr_create sa_register \
469 getcontext makecontext setcontext sigaltstack swapcontext])
474 dnl --------------------------------------------------------------------
475 dnl Target Configuration Section
476 dnl --------------------------------------------------------------------
478 dnl The target configuration section is responsible for setting up all
479 dnl the paths for includes, and tools required to build AROS to some
480 dnl particular target.
482 aros_config_cflags="-Wall -Werror-implicit-function-declaration"
483 aros_config_aflags="-Wall -x assembler-with-cpp -c"
484 aros_config_ldflags=""
486 aros_shared_default=yes
488 aros_shared_cflags="-fPIC"
489 aros_shared_aflags=""
490 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
491 aros_kernel_ldflags="-Wl,-rpath,./lib"
493 aros_kernel_ar_flags="cr"
494 aros_target_ar_flags="cr"
495 aros_target_nm_flags="-C -ul"
496 aros_target_strip_flags="--strip-unneeded -R.comment"
501 aros_target_genmap="-Wl,-Map -Xlinker"
503 # Native flavour stuff
504 aros_serial_debug="0"
506 # Palm native flavour stuff
507 aros_palm_debug_hack="0"
510 aros_nesting_supervisor="0"
512 # Collect-aros stuff: "-ius" to ignore undefined symbols
513 ignore_undefined_symbols=""
515 # Check for X11 by default
518 #-----------------------------------------------------------------------------
521 # GCC 4.1+ has a stack protection feature that requires OS support. Ubuntu has
522 # it switched on by default, and we use the host compiler, so it compiles AROS
523 # code with this enabled resulting in link failures as we don't have support
526 # We use two methods to disable it. For the host compiler (used to compile
527 # some hosted modules), we test to see if the compiler supports stack
528 # protection, and if it does we disable it in AROS_CONFIG_CFLAGS. This should
529 # work on all platforms.
531 # For the "cross" compiler we clear the "ssp_default" spec in config/specs.in
532 # (this is done unconditionally, as it should have no effect on compilers
533 # without the stack protection feature). This may be specific to the way that
534 # Ubuntu enables the feature, so may not work everywhere. My specs-fu isn't
535 # strong enough to disable it in a generic way though, so we'll live with it
536 # until another vendor ships GCC with it enabled in a different way, and deal
540 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
541 save_cflags="$CFLAGS"
542 CFLAGS="$CFLAGS -fno-stack-protector"
543 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
544 AC_MSG_RESULT($use_no_stack_protector)
545 if test "x-$use_no_stack_protector" = "x-yes" ; then
546 aros_host_cflags="$aros_host_cflags -fno-stack-protector"
548 CFLAGS="$save_cflags"
550 #-----------------------------------------------------------------------------
552 # Disable pointer-signedness warnings if the compiler recognises the option
553 # (this only works for the host compiler at the moment)
555 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
556 save_cflags="$CFLAGS"
557 CFLAGS="$CFLAGS -Wno-pointer-sign"
558 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
559 AC_MSG_RESULT($use_no_sign_warning)
560 if test "x-$use_no_sign_warning" = "x-yes" ; then
561 aros_host_cflags="$aros_host_cflags -Wno-pointer-sign"
563 CFLAGS="$save_cflags"
565 #-----------------------------------------------------------------------------
567 # Check if host compiler supports -fgnu89-inline, can be needed for crosstools.
569 AC_MSG_CHECKING([whether ${CC} accepts -fgnu89-inline])
570 save_cflags="$CFLAGS"
571 CFLAGS="$CFLAGS -fgnu89-inline"
572 AC_TRY_COMPILE(,, use_gnu89_inline="yes", use_gnu89_inline="no")
573 AC_MSG_RESULT($use_gnu89_inline)
574 if test "x-$use_gnu89_inline" = "x-yes" ; then
575 gnu89_inline="-fgnu89-inline"
577 CFLAGS="$save_cflags"
579 #-----------------------------------------------------------------------------
581 AC_MSG_CHECKING([for type of build])
582 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")
584 if test "$build_type" = "nightly"; then
585 build_type_string="NIGHTLY"
586 elif test "$build_type" = "snapshot"; then
587 build_type_string="SNAPSHOT"
588 elif test "$build_type" = "milestone"; then
589 build_type_string="MILESTONE"
590 elif test "$build_type" = "release"; then
591 build_type_string="RELEASE"
593 build_type_string="PERSONAL"
594 build_type="personal"
597 aros_config_cflags="$aros_config_cflags -DAROS_BUILD_TYPE=AROS_BUILD_TYPE_$build_type_string"
599 AC_MSG_RESULT($build_type)
601 #-----------------------------------------------------------------------------
602 all_debug_types="messages stack modules mungwall symbols"
604 AC_MSG_CHECKING([which debug types to enable])
605 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)]),
606 debug="$enableval",debug="")
608 if test "$debug" = "" -o "$debug" = "no"; then
610 elif test "$debug" = "yes"; then
614 if test "$debug" = "all" ; then
615 debug="messages stack modules symbols"
616 for d in $all_debug_types; do
617 export aros_${d}_debug="1"
620 for d in $all_debug_types; do
621 export aros_${d}_debug="0"
625 if test "$debug" != "none"; then
626 debug=`echo $debug | sed s/,/\ /g`
629 for d2 in $all_debug_types; do
630 if test "$d2" = "$d"; then
635 if test "$found" = "0"; then
636 AC_MSG_ERROR([unrecognized debug type "$d". Available types are: all none $all_debug_types])
638 export aros_${d}_debug="1"
642 AC_MSG_RESULT($debug)
644 if test "$aros_messages_debug" = "1"; then
645 aros_messages_debug="-DADEBUG=1 -DMDEBUG=1"
647 aros_messages_debug=""
649 if test "$aros_symbols_debug" = "1"; then
650 aros_symbols_debug="-g"
652 aros_symbols_debug=""
655 # These are the flags to pass when compiling debugged programs
656 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug"
658 aros_debug_ldflags="$aros_symbols_debug"
660 #-----------------------------------------------------------------------------
661 # Checking if we should build crosstools..
662 AC_MSG_CHECKING([whether to build crosstools])
663 AC_ARG_ENABLE(crosstools,AC_HELP_STRING([--enable-crosstools],[Build cross-compiler toolchains if necessary (default=no).]),crosstools="$enableval",crosstools="no")
664 AC_MSG_RESULT($crosstools)
666 #-----------------------------------------------------------------------------
667 # Checking for distcc and ccache.
669 # Always apply the transforms in this particular order. Basically you should
670 # always run 'ccache distcc compiler' in that order for the best performance.
672 AC_MSG_CHECKING([whether to enable distcc])
673 AC_ARG_ENABLE(distcc,AC_HELP_STRING([--enable-distcc],[Use distcc as a front end to the compiler (default=no).]),distcc="$enableval",distcc="no")
674 if test "$distcc" != "" -a "$distcc" != "no"; then
675 # AC_CHECK_PROG will print out the result in this case
676 AC_PATH_PROG(DISTCC,[distcc],distcc,)
681 AC_MSG_CHECKING([whether to enable ccache])
682 AC_ARG_ENABLE(ccache,AC_HELP_STRING([--enable-ccache],[Use ccache as a front end to the compiler (default=no).]),ccache="$enableval",ccache="no")
683 if test "$ccache" != "" -a "$ccache" != "no"; then
684 # AC_CHECK_PROG will print out the result in this case
685 AC_CHECK_PROG(CCACHE,[ccache],ccache,)
690 #-----------------------------------------------------------------------------
691 AC_MSG_CHECKING([what specific host gcc version to use])
692 AC_ARG_WITH(gcc-version,AC_HELP_STRING([--with-gcc-version=VERSION],[Use host gcc-VERSION for building AROS]),target_tool_version="$withval",target_tool_version="default")
693 AC_MSG_RESULT($target_tool_version)
695 #-----------------------------------------------------------------------------
696 AC_MSG_CHECKING([what optimization flags to use])
697 AC_ARG_WITH(optimization,AC_HELP_STRING([--with-optimization=FLAGS],[Use optimization flags FLAGS (default=-O2).]),optimization="$withval",optimization="unknown")
698 if test "$optimization" = "unknown"; then
699 dnl default is -O2 for normal builds, -O0 for debug builds
700 if test "$debug" != "none"; then
706 aros_config_cflags="$aros_config_cflags $optimization"
707 AC_MSG_RESULT($optimization)
709 #-----------------------------------------------------------------------------
710 AC_MSG_CHECKING([what paranoia flags to use])
711 AC_ARG_WITH(paranoia,AC_HELP_STRING([--with-paranoia=FLAGS],[CC flags to enable paranoia]),[paranoia_flags="$withval"],[paranoia_flags="default"])
712 if test "$paranoia_flags" = "default"; then
714 else if test "$paranoia_flags" = "yes"; then
715 paranoia_flags="-Wall -Werror"
717 AC_MSG_RESULT($paranoia_flags)
718 aros_config_cflags="$aros_config_cflags $paranoia_flags"
720 #-----------------------------------------------------------------------------
721 AC_MSG_CHECKING([what target variant to enable])
722 AC_ARG_ENABLE(target_variant,AC_HELP_STRING([--enable-target-variant=NAME],[Enable a specific target variant(default=none)]),target_variant=$enableval,target_variant="")
723 if test "$target_variant" = ""; then
724 aros_target_variant=""
725 aros_target_suffix=""
728 aros_target_variant="$target_variant"
729 aros_target_suffix="-$target_variant"
731 AC_MSG_RESULT($enableval)
733 #-----------------------------------------------------------------------------
734 # Target-specific defaults. You can override then on a per-target basis.
736 # Bootloader name. Currently used by PC target.
737 target_bootloader="none"
739 # Prefix for toolchain used to build bootstrap. For hosted ports, this should be a toolchain for target host OS.
740 # (i. e. when building mingw32-i386 port this should be set to "i386-mingw32-").
741 # For native ports this toolchain is used to build a bootloader and second-level bootstrap (if present).
742 if test "$crosstools" != "yes"; then
743 target_tool_prefix=${target_cpu}-elf-
745 target_tool_prefix=${target_cpu}-aros-
748 #-----------------------------------------------------------------------------
749 # Additional options for some specific targets
751 case "$aros_target_variant" in
753 AC_MSG_CHECKING([XCode path])
754 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")
755 AC_MSG_RESULT($aros_xcode_path)
757 AC_MSG_CHECKING([for minimum supported iOS version])
758 AC_ARG_WITH(ios-version,AC_HELP_STRING([--with-ios-version=VERSION],[Specify minimum supported iOS version (default=3.0).]),aros_ios_version="$withval",aros_ios_version="3.0")
759 AC_MSG_RESULT($aros_ios_version)
761 AC_MSG_CHECKING([what iOS SDK version to use])
762 AC_ARG_WITH(ios-sdk,AC_HELP_STRING([--with-ios-sdk=VERSION],[Use iOS SDK version VERSION (default=4.1).]),aros_ios_sdk="$withval",aros_ios_sdk="4.1")
763 AC_MSG_RESULT($aros_ios_sdk)
768 AC_MSG_CHECKING([Android SDK path])
769 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)
770 AC_MSG_RESULT($aros_android_sdk)
772 AC_MSG_CHECKING([Android NDK path])
773 AC_ARG_WITH(ndk,AC_HELP_STRING([--with-ndk=PATH],[Specify Android NDK path (default=none).]),aros_android_ndk="$withval",aros_android_ndk="none")
774 AC_MSG_RESULT($aros_android_ndk)
776 AC_MSG_CHECKING([what Android SDK version to use])
777 AC_ARG_WITH(sdk-version,AC_HELP_STRING([--with-sdk-version=LEVEL],[Use Android SDK for API LEVEL (default=8).]),aros_sdk_version="$withval",aros_sdk_version="8")
778 AC_MSG_RESULT($aros_sdk_version)
780 if test "$aros_android_ndk" != "none"; then
781 AC_MSG_CHECKING([what Android NDK version to use])
782 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")
783 AC_MSG_RESULT($aros_ndk_version)
786 export PATH="$aros_android_sdk/tools:$PATH"
787 AC_PATH_PROG(android_tool, $android_tool)
788 AROS_REQUIRED(android,$android_tool)
790 AC_PATH_PROG(ant, ant)
791 if test "$ant" = ""; then
792 AC_MSG_WARN([Apache Ant is missing, Java bootstrap can't be built automatically])
795 dnl MSYS bash can't run .bat files directly, then need to be started via cmd.exe
796 if test "$host_os" = "mingw32"; then
797 android_tool="cmd //c $android_tool"
803 #-----------------------------------------------------------------------------
804 # This is the target configuration switch.
807 aros_target_arch="linux"
808 aros_target_family="unix"
809 case "$target_cpu" in
811 aros_target_cpu="m68k"
812 aros_object_format="m68kelf"
813 aros_flavour="emulcompat"
814 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__linux__"
815 aros_shared_ldflags="-Wl,-T,\$(TOP)/config/linux/m68k/script.so"
816 aros_kernel_ldflags="-Wl,-rpath,./lib,-T,\$(TOP)/config/linux/m68k/script.normal"
817 gcc_target_cpu="mc68000"
820 aros_target_cpu="i386"
821 aros_object_format="elf_i386"
822 aros_flavour="emulation"
823 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__linux__"
824 aros_config_cflags="$aros_config_cflags -m32 -march=i486"
825 aros_kernel_cflags="$aros_kernel_cflags -m32 -march=i486"
826 aros_config_aflags="$aros_config_aflags -m32 -march=i486"
827 aros_config_ldflags="-m32 -march=i486"
828 aros_kernel_ldflags="-melf_i386"
829 aros_default_wbdepth=8
830 gcc_target_cpu="i386"
831 pci_hidd_target="hidd-pci-linux"
832 android_tool_dir_prefix="x86"
833 android_tool_prefix="i686-android-linux"
834 android_ndk_arch="x86"
837 aros_target_cpu="x86_64"
838 aros_object_format="elf_x86_64"
839 aros_flavour="emulation"
840 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__linux__"
841 aros_config_cflags="$aros_config_cflags -mno-red-zone -fno-omit-frame-pointer"
842 aros_default_wbdepth=8
843 pci_hidd_target="hidd-pci-linux"
846 aros_target_cpu="ppc"
847 aros_object_format="elf32ppc"
848 aros_flavour="emulation"
849 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
850 aros_default_wbdepth=8
854 # Same as powerpc, but I need this for the nightly build to work again.
855 # Actually, the nightly should be made working with powerpc target.
856 # That just was too much work for the moment, another week or two.
858 aros_target_cpu="ppc"
859 aros_object_format="elf32ppc"
860 aros_flavour="emulation"
861 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
862 aros_default_wbdepth=8
866 aros_target_cpu="arm"
867 aros_object_format="armelf_linux_eabi"
868 aros_flavour="emulation"
869 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
871 aros_config_cflags="$aros_config_cflags -marm -march=armv6 -mfpu=vfp -mfloat-abi=softfp -mthumb-interwork -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing -fno-omit-frame-pointer"
872 aros_config_aflags="$aros_config_aflags -marm -march=armv6 -mfpu=vfp -mfloat-abi=softfp -mthumb-interwork -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing"
873 aros_arch_libs="-laeabi"
874 android_tool_dir_prefix="arm-linux-androideabi"
875 android_tool_prefix="arm-linux-androideabi"
876 android_ndk_arch="arm"
879 AC_MSG_ERROR("Unknown CPU for Linux -- $target_cpu")
882 case "$aros_target_variant" in
885 dnl Not all Linux CPUs are supported by Android
886 if test "$android_ndk_arch" = ""; then
887 AC_MSG_ERROR("Unsupported CPU for Android -- $target_cpu")
890 aros_android_level=android-$aros_sdk_version
891 aros_default_wbwidth=320
892 aros_default_wbheight=480
893 dnl Android gcc and AROS gcc use different enums size, so we use AROS gcc
895 if test "$aros_android_ndk" = "none"; then
896 dnl Use standalone toolchain, don't adjust paths
897 aros_kernel_cflags="-mandroid"
898 aros_kernel_ldflags="-mandroid"
901 export PATH="$aros_android_ndk/toolchains/$android_tool_dir_prefix-$target_tool_version/prebuilt/$android_build_os/bin:$PATH"
902 aros_android_ndk="$aros_android_ndk/platforms/android-$aros_ndk_version/arch-$android_ndk_arch"
903 aros_kernel_cflags="--sysroot $aros_android_ndk -mandroid"
904 aros_kernel_ldflags="--sysroot $aros_android_ndk -mandroid"
905 CFLAGS="$CFLAGS --sysroot $aros_android_ndk -mandroid"
906 aros_kernel_includes="-isystem $aros_android_ndk/usr/include"
909 dnl (Ab)use $(X11_HIDD_TARGET) as "Default display driver target"
910 dnl in order not to fill mmakefiles with garbage
911 x11_hidd_target=kernel-hidd-androidgfx-kobj
912 target_tool_prefix="$android_tool_prefix-"
918 aros_target_arch="pc"
919 aros_shared_default="no"
920 target_bootloader="grub2"
921 case "$target_cpu" in
923 aros_target_cpu="i386"
925 dnl If somebody hasn't already set the target object
926 dnl format, then use this value. Mostly to support
927 dnl FreeBSD cross-compilation.
928 dnl TODO: Remove when we always use our compiler.
930 if test "$aros_object_format" = "" ; then
931 aros_object_format="elf_i386"
933 aros_flavour="standalone"
934 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
935 aros_config_cflags="$aros_config_cflags -m32 -march=i486"
936 aros_kernel_cflags="$aros_kernel_cflags -m32 -march=i486"
937 aros_config_aflags="$aros_config_aflags -m32 -march=i486"
938 aros_config_ldflags="-m32 -march=i486"
939 aros_kernel_ldflags="-melf_i386"
940 aros_default_wbwidth=640
941 aros_default_wbheight=480
942 gcc_target_cpu="i386"
945 aros_target_cpu="x86_64"
947 if test "$aros_object_format" = "" ; then
948 aros_object_format="elf_x86_64"
950 aros_flavour="standalone"
951 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
952 aros_config_cflags="$aros_config_cflags -fno-asynchronous-unwind-tables -mno-red-zone -fno-omit-frame-pointer"
953 aros_kernel_ldflags=""
954 aros_default_wbwidth=640
955 aros_default_wbheight=480
958 AC_MSG_ERROR("Unknown native CPU -- $target_cpu")
964 aros_target_arch="prep"
965 aros_shared_default="no"
966 aros_target_cpu="ppc"
967 aros_object_format="elf32ppc"
968 aros_flavour="ppcnative"
969 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
970 aros_kernel_ldflags=""
971 aros_default_wbwidth=640
972 aros_default_wbheight=480
977 aros_target_arch="freebsd"
978 aros_target_family="unix"
979 aros_target_cpu="i386"
980 aros_flavour="emulation"
981 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
982 gcc_target_cpu="i386"
984 aros_target_strip_flags="-x"
988 aros_target_arch="darwin"
989 aros_target_family="unix"
990 aros_flavour="emulation"
991 case "$target_cpu" in
993 aros_ios_platform="iPhoneSimulator"
994 aros_target_cpu="i386"
995 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
996 aros_kernel_ldflags=""
997 aros_macosx_version="10.4"
998 aros_default_wbdepth=8
999 gcc_target_cpu="i386"
1000 aros_object_format="elf_i386"
1001 aros_kernel_ar_flags="-cr"
1002 aros_target_strip_flags="-x"
1003 target_tool_prefix="i686-apple-darwin10-"
1004 target_tool_flags="-m32"
1007 aros_target_cpu="x86_64"
1008 aros_object_format="elf_x86_64"
1009 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1010 aros_macosx_version="10.6"
1011 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1012 aros_kernel_cflags="-m64"
1013 aros_kernel_ldflags="-m64"
1014 aros_target_cflags="-mcmodel=large"
1015 aros_default_wbdepth=8
1017 aros_kernel_ar_flags="-cr"
1019 aros_kernel_ranlib="ranlib"
1020 target_tool_prefix="i686-apple-darwin10-"
1023 aros_target_cpu="ppc"
1024 aros_object_format="elf32ppc"
1025 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1026 aros_kernel_ldflags=""
1027 aros_macosx_version="10.0"
1028 aros_default_wbdepth=8
1029 gcc_target_cpu="ppc"
1031 aros_kernel_ar_flags="-cr"
1032 aros_kernel_ld="ld -arch ppc"
1033 aros_kernel_ranlib="ranlib -arch ppc"
1034 target_tool_prefix="powerpc-apple-darwin10-"
1037 aros_ios_platform="iPhoneOS"
1038 aros_target_cpu="arm"
1039 aros_object_format="armelf_linux_eabi"
1040 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1041 aros_config_cflags="$aros_config_cflags -marm -march=armv6 -mfpu=vfp -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
1042 aros_config_aflags="$aros_config_aflags -marm -march=armv6 -mfpu=vfp -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
1043 aros_arch_libs="-laeabi"
1044 aros_default_wbdepth=8
1045 gcc_target_cpu="arm"
1047 aros_kernel_ar_flags="-cr"
1048 aros_kernel_ld="ld -arch arm"
1049 aros_kernel_ranlib="ranlib -arch arm"
1050 target_tool_prefix="arm-apple-darwin10-"
1051 export PATH="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/usr/bin:$PATH"
1054 AC_MSG_ERROR("Unsupported target CPU for darwin hosted flavour -- $target_cpu")
1057 case "$aros_target_variant" in
1059 aros_default_wbwidth=320
1060 aros_default_wbheight=480
1061 aros_ios_sdk="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/SDKs/$aros_ios_platform$aros_ios_sdk.sdk"
1062 target_tool_flags="$target_tool_flags -isysroot $aros_ios_sdk"
1063 aros_kernel_includes="-isystem $aros_ios_sdk/usr/include"
1065 # This is here because it may depend on iOS or SDK version
1066 aros_kernel_cflags="$aros_kernel_cflags -miphoneos-version-min=$aros_ios_version"
1067 aros_kernel_ldflags="$aros_kernel_ldflags -miphoneos-version-min=$aros_ios_version"
1068 aros_kernel_objcflags="-fobjc-abi-version=2 -fobjc-legacy-dispatch"
1071 aros_kernel_cflags="$aros_kernel_cflags -mmacosx-version-min=$aros_macosx_version"
1072 aros_kernel_ldflags="$aros_kernel_ldflags -mmacosx-version-min=$aros_macosx_version"
1078 aros_target_arch="dragonfly"
1079 aros_target_family="unix"
1080 aros_flavour="emulation"
1081 case "$target_cpu" in
1083 aros_target_cpu="i386"
1084 aros_object_format="elf_i386"
1085 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__DragonFly__"
1088 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1089 aros_target_cpu="x86_64"
1090 aros_object_format="elf_x86_64"
1091 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__DragonFly__"
1094 AC_MSG_ERROR("Unknown CPU for DragonFly -- $target_cpu")
1100 aros_target_arch="netbsd"
1101 aros_target_family="unix"
1102 case "$target_cpu" in
1104 aros_target_cpu="m68k"
1105 aros_object_format="m68kelf"
1106 aros_flavour="emulcompat"
1107 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__NetBSD__"
1108 gcc_target_cpu="mc68000"
1111 aros_target_cpu="i386"
1112 aros_object_format="elf_i386"
1113 aros_flavour="emulation"
1114 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__NetBSD__"
1115 aros_default_wbdepth=8
1116 gcc_target_cpu="i386"
1119 AC_MSG_ERROR("Unknown CPU for NetBSD -- $target_cpu")
1122 aros_target_genmap="-Wl,-M -Xlinker >"
1123 aros_flavour="emulation"
1124 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1128 aros_target_arch="openbsd"
1129 aros_target_family="unix"
1130 case "$target_cpu" in
1132 aros_target_cpu="i386"
1133 aros_object_format="elf_i386"
1134 aros_flavour="emulation"
1135 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__OpenBSD__"
1136 gcc_target_cpu="i386"
1139 AC_MSG_ERROR("Unknown CPU for OpenBSD -- $target_cpu")
1142 aros_target_genmap="-Wl,-M -Xlinker >"
1143 aros_target_nm_flags="-u"
1144 aros_flavour="emulation"
1148 aros_target_arch="solaris"
1149 aros_target_family="unix"
1150 case "$target_cpu" in
1152 aros_target_cpu="i386"
1153 aros_object_format="elf_i386"
1154 aros_flavour="emulation"
1155 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__Solaris__"
1156 aros_default_wbdepth=8
1157 gcc_target_cpu="i386"
1160 aros_target_cpu="sparc"
1161 aros_object_format="elf_sparc"
1162 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dsparc -D__Solaris__"
1163 gcc_target_cpu="sparc"
1166 AC_MSG_ERROR("Unknown CPU for Solaris -- $target_cpu")
1169 aros_config_cflags="$aros_config_cflags -D$aros_target_cpu"
1170 aros_flavour="emulation"
1174 aros_target_arch="morphos"
1175 aros_shared_default="no"
1176 aros_target_cpu="ppc"
1177 aros_object_format="elf_ppc"
1178 aros_flavour="nativecompat"
1179 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1180 gcc_target_cpu="ppc"
1184 aros_target_arch="sam440"
1185 aros_shared_default="no"
1186 aros_target_cpu="ppc"
1187 aros_object_format="elf32ppc"
1188 aros_flavour="ppcnative"
1189 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1190 aros_kernel_ldflags=""
1191 aros_default_wbwidth=1024
1192 aros_default_wbheight=768
1193 aros_default_wbdepth=24
1194 aros_config_cflags="$aros_config_cflags -mcpu=440fp -mno-toc -fno-asynchronous-unwind-tables"
1195 gcc_target_cpu="powerpc"
1199 aros_target_arch="efika"
1200 aros_shared_default="no"
1201 aros_target_cpu="arm"
1202 aros_object_format="armelf_linux_eabi"
1203 aros_flavour="standalone"
1204 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1205 aros_kernel_ldflags=""
1206 aros_default_wbwidth=1024
1207 aros_default_wbheight=600
1208 aros_arch_libs="-laeabi"
1209 aros_config_cflags="$aros_config_cflags -marm -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing"
1210 aros_config_aflags="$aros_config_aflags -marm -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3 -mfloat-abi=hard -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing"
1214 aros_target_arch="chrp"
1215 aros_shared_default="no"
1216 aros_target_cpu="ppc"
1217 aros_object_format="elf32ppc"
1218 aros_flavour="ppcnative"
1219 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1220 aros_kernel_ldflags=""
1221 aros_default_wbwidth=640
1222 aros_default_wbheight=480
1223 aros_config_cflags="$aros_config_cflags -mno-toc -fno-asynchronous-unwind-tables"
1224 gcc_target_cpu="powerpc"
1225 case "$aros_target_variant" in
1227 aros_config_cflags="$aros_config_cflags -DBIG_ENDIAN_OHCI=1 -mcpu=603e"
1233 aros_target_arch="amiga"
1234 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D_AMIGA -DAMIGA"
1235 aros_shared_default="no"
1237 case "$target_cpu" in
1239 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")
1241 aros_target_cpu="m68k"
1242 aros_object_format="m68kelf"
1243 aros_flavour="standcompat"
1244 gcc_target_cpu="m68000"
1245 aros_config_cflags="$aros_config_cflags -fno-strict-aliasing -ffreestanding -fomit-frame-pointer -${gcc_target_cpu} -fbuiltin -Wno-volatile-register-var -Os"
1246 aros_config_aflags="$aros_config_aflags -${gcc_target_cpu}"
1247 target_tool_prefix="m68k-elf-"
1248 # Needed to get the correct multilib
1249 aros_config_ldflags="-${gcc_target_cpu}"
1250 aros_shared_ldflags="-${gcc_target_cpu}"
1251 aros_kernel_ldflags="-${gcc_target_cpu}"
1252 aros_target_nostdlib_ldflags="-${gcc_target_cpu}"
1253 aros_target_strip_flags="-R.comment --strip-debug"
1254 aros_default_wbwidth=640
1255 aros_default_wbheight=256
1256 aros_default_wbdepth=2
1260 aros_flavour="native"
1261 gcc_target_cpu="ppc"
1264 AC_MSG_ERROR("Unknown CPU for Amiga $target_cpu")
1270 aros_target_arch="mingw32"
1271 aros_shared_default="no"
1272 aros_flavour="emulation"
1273 aros_shared_cflags=""
1276 case "$target_cpu" in
1278 aros_target_cpu="i386"
1279 aros_object_format="elf_i386"
1280 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1281 aros_default_wbdepth=8
1282 gcc_target_cpu="i386"
1284 dnl Temporary hack, needed to get nightly build working
1285 aros_target_as="i386-aros-as"
1286 aros_target_ar="i386-aros-ar"
1287 aros_target_ranlib="i386-aros-ranlib"
1288 aros_target_nm="i386-aros-nm"
1289 aros_target_strip="i386-aros-strip"
1290 aros_target_objcopy="i386-aros-objcopy"
1291 aros_target_objdump="i386-aros-objdump"
1293 target_tool_prefix="i386-mingw32-"
1296 aros_target_cpu="x86_64"
1297 aros_object_format="elf_x86_64"
1298 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1299 aros_config_cflags="$aros_config_cflags -fno-omit-frame-pointer"
1300 aros_default_wbdepth=8
1301 target_tool_prefix="x86_64-w64-mingw32-"
1304 aros_target_cpu="arm"
1305 aros_object_format="armelf_linux_eabi"
1306 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1307 aros_arch_libs="-laeabi"
1308 aros_default_wbdepth=8
1309 gcc_target_cpu="arm"
1310 target_tool_prefix="arm-mingw32ce-"
1311 aros_default_wbwidth=160
1312 aros_default_wbheight=160
1315 AC_MSG_ERROR("Unknown CPU for Mingw32 -- $target_cpu")
1318 if test $host_os = "cygwin"; then
1319 aros_kernel_cflags="-mno-cygwin"
1323 aros_target_arch="pp"
1324 aros_shared_default="no"
1325 case "$target_cpu" in
1327 aros_target_cpu="m68k"
1328 aros_object_format="m68kelf"
1329 aros_flavour="palmnative"
1330 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1331 aros_default_wbwidth=160
1332 aros_default_wbheight=160
1333 aros_default_wbdepth=1
1334 aros_target_ar_flags="cru"
1335 aros_compiler_libs="-lgcc1"
1336 aros_shared_default=no
1337 aros_shared_cflags="-fpic"
1338 aros_shared_aflags=""
1339 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1340 aros_kernel_ldflags="-Wl,-rpath,./lib"
1341 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug -mc68000 -Wa,-mc68000"
1342 aros_debug_aflags=""
1343 aros_debug_ldflags="$aros_symbols_debug"
1344 aros_mungwall_debug="0"
1345 aros_modules_debug="0"
1346 gcc_target_cpu="mc68000"
1347 ignore_undefined_symbols="-ius"
1350 AC_MSG_ERROR("Unknown CPU for PalmPilot -- $target_cpu")
1356 aros_target_arch="mac"
1357 aros_shared_default="no"
1358 case "$target_cpu" in
1360 aros_target_cpu="m68k"
1361 aros_object_format="m68kelf"
1362 aros_flavour="mac68knative"
1363 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1364 aros_default_wbwidth=512
1365 aros_default_wbheight=384
1366 aros_default_wbdepth=8
1367 aros_target_ar_flags="cru"
1368 aros_compiler_libs="-lgcc1"
1369 aros_shared_default=no
1370 aros_shared_cflags="-fpic"
1371 aros_shared_aflags=""
1372 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1373 aros_kernel_ldflags="-Wl,-rpath,./lib"
1374 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug -mc68000"
1375 aros_debug_aflags=""
1376 aros_debug_ldflags="$aros_symbols_debug"
1377 aros_mungwall_debug="0"
1378 aros_modules_debug="0"
1379 gcc_target_cpu="mc68000"
1380 ignore_undefined_symbols="-ius"
1383 AC_MSG_ERROR("Unknown CPU for Mac68k -- $target_cpu")
1389 AC_MSG_ERROR([Unsupported target architecture $target])
1393 # Some formats need custom ELF specs.
1394 # For example for x86_64 it is needed in order for -m32 switch to work correctly.
1395 if test -f $SRCDIR/config/${aros_object_format}-specs.in; then
1396 elf_specs_in=config/${aros_object_format}-specs.in
1398 elf_specs_in=config/elf-specs.in
1401 #-----------------------------------------------------------------------------
1402 AC_MSG_CHECKING([where to install or search for cross tools binaries])
1403 AC_ARG_WITH(crosstools,AC_HELP_STRING([--with-crosstools=DIR],[Where to install or search for cross tools binaries]),with_crosstools=$withval,with_crosstools="default")
1404 if test "$with_crosstools" = "default"; then
1405 AROS_CROSSTOOLSDIR="$AROS_BUILDDIR_UNIX/bin/$aros_host_arch-$aros_host_cpu/tools/crosstools"
1407 AROS_CROSSTOOLSDIR="$with_crosstools"
1409 AC_MSG_RESULT($AROS_CROSSTOOLSDIR)
1411 if test "$crosstools" != "no" -o "$with_crosstools" != "default"; then
1413 dnl --with-crosstools with no --enable-crosstools implies --with-aros-gcc with no version specified
1414 dnl The same is about --enable-crosstools
1417 PATH=$AROS_CROSSTOOLSDIR:$PATH
1420 AC_MSG_CHECKING([what specific AROS gcc version to use])
1421 AC_ARG_WITH(aros-gcc,AC_HELP_STRING([--with-aros-gcc=VERSION],[Use aros-gcc-VERSION for building AROS]),aros_gcc_version="$withval",aros_gcc_version="$use_aros_gcc")
1422 case "$aros_gcc_version" in
1424 aros_gcc_version="default"
1427 aros_gcc_version="none"
1430 AC_MSG_RESULT($aros_gcc_version)
1432 if test "$aros_gcc_version" != "none"; then
1434 dnl Here we either build own crosstools, or use preinstalled ones
1435 dnl Check for specific version requested, and append suffix if needed
1437 if test "$aros_gcc_version" != "default"; then
1438 aros_target_cc="$aros_target_cpu-aros-gcc-$aros_gcc_version"
1439 aros_target_cxx="$aros_target_cpu-aros-g++-$aros_gcc_version"
1441 aros_target_cc="$aros_target_cpu-aros-gcc"
1442 aros_target_cxx="$aros_target_cpu-aros-g++"
1445 aros_target_ld="$aros_target_cpu-aros-ld"
1446 aros_target_as="$aros_target_cpu-aros-as"
1447 aros_target_ar="$aros_target_cpu-aros-ar"
1448 aros_target_ranlib="$aros_target_cpu-aros-ranlib"
1449 aros_target_nm="$aros_target_cpu-aros-nm"
1450 aros_target_strip="$aros_target_cpu-aros-strip"
1451 aros_target_objcopy="$aros_target_cpu-aros-objcopy"
1452 aros_target_objdump="$aros_target_cpu-aros-objdump"
1455 # Some compilers (ppc-elf-gcc is known to) have CPU defines in specs
1456 # Since we override specs, we may need to put these defines there
1457 if test "$gcc_target_cpu" != ""; then
1458 gcc_target_cpu="-D__${gcc_target_cpu}__"
1461 AC_MSG_CHECKING([where to download sourcecode for external ports])
1462 AC_ARG_WITH(portssources,AC_HELP_STRING([--with-portssources=DIR],[Where to download sourcecode for external ports]),with_portssrcdir=$withval,with_portssrcdir="default")
1463 if test "$with_portssrcdir" = "default"; then
1464 AROS_PORTSSRCDIR="$AROS_BUILDDIR_UNIX/bin/Sources"
1466 AROS_PORTSSRCDIR="$with_portssrcdir"
1468 AC_MSG_RESULT($AROS_PORTSSRCDIR)
1470 AC_MSG_CHECKING([which bootloader to use])
1471 AC_ARG_WITH(bootloader,AC_HELP_STRING([--with-bootloader=NAME],[Use a specific bootloader]),target_bootloader=$withval,target_bootloader=$target_bootloader)
1472 if test "$target_bootloader" = "none"; then
1473 aros_target_bootloader=""
1475 aros_target_bootloader="$target_bootloader"
1477 AC_MSG_RESULT($target_bootloader)
1479 AC_MSG_CHECKING([which icon-set to use])
1480 AC_ARG_WITH(iconset,AC_HELP_STRING([--with-iconset=NAME],[Use a specific Icon-set (default=Gorilla).]),target_iconset=$withval,target_iconset="default")
1481 if test "$target_iconset" = "default"; then
1482 aros_target_iconset="Gorilla"
1483 target_iconset="default (Gorilla)"
1485 aros_target_iconset="$target_iconset"
1487 AC_MSG_RESULT($target_iconset)
1489 AC_MSG_CHECKING([which GUI Theme to use])
1490 AC_ARG_WITH(theme,AC_HELP_STRING([--with-theme=NAME],[Use a specific GUI Theme]),target_guitheme=$withval,target_guitheme="default")
1491 if test "$target_guitheme" = "default"; then
1492 aros_target_guitheme="Ice"
1494 aros_target_guitheme="$target_guitheme"
1496 AC_MSG_RESULT($aros_target_guitheme)
1498 # Find out if we are cross-compiling (i.e. if we can't use the host compiler
1501 if test "$aros_host_cpu" != "$aros_target_cpu" ; then
1505 dnl Native x86-64 Linux toolchain can also produce i386 binaries, given -m32 flag.
1506 if test "$aros_host_cpu" == "x86_64" ; then
1507 if test "$aros_target_cpu" == "i386" ; then
1508 if test "$aros_target_arch" != "mingw32"; then
1514 dnl Enforce cross-compile if we are on Darwin, but our target is not Darwin.
1515 if test "$aros_host_arch" == "darwin" ; then
1516 if test "$aros_target_arch" != "darwin" ; then
1521 dnl The same for MinGW
1522 if test "$aros_host_arch" == "mingw32" ; then
1523 if test "$aros_target_arch" != "mingw32" ; then
1528 # I want to have this information in configure output, although it might be
1529 # misleading, e.g. for darwin hosted you cannot compile target code without a
1530 # cross compiler, but here it says no.
1532 # Note: it says 'yes' only if bootstrap ("kernel") is cross-compiled.
1533 # Target code is a little bit different thing.
1535 echo "checking wether we are (AROS style) cross compiling... $cross_compiling"
1537 # Set prefix for target compiler etc. if we're cross-compiling
1538 # (should possibly be earlier but needs to be after AC_PROG_CC)
1539 if test "$cross_compiling" = "yes" ; then
1541 if test "x-$aros_flavour" = "x-standalone" -o "x-$aros_flavour" = "x-standcompat" ; then
1542 if test "$aros_gcc_version" != "none"; then
1544 dnl If we are cross-compiling a native port with AROS compiler, we can reuse
1545 dnl AROS compiler for bootstrap ("kernel"). This eliminates a need for one more
1548 dnl Use target toolchain as bootstrap one.
1549 target_tool_prefix=${target_cpu}-aros-
1550 target_tool_version=$aros_gcc_version
1551 use_kernel_cc_wrapper=yes
1553 dnl Cancel explicit AROS tools assignment. This will cause configure
1554 dnl to select the same tools for bootstrap and AROS.
1562 aros_target_objcopy=
1563 aros_target_objdump=
1567 CC=${target_tool_prefix}gcc
1568 dnl CPP is needed for AC_CHECK_HEADER to work correctly
1569 CPP=${target_tool_prefix}cpp
1570 if test "$target_tool_version" != "default"; then
1571 CC="$CC-$target_tool_version"
1572 CPP="$CC-$target_tool_version"
1574 if test "$crosstools" != "yes" ; then
1575 AC_PATH_PROG(CC,$CC)
1576 AROS_REQUIRED(gcc,$CC)
1578 CC=$AROS_CROSSTOOLSDIR/$CC
1581 CC="$CC $target_tool_flags"
1583 #-----------------------------------------------------------------------------
1585 # Disable pointer-signedness warnings if the compiler recognises the option
1587 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
1588 save_cflags="$CFLAGS"
1589 if test "$crosstools" != "yes" ; then
1590 CFLAGS="$CFLAGS -Wno-pointer-sign"
1591 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
1593 # we do know it is supported for the smallest version of gcc we are going to build
1594 # we assume it's also supported by later versions
1595 use_no_sign_warning=yes
1597 AC_MSG_RESULT($use_no_sign_warning)
1598 if test "x-$use_no_sign_warning" = "x-yes" ; then
1599 aros_config_cflags="$aros_config_cflags -Wno-pointer-sign"
1601 CFLAGS="$save_cflags"
1603 #-----------------------------------------------------------------------------
1605 # Find all the tools we need to compile. This could be cross-compiling
1606 # though! If that is the case we use the GNU form of the target and
1607 # simply add this to the front of the binary name. This is rather simple,
1608 # but it should work under most circumstances.
1610 # The default tools are to use the same as the host, but only if the
1611 # host and target CPU are the same. With GCC this is normally enough.
1615 aros_shared_ld="$aros_host_ld"
1617 aros_target_mkdep="$aros_host_mkdep"
1618 aros_target_incl_def="$aros_host_incl"
1620 aros_kernel_cc="$CC"
1622 # The default tools executables to be linked to.
1623 if test "$rescomp" != ""; then
1624 if test "$cross_compiling" = "yes" ; then
1625 rescomp=${target_tool_prefix}${rescomp}
1627 AC_PATH_PROG(aros_kernel_rescomp,$rescomp)
1628 AROS_REQUIRED($rescomp,$aros_kernel_rescomp)
1631 if test "$crosstools" != "yes"; then
1632 AROS_TOOL_TARGET(aros_kernel_ld,ld,$aros_kernel_ld)
1633 AROS_REQUIRED(ld,$aros_kernel_ld)
1634 AROS_TOOL_TARGET(aros_kernel_ar,ar,$aros_kernel_ar)
1635 AROS_REQUIRED(ld,$aros_kernel_ar)
1636 AROS_TOOL_TARGET(aros_kernel_ranlib,ranlib,$aros_kernel_ranlib)
1637 AROS_REQUIRED(ld,$aros_kernel_ranlib)
1639 dnl For non-ELF hosts we additionally have to look up ELF toolchain for AROS binaries
1640 dnl It can be either AROS toolchain selected earlier or generic ELF toolchain we select here.
1641 if test "$target_tool_prefix" != "${target_cpu}-elf-" -a "$target_tool_prefix" != "${target_cpu}-aros-" ; then
1642 target_tool_prefix=${target_cpu}-elf-
1643 if test "$aros_target_cc" == ""; then
1644 aros_target_cc="${target_tool_prefix}gcc"
1646 if test "$aros_target_ld" == ""; then
1647 aros_target_ld="${target_tool_prefix}ld"
1650 AROS_TOOL_TARGET(aros_target_as_ln,as,$aros_target_as)
1651 AROS_REQUIRED(as,$aros_target_as_ln)
1652 AROS_TOOL_TARGET(aros_target_ar_ln,ar,$aros_target_ar)
1653 AROS_REQUIRED(ar,$aros_target_ar_ln)
1654 AROS_TOOL_TARGET(aros_target_nm_ln,nm,$aros_target_nm)
1655 AROS_REQUIRED(nm,$aros_target_nm_ln)
1656 AROS_TOOL_TARGET(aros_target_objcopy_ln,objcopy,$aros_target_objcopy)
1657 AROS_REQUIRED(objcopy,$aros_target_objcopy_ln)
1658 AROS_TOOL_TARGET(aros_target_objdump_ln,objdump,$aros_target_objdump)
1659 AROS_REQUIRED(objdump,$aros_target_objdump_ln)
1660 AROS_TOOL_TARGET(aros_target_ranlib_ln,ranlib,$aros_target_ranlib)
1661 AROS_REQUIRED(ranlib,$aros_target_ranlib_ln)
1662 AROS_TOOL_TARGET(aros_target_strip_ln,strip,$aros_target_strip)
1663 AROS_REQUIRED(strip,$aros_target_strip_ln)
1664 if test "$aros_target_cxx" != ""; then
1665 AC_PATH_PROG(aros_target_cxx,$aros_target_cxx)
1666 AROS_REQUIRED(c++,$aros_target_cxx)
1669 aros_target_cc=$AROS_CROSSTOOLSDIR/$aros_target_cc
1670 aros_target_cxx=$AROS_CROSSTOOLSDIR/$aros_target_cxx
1671 aros_target_as_ln=$AROS_CROSSTOOLSDIR/$aros_target_as
1672 aros_target_ar_ln=$AROS_CROSSTOOLSDIR/$aros_target_ar
1673 aros_target_nm_ln=$AROS_CROSSTOOLSDIR/$aros_target_nm
1674 aros_target_objcopy_ln=$AROS_CROSSTOOLSDIR/$aros_target_objcopy
1675 aros_target_objdump_ln=$AROS_CROSSTOOLSDIR/$aros_target_objdump
1676 aros_target_ranlib_ln=$AROS_CROSSTOOLSDIR/$aros_target_ranlib
1677 aros_target_strip_ln=$AROS_CROSSTOOLSDIR/$aros_target_strip
1679 dnl FIXME: This works only for native ports. Hosted ports can't be compiled this way.
1680 aros_kernel_ar=$AROS_CROSSTOOLSDIR/$aros_target_ar
1681 aros_kernel_ld=$AROS_CROSSTOOLSDIR/$aros_target_ld
1682 aros_kernel_ranlib=$AROS_CROSSTOOLSDIR/$aros_target_ranlib
1684 crosstools_target=tools-crosstools
1687 aros_kernel_ar="$aros_kernel_ar $aros_kernel_ar_flags"
1689 orig_target_cc=$aros_kernel_cc
1690 orig_target_ld=$aros_kernel_ld
1692 if test "$crosstools" != "yes"; then
1693 if test "$aros_target_cc" != ""; then
1694 AC_PATH_PROG(aros_target_cc,$aros_target_cc)
1695 AROS_REQUIRED(gcc,$aros_target_cc)
1696 orig_target_cc=$aros_target_cc
1698 if test "$aros_target_ld" != ""; then
1699 AC_PATH_PROG(aros_target_ld,$aros_target_ld)
1700 AROS_REQUIRED(ld,$aros_target_ld)
1701 orig_target_ld=$aros_target_ld
1704 orig_target_cc=$aros_target_cc
1705 orig_target_ld=$aros_target_ld
1708 # Build crosstools if we have no C++ - temporary thing
1709 if test "$aros_target_cxx" = "" -a "$crosstools" != "yes"; then
1710 crosstools_cxx_target=tools-crosstools
1713 aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/config"
1714 aros_targetcfg_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/config"
1715 aros_inc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/include/aros"
1716 aros_gendir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen"
1717 aros_geninc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/include/aros"
1718 aros_tools_dir="bin/${aros_host_arch}-${aros_host_cpu}/tools"
1719 aros_scripts_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/scripts"
1721 # aros_cc_pre is a variable that is added to the front of the compiler name
1722 # in the generated aros-gcc shell script. We need this to enable the cache
1723 # to work across cleaned builds. Also, support DISTCC using the correct
1724 # environment variable.
1727 if test "x${DISTCC}" != "x" ; then
1728 if test "x${CCACHE}" != "x" ; then
1729 aros_cc_pre="env CCACHE_PREFIX=${DISTCC} ${CCACHE} "
1731 aros_cc_pre="${DISTCC} "
1734 if test "x${CCACHE}" != "x" ; then
1735 aros_cc_pre="${CCACHE} "
1739 prefix="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros"
1741 AC_SUBST(aros_target_nostdinc_cflags,-nostdinc)
1742 AC_SUBST(aros_target_nostartup_ldflags,-nostartfiles)
1743 AC_SUBST(aros_target_nix_ldflags,-nix)
1744 AC_SUBST(aros_target_detach_ldflags,-detach)
1745 AC_SUBST(aros_target_nostdlib_ldflags,-nostdlib)
1748 if test "$crosstools" != "yes"; then
1749 if test "$GCC" = "yes"; then
1750 aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-`
1753 # We do not know which gcc version we are going to build and what we need to know
1754 # here is different for different versions so this will be set later during the
1755 # build of crosstools.
1756 aros_target_cc_path=@aros_target_cc_path@
1758 aros_target_cc="${prefix}-gcc"
1759 aros_target_as="${prefix}-as"
1760 aros_target_ld="${prefix}-ld"
1761 aros_target_ar="${prefix}-ar $aros_target_ar_flags"
1762 aros_target_objcopy=${prefix}-objcopy
1763 aros_target_objdump=${prefix}-objdump
1764 aros_target_ranlib="${prefix}-ranlib $aros_target_ranlib_flags"
1765 aros_target_nm="${prefix}-nm $aros_target_nm_flags"
1766 aros_target_strip=${prefix}-strip
1767 aros_plain_nm="${prefix}-nm"
1768 aros_plain_ar="${prefix}-ar"
1770 # Find the system include path. We can suggest that an alternative is
1771 # used if we don't get it correct. The default is to use /usr/include.
1772 # Which is set in the aros_target_incl_def variable.
1774 AC_ARG_ENABLE(includes,
1775 AC_HELP_STRING([--enable-includes=dir],[Alternative system include directory]),
1776 [aros_target_incl=$enable_includes], [aros_target_incl=$aros_target_incl_def])
1778 if test "$aros_kernel_includes" = ""; then
1779 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
1780 # FIXME: for cross-compiling this should point to another location
1781 aros_kernel_includes="-isystem $aros_target_incl"
1785 if test "$aros_kernel_includes" != "" ; then
1786 dnl find out about the kernel cc's include path
1787 AC_MSG_CHECKING([for the kernel compiler's include path])
1788 if test "$aros_kernel_cc_includes" = "" ; then
1789 # Try to guess where the directory is.
1790 aros_kernel_cc_includes=`dirname \`${aros_kernel_cc} ${aros_kernel_cflags} -print-libgcc-file-name\``/include
1791 if test -d $aros_kernel_cc_includes; then
1792 # Check if there is also an include-fixed directory and add it
1793 # to kernel compiler's include path as it may contain some of
1794 # the headers we need.
1795 if test -d "$aros_kernel_cc_includes"-fixed; then
1796 aros_kernel_cc_includes+=" -isystem $aros_kernel_cc_includes"-fixed
1799 # The directory doesn't exist, we need to do some more work.
1800 aros_kernel_cc_includes=${PWD}/${aros_gendir}/cc_include
1802 # These are the headers we're looking for.
1803 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
1804 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
1808 for h in $headers; do
1809 # Which other headers are needed by each of the above?
1810 deps=$(echo "#include <$h>" | \
1811 $aros_kernel_cc -E -M - 2>/dev/null | \
1812 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
1814 # Copy all the needed headers to a directory beneath gendir.
1817 dir=${aros_kernel_cc_includes}$(echo $(dirname $d) | \
1818 sed -n "s,^.*/include\(/.*\),\1,p")
1819 ! test -d $dir && mkdir -p $dir
1820 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
1825 AC_MSG_RESULT($aros_kernel_cc_includes)
1826 # Adding -nostdinc to kernel includes as they are always used together.
1827 aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes"
1830 if test "$crosstools" != "yes"; then
1831 dnl find out about the target cc's include path
1832 AC_MSG_CHECKING([for the target compiler's include path])
1833 if test "$aros_target_cc_includes" = "" ; then
1834 #try to guess where the directory is
1835 aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include
1836 if ! test -d $aros_target_cc_includes; then
1837 #the directory doesn't exist, we need to do some more work
1838 aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include
1840 #these are the headers we're looking for
1841 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
1842 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
1846 for h in $headers; do
1847 #which other headers each of the above headers needs?
1848 deps=$(echo "#include <$h>" | \
1849 $orig_target_cc -E -M - 2>/dev/null | \
1850 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
1852 #copy all the needed headers to a directory beneath gendir
1855 dir=${aros_target_cc_includes}$(echo $(dirname $d) | \
1856 sed -n "s,^.*/include\(/.*\),\1,p")
1857 ! test -d $dir && mkdir -p $dir
1858 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
1863 AC_MSG_RESULT($aros_target_cc_includes)
1865 # We do not know which gcc version we are going to build and what we need to know
1866 # here is different for different versions so this will be set later during the
1867 # build of crosstools.
1868 aros_target_cc_includes=@aros_target_cc_includes@
1872 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
1873 # On GCC >= 4.0 -iquote should be used
1877 save_cflags="$CFLAGS"
1879 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1880 if test "x-$crosstools" != "x-yes"; then
1881 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1883 # we do know it is supported for the smallest version of gcc we are going to build
1884 # we assume it's also supported by later versions
1887 AC_MSG_RESULT($has_iquote)
1888 if test "x-$has_iquote" = "x-yes" ; then
1889 host_cflags_iquote=-iquote
1890 host_cflags_iquote_end=
1892 host_cflags_iquote=-I
1893 host_cflags_iquote_end=-I-
1895 kernel_cflags_iquote=$host_cflags_iquote
1896 kernel_cflags_iquote_end=$host_cflags_iquote_end
1897 if test "x-$cross_compiling" = "x-yes"; then
1898 CC="$aros_kernel_cc"
1899 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
1900 if test "x-$crosstools" != "x-yes"; then
1901 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
1903 # we do know it is supported for the smallest version of gcc we are going to build
1904 # we assume it's also supported by later versions
1905 use_no_stack_protector=yes
1907 AC_MSG_RESULT($use_no_stack_protector)
1908 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1909 if test "x-$crosstools" != "x-yes"; then
1910 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1912 # we do know it is supported for the smallest version of gcc we are going to build
1913 # we assume it's also supported by later versions
1916 AC_MSG_RESULT($has_iquote)
1917 if test "x-$has_iquote" = "x-yes" ; then
1918 kernel_cflags_iquote=-iquote
1919 kernel_cflags_iquote_end=
1921 kernel_cflags_iquote=-I
1922 kernel_cflags_iquote_end=-I-
1925 aros_cflags_iquote=$kernel_cflags_iquote
1926 aros_cflags_iquote_end=$kernel_cflags_iquote_end
1927 if test "$orig_target_cc" != "$aros_kernel_cc"; then
1928 CC="$orig_target_cc"
1929 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1930 if test "x-$crosstools" != "x-yes"; then
1931 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1933 # we do know it is supported for the smallest version of gcc we are going to build
1934 # we assume it's also supported by later versions
1937 AC_MSG_RESULT($has_iquote)
1938 if test "x-$has_iquote" = "x-yes" ; then
1939 aros_cflags_iquote=-iquote
1940 aros_cflags_iquote_end=
1942 aros_cflags_iquote=-I
1943 aros_cflags_iquote_end=-I-
1946 if test "x-$use_no_stack_protector" = "x-yes" ; then
1947 aros_kernel_cflags="$aros_kernel_cflags -fno-stack-protector"
1950 #-----------------------------------------------------------------------------
1952 # Check if we can explicitly choose older version of symbol hashing
1954 CFLAGS="save_cflags -Wl,--hash-style=sysv"
1955 CC="$aros_kernel_cc"
1956 AC_MSG_CHECKING([whether ${CC} accepts -Wl,--hash-style=sysv])
1957 AC_TRY_LINK(,, use_hash_style="yes", use_hash_style="no")
1958 AC_MSG_RESULT($use_hash_style)
1959 if test "x-$use_hash_style" = "x-yes" ; then
1960 aros_kernel_cflags="$aros_kernel_cflags -Wl,--hash-style=sysv"
1963 CFLAGS="$save_cflags"
1965 AC_SUBST(host_cflags_iquote)
1966 AC_SUBST(host_cflags_iquote_end)
1967 AC_SUBST(kernel_cflags_iquote)
1968 AC_SUBST(kernel_cflags_iquote_end)
1969 AC_SUBST(aros_cflags_iquote)
1970 AC_SUBST(aros_cflags_iquote_end)
1973 dnl Check if user specified --with-resolution=XRESxYRESxDEPTH
1974 AC_MSG_CHECKING([for default resolution of WBScreen])
1975 AC_ARG_WITH(resolution,AC_HELP_STRING([--with-resolution=XRESxYRESxDEPTH],[Default resolution of the initial WorkbenchScreen]),resolution=$withval,resolution=none)
1976 # We require an argument, so map --with/--without ("yes"/"no") to "none" specified
1977 if test "$resolution" = "yes" ; then
1980 if test "$resolution" = "no" ; then
1983 if test "$resolution" != "none" ; then
1984 aros_default_wbwidth=`echo $resolution | cut -d'x' -f1`
1985 aros_default_wbheight=`echo $resolution | cut -d'x' -f2`
1986 aros_default_wbdepth=`echo $resolution | cut -d'x' -f3`
1988 AC_MSG_RESULT($aros_default_wbwidth x $aros_default_wbheight x $aros_default_wbdepth)
1989 aros_cv_default_wbwidth=$aros_default_wbwidth
1990 aros_cv_default_wbheight=$aros_default_wbheight
1991 aros_cv_default_wbdepth=$aros_default_wbdepth
1993 dnl See if the user wants the serial debug output for native flavour
1994 AC_MSG_CHECKING([if serial debug is enabled])
1995 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)
1996 if test "$aros_serial_debug" = 0 ; then
1997 serial_debug_forced=""
1998 if test "$serial_debug" = "yes" ; then
2001 if test "$serial_debug" = "no" ; then
2005 serial_debug_forced="(forced)"
2006 serial_debug=$aros_serial_debug
2008 if test "$serial_debug" != "none" ; then
2009 aros_serial_debug=$serial_debug
2010 AC_MSG_RESULT($serial_debug_forced on port $serial_debug)
2015 dnl See if the user wants the palm debug output hack for palm native flavour
2016 AC_MSG_CHECKING([if palm debug hack is enabled])
2017 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")
2018 if test "$palm_debug_hack" = "yes" ; then
2019 aros_palm_debug_hack="1"
2021 AC_MSG_RESULT($palm_debug_hack)
2023 dnl See if the user wants the usb3.0 code
2024 AC_MSG_CHECKING([if usb3.0 code is enabled])
2025 AC_ARG_ENABLE(usb30_code,AC_HELP_STRING([--enable-usb30-code],[Enable usb3.0 code (default=no)]),usb30_code="yes",usb30_code="no")
2026 if test "$usb30_code" = "yes" ; then
2031 AC_MSG_RESULT($usb30_code)
2033 dnl See if the user wants nesting supervisor activated for unix flavour
2034 AC_MSG_CHECKING([if nesting supervisor support is enabled])
2035 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")
2036 if test "$nesting_supervisor" = "yes" ; then
2037 aros_nesting_supervisor="1"
2039 AC_MSG_RESULT($nesting_supervisor)
2041 dnl See if the user wants to disable MMU support
2042 dnl This can be overriden on per-target basis,
2043 dnl set $aros_enable_mmu to "yes" or "no" to do this
2044 if test "$aros_enable_mmu" = "" ; then
2045 AC_MSG_CHECKING([if MMU support is enabled])
2046 dnl Enabled by default
2047 AC_ARG_ENABLE(mmu,AC_HELP_STRING([--disable-mmu],[Disable MMU support (default=enabled)]),aros_enable_mmu=$enableval,aros_enable_mmu="yes")
2048 if test "$aros_enable_mmu" = "" ; then
2049 aros_enable_mmu="yes"
2051 AC_MSG_RESULT($aros_enable_mmu)
2053 if test "$aros_enable_mmu" = "no" ; then
2060 dnl things specifically required for hosted flavours
2061 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2063 if test "x-$need_dlopen" != "x-no" ; then
2064 dnl some kind of dynamic library access system is required for hostlib.resource
2065 AC_CHECK_FUNC(dlopen, have_dl="yes", have_dl="no")
2066 if test "x-$have_dl" = "x-no" ; then
2067 AC_CHECK_LIB(dl, dlopen, [have_dl="yes"
2068 aros_host_ldflags="$aros_host_ldflags -ldl"],
2071 if test "x-$have_dl" = "x-no" ; then
2072 AC_MSG_ERROR([dlopen() dynamic linker functions not available])
2078 AC_ARG_ENABLE(x11_hidd, AC_HELP_STRING([--enable-x11-hidd],
2079 [build X11 hidd for hosted (default=auto)]),
2080 x11_hidd="$enableval",
2081 x11_hidd="$need_x11")
2082 case "x-$x11_hidd" in
2083 x-yes|x-no|x-auto) ;;
2084 *) x11_hidd="$need_x11" ;;
2090 if test "x-$x11_hidd" != "x-no" ; then
2096 for path in $x_libraries
2098 x_cflags="$x_cflags -L$path"
2101 for path in $x_includes
2103 x_cflags="$x_cflags -I$path"
2106 if test "x-$no_x" = "x-yes" ; then
2109 if test "x-$x11_hidd" != "x-auto" ; then
2110 dnl and they explicitly asked for it, bail out
2111 AC_MSG_ERROR([X11 libs/headers not found, cannot build X11 hidd as requested])
2115 dnl found it, setup the metatarget
2116 x11_hidd_target=kernel-x11gfx-kobj
2119 dnl setup shared memory extensions
2120 AC_ARG_ENABLE(x11_shm, AC_HELP_STRING([--enable-x11-shm],
2121 [use X11 shared memory (default=auto)]),
2122 x11_hidd_shm="$enableval",
2123 x11_hidd_shm="auto")
2124 case "x-$x11_hidd_shm" in
2125 x-yes|x-no|x-auto) ;;
2126 *) x11_hidd_shm="auto" ;;
2132 if test "x-$x11_hidd_shm" != "x-no" ; then
2134 dnl system shm headers
2135 AC_CHECK_HEADERS(sys/ipc.h)
2136 AC_CHECK_HEADERS(sys/shm.h)
2139 if test "x-$ac_cv_header_sys_ipc_h" = "x-yes" -a "x-$ac_cv_header_sys_shm_h" = "x-yes" ; then
2141 dnl make sure X libs have shm functions
2142 save_cflags="$CFLAGS"
2143 CFLAGS="$CFLAGS $x_cflags"
2144 AC_CHECK_LIB(Xext, XShmQueryExtension, have_xshm=yes)
2145 CFLAGS="$save_cflags"
2149 dnl detection done, prepare output
2150 if test "x-$have_xshm" = "x-yes" ; then
2153 elif test "x-$x11_hidd_shm" = "x-yes" ; then
2154 dnl they explicitly asked for it, but we can't do it
2155 AC_MSG_ERROR([X11 has no support for shared memory, cannot enable it as requested])
2157 dnl otherwise just disable it
2162 dnl setup vidmode (fullscreen) extensions
2163 AC_ARG_ENABLE(x11_vidmode, AC_HELP_STRING([--enable-x11-vidmode],
2164 [use X11 vidmode extension (default=auto)]),
2165 x11_hidd_vidmode="$enableval",
2166 x11_hidd_vidmode="auto")
2167 case "x-$x11_hidd_vidmode" in
2168 x-yes|x-no|x-auto) ;;
2169 *) x11_hidd_vidmode="auto" ;;
2175 if test "x-$x11_hidd_vidmode" != "x-no" ; then
2177 dnl make sure X libs have vidmode functions
2178 save_cflags="$CFLAGS"
2179 CFLAGS="$CFLAGS $x_cflags"
2180 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, have_vidmode=yes)
2181 CFLAGS="$save_cflags"
2184 dnl detection done, prepare output
2185 if test "x-$have_vidmode" = "x-yes" ; then
2186 dnl we can do vidmode
2187 DO_VIDMODE_SUPPORT="1"
2188 elif test "x-$x11_hidd_vidmode" = "x-yes" ; then
2189 dnl they explicitly asked for it, but we can't do it
2190 AC_MSG_ERROR([X11 vidmode extension not available, cannot enable it as requested])
2192 dnl otherwise just disable it
2193 DO_VIDMODE_SUPPORT="0"
2197 aros_host_x11_includes=$x_includes
2198 aros_host_x11_libdirs=$x_libraries
2203 AC_ARG_ENABLE(sdl_hidd, AC_HELP_STRING([--enable-sdl-hidd],
2204 [build SDL hidd for hosted (default=auto)]),
2205 sdl_hidd="$enableval",
2207 case "x-$sdl_hidd" in
2208 x-yes|x-no|x-auto) ;;
2209 *) sdl_hidd="auto" ;;
2213 if test "x-$sdl_hidd" != "x-no" ; then
2216 AM_PATH_SDL([1.2.10], have_sdl="yes", have_sdl="no")
2218 if test "x-$have_sdl" != "x-yes" ; then
2221 if test "x-$sdl_hidd" != "x-auto" ; then
2222 dnl and they explicitly asked for it, bail out
2223 AC_MSG_ERROR([SDL libs/headers not found, cannot build SDL hidd as requested])
2227 dnl found it, set up the metatarget
2228 sdl_hidd_target=kernel-hidd-sdl
2229 aros_host_sdl_cflags=SDL_CFLAGS
2230 aros_host_sdl_libs=SDL_LIBS
2235 AC_CHECK_HEADER(sys/soundcard.h)
2236 if test "x-$ac_cv_header_sys_soundcard_h" = "x-yes" ; then
2237 oss_library_target=workbench-libs-oss-unix
2242 dnl See if the user wants dbus.library
2243 AC_MSG_CHECKING([if building of dbus.library is enabled])
2244 AC_ARG_ENABLE(dbus,AC_HELP_STRING([--enable-dbus],[Enable DBUS support via dbus.library (default=no)]),dbus="yes",dbus="no")
2245 if test "$dbus" = "yes" ; then
2247 DBUS_CFLAGS=`pkg-config --cflags dbus-1`
2248 DBUS_LIBFLAGS=`pkg-config --libs dbus-1`
2249 KERNEL_DBUS_KOBJ=kernel-dbus-kobj
2250 KERNEL_DBUS_INCLUDES=kernel-dbus-includes
2254 AC_MSG_RESULT($dbus)
2256 if test "$use_kernel_cc_wrapper" = "yes" ; then
2257 aros_kernel_cc="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-gcc"
2260 dnl --------------------------------------------------------------------
2261 dnl Configuration Output Section
2262 dnl --------------------------------------------------------------------
2267 AC_SUBST(aros_flavour)
2268 AC_SUBST(aros_flavour_uc)
2269 AC_SUBST(AROS_BUILDDIR)
2270 AC_SUBST(AROS_BUILDDIR_UNIX)
2272 AC_SUBST(AROS_CROSSTOOLSDIR)
2273 AC_SUBST(AROS_PORTSSRCDIR)
2275 # Compatability with other Amiga-like operation systems
2276 AC_SUBST(aros_amigaos_compliance)
2279 AC_SUBST(aros_cc_pre)
2280 AC_SUBST(aros_host_strip)
2281 AC_SUBST(aros_host_arch)
2282 AC_SUBST(aros_host_cpu)
2283 AC_SUBST(aros_host_cc)
2284 AC_SUBST(aros_host_ar)
2285 AC_SUBST(aros_host_ranlib)
2286 AC_SUBST(aros_host_ld)
2287 AC_SUBST(aros_host_make)
2288 AC_SUBST(aros_host_cflags)
2289 AC_SUBST(gnu89_inline)
2290 AC_SUBST(aros_host_ldflags)
2291 AC_SUBST(aros_host_debug)
2292 AC_SUBST(aros_host_mkdep)
2293 AC_SUBST(aros_host_mkargs)
2294 AC_SUBST(aros_host_exe_suffix)
2295 AC_SUBST(aros_host_lib_suffix)
2296 AC_SUBST(aros_tools_dir)
2297 AC_SUBST(aros_host_aclocal)
2298 AC_SUBST(aros_host_autoconf)
2299 AC_SUBST(aros_host_autoheader)
2300 AC_SUBST(aros_host_automake)
2304 AC_SUBST(aros_target_guitheme)
2305 AC_SUBST(aros_target_iconset)
2306 AC_SUBST(aros_target_bootloader)
2307 AC_SUBST(aros_target_arch)
2308 AC_SUBST(aros_target_family)
2309 AC_SUBST(aros_target_cpu)
2310 AC_SUBST(aros_target_variant)
2311 AC_SUBST(aros_target_suffix)
2312 AC_SUBST(aros_target_incl)
2313 AC_SUBST(aros_target_ar)
2314 AC_SUBST(aros_target_ranlib)
2315 AC_SUBST(aros_plain_nm)
2316 AC_SUBST(aros_plain_ar)
2317 AC_SUBST(aros_kernel_ar)
2318 AC_SUBST(aros_kernel_ranlib)
2319 AC_SUBST(orig_target_cc)
2320 AC_SUBST(aros_target_cc)
2321 AC_SUBST(aros_target_cxx)
2322 AC_SUBST(aros_kernel_cc)
2323 AC_SUBST(aros_target_as)
2324 AC_SUBST(orig_target_ld)
2325 AC_SUBST(aros_target_ld)
2326 AC_SUBST(aros_kernel_ld)
2327 AC_SUBST(aros_target_cc_includes)
2328 AC_SUBST(aros_target_cc_path)
2329 AC_SUBST(aros_target_objdump)
2330 AC_SUBST(aros_target_objcopy)
2331 AC_SUBST(aros_target_strip)
2332 AC_SUBST(aros_target_nm)
2333 AC_SUBST(aros_kernel_rescomp)
2334 AC_SUBST(aros_shared_default)
2335 AC_SUBST(aros_shared_ld)
2336 AC_SUBST(aros_object_format)
2337 AC_SUBST(aros_compiler_libs)
2338 AC_SUBST(aros_arch_libs)
2340 AC_SUBST(aros_config_cflags)
2341 AC_SUBST(aros_config_aflags)
2342 AC_SUBST(aros_config_ldflags)
2344 AC_SUBST(aros_shared_cflags)
2345 AC_SUBST(aros_shared_aflags)
2346 AC_SUBST(aros_shared_ldflags)
2347 AC_SUBST(aros_kernel_cflags)
2348 AC_SUBST(aros_kernel_includes)
2349 AC_SUBST(aros_kernel_objcflags)
2350 AC_SUBST(aros_kernel_ldflags)
2351 AC_SUBST(aros_target_cflags)
2352 AC_SUBST(aros_debug_cflags)
2353 AC_SUBST(aros_debug_aflags)
2354 AC_SUBST(aros_debug_ldflags)
2355 AC_SUBST(aros_target_genmap)
2356 AC_SUBST(aros_target_strip_flags)
2358 AC_SUBST(crosstools_target)
2359 AC_SUBST(crosstools_cxx_target)
2362 AC_SUBST(x11_hidd_target)
2363 AC_SUBST(sdl_hidd_target)
2364 AC_SUBST(pci_hidd_target)
2365 AC_SUBST(oss_library_target)
2367 AC_SUBST(aros_default_wbwidth)
2368 AC_SUBST(aros_default_wbheight)
2369 AC_SUBST(aros_default_wbdepth)
2370 AC_SUBST(DO_XSHM_SUPPORT)
2371 AC_SUBST(DO_VIDMODE_SUPPORT)
2373 AC_SUBST(aros_host_x11_includes)
2374 AC_SUBST(aros_host_x11_libdirs)
2375 AC_SUBST(aros_host_sdl_cflags)
2376 AC_SUBST(aros_host_sdl_libs)
2378 # Native version related
2379 AC_SUBST(aros_serial_debug)
2381 # Palm native version related
2382 AC_SUBST(aros_palm_debug_hack)
2385 AC_SUBST(aros_usb30_code)
2387 # Unix/Hosted version related
2388 AC_SUBST(aros_nesting_supervisor)
2391 AC_SUBST(aros_enable_mmu)
2394 AC_SUBST(aros_ios_platform)
2395 AC_SUBST(aros_ios_version)
2396 AC_SUBST(aros_ios_sdk)
2399 AC_SUBST(android_tool)
2400 AC_SUBST(aros_android_level)
2403 AC_SUBST(ENABLE_DBUS)
2404 AC_SUBST(DBUS_CFLAGS)
2405 AC_SUBST(DBUS_LIBFLAGS)
2406 AC_SUBST(KERNEL_DBUS_KOBJ)
2407 AC_SUBST(KERNEL_DBUS_INCLUDES)
2410 AC_SUBST(ENABLE_X11)
2413 AC_SUBST(aros_debug)
2414 AC_SUBST(aros_mungwall_debug)
2415 AC_SUBST(aros_stack_debug)
2416 AC_SUBST(aros_modules_debug)
2418 # Collect-aros stuff: "-ius" to ignore undefined symbols
2419 AC_SUBST(ignore_undefined_symbols)
2421 # C compiler related
2422 AC_SUBST(gcc_target_cpu)
2424 dnl Prepare for output, make up all the generated patches
2425 case "$aros_flavour" in
2426 emulation) aros_flavour_uc="AROS_FLAVOUR_EMULATION"
2427 aros_flavour="emulation" ;;
2428 emulcompat) aros_flavour_uc="(AROS_FLAVOUR_EMULATION|AROS_FLAVOUR_BINCOMPAT)"
2429 aros_flavour="emulation" ;;
2430 standalone) aros_flavour_uc="AROS_FLAVOUR_STANDALONE"
2431 aros_flavour="standalone";;
2432 standcompat) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2433 aros_flavour="standalone";;
2434 native) aros_flavour_uc="AROS_FLAVOUR_NATIVE"
2435 aros_flavour="native" ;;
2436 nativecompat) aros_flavour_uc="(AROS_FLAVOUR_NATIVE|AROS_FLAVOUR_BINCOMPAT)"
2437 aros_flavour="native" ;;
2438 linklib) aros_flavour_uc="AROS_FLAVOUR_LINKLIB"
2439 aros_flavour="linklib" ;;
2440 palmnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2441 aros_flavour="palmnative" ;;
2442 mac68knative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2443 aros_flavour="mac68knative" ;;
2444 ppcnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2445 aros_flavour="ppcnative" ;;
2448 if test ! -d ${aros_inc_dir} ; then
2449 ${MKDIR} ${aros_inc_dir}
2451 if test ! -d ${aros_geninc_dir} ; then
2452 ${MKDIR} ${aros_geninc_dir}
2454 if test ! -d ${aros_hostcfg_dir} ; then
2455 ${MKDIR} ${aros_hostcfg_dir}
2457 if test ! -d ${aros_targetcfg_dir} ; then
2458 ${MKDIR} ${aros_targetcfg_dir}
2460 if test ! -d ${aros_tools_dir} ; then
2461 ${MKDIR} ${aros_tools_dir}
2463 if test ! -d ${aros_scripts_dir} ; then
2464 ${MKDIR} ${aros_scripts_dir}
2467 AC_CONFIG_HEADERS(${aros_geninc_dir}/host-conf.h:config/host-conf.h.in)
2469 AC_CONFIG_COMMANDS([compiler_executable],
2471 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
2472 prefix3=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf
2476 chmod a+x ${prefix2}-gcc ${prefix2}-ld ${prefix3}-gcc
2478 ln -sf $aros_target_as_ln$aros_host_exe_suffix ${prefix2}-as$aros_host_exe_suffix
2479 ln -sf $aros_target_nm_ln$aros_host_exe_suffix ${prefix2}-nm$aros_host_exe_suffix
2480 ln -sf $aros_target_ar_ln$aros_host_exe_suffix ${prefix2}-ar$aros_host_exe_suffix
2481 ln -sf $aros_target_ranlib_ln$aros_host_exe_suffix ${prefix2}-ranlib$aros_host_exe_suffix
2482 ln -sf $aros_target_objcopy_ln$aros_host_exe_suffix ${prefix2}-objcopy$aros_host_exe_suffix
2483 ln -sf $aros_target_objdump_ln$aros_host_exe_suffix ${prefix2}-objdump$aros_host_exe_suffix
2484 ln -sf $aros_target_strip_ln$aros_host_exe_suffix ${prefix2}-strip$aros_host_exe_suffix
2486 ln -sf $aros_kernel_ld$aros_host_exe_suffix ${prefix3}-ld$aros_host_exe_suffix
2489 aros_host_exe_suffix=${aros_host_exe_suffix}
2490 aros_tools_dir=${aros_tools_dir}
2491 aros_target_cpu=${aros_target_cpu}
2492 aros_target_arch=${aros_target_arch}
2493 aros_target_suffix=${aros_target_suffix}
2494 aros_target_nm_ln=${aros_target_nm_ln}
2495 aros_target_as_ln=${aros_target_as_ln}
2496 aros_target_ar_ln=${aros_target_ar_ln}
2497 aros_target_ranlib_ln=${aros_target_ranlib_ln}
2498 aros_target_objdump_ln=${aros_target_objdump_ln}
2499 aros_target_objcopy_ln=${aros_target_objcopy_ln}
2500 aros_target_strip_ln=${aros_target_strip_ln}
2501 aros_kernel_ld=${aros_kernel_ld}
2504 AC_CONFIG_COMMANDS([genmf_executable],
2505 [chmod a+x ${aros_tools_dir}/genmf.py],
2506 [aros_tools_dir=${aros_tools_dir}]
2512 ${aros_inc_dir}/config.h:config/config.h.in
2513 ${aros_geninc_dir}/config.h:config/config.h.in
2514 ${aros_hostcfg_dir}/host.cfg:config/host.cfg.in
2515 ${aros_targetcfg_dir}/target.cfg:config/target.cfg.in
2517 ${aros_targetcfg_dir}/make.defaults:config/make.defaults.in
2518 ${aros_targetcfg_dir}/specs:config/specs.in
2519 ${aros_targetcfg_dir}/elf-specs:${elf_specs_in}
2520 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-gcc:scripts/aros-gcc.in
2521 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-gcc:scripts/elf-gcc.in
2522 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-ld:scripts/aros-ld.in
2523 ${aros_tools_dir}/genmf.py:tools/genmf/genmf.py
2524 tools/collect-aros/env.h
2525 ${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in
2530 dnl This is in order to not define SHARED_CFLAGS sometimes
2531 dnl We don't always do aros_shared_ar, aros_shared_cflags
2533 #XXX compatability...
2534 aros_shared_ar="$aros_shared_ld $aros_shared_ldflags -o"
2536 if test -n "$aros_shared_cflags" ; then
2537 echo "SHARED_CFLAGS := $aros_shared_cflags" >> ${aros_hostcfg_dir}/host.cfg
2538 echo "SHARED_AR := $aros_shared_ar" >> ${aros_hostcfg_dir}/host.cfg