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_toolchain_family=`cat ${srcdir}/config/toolchain_def`
27 default_gcc_version=`cat ${srcdir}/config/gcc_def`
28 exp_gcc_version=`cat ${srcdir}/config/gcc_exp`
29 default_binutils_version=`cat ${srcdir}/config/binutils_def`
30 exp_binutils_version=`cat ${srcdir}/config/binutils_exp`
31 default_grub2_version="2.02"
32 target_grub2_version=$default_grub2_version
34 # The AROS target is slightly different to the normal GNU style
35 # format. We don't have the middle part, and we reverse the order
36 # of the $(CPU) and $(OS) bits.
38 # Don't strip the version of the target yet, it might be
39 # useful on some systems.
41 AC_MSG_CHECKING([for AROS style target])
43 if test "$target" = "NONE" ; then
44 target=$host_os-$host_cpu
46 if test "$target" = "" ; then
47 target=$host_os-$host_cpu
50 AC_MSG_RESULT($target)
52 if test "$host_os" = "mingw32" ; then
56 # Don't know where else to put this...
57 AC_MSG_CHECKING([building AROS in])
58 AROS_BUILDDIR=`${PWDCMD-pwd}`
59 AROS_BUILDDIR_UNIX=${PWD}
60 AC_MSG_RESULT($AROS_BUILDDIR)
62 AC_MSG_CHECKING([AROS source in])
63 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
65 AC_MSG_RESULT($SRCDIR)
67 # Parse the target field into something useful.
69 target_os=`echo $target | sed 's/^\([^-].*\)-\(.*\)$/\1/'`
70 target_cpu=`echo $target | sed 's/^\([^-].*\)-\(.*\)$/\2/'`
73 # Some debug output, to be removed again.
74 AC_MSG_CHECKING([for target system (debug output)])
75 AC_MSG_RESULT($target_os)
76 AC_MSG_CHECKING([for target cpu (debug output)])
77 AC_MSG_RESULT($target_cpu)
79 dnl --------------------------------------------------------------------
80 dnl Set the default Workbench resolution
81 dnl --------------------------------------------------------------------
82 aros_nominal_width=800
83 aros_nominal_height=600
86 dnl --------------------------------------------------------------------
87 dnl Host Configuration Section
88 dnl --------------------------------------------------------------------
90 dnl The idea here is to find out all the information we need about the
91 dnl host. This means things like tools for building directory structures,
92 dnl copying files around and the like.
94 default_c_compilers="gcc clang cc"
95 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="")
96 if test "$use_c_compiler" = ""; then
97 host_c_compilers="$default_c_compilers"
99 host_c_compilers="$use_c_compiler"
103 default_cxx_compilers="g++ clang++ c++"
104 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="")
105 if test "$use_cxx_compiler" = ""; then
106 host_cxx_compilers="$default_cxx_compilers"
108 host_cxx_compilers="$use_cxx_compiler"
109 CXX=$use_cxx_compiler
113 # The first step is to find the host binaries.
114 # Check for a compiler.
115 # Due to a bug in autoconf check for c++ compiler first.
116 # For mor info see, http://osdir.com/ml/bug-autoconf-gnu/2010-05/msg00001.html.
117 AC_PROG_CXX([${host_cxx_compilers}])
119 AC_PATH_PROG(CXX,$CXX)
120 AC_PROG_CC([${host_c_compilers}])
123 aros_host_def_cc="$CC"
127 # detect the compiler version
128 AC_MSG_CHECKING([which toolchain family ${CC} belongs to])
129 HOST_COMPILER_VERSION=`"$CC" --version 2>/dev/null`
130 if test x"$HOST_COMPILER_VERSION" = "x"; then
131 HOST_COMPILER_VERSION=`"$CC" --qversion 2>/dev/null`
133 if test x"$HOST_COMPILER_VERSION" = "x"; then
134 HOST_COMPILER_VERSION=`"$CC" -V 2>/dev/null`
137 IS_SUN_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'Sun C\+\+'`
138 if test "$IS_SUN_COMPILER" -ne "0"; then
139 HOST_TOOLCHAIN_PREFIX=
140 HOST_TOOLCHAIN_SUFFIX=
141 HOST_TOOLCHAIN_FAMILY=sun
143 IS_LLVM_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'LLVM|clang'`
144 if test "$IS_LLVM_COMPILER" -ne "0"; then
145 if test "$CC_BASE" != "gcc"; then
146 HOST_TOOLCHAIN_PREFIX=llvm-
147 HOST_TOOLCHAIN_SUFFIX="`echo $CC_BASE | sed -e \"s|clang||g\"`"
148 HOST_TOOLCHAIN_FAMILY=llvm
153 if test "x$IS_GNU_COMPILER" = "x"; then
154 IS_GNU_COMPILER=`echo $HOST_COMPILER_VERSION | grep -i -c -E 'gcc'`
156 if test "$IS_GNU_COMPILER" -ne "0"; then
157 HOST_TOOLCHAIN_PREFIX=
158 HOST_TOOLCHAIN_SUFFIX=
159 HOST_TOOLCHAIN_FAMILY=gnu
161 if test x"$HOST_TOOLCHAIN_FAMILY" = "x"; then
162 HOST_TOOLCHAIN_FAMILY=unknown
164 AC_MSG_RESULT($HOST_TOOLCHAIN_FAMILY)
166 # Check for a compatible awk
167 AC_CHECK_PROGS(AWK,[gawk nawk])
168 AROS_REQUIRED(gawk,$AWK)
169 AROS_PROG(MMAKE,mmake)
171 # Perform some default variable assignments. Note all of these will be
172 # Regenerated from the script, so there is no need to cache them.
174 aros_build_host=$host
178 base_ld_name=${HOST_TOOLCHAIN_PREFIX}ld${HOST_TOOLCHAIN_SUFFIX}
179 if test "$HOST_TOOLCHAIN_FAMILY" = "llvm"; then
180 AC_CHECK_PROGS(base_lld_name,[$base_ld_name ld.lld${HOST_TOOLCHAIN_SUFFIX} ld64.lld${HOST_TOOLCHAIN_SUFFIX} ld-link${HOST_TOOLCHAIN_SUFFIX}.exe ld${HOST_TOOLCHAIN_SUFFIX}])
181 base_ld_name=$base_lld_name
183 AROS_TOOL_CCPATH(aros_host_ld,ld,$base_ld_name)
184 AROS_REQUIRED(ld,$aros_host_ld)
185 aros_host_make="make"
186 aros_host_cflags="$CFLAGS"
187 aros_host_cxxflags="$CXXFLAGS"
188 aros_host_cppflags="$CPPFLAGS"
189 aros_host_ldflags="$LDFLAGS"
190 aros_host_debug="-g -O0"
191 aros_host_mkdep="\$(SRCDIR)/scripts/mkdep"
192 aros_host_mkargs="--no-print-directory"
193 aros_host_exe_suffix="$EXEEXT"
194 aros_host_lib_suffix=""
196 # Ignore all compliance, AROS ROMs = 0
197 # KickStart v1.0 = 30
198 # KickStart v1.3 = 34
199 # KickStart v2.0 = 37
200 # KickStart v3.0 = 39
201 # KickStart v3.1 = 40
203 aros_amigaos_compliance=0
205 AC_CHECK_PROGS(aros_host_aclocal,[aclocal aclocal19 aclocal-1.9])
206 AC_CHECK_PROGS(aros_host_autoconf,[autoconf autoconf259 autoconf253])
207 AC_CHECK_PROGS(aros_host_autoheader,[autoheader autoheader259 autoheader253])
208 AC_CHECK_PROGS(aros_host_automake,[automake automake19 automake-1.9])
210 AROS_REQUIRED(aclocal/aclocal19/aclocal-1.9, $aros_host_aclocal)
211 AROS_REQUIRED(automake/automake19/automake-1.9, $aros_host_automake)
213 case "$aros_host_cc" in
218 aros_host_cc_pipe="-pipe"
228 aros_kernel_cc_includes=""
229 aros_target_cc_includes=""
232 # ----------------------------------------------------------------------------------------
233 # Host-specific defaults
235 # This is the main host configuration section. It is where the host
236 # can change the values of any variables it needs to change. We do
237 # not look at anything that compiles to the target yet, we'll get
242 aros_host_arch="aros"
243 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
249 aros_host_cpu="x86_64"
255 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
256 aros_host_cpu="$host_cpu"
262 aros_host_arch="linux"
263 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
264 android_build_os="linux-x86"
265 android_tool="android"
266 default_android_sdk="/opt/android-sdk-linux_x86"
272 aros_host_cpu="x86_64"
284 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
285 aros_host_cpu="$host_cpu"
291 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe -I/usr/local/include"
292 aros_host_make="gmake"
293 aros_host_arch="freebsd"
296 aros_host_ldflags="$aros_host_ldflags -L/usr/local/lib -liconv"
298 dnl FreeBSD 5.x (and later) has changed the default object format.
299 dnl The double [[]] is necessary to get around m4's quoting rules.
302 aros_object_format="elf_i386"
306 aros_object_format="elf_i386_fbsd"
313 AC_MSG_CHECKING([for macOS SDK files])
314 LOC=$( xcode-select -p )
315 AS_IF([ test $? != 0],[AC_MSG_ERROR([XCode incorrectly configured!
316 please run 'xcode-select --install' before
317 re-running configure])])
319 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
320 aros_host_arch="darwin"
322 if [[ -z ${SED+x} ]]; then SED="gsed"; fi
323 android_build_os="darwin-x86"
324 android_tool="android"
325 default_android_sdk="/android-sdk-mac_x86"
331 aros_host_cpu="x86_64"
337 AC_MSG_WARN("Unknown CPU for Darwin host -- $host_cpu")
338 aros_host_cpu="$host_cpu"
342 aros_host_ldflags="$aros_host_ldflags -liconv"
347 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
348 aros_host_make="gmake"
349 aros_host_arch="dragonfly"
355 aros_host_cpu="x86_64"
358 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
359 aros_host_cpu="$host_cpu"
365 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
366 aros_host_make="gmake"
367 aros_host_arch="netbsd"
376 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
377 aros_host_cpu="$host_cpu"
380 aros_host_lib_suffix=".0.0"
384 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
385 aros_host_make="gmake"
386 aros_host_arch="openbsd"
392 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
393 aros_host_cpu="$host_cpu"
399 aros_host_arch="solaris"
400 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
406 aros_host_cpu="sparc"
409 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
410 aros_host_cpu="$host_cpu"
416 aros_host_arch="morphos"
422 aros_host_arch="amiga"
428 TOUCH="/gg/bin/touch"
437 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
438 aros_host_cpu="$host_cpu"
444 aros_host_arch="cygwin"
445 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
447 android_build_os="windows"
448 android_tool="android.bat"
449 default_android_sdk="/cygdrive/c/android-sdk-windows-1.6_r1"
456 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
457 aros_host_cpu="$host_cpu"
463 aros_host_arch="mingw32"
464 aros_host_cflags="$aros_host_cflags $aros_host_cc_pipe"
466 android_build_os="windows"
467 android_tool="android.bat"
468 default_android_sdk="/c/android-sdk-windows-1.6_r1"
470 libpng_libextra="-lws2_32"
474 dnl Currently there's neither 64-bit MinGW nor MSYS. Both environments are 32-bit
475 dnl and run under emulation. Consequently, uname reports i386 even on 64-bit systems.
476 dnl Here we attempt to detect Windows home platform by asking gcc about its target.
477 dnl 64-bit gcc will output "x86_64-w64-mingw32" here.
479 AC_MSG_CHECKING([for Windows native gcc target])
480 host_cpu=`gcc -dumpmachine`
481 AC_MSG_RESULT($host_cpu)
492 dnl Native i386 gcc for MinGW32 reports 'mingw32' with -dumpmachine switch
497 aros_host_cpu="x86_64"
498 dnl Dragon's x86_64-w64-mingw32-gcc is a bit broken. It ignores standard $prefix/include
499 dnl directory, so we have to add it explicitly here.
500 aros_host_cflags="$aros_host_cflags -isystem /mingw/include"
504 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
505 aros_host_cpu="$host_cpu"
510 AC_MSG_ERROR([Unsupported host architecture $host])
514 base_ar_name=${HOST_TOOLCHAIN_PREFIX}ar${HOST_TOOLCHAIN_SUFFIX}
515 AROS_PROG(aros_host_cmd_ar,$base_ar_name,[cr])
516 AROS_PATH_PROG(aros_host_full_ar,$aros_host_cmd_ar)
517 aros_host_ar=`echo $aros_host_cmd_ar | sed -e "s|$base_ar_name|$aros_host_full_ar|g"`
518 AROS_REQUIRED(ar,$aros_host_ar)
519 base_ranlib_name=${HOST_TOOLCHAIN_PREFIX}ranlib${HOST_TOOLCHAIN_SUFFIX}
520 AROS_PATH_PROG(aros_host_ranlib,$base_ranlib_name)
521 AROS_REQUIRED(ranlib,$aros_host_ranlib)
522 AROS_PROG(aros_host_strip,strip)
523 AROS_REQUIRED(strip,$aros_host_strip)
525 AROS_PROG(RM,[rm],[-rf])
526 AROS_REQUIRED(rm,$RM)
528 AROS_REQUIRED(cp,$CP)
530 AROS_REQUIRED(mv,$MV)
531 AROS_PROG(ECHO,[echo])
532 AROS_REQUIRED(echo,$ECHO)
533 AROS_PROG(MKDIR,[mkdir],[-p])
534 AROS_REQUIRED(mkdir,$MKDIR)
535 AROS_PROG(TOUCH,[touch])
536 AROS_REQUIRED(touch,$TOUCH)
537 AROS_PROG(SORT,[sort])
538 AROS_REQUIRED(sort,$SORT)
539 AROS_PROG(UNIQ,[uniq])
540 AROS_REQUIRED(uniq,$UNIQ)
541 AROS_PROG(NOP,[true])
542 AROS_REQUIRED(true,$NOP)
544 AROS_REQUIRED(cat,$CAT)
545 AROS_PROG(BISON,[bison])
546 AROS_REQUIRED(bison,$BISON)
547 AROS_PROG(FLEX,[flex])
548 AROS_REQUIRED(flex,$FLEX)
549 AC_MSG_CHECKING([version of $FLEX])
550 ax_cv_flex_version="`$FLEX --version | cut -d\" \" -f2`"
551 AC_MSG_RESULT($ax_cv_flex_version)
552 AROS_PROG(PNGTOPNM,[pngtopnm])
553 AROS_REQUIRED(pngtopnm,$PNGTOPNM)
554 AROS_PROG(PPMTOILBM,[ppmtoilbm])
555 AROS_REQUIRED(ppmtoilbm,$PPMTOILBM)
557 AROS_REQUIRED(sed,$SED)
558 AROS_PROG(CHMOD,[chmod])
559 AROS_REQUIRED(chmod,$CHMOD)
560 AROS_PROG(PATCH,[patch])
561 AROS_REQUIRED(patch,$PATCH)
565 AC_ARG_ENABLE([libpng-config], [--disable-libpng-config disable libpng-config test and configuration])
566 if test "$enable_libpng_config" != "no"; then
567 AC_CHECK_PROG([arosconfig_use_libpngconfig],[libpng-config],[yes],[no])
569 if test "$arosconfig_use_libpngconfig" = "yes"; then
570 AC_MSG_CHECKING([libpng-config library])
571 libpng_incdir="`libpng-config --cflags`"
572 libpng_libextra="$libpng_libextra `libpng-config --ldflags`"
573 libpng="`libpng-config --libs`"
574 AC_MSG_RESULT($libpng)
576 AC_CHECK_LIB(png, png_read_png, [libpng="-lpng"], [libpng="no"])
577 if test "$libpng_libextra" != ""; then
578 if test "$libpng" != "no"; then
579 libpng_libextra="$libpng_libextra $libpng"
583 AROS_REQUIRED(libpng, $libpng)
585 AC_SUBST(libpng_libextra)
586 AC_SUBST(libpng_incdir)
593 dnl ---------------------------------------------------------------------------
594 dnl Look for things about the host system, good for hosted targets.
595 dnl ---------------------------------------------------------------------------
597 # Check for some includes for the X11 HIDD and the kernel
598 AC_CHECK_HEADERS([sys/ipc.h sys/shm.h \
599 sys/mmap.h sys/mman.h sysexits.h \
600 sys/statfs.h sys/statvfs.h sys/vfs.h sys/param.h \
603 AC_CHECK_HEADERS([sys/mount.h],,,[#include <sys/param.h>])
604 AC_CHECK_HEADERS([GL/glx.h],[host_feature_glx=yes],[host_feature_glx=no],)
606 AC_MSG_CHECKING([if __unused conflicts with sys/stat.h])
607 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
609 #define __unused __attribute__((unused))
610 #include <sys/stat.h>
612 [host_stat_h__unused_used=no],
613 [host_stat_h__unused_used=yes])
614 AC_MSG_RESULT($host_stat_h__unused_used)
631 AC_CHECK_MEMBERS(struct tm.tm_gmtoff)
633 # Look for some functions
634 AC_CHECK_FUNCS([getpagesize kqueue statfs statvfs \
635 clone kse_create rfork_thread thr_create sa_register \
636 getcontext makecontext setcontext sigaltstack swapcontext])
640 #-----------------------------------------------------------------------------
643 # GCC 4.1+ has a stack protection feature that requires OS support. Ubuntu has
644 # it switched on by default, and we use the host compiler, so it compiles AROS
645 # code with this enabled resulting in link failures as we don't have support
648 # We use two methods to disable it. For the host compiler (used to compile
649 # some hosted modules), we test to see if the compiler supports stack
650 # protection, and if it does we disable it in AROS_CONFIG_CFLAGS. This should
651 # work on all platforms.
654 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
655 save_cflags="$CFLAGS"
656 CFLAGS="$CFLAGS -fno-stack-protector"
657 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
658 AC_MSG_RESULT($use_no_stack_protector)
659 if test "x-$use_no_stack_protector" = "x-yes" ; then
660 aros_host_cflags="$aros_host_cflags -fno-stack-protector"
662 CFLAGS="$save_cflags"
664 #-----------------------------------------------------------------------------
666 # Disable pointer-signedness warnings if the compiler recognises the option
667 # (this only works for the host compiler at the moment)
669 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
670 save_cflags="$CFLAGS"
671 CFLAGS="$CFLAGS -Wno-pointer-sign"
672 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
673 AC_MSG_RESULT($use_no_sign_warning)
674 if test "x-$use_no_sign_warning" = "x-yes" ; then
675 aros_host_cflags="$aros_host_cflags -Wno-pointer-sign"
677 CFLAGS="$save_cflags"
679 #-----------------------------------------------------------------------------
681 # Check if host compiler supports -fgnu89-inline, can be needed for crosstools.
683 AC_MSG_CHECKING([whether ${CC} accepts -fgnu89-inline])
684 save_cflags="$CFLAGS"
685 CFLAGS="$CFLAGS -fgnu89-inline"
686 AC_TRY_COMPILE(,, use_gnu89_inline="yes", use_gnu89_inline="no")
687 AC_MSG_RESULT($use_gnu89_inline)
688 if test "x-$use_gnu89_inline" = "x-yes" ; then
689 gnu89_inline="-fgnu89-inline"
691 CFLAGS="$save_cflags"
694 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
695 # On GCC >= 4.0 -iquote should be used
697 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
698 CFLAGS="$CFLAGS -iquote."
699 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
700 AC_MSG_RESULT($has_iquote)
701 if test "x-$has_iquote" = "x-yes" ; then
702 host_cflags_iquote=-iquote
703 host_cflags_iquote_end=
705 host_cflags_iquote=-I
706 host_cflags_iquote_end=-I-
709 AC_MSG_NOTICE([Performing target configuration...])
711 dnl --------------------------------------------------------------------
712 dnl Target Configuration Section
713 dnl --------------------------------------------------------------------
715 dnl The target configuration section is responsible for setting up all
716 dnl the paths for includes, and tools required to build AROS to some
717 dnl particular target.
721 aros_nowarn_flags="NOWARN_UNUSED_COMMAND_LINE_ARGUMENT NOWARN_UNKNOWN_WARNING_OPTION NOWARN_POINTER_SIGN NOWARN_PARENTHESES"
729 aros_config_cppflags=
731 aros_config_cxxflags=
732 aros_config_aflags="$""(WARN_ALL) -x assembler-with-cpp -c"
733 aros_config_ldflags=""
735 aros_shared_default=yes
737 aros_shared_cflags="-fPIC"
738 aros_shared_aflags=""
739 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
740 aros_kernel_ldflags="-Wl,-rpath,./lib"
742 aros_kernel_ar_flags="cr"
743 aros_target_ar_flags="cr"
744 aros_target_nm_flags="-C -ul"
745 aros_target_strip_flags="--strip-unneeded -R.comment"
750 aros_target_genmap="-Wl,-Map -Xlinker"
752 # Native flavour stuff
753 aros_serial_debug="0"
755 # Palm native flavour stuff
756 aros_palm_debug_hack="0"
759 aros_nesting_supervisor="0"
761 # Collect-aros stuff: "-ius" to ignore undefined symbols
762 ignore_undefined_symbols=""
764 # Check for X11 by default
767 AC_MSG_CHECKING([Which toolchain family to use ...])
768 AC_ARG_WITH(toolchain,AC_HELP_STRING([--with-toolchain=family],[Which toolchain family to crosscompile with (defaults to gnu)]),aros_toolchain="$withval",aros_toolchain="$default_toolchain_family")
769 AC_MSG_RESULT($aros_toolchain)
772 AC_MSG_CHECKING([if we should enable link time optimizations (LTO)])
773 AC_ARG_ENABLE(lto,AC_HELP_STRING([--enable-lto=[yes|no]],[Enable link time optimizations if the target compiler supports them (default=no)]),
774 aros_config_lto="$enableval",aros_config_lto="no")
775 if test "$aros_config_lto" != "no"; then
776 aros_config_lto="yes"
778 AC_MSG_RESULT($aros_config_lto)
780 AC_MSG_CHECKING([if we should enable coverage instrumentation])
781 AC_ARG_ENABLE(coverage,AC_HELP_STRING([--enable-coverage=[yes|no]],[Enable coverage instrumentation if the target compiler supports it (default=no)]),
782 aros_config_coverage="$enableval",aros_config_coverage="no")
783 if test "$aros_config_coverage" != "no"; then
784 aros_config_coverage="yes"
786 AC_MSG_RESULT($aros_config_coverage)
790 case "$aros_toolchain" in
792 toolchain_c_compiler="clang"
793 toolchain_cxx_compiler="clang++"
794 toolchain_cpp_preprocessor="clang -E"
795 toolchain_ld="ld.lld"
797 toolchain_as="llvm-as"
798 toolchain_ar="llvm-ar"
799 toolchain_ranlib="llvm-ranlib"
800 toolchain_nm="llvm-nm"
801 toolchain_strip="true"
802 toolchain_objcopy="llvm-objcopy"
803 toolchain_objdump="llvm-objdump"
807 toolchain_c_compiler="gcc"
808 toolchain_cxx_compiler="g++"
809 toolchain_cpp_preprocessor="gcc -E"
812 if test "$aros_config_lto" != "yes"; then
815 toolchain_ranlib="ranlib"
818 toolchain_ld="ld.bfd"
819 toolchain_ar="gcc-ar"
820 toolchain_ranlib="gcc-ranlib"
821 toolchain_nm="gcc-nm"
823 toolchain_strip="strip"
824 toolchain_objcopy="objcopy"
825 toolchain_objdump="objdump"
829 AC_MSG_WARN("Unknown toolchain family!")
830 toolchain_c_compiler="cc"
831 toolchain_cxx_compiler="c++"
832 toolchain_cpp_preprocessor="cpp"
837 toolchain_ranlib="ranlib"
839 toolchain_strip="strip"
840 toolchain_objcopy="objcopy"
841 toolchain_objdump="objdump"
845 #-----------------------------------------------------------------------------
847 AC_MSG_CHECKING([which type of build to do])
848 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")
850 if test "$build_type" = "nightly"; then
851 build_type_string="NIGHTLY"
852 elif test "$build_type" = "snapshot"; then
853 build_type_string="SNAPSHOT"
854 elif test "$build_type" = "milestone"; then
855 build_type_string="MILESTONE"
856 elif test "$build_type" = "release"; then
857 build_type_string="RELEASE"
859 build_type_string="PERSONAL"
860 build_type="personal"
863 aros_config_cppflags="$aros_config_cppflags -DAROS_BUILD_TYPE=AROS_BUILD_TYPE_$build_type_string"
865 AC_MSG_RESULT($build_type)
867 #-----------------------------------------------------------------------------
868 all_debug_types="messages stack modules mungwall symbols"
870 AC_MSG_CHECKING([which debug types to enable])
871 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)]),
872 debug="$enableval",debug="")
874 if test "$debug" = "" -o "$debug" = "no"; then
876 elif test "$debug" = "yes"; then
880 if test "$debug" = "all" ; then
881 debug="messages stack modules symbols"
882 for d in $all_debug_types; do
883 export aros_${d}_debug="1"
886 for d in $all_debug_types; do
887 export aros_${d}_debug="0"
891 if test "$debug" != "none"; then
892 debug=`echo $debug | sed s/,/\ /g`
895 for d2 in $all_debug_types; do
896 if test "$d2" = "$d"; then
901 if test "$found" = "0"; then
902 AC_MSG_ERROR([unrecognized debug type "$d". Available types are: all none $all_debug_types])
904 export aros_${d}_debug="1"
908 AC_MSG_RESULT($debug)
910 if test "$aros_messages_debug" = "1"; then
911 aros_messages_debug="-DADEBUG=1 -DMDEBUG=1"
913 aros_messages_debug=""
915 if test "$aros_symbols_debug" = "1"; then
916 aros_symbols_debug="-g"
918 aros_symbols_debug=""
921 # These are the flags to pass when compiling debugged programs
922 aros_debug_cppflags="$aros_messages_debug"
923 aros_debug_cflags="$aros_symbols_debug"
926 aros_debug_ldflags="$aros_symbols_debug"
928 #-----------------------------------------------------------------------------
929 # Checking for distcc and ccache.
931 # Always apply the transforms in this particular order. Basically you should
932 # always run 'ccache distcc compiler' in that order for the best performance.
934 AC_MSG_CHECKING([whether to enable distcc])
935 AC_ARG_ENABLE(distcc,AC_HELP_STRING([--enable-distcc],[Use distcc as a front end to the compiler (default=no).]),distcc="$enableval",distcc="no")
936 if test "$distcc" != "" -a "$distcc" != "no"; then
937 # AC_CHECK_PROG will print out the result in this case
938 AC_PATH_PROG(DISTCC,[distcc],distcc,)
943 AC_MSG_CHECKING([whether to enable ccache])
944 AC_ARG_ENABLE(ccache,AC_HELP_STRING([--enable-ccache],[Use ccache as a front end to the compiler (default=no).]),ccache="$enableval",ccache="no")
945 if test "$ccache" != "" -a "$ccache" != "no"; then
946 # AC_CHECK_PROG will print out the result in this case
947 AC_CHECK_PROG(CCACHE,[ccache],ccache,)
952 #-----------------------------------------------------------------------------
953 AC_MSG_CHECKING([what specific host gcc version to use])
954 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="")
955 if test "$kernel_tool_version" != "" ; then
956 msg_result=$kernel_tool_version
960 AC_MSG_RESULT($msg_result)
962 #-----------------------------------------------------------------------------
963 AC_MSG_CHECKING([what optimization flags to use])
964 AC_ARG_WITH(optimization,AC_HELP_STRING([--with-optimization=FLAGS],[Use optimization flags FLAGS (e.g --with-optimization=-O2).]),optimization_level="$withval",optimization_level="unknown")
965 if test "$optimization_level" = "unknown"; then
966 dnl default is -O2 for normal builds, -O0 for debug builds
967 optimization="default"
968 if test "$debug" != "none"; then
969 optimization_level="-O0"
971 optimization_level="-O2"
974 optimization="$optimization_level"
976 AC_MSG_RESULT($optimization)
979 #-----------------------------------------------------------------------------
980 AC_MSG_CHECKING([which paranoia flags to use])
981 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"])
982 if test "$paranoia_flags" = "no"; then
983 paranoia_flags="$""(WARN_ALL) -Werror-implicit-function-declaration"
986 if test "$paranoia_flags" = "yes"; then
987 paranoia_flags="$""(WARN_ALL) $""(WARN_ERROR)"
989 msg_result="$paranoia_flags"
991 AC_MSG_RESULT($msg_result)
992 aros_warn_flags="$aros_warn_flags $paranoia_flags"
994 #-----------------------------------------------------------------------------
995 AC_MSG_CHECKING([what target variant to enable])
996 AC_ARG_ENABLE(target_variant,AC_HELP_STRING([--enable-target-variant=NAME],[Enable a specific target variant (default=none)]),target_variant=$enableval,target_variant="")
997 if test "$target_variant" = ""; then
998 aros_target_variant=""
999 aros_target_suffix=""
1002 aros_target_variant="$target_variant"
1003 aros_target_suffix="-$target_variant"
1005 AC_MSG_RESULT($enableval)
1007 #-----------------------------------------------------------------------------
1008 # Target-specific defaults. You can override then on a per-target basis.
1010 # Bootloader name. Currently used by PC target.
1011 target_bootloader="none"
1015 #-----------------------------------------------------------------------------
1016 # Additional options for some specific targets
1018 case "$aros_target_variant" in
1020 AC_MSG_CHECKING([XCode path])
1021 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")
1022 AC_MSG_RESULT($aros_xcode_path)
1024 AC_MSG_CHECKING([what iOS SDK version to use])
1025 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")
1026 AC_MSG_RESULT($aros_sdk_version)
1031 AC_MSG_CHECKING([Android SDK path])
1032 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)
1033 AC_MSG_RESULT($aros_android_sdk)
1035 AC_MSG_CHECKING([Android NDK path])
1036 AC_ARG_WITH(ndk,AC_HELP_STRING([--with-ndk=PATH],[Specify Android NDK path (default=none).]),aros_android_ndk="$withval",aros_android_ndk="none")
1037 AC_MSG_RESULT($aros_android_ndk)
1039 AC_MSG_CHECKING([what Android SDK version to use])
1040 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")
1041 AC_MSG_RESULT($aros_sdk_version)
1043 aros_android_level=android-$aros_sdk_version
1044 if test ! -d $aros_android_sdk/platforms/$aros_android_level; then
1045 echo "Platform $aros_android_level is not installed in your SDK"
1046 echo "Use --with-sdk-version=<API level number> to select another platform version"
1047 echo "You can check what plaform versions are installed in your SDK"
1048 echo "by examining contents of $aros_android_sdk/platforms directory"
1049 AC_MSG_ERROR([Android platform $aros_android_level is not installed])
1052 export PATH="$aros_android_sdk/tools:$PATH"
1053 AC_PATH_PROG(android_tool, $android_tool)
1054 AROS_REQUIRED(android,$android_tool)
1056 if test "$aros_android_ndk" != "none"; then
1057 AC_MSG_CHECKING([what Android NDK version to use])
1058 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")
1059 AC_MSG_RESULT($aros_ndk_version)
1062 AC_PATH_PROG(ant, ant)
1063 if test "$ant" = ""; then
1064 AC_MSG_WARN([Apache Ant is missing, Java bootstrap can't be built automatically])
1067 AC_MSG_CHECKING([Build debug or release apk])
1068 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)
1069 if test $aros_android_antapk != release -a $aros_android_antapk != debug; then
1070 AC_MSG_ERROR([apk-version has to be release or debug])
1072 AC_MSG_RESULT($aros_android_antapk)
1074 target_extra_cfg+="$export_newline""# Android$export_newline""AROS_ANDROID_ANTAPK := $aros_android_antapk$export_newline"
1075 host_extra_cfg+="$export_newline""# Android-specific$export_newline""ANDROID := $android_tool$export_newline""ANT := $ant$export_newline"
1076 aros_target_options+="$export_newline""# Enable Android Gfx Driver$export_newline""OPT_HOST_ANDROIDGFX := yes$export_newline"
1078 dnl MSYS bash can't run .bat files directly, then need to be started via cmd.exe
1079 if test "$host_os" = "mingw32"; then
1080 android_tool="cmd //c $android_tool"
1088 #-----------------------------------------------------------------------------
1089 # External toolchains
1090 kernel_tool_prefix="none"
1091 aros_tool_prefix="none"
1092 elf_tool_prefix="${target_cpu}-elf-"
1094 # Base target cpu ISA configuration switch.
1095 case "$target_cpu" in
1101 m68k_isa_extra="ISA_MC68000_FLAGS = -march=68000"
1102 m68k_020_isa_extra="ISA_MC68020_FLAGS = -march=68020"
1103 m68k_030_isa_extra="ISA_MC68030_FLAGS = -march=68030"
1104 m68k_040_isa_extra="ISA_MC68040_FLAGS = -march=68040"
1105 m68k_060_isa_extra="ISA_MC68060_FLAGS = -march=68060"
1106 m68k_ac080_isa_extra="ISA_AC68080_FLAGS = -march=68040"
1107 m68k_020_ext="ISA_MC68020_EXT :=020"
1108 m68k_030_ext="ISA_MC68030_EXT :=030"
1109 m68k_040_ext="ISA_MC68040_EXT :=040"
1110 m68k_060_ext="ISA_MC68060_EXT :=060"
1111 m68k_020_cflags="ISA_MC68020_CFLAGS ="
1112 m68k_030_cflags="ISA_MC68030_CFLAGS ="
1113 m68k_040_cflags="ISA_MC68040_CFLAGS ="
1114 m68k_060_cflags="ISA_MC68060_CFLAGS ="
1115 m68k_020_cppflags="ISA_MC68020_CPPFLAGS ="
1116 m68k_030_cppflags="ISA_MC68030_CPPFLAGS ="
1117 m68k_040_cppflags="ISA_MC68040_CPPFLAGS ="
1118 m68k_060_cppflags="ISA_MC68060_CPPFLAGS ="
1119 m68k_020_ldflags="ISA_MC68020_LDFLAGS ="
1120 m68k_030_ldflags="ISA_MC68030_LDFLAGS ="
1121 m68k_040_ldflags="ISA_MC68040_LDFLAGS ="
1122 m68k_060_ldflags="ISA_MC68060_LDFLAGS ="
1125 x86_isa_extra="ISA_X86_FLAGS = -m32 -march=i486"
1126 x86_64_isa_extra="ISA_X8664_FLAGS = -mcmodel=large"
1132 # This is the target configuration switch.
1133 case "$target_os" in
1135 aros_target_arch="linux"
1136 aros_target_family="unix"
1137 case "$target_cpu" in
1139 aros_target_cpu="m68k"
1140 aros_object_format="m68kelf"
1141 aros_flavour="emulcompat"
1142 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__linux__"
1143 aros_isa_flags="$""(ISA_MC68000_FLAGS)"
1144 aros_shared_ldflags="-Wl,-T,\$(TOP)/config/linux/m68k/script.so"
1145 aros_kernel_ldflags="-Wl,-rpath,./lib,-T,\$(TOP)/config/linux/m68k/script.normal"
1146 gcc_target_cpu="mc68000"
1149 aros_target_cpu="i386"
1150 aros_object_format="elf_i386"
1151 aros_flavour="emulation"
1152 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__linux__"
1153 aros_isa_flags="$""(ISA_X86_FLAGS)"
1154 x86_64_isa_extra="$x86_64_isa_extra $""(CFLAGS_NO_RED_ZONE)"
1155 aros_kernel_ldflags="-Wl,-melf_i386"
1156 aros_nominal_depth=8
1157 gcc_target_cpu="i386"
1158 pci_hidd_target="hidd-pci-linux"
1159 android_tool_dir_prefix="x86"
1160 android_tool_prefix="i686-android-linux"
1161 android_ndk_arch="x86"
1164 aros_target_cpu="x86_64"
1165 aros_object_format="elf_x86_64"
1166 aros_flavour="emulation"
1167 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__linux__"
1168 aros_isa_flags="$""(ISA_X8664_FLAGS)"
1169 x86_64_isa_extra="$x86_64_isa_extra $""(CFLAGS_NO_RED_ZONE)"
1170 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_OMIT_FP)"
1171 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_OMIT_FP)"
1172 aros_nominal_depth=8
1173 pci_hidd_target="hidd-pci-linux"
1176 aros_target_cpu="ppc"
1177 aros_object_format="elf32ppc"
1178 aros_flavour="emulation"
1179 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
1180 aros_nominal_depth=8
1181 gcc_target_cpu="ppc"
1184 # Same as powerpc, but I need this for the nightly build to work again.
1185 # Actually, the nightly should be made working with powerpc target.
1186 # That just was too much work for the moment, another week or two.
1188 aros_target_cpu="ppc"
1189 aros_object_format="elf32ppc"
1190 aros_flavour="emulation"
1191 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
1192 aros_nominal_depth=8
1193 gcc_target_cpu="ppc"
1196 aros_target_cpu="aarch64"
1197 target_cpu="aarch64"
1198 aros_object_format="aarch64elf_aros"
1199 aros_flavour="emulation"
1200 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1201 gcc_target_cpu="aarch64"
1202 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1203 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1204 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_STRICT_ALIASING)"
1205 aros_c_libs="$aros_c_libs -laeabi"
1206 gcc_default_float_abi="hard"
1207 kernel_tool_prefix="aarch64-linux-gnueabihf-"
1210 aros_target_cpu="arm"
1212 aros_object_format="armelf_aros"
1213 aros_flavour="emulation"
1214 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1215 gcc_target_cpu="arm"
1216 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1217 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1218 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_STRICT_ALIASING)"
1219 aros_c_libs="$aros_c_libs -laeabi"
1220 gcc_default_float_abi="hard"
1221 android_tool_dir_prefix="arm-linux-androideabi"
1222 android_tool_prefix="arm-linux-androideabi"
1223 android_ndk_arch="arm"
1224 kernel_tool_prefix="arm-linux-gnueabihf-"
1227 aros_target_cpu="arm"
1228 aros_object_format="armelf_aros"
1229 aros_flavour="emulation"
1230 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
1231 gcc_target_cpu="arm"
1232 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1233 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_OMIT_FP)"
1234 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_STRICT_ALIASING)"
1235 aros_c_libs="$aros_c_libs -laeabi"
1236 android_tool_dir_prefix="arm-linux-androideabi"
1237 android_tool_prefix="arm-linux-androideabi"
1238 android_ndk_arch="arm"
1239 kernel_tool_prefix="arm-linux-gnueabi-"
1242 AC_MSG_ERROR("Unknown CPU for Linux -- $target_cpu")
1245 case "$aros_target_variant" in
1248 dnl Not all Linux CPUs are supported by Android
1249 if test "$android_ndk_arch" = ""; then
1250 AC_MSG_ERROR("Unsupported CPU for Android -- $target_cpu")
1253 aros_nominal_width=320
1254 aros_nominal_height=480
1255 if test "$aros_android_ndk" = "none"; then
1256 dnl Use standalone toolchain, don't adjust paths
1257 aros_kernel_cflags="-mandroid"
1258 aros_kernel_ldflags="-mandroid"
1261 dnl In Android NDK toolchains are placed in own directories,
1262 dnl but tool names are not suffixed with version
1263 export PATH="$aros_android_ndk/toolchains/$android_tool_dir_prefix-$kernel_tool_version/prebuilt/$android_build_os/bin:$PATH"
1264 kernel_tool_version=""
1265 aros_android_ndk="$aros_android_ndk/platforms/android-$aros_ndk_version/arch-$android_ndk_arch"
1266 aros_kernel_cflags="--sysroot $aros_android_ndk -mandroid"
1267 aros_kernel_ldflags="--sysroot $aros_android_ndk -mandroid"
1268 CFLAGS="$CFLAGS --sysroot $aros_android_ndk -mandroid"
1269 aros_kernel_includes="-isystem $aros_android_ndk/usr/include"
1272 # Disable implicit PIC mode
1273 aros_config_cflags="$aros_config_cflags -fno-pic"
1274 kernel_tool_prefix="$android_tool_prefix-"
1280 aros_target_arch="pc"
1281 aros_shared_default="no"
1282 target_bootloader="grub2"
1283 case "$target_cpu" in
1285 aros_target_cpu="i386"
1287 dnl If somebody hasn't already set the target object
1288 dnl format, then use this value. Mostly to support
1289 dnl FreeBSD cross-compilation.
1290 dnl TODO: Remove when we always use our compiler.
1292 if test "$aros_object_format" = "" ; then
1293 aros_object_format="elf_i386"
1295 aros_flavour="standalone"
1296 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1297 aros_isa_flags="$""(ISA_X86_FLAGS)"
1298 x86_64_isa_extra="$x86_64_isa_extra $""(CFLAGS_NO_RED_ZONE)"
1299 aros_kernel_ldflags="-Wl,-melf_i386"
1300 aros_nominal_width=640
1301 aros_nominal_height=480
1302 gcc_target_cpu="i386"
1305 PLATFORM_EXECSMP="#define __AROSPLATFORM_SMP__"
1306 aros_target_cpu="x86_64"
1308 if test "$aros_object_format" = "" ; then
1309 aros_object_format="elf_x86_64"
1311 aros_flavour="standalone"
1312 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1313 aros_isa_flags="$""(ISA_X8664_FLAGS)"
1314 x86_64_isa_extra="$x86_64_isa_extra $""(CFLAGS_NO_RED_ZONE)"
1315 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_OMIT_FP)"
1316 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_OMIT_FP)"
1317 aros_kernel_ldflags=""
1318 aros_nominal_width=640
1319 aros_nominal_height=480
1320 case "$aros_target_variant" in
1322 ENABLE_EXECSMP="#define __AROSEXEC_SMP__"
1327 AC_MSG_ERROR("Unknown native CPU -- $target_cpu")
1333 aros_target_arch="prep"
1334 aros_shared_default="no"
1335 aros_target_cpu="ppc"
1336 aros_object_format="elf32ppc"
1337 aros_flavour="ppcnative"
1338 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1339 aros_kernel_ldflags=""
1340 aros_nominal_width=640
1341 aros_nominal_height=480
1342 gcc_target_cpu="ppc"
1346 aros_target_arch="freebsd"
1347 aros_target_family="unix"
1348 aros_target_cpu="i386"
1349 aros_flavour="emulation"
1350 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1351 gcc_target_cpu="i386"
1353 aros_target_strip_flags="-x"
1357 aros_target_arch="darwin"
1358 aros_target_family="unix"
1359 aros_flavour="emulation"
1360 case "$target_cpu" in
1362 aros_ios_platform="iPhoneSimulator"
1363 aros_target_cpu="i386"
1364 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1365 aros_isa_flags="$""(ISA_X86_FLAGS)"
1366 aros_kernel_ldflags=""
1367 aros_macosx_version="10.4"
1368 aros_nominal_depth=8
1369 gcc_target_cpu="i386"
1370 aros_object_format="elf_i386"
1371 aros_kernel_ar_flags="-cr"
1372 aros_target_strip_flags="-x"
1373 kernel_tool_flags="-m32"
1376 aros_target_cpu="x86_64"
1377 aros_object_format="elf_x86_64"
1378 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1379 aros_isa_flags="$""(ISA_X8664_FLAGS)"
1380 aros_macosx_version="10.6"
1381 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_OMIT_FP)"
1382 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_OMIT_FP)"
1383 aros_kernel_cflags="-m64"
1384 aros_kernel_ldflags="-m64"
1385 aros_nominal_depth=8
1386 aros_kernel_rs="$toolchain_ar"
1387 aros_kernel_ar_flags="-cr"
1388 aros_kernel_ld="$toolchain_ld"
1389 aros_kernel_as="$toolchain_as"
1390 aros_kernel_ranlib="$toolchain_ranlib"
1391 aros_kernel_nm="$toolchain_nm"
1392 aros_kernel_strip="strip"
1393 kernel_tool_prefix="i686-apple-darwin10-"
1396 aros_target_cpu="ppc"
1397 aros_object_format="elf32ppc"
1398 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1399 aros_kernel_ldflags=""
1400 aros_macosx_version="10.0"
1401 aros_nominal_depth=8
1402 gcc_target_cpu="ppc"
1403 aros_kernel_rs="$toolchain_ar"
1404 aros_kernel_ar_flags="-cr"
1405 aros_kernel_ld="$toolchain_ld -arch ppc"
1406 aros_kernel_as="$toolchain_as -arch ppc"
1407 aros_kernel_ranlib="$toolchain_ranlib -arch ppc"
1408 aros_kernel_nm="$toolchain_nm -arch ppc"
1409 aros_kernel_strip="strip -arch ppc"
1410 kernel_tool_prefix="powerpc-apple-darwin10-"
1413 aros_ios_platform="iPhoneOS"
1414 aros_target_cpu="arm"
1415 aros_object_format="armelf_aros"
1416 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1417 aros_c_libs="$aros_c_libs -laeabi"
1418 aros_nominal_depth=8
1419 gcc_target_cpu="arm"
1420 aros_kernel_rs="$toolchain_ar"
1421 aros_kernel_ar_flags="-cr"
1422 aros_kernel_ld="$toolchain_ld -arch arm"
1423 aros_kernel_ranlib="$toolchain_ranlib -arch arm"
1424 kernel_tool_prefix="arm-apple-darwin10-"
1425 export PATH="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/usr/bin:$PATH"
1428 AC_MSG_ERROR("Unsupported target CPU for darwin hosted flavour -- $target_cpu")
1431 case "$aros_target_variant" in
1433 make_extra_targetcfg="$export_newline""# Apple iOS stuff for gcc$export_newline""IOS_LDFLAGS := -F$""(IOS_SDK_PATH)/System/Library/Frameworks$export_newline"
1434 aros_ios_version="3.0"
1435 aros_nominal_width=320
1436 aros_nominal_height=480
1437 aros_ios_sdk="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/SDKs/$aros_ios_platform$aros_sdk_version.sdk"
1438 target_extra_cfg+="$export_newline""# Apple iOS specific$export_newline""IOS_PLATFORM := $aros_ios_platform$export_newline""IOS_OS_VERSION := $aros_ios_version$export_newline""IOS_SDK_PATH := $aros_ios_sdk$export_newline"
1439 kernel_tool_flags="$target_tool_flags -isysroot $aros_ios_sdk"
1440 aros_kernel_includes="-isystem $aros_ios_sdk/usr/include"
1442 # This is here because it may depend on iOS or SDK version
1443 aros_kernel_cflags="$aros_kernel_cflags -miphoneos-version-min=$aros_ios_version"
1444 aros_kernel_ldflags="$aros_kernel_ldflags -miphoneos-version-min=$aros_ios_version"
1445 aros_kernel_objcflags="-fobjc-abi-version=2 -fobjc-legacy-dispatch"
1448 aros_kernel_cflags="$aros_kernel_cflags -mmacosx-version-min=$aros_macosx_version"
1449 aros_kernel_ldflags="$aros_kernel_ldflags -mmacosx-version-min=$aros_macosx_version"
1455 aros_target_arch="dragonfly"
1456 aros_target_family="unix"
1457 aros_flavour="emulation"
1458 case "$target_cpu" in
1460 aros_target_cpu="i386"
1461 aros_object_format="elf_i386"
1462 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__DragonFly__"
1463 aros_isa_flags="$""(ISA_X86_FLAGS)"
1466 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_OMIT_FP)"
1467 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_OMIT_FP)"
1468 aros_target_cpu="x86_64"
1469 aros_object_format="elf_x86_64"
1470 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__DragonFly__"
1471 aros_isa_flags="$""(ISA_X8664_FLAGS)"
1474 AC_MSG_ERROR("Unknown CPU for DragonFly -- $target_cpu")
1480 aros_target_arch="netbsd"
1481 aros_target_family="unix"
1482 case "$target_cpu" in
1484 aros_target_cpu="m68k"
1485 aros_object_format="m68kelf"
1486 aros_flavour="emulcompat"
1487 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__NetBSD__"
1488 aros_isa_flags="$""(ISA_MC68000_FLAGS)"
1489 gcc_target_cpu="mc68000"
1492 aros_target_cpu="i386"
1493 aros_object_format="elf_i386"
1494 aros_flavour="emulation"
1495 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__NetBSD__"
1496 aros_isa_flags="$""(ISA_X86_FLAGS)"
1497 aros_nominal_depth=8
1498 gcc_target_cpu="i386"
1501 AC_MSG_ERROR("Unknown CPU for NetBSD -- $target_cpu")
1504 aros_target_genmap="-Wl,-M -Xlinker >"
1505 aros_flavour="emulation"
1506 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1510 aros_target_arch="openbsd"
1511 aros_target_family="unix"
1512 case "$target_cpu" in
1514 aros_target_cpu="i386"
1515 aros_object_format="elf_i386"
1516 aros_flavour="emulation"
1517 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__OpenBSD__"
1518 aros_isa_flags="$""(ISA_X86_FLAGS)"
1519 gcc_target_cpu="i386"
1522 AC_MSG_ERROR("Unknown CPU for OpenBSD -- $target_cpu")
1525 aros_target_genmap="-Wl,-M -Xlinker >"
1526 aros_target_nm_flags="-u"
1527 aros_flavour="emulation"
1531 aros_target_arch="solaris"
1532 aros_target_family="unix"
1533 case "$target_cpu" in
1535 aros_target_cpu="i386"
1536 aros_object_format="elf_i386"
1537 aros_flavour="emulation"
1538 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__Solaris__"
1539 aros_isa_flags="$""(ISA_X86_FLAGS)"
1540 aros_nominal_depth=8
1541 gcc_target_cpu="i386"
1544 aros_target_cpu="sparc"
1545 aros_object_format="elf_sparc"
1546 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dsparc -D__Solaris__"
1547 gcc_target_cpu="sparc"
1550 AC_MSG_ERROR("Unknown CPU for Solaris -- $target_cpu")
1553 aros_config_cppflags="$aros_config_cppflags -D$aros_target_cpu"
1554 aros_flavour="emulation"
1558 aros_target_arch="morphos"
1559 aros_shared_default="no"
1560 aros_target_cpu="ppc"
1561 aros_object_format="elf_ppc"
1562 aros_flavour="nativecompat"
1563 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1564 gcc_target_cpu="ppc"
1568 aros_target_arch="sam440"
1569 aros_shared_default="no"
1570 aros_target_cpu="ppc"
1571 aros_object_format="elf32ppc"
1572 aros_flavour="ppcnative"
1573 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1574 aros_kernel_ldflags=""
1575 aros_nominal_width=1024
1576 aros_nominal_height=768
1577 aros_nominal_depth=24
1578 aros_isa_flags="$aros_isa_flags -mcpu=440fp -mno-toc"
1579 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1580 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1581 gcc_target_cpu="powerpc"
1585 aros_target_arch="efika"
1586 aros_shared_default="no"
1587 aros_target_cpu="arm"
1588 aros_object_format="armelf_aros"
1589 aros_flavour="standalone"
1590 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1591 aros_kernel_ldflags=""
1592 aros_nominal_width=1024
1593 aros_nominal_height=600
1594 aros_c_libs="$aros_c_libs -laeabi"
1595 gcc_default_cpu="armv7-a"
1596 gcc_default_fpu="vfpv3"
1597 aros_isa_flags="$aros_isa_flags -mtune=cortex-a8"
1598 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1599 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1600 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1601 if test "$optimization" = "default"; then
1602 optimization_level="-Os"
1604 case "$target_cpu" in
1606 gcc_default_float_abi="hard"
1611 gcc_default_float_abi="softfp"
1614 AC_MSG_ERROR("Unknown CPU for EfikaMX $target_cpu")
1620 aros_target_arch="chrp"
1621 aros_shared_default="no"
1622 aros_target_cpu="ppc"
1623 aros_object_format="elf32ppc"
1624 aros_flavour="ppcnative"
1625 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1626 aros_kernel_ldflags=""
1627 aros_nominal_width=640
1628 aros_nominal_height=480
1629 aros_isa_flags="$aros_isa_flags -mno-toc"
1630 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1631 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES)"
1632 gcc_target_cpu="powerpc"
1633 case "$aros_target_variant" in
1635 aros_isa_flags="$aros_isa_flags -mcpu=603e"
1636 aros_config_cppflags="$aros_config_cppflags -DBIG_ENDIAN_OHCI=1"
1642 PLATFORM_EXECSMP="#define __AROSPLATFORM_SMP__"
1643 aros_flavour="standalone"
1644 aros_target_arch="raspi"
1646 aros_shared_default="no"
1648 aros_target_mkdep="$aros_target_mkdep -D__GNUC__"
1650 case "$target_cpu" in
1652 aros_target_cpu="aarch64"
1653 gcc_default_cpu="aarch64"
1654 aros_object_format="aarch64elf_aros"
1657 aros_target_cpu="arm"
1658 gcc_default_cpu="armv6zk"
1659 gcc_default_cpu_tune="arm1176jzf-s"
1660 aros_object_format="armelf_aros"
1661 aros_isa_flags="$aros_isa_flags -marm"
1662 aros_config_cflags="$aros_config_cflags"
1663 aros_config_cxxflags="$aros_config_cxxflags"
1664 aros_config_aflags="$aros_config_aflags -marm"
1665 aros_kernel_cflags="$aros_kernel_cflags -marm"
1666 aros_target_mkdep="$aros_target_mkdep -Darm"
1667 aros_c_libs="$aros_c_libs -laeabi"
1670 aros_flavour="standcompat"
1671 aros_target_cpu="armeb"
1672 gcc_default_float_abi="hard"
1673 gcc_default_cpu="armv7ve"
1674 gcc_default_cpu_tune="cortex-a7"
1675 aros_object_format="armelfb_aros"
1676 aros_isa_flags="$aros_isa_flags -marm"
1677 aros_config_cflags="$aros_config_cflags"
1678 aros_config_cxxflags="$aros_config_cxxflags"
1679 aros_config_aflags="$aros_config_aflags -marm"
1680 aros_kernel_cflags="$aros_kernel_cflags -marm"
1681 aros_target_mkdep="$aros_target_mkdep -Darm"
1682 aros_c_libs="$aros_c_libs -laeabi"
1685 aros_target_cpu="arm"
1686 gcc_default_cpu="armv6zk"
1687 gcc_default_cpu_tune="arm1176jzf-s"
1688 aros_object_format="armelf_aros"
1689 aros_isa_flags="$aros_isa_flags -marm"
1690 aros_config_cflags="$aros_config_cflags"
1691 aros_config_cxxflags="$aros_config_cxxflags"
1692 aros_config_aflags="$aros_config_aflags -marm"
1693 aros_kernel_cflags="$aros_kernel_cflags -marm"
1694 aros_target_mkdep="$aros_target_mkdep -Darm"
1695 aros_c_libs="$aros_c_libs -laeabi"
1698 AC_MSG_ERROR("Unknown CPU for RasPi $target_cpu")
1702 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
1703 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
1704 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
1705 aros_kernel_cflags="$aros_kernel_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
1707 case "$aros_target_variant" in
1709 ENABLE_EXECSMP="#define __AROSEXEC_SMP__"
1715 aros_flavour="standalone"
1716 aros_target_arch="stm32f7_discovery"
1717 aros_target_cpu="arm"
1718 aros_target_cpu_mode="thumb2"
1719 aros_object_format="armelf_aros"
1720 aros_shared_default="no"
1722 gcc_default_cpu="armv7e-m"
1723 gcc_default_cpu_tune="cortex-m7"
1724 gcc_default_fpu="fpv5-sp-d16"
1725 gcc_default_float_abi="hard"
1727 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dthumb"
1731 aros_elf_translate="$""(ELF2HUNK)"
1732 make_extra_commands="$export_newline""ELF2HUNK := $""(TOOLDIR)/elf2hunk$""(HOST_EXE_SUFFIX)$export_newline"
1733 aros_target_arch="amiga"
1734 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D_AMIGA -DAMIGA"
1735 aros_shared_default="no"
1737 case "$target_cpu" in
1739 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")
1741 aros_target_cpu="m68k"
1742 aros_object_format="m68kelf"
1743 aros_flavour="standcompat"
1744 gcc_target_cpu="m68000"
1745 aros_isa_flags="$""(ISA_MC68000_FLAGS)"
1746 aros_nowarn_flags="$aros_nowarn_flags NOWARN_VOLATILE_REGISTER_VAR"
1747 aros_config_cppflags="$aros_config_cppflags -DNOLIBINLINE"
1748 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_FREESTANDING) $""(CFLAGS_OMIT_FP) $""(CFLAGS_BUILTIN)"
1749 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_STRICT_ALIASING) $""(CFLAGS_FREESTANDING) $""(CFLAGS_OMIT_FP) $""(CFLAGS_BUILTIN)"
1750 if test "$optimization" = "default"; then
1751 optimization_level="-Os"
1753 aros_config_aflags="$aros_config_aflags"
1754 aros_target_strip_flags="-R.comment --strip-debug"
1755 aros_nominal_width=640
1756 aros_nominal_height=256
1757 aros_nominal_depth=2
1761 aros_flavour="native"
1762 gcc_target_cpu="ppc"
1765 AC_MSG_ERROR("Unknown CPU for Amiga $target_cpu")
1771 aros_target_arch="mingw32"
1772 aros_shared_default="no"
1773 aros_flavour="emulation"
1774 aros_shared_cflags=""
1775 need_crosstools="yes"
1778 case "$target_cpu" in
1780 aros_target_cpu="i386"
1781 aros_object_format="elf_i386"
1782 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1783 aros_isa_flags="$""(ISA_X86_FLAGS)"
1784 aros_nominal_depth=8
1785 gcc_target_cpu="i386"
1787 kernel_tool_prefix="i386-mingw32-"
1790 aros_target_cpu="x86_64"
1791 aros_object_format="elf_x86_64"
1792 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1793 aros_isa_flags="$""(ISA_X8664_FLAGS)"
1794 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_OMIT_FP)"
1795 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_OMIT_FP)"
1796 aros_nominal_depth=8
1797 kernel_tool_prefix="x86_64-w64-mingw32-"
1800 aros_target_cpu="arm"
1801 aros_object_format="armelf_aros"
1802 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1803 aros_c_libs="$aros_c_libs -laeabi"
1804 aros_nominal_depth=8
1805 gcc_target_cpu="arm"
1806 gcc_default_float_abi="soft"
1807 kernel_tool_prefix="arm-mingw32ce-"
1808 aros_nominal_width=160
1809 aros_nominal_height=160
1812 AC_MSG_ERROR("Unknown CPU for Mingw32 -- $target_cpu")
1815 if test $host_os = "cygwin"; then
1816 aros_kernel_cflags="-mno-cygwin"
1820 aros_target_arch="pp"
1821 aros_shared_default="no"
1822 case "$target_cpu" in
1824 aros_target_cpu="m68k"
1825 aros_object_format="m68kelf"
1826 aros_flavour="palmnative"
1827 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1828 aros_isa_flags="$""(ISA_MC68000_FLAGS)"
1829 aros_nominal_width=160
1830 aros_nominal_height=160
1831 aros_nominal_depth=1
1832 aros_target_ar_flags="cru"
1833 aros_c_libs="$aros_c_libs -lgcc1"
1834 aros_shared_default=no
1835 aros_shared_cflags="-fpic"
1836 aros_shared_aflags=""
1837 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1838 aros_kernel_ldflags="-Wl,-rpath,./lib"
1839 aros_debug_cppflags="$aros_messages_debug"
1840 aros_debug_cflags="$aros_symbols_debug"
1841 aros_debug_aflags=""
1842 aros_debug_ldflags="$aros_symbols_debug"
1843 aros_mungwall_debug="0"
1844 aros_modules_debug="0"
1845 gcc_target_cpu="mc68000"
1846 ignore_undefined_symbols="-ius"
1849 AC_MSG_ERROR("Unknown CPU for PalmPilot -- $target_cpu")
1855 aros_target_arch="mac"
1856 aros_shared_default="no"
1857 case "$target_cpu" in
1859 aros_target_cpu="m68k"
1860 aros_object_format="m68kelf"
1861 aros_flavour="mac68knative"
1862 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1863 aros_isa_flags="$""(ISA_MC68000_FLAGS)"
1864 aros_nominal_width=512
1865 aros_nominal_height=384
1866 aros_nominal_depth=8
1867 aros_target_ar_flags="cru"
1868 aros_c_libs="$aros_c_libs -lgcc1"
1869 aros_shared_default=no
1870 aros_shared_cflags="-fpic"
1871 aros_shared_aflags=""
1872 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1873 aros_kernel_ldflags="-Wl,-rpath,./lib"
1874 aros_debug_cppflags="$aros_messages_debug"
1875 aros_debug_cflags="$aros_symbols_debug"
1876 aros_debug_aflags=""
1877 aros_debug_ldflags="$aros_symbols_debug"
1878 aros_mungwall_debug="0"
1879 aros_modules_debug="0"
1880 gcc_target_cpu="mc68000"
1881 ignore_undefined_symbols="-ius"
1884 AC_MSG_ERROR("Unknown CPU for Mac68k -- $target_cpu")
1890 AC_MSG_ERROR([Unsupported target architecture $target])
1894 #-----------------------------------------------------------------------------
1895 crosstools_guess="yes"
1896 aros_target_toolchain="no"
1897 aros_kernel_sysroot=""
1899 AC_MSG_CHECKING([Kernel toolchain prefix])
1900 AC_ARG_WITH(kernel-toolchain-prefix,AC_HELP_STRING([--with-kernel-toolchain-prefix=...],[Specify crosscompile toolchain prefix for kernel objects]),[kernel_tool_prefix="$withval"])
1901 AC_MSG_RESULT($kernel_tool_prefix)
1903 AC_MSG_CHECKING([ELF toolchain prefix])
1904 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"
1905 crosstools_guess="no"])
1906 AC_MSG_RESULT($elf_tool_prefix)
1908 AC_MSG_CHECKING([AROS toolchain prefix])
1909 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"
1910 crosstools_guess="no"])
1911 if test "$aros_tool_prefix" = "yes" ; then
1912 aros_tool_prefix=$aros_target_cpu-aros-
1914 AC_MSG_RESULT($aros_tool_prefix)
1916 #-----------------------------------------------------------------------------
1917 # Checking if we should build crosstools..
1918 AC_MSG_CHECKING([whether to build crosstools])
1919 AC_ARG_ENABLE(crosstools,AC_HELP_STRING([--disable-crosstools],[Do not build cross-compiler toolchain]),crosstools="$enableval",crosstools="$crosstools_guess")
1920 AC_MSG_RESULT($crosstools)
1922 if test "${crosstools}" = "yes"; then
1923 if test "${crosstools_guess}" = "no"; then
1924 AC_MSG_ERROR([Cannot build external toolchain if an external ELF or AROS toolchain is specified])
1928 if test "${crosstools}" = "yes" || test "${crosstools_guess}" = "no"; then
1929 aros_target_toolchain="yes"
1932 AC_MSG_CHECKING([where to install the crosstools binaries])
1933 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])
1934 if test "x$aros_toolchain_install" = "x"; then
1935 AROS_CROSSTOOLSDIR="$AROS_BUILDDIR_UNIX/bin/$aros_host_arch-$aros_host_cpu/tools/crosstools"
1937 AROS_CROSSTOOLSDIR="$aros_toolchain_install"
1938 PATH="$AROS_CROSSTOOLSDIR:$PATH"
1939 if test "$crosstools_guess" = "no" ; then
1940 if test "x-$aros_flavour" != "x-emulation" -a "x-$aros_flavour" != "x-emulcompat" ; then
1941 aros_kernel_sysroot="$""(TARGET_SYSROOT)"
1945 AC_MSG_RESULT($AROS_CROSSTOOLSDIR)
1947 #-----------------------------------------------------------------------------
1948 if test "$aros_toolchain" = "gnu" ; then
1949 AC_MSG_CHECKING([what specific target binutils version to use])
1951 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="")
1952 if test "$use_binutils_version" = ""; then
1953 target_binutils_version="$default_binutils_version"
1955 target_binutils_version="$use_binutils_version"
1957 if test "$aros_toolchain" = "gnu" ; then
1958 AC_MSG_RESULT($target_binutils_version)
1962 # Helper to identify gcc version
1963 AC_DEFUN([CROSS_GCC_VERSION], [
1964 target_gcc_version=""
1965 AC_CACHE_CHECK([gcc version],[ax_cv_gcc_version],[
1966 ax_cv_gcc_version="`$AROS_CROSSTOOLSDIR/${aros_tool_prefix}${toolchain_cpp_preprocessor} -dumpversion`"
1967 AS_IF([test "x$ax_cv_gcc_version" = "x"],[
1968 ax_cv_gcc_version=""
1971 target_gcc_version=$ax_cv_gcc_version
1972 AC_SUBST([target_gcc_version])
1975 #-----------------------------------------------------------------------------
1976 if test "$aros_toolchain" = "gnu" ; then
1977 AC_MSG_CHECKING([what specific target gcc version to use])
1979 AC_ARG_WITH(gcc-version,AC_HELP_STRING([--with-gcc-version=VERSION],[Compile gcc-VERSION for AROS]),use_gcc_version="$withval",use_gcc_version="")
1980 if test "$use_gcc_version" = ""; then
1981 if test "${crosstools}" = "no"; then
1982 if test "x$aros_toolchain_install" != "x"; then
1986 if test "$use_gcc_version" = ""; then
1987 target_gcc_version="$default_gcc_version"
1990 target_gcc_version="$use_gcc_version"
1992 if test "$aros_toolchain" = "gnu" ; then
1993 AC_MSG_RESULT($target_gcc_version)
1995 AC_MSG_CHECKING([version string style])
1996 if test "${target_gcc_version#*$'-'}" != "$target_gcc_version" ; then
1997 AC_MSG_RESULT(snapshot)
1998 GCC_VERSION_MAJOR=$(echo $target_gcc_version | cut -d'-' -f1)
1999 GCC_VERSION_MINOR=-1
2000 GCC_VERSION_PATCH=-1
2002 AC_MSG_RESULT(release)
2003 GCC_VERSION_MAJOR=$(echo $target_gcc_version | cut -d'.' -f1)
2004 GCC_VERSION_MINOR=$(echo $target_gcc_version | cut -d'.' -f2)
2005 GCC_VERSION_PATCH=$(echo $target_gcc_version | cut -d'.' -f3)
2008 gcc_fix_bitfields="false"
2009 if test "$GCC_VERSION_MAJOR" -gt "4" ; then
2010 gcc_fix_bitfields="true"
2012 if test "$GCC_VERSION_MAJOR" -gt "3" ; then
2013 if test "$GCC_VERSION_MINOR" -gt "6" ; then
2014 gcc_fix_bitfields="true"
2019 if test "$gcc_fix_bitfields" = "true" ; then
2020 case "$aros_target_cpu" in
2022 x86_isa_extra="$x86_isa_extra $""(CFLAGS_NO_MS_BITFIELDS)"
2023 x86_64_isa_extra="$x86_64_isa_extra $""(CFLAGS_NO_MS_BITFIELDS)"
2029 AC_MSG_CHECKING([whether to enable Objective-C suppport])
2030 AC_ARG_ENABLE(objc,AC_HELP_STRING([--enable-objc],[Enable Objectve-C support (default=no)]),objc="$enableval",objc="no")
2031 AC_MSG_RESULT($objc)
2032 if test "x$objc" = "xyes"; then
2035 objc_target="no-objc"
2038 AC_MSG_CHECKING([whether to enable Java suppport])
2039 AC_ARG_ENABLE(java,AC_HELP_STRING([--enable-java],[Enable Java support (default=no)]),java="$enableval",java="no")
2040 AC_MSG_RESULT($java)
2041 if test "x$java" != "xno"; then
2044 java_target="no-java"
2047 spec_obj_format="-m $aros_object_format"
2048 # Now process extra architecture-specific options.
2049 # Currently this is implemented only for ARM. We can specify which minimum CPU and FPU to use,\
2050 # as well as floating-point ABI.
2051 case "$aros_target_cpu" in
2053 aros_isa_targets="M68K_ISA_TARGETS :=MC68020 MC68040"
2054 aros_isa_extra="$aros_isa_extra$export_newline$aros_isa_targets$export_newline"
2055 aros_isa_extra="$aros_isa_extra$m68k_isa_extra$export_newline$m68k_020_isa_extra$export_newline$m68k_030_isa_extra$export_newline$m68k_040_isa_extra$export_newline$m68k_060_isa_extra$export_newline$m68k_ac080_isa_extra$export_newline"
2056 aros_isa_extra="$aros_isa_extra$m68k_020_cppflags$export_newline$m68k_030_cppflags$export_newline$m68k_040_cppflags$export_newline$m68k_060_cppflags$export_newline"
2057 aros_isa_extra="$aros_isa_extra$m68k_020_cflags$export_newline$m68k_030_cflags$export_newline$m68k_040_cflags$export_newline$m68k_060_cflags$export_newline"
2058 aros_isa_extra="$aros_isa_extra$m68k_020_ldflags$export_newline$m68k_030_ldflags$export_newline$m68k_040_ldflags$export_newline$m68k_060_ldflags$export_newline"
2059 aros_isa_extra="$aros_isa_extra$m68k_020_ext$export_newline$m68k_030_ext$export_newline$m68k_040_ext$export_newline$m68k_060_ext$export_newline"
2062 aros_isa_extra="$export_newline$x86_isa_extra$export_newline$x86_64_isa_extra$export_newline"
2063 dnl x86_64 can build 32 or 64bit code
2064 spec_obj_format="%{!m32:-m elf_x86_64} %{m32:-m elf_i386}"
2067 dnl ARM defaults are: armv6 + vfp (unless overriden in per-target section above)
2068 if test "$gcc_default_cpu" = ""; then
2069 gcc_default_cpu="armv6"
2071 if test "$gcc_default_fpu" = ""; then
2072 gcc_default_fpu="vfp"
2074 if test "$gcc_default_endian" = ""; then
2075 if test "$target_cpu" = "armeb"; then
2076 gcc_default_endian="big-endian"
2078 gcc_default_endian="little-endian"
2081 if test "$gcc_default_float_abi" = ""; then
2082 if test "$target_cpu" = "armhf"; then
2083 gcc_default_float_abi="hard"
2085 gcc_default_float_abi="softfp"
2089 AC_MSG_CHECKING([Which minimum CPU to use])
2090 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)
2091 AC_MSG_RESULT($aros_gcc_cpu)
2093 AC_MSG_CHECKING([Which minimum FPU to use])
2094 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)
2095 AC_MSG_RESULT($aros_gcc_fpu)
2097 AC_MSG_CHECKING([Which floating point ABI to use])
2098 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)
2099 AC_MSG_RESULT($aros_gcc_float_abi)
2101 AC_MSG_CHECKING([Which ARM mode to use])
2102 if test "$aros_target_cpu_mode" = ""; then
2103 aros_target_cpu_mode="arm32"
2104 AC_MSG_RESULT([Defaulting to $aros_target_cpu_mode])
2106 AC_MSG_RESULT([$aros_target_cpu_mode])
2109 case "$aros_target_cpu_mode" in
2111 gcc_default_mode="arm"
2112 aros_isa_flags="$aros_isa_flags -m$gcc_default_mode -m$gcc_default_endian -mthumb-interwork -march=$aros_gcc_cpu -mfpu=$aros_gcc_fpu -mfloat-abi=$aros_gcc_float_abi"
2115 AC_MSG_ERROR([ARM 64-bit mode is unsupported])
2118 AC_MSG_ERROR([Thumb1 16-bit mode is unsupported])
2121 AC_MSG_ERROR([Thumb1 16-bit mode is unsupported])
2124 gcc_default_mode="thumb"
2125 # Do not specify -mthumb-interwork as it may add extra code to support arm/thumb interwork
2126 aros_isa_flags="$aros_isa_flags -m$gcc_default_mode -$gcc_default_endian -march=$aros_gcc_cpu -mfpu=$aros_gcc_fpu -mfloat-abi=$aros_gcc_float_abi"
2129 AC_MSG_ERROR([Unsupported ARM mode specified $aros_target_cpu_mode])
2133 aros_config_cflags="$aros_config_cflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
2134 aros_config_cxxflags="$aros_config_cxxflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
2135 aros_config_aflags="$aros_config_aflags $""(CFLAGS_NO_ASYNCHRONOUS_UNWIND_TABLES) $""(CFLAGS_NO_EXCEPTIONS)"
2138 aros_isa_extra="$x86_isa_extra$export_newline$x86_64_isa_extra$export_newline"
2139 aros_kernel_ldflags="$aros_kernel_ldflags -m32"
2143 # Some architectures may need custom ELF specs.
2144 if test -f $SRCDIR/config/${aros_object_format}-specs.in; then
2145 elf_specs_in=config/${aros_object_format}-specs.in
2147 elf_specs_in=config/elf-specs.in
2150 # Some compilers (ppc-elf-gcc is known to) have CPU defines in specs
2151 # Since we override specs, we may need to put these defines there
2152 if test "$gcc_target_cpu" != ""; then
2153 gcc_target_cpu="-D__${gcc_target_cpu}__"
2156 AC_MSG_CHECKING([where to download sourcecode for external ports])
2157 AC_ARG_WITH(portssources,AC_HELP_STRING([--with-portssources=DIR],[Where to download sourcecode for external ports]),with_portssrcdir=$withval,with_portssrcdir="default")
2158 if test "$with_portssrcdir" = "default"; then
2159 AROS_PORTSSRCDIR="$AROS_BUILDDIR_UNIX/bin/Sources"
2161 AROS_PORTSSRCDIR="$with_portssrcdir"
2163 AC_MSG_RESULT($AROS_PORTSSRCDIR)
2165 AC_MSG_CHECKING([which bootloader to use])
2166 AC_ARG_WITH(bootloader,AC_HELP_STRING([--with-bootloader=NAME],[Use a specific bootloader]),target_bootloader=$withval,target_bootloader=$target_bootloader)
2167 if test "$target_bootloader" = "none"; then
2168 aros_target_bootloader=""
2170 aros_target_bootloader="$target_bootloader"
2172 AC_MSG_RESULT($target_bootloader)
2174 AC_MSG_CHECKING([which icon-set to use])
2175 AC_ARG_WITH(iconset,AC_HELP_STRING([--with-iconset=NAME],[Use a specific Icon-set (default=Gorilla).]),target_iconset=$withval,target_iconset="default")
2176 if test "$target_iconset" = "default"; then
2177 aros_target_iconset="Gorilla"
2178 target_iconset="default (Gorilla)"
2180 aros_target_iconset="$target_iconset"
2182 AC_MSG_RESULT($target_iconset)
2184 AC_MSG_CHECKING([which GUI Theme to use])
2185 AC_ARG_WITH(theme,AC_HELP_STRING([--with-theme=NAME],[Use a specific GUI Theme]),target_guitheme=$withval,target_guitheme="default")
2186 if test "$target_guitheme" = "default"; then
2187 aros_target_guitheme="Ice"
2189 aros_target_guitheme="$target_guitheme"
2191 AC_MSG_RESULT($aros_target_guitheme)
2193 # Find out if we are cross-compiling (i.e. if we can't use the host compiler
2197 dnl The first case is simple. If we are compiling for another CPU, we are cross-compiling for sure
2198 if test "$aros_host_cpu" != "$aros_target_cpu" ; then
2202 dnl x86-64 toolchains can also produce i386 binaries, given -m32 flag.
2203 dnl The flag itself is given in per-target section, because some targets require to pass it
2204 dnl in a different manner, otherwise some tests fail.
2205 dnl TODO: Justify this.
2206 if test "$aros_host_cpu" == "x86_64" ; then
2207 if test "$aros_target_cpu" == "i386" ; then
2212 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2213 dnl For a hosted build we are cross-compiling if host OS differs from build OS.
2214 dnl TODO: This might get a little bit more tricky if we ever cross-compile ARM-Android-hosted
2215 dnl AROS on ARM Linux, or even vice versa (Linux-hosted ARM AROS building on ARM Android).
2216 dnl ARM ABIs of Linux and Android are not compatible (despite very close), so host_cc can't be
2217 dnl used to build bootstrap for target arch in either case.
2218 dnl For us Android is not a separate OS, but a variant of Linux, so both systems will be
2219 dnl identified as 'linux'. If this ever involves, we'll have to implement some additional check,
2220 dnl perhaps introducing aros_host_variant
2221 if test "$aros_host_arch" != "$aros_target_arch" ; then
2225 dnl For a native build we only care if our host_cc can produce static ELF files. If so, we can use
2226 dnl it as kernel_cc. If not, (e.g. we are on Windows or Darwin), we need a crosscompiler.
2227 dnl if test "$host_cc_elf" = "no" ; then
2232 if test "$cross_compiling" = "no" ; then
2233 kernel_tool_prefix=""
2234 if test "$host_cc_elf" = "yes" ; then
2239 if test "$kernel_tool_version" != ""; then
2240 kernel_tool_version="-$kernel_tool_version"
2243 #######################################################################
2244 ## Compute what toolchains to use, and their paths ##
2245 #######################################################################
2247 # This takes, as input:
2248 # crosstools {yes,no}
2249 # kernel_tool_version {"",[version]}
2250 # target_tool_version {"",[version]}
2251 # kernel_tool_prefix {none,[some-arch-os-]}
2253 # target_tool_prefix ${aros_target_cpu}-aros-
2254 # aros_tool_prefix ${aros_target_cpu}-aros-
2257 # aros_kernel_{cpp,cc,ar,ld,as,ranlib,nm,strip}
2258 # Where the 'kernel' binaries are located
2259 # orig_target_{cpp,cc,ar,ld,as,ranlib,nm,strip}
2260 # Where the 'target' binaries are located
2261 # (not the symlink farm - that is aros_target_*!)
2264 # if crosstools then
2265 # if kernel_tools_prefix = "no-kernel-prefix-"
2266 # aros_kernel_* = crosstools cc paths
2267 # aros_kernel_cc = elf cc wrapper around crosstools cc
2269 # VALIDATE(${kernel_tools_prefix}*)
2270 # aros_kernel_* = ${kernel_tools_prefix}*
2271 # if ${kernel_tools_prefix}cc is an AROS gcc
2272 # aros_kernel_cc = ${kernel_tools_prefix}cc
2274 # aros_kernel_cc = elf cc wrapper around ${kernel_tools_prefix}cc
2278 # orig_target_* = aros built crosstools
2279 # orig_target_cc = elf cc wrapper around crosstools cc
2281 # VALIDATE(${kernel_tools_prefix}*)
2283 # orig_target_* = aros_kernel_*
2284 # if aros_kernel_cc is an AROS gcc
2285 # orig_target_cc = aros_kernel_cc
2287 # orig_target_cc = aros cc wrapper around aros_kernel_cc
2291 if test "$aros_toolchain" = "gnu" ; then
2292 target_tool_prefix="${aros_target_cpu}-aros-"
2293 elif test "$aros_toolchain" = "llvm" ; then
2294 target_tool_prefix="bin/"
2297 if test "$kernel_tool_prefix" != "" ; then
2298 AC_MSG_CHECKING([which kernel tools])
2299 AC_MSG_RESULT([$kernel_tool_prefix]);
2302 if test "$kernel_tool_prefix" = "none" ; then
2303 dnl ELF wrapper can be used only for native bootstrap
2304 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2305 AC_MSG_ERROR([--with-kernel-toolchain-prefix= is required for this arch])
2308 if test "x-$aros_flavour" != "x-standalone" -o "x-$aros_flavour" != "x-standcompat" ; then
2309 # Kernel tools required - find them
2310 # Note that 'normally', aros_kernel_* overrides will be
2311 # empty, unless specified in the per-arch sections above.
2313 if test "x$aros_kernel_cpp" = "x"; then
2314 aros_kernel_cpp=${kernel_tool_prefix}${CPP}
2316 AROS_BUILDCMD(aros_kernel_cpp,$aros_kernel_cpp,${kernel_tool_version})
2317 AROS_TOOL_KERNEL(aros_kernel_cpp,cpp,$aros_kernel_cpp)
2318 AROS_REQUIRED(cpp,$aros_kernel_cpp)
2320 if test "x$aros_kernel_cc" = "x"; then
2321 aros_kernel_cc=${kernel_tool_prefix}${CC}
2323 AROS_BUILDCMD(aros_kernel_cc,$aros_kernel_cc,${kernel_tool_version})
2324 AROS_TOOL_KERNEL(aros_kernel_cc,cc,$aros_kernel_cc)
2325 AROS_REQUIRED(cc,$aros_kernel_cc)
2327 if test "x$aros_kernel_cxx" = "x"; then
2328 aros_kernel_cxx=${kernel_tool_prefix}${CXX}
2330 AROS_BUILDCMD(aros_kernel_cxx,$aros_kernel_cxx,${kernel_tool_version})
2331 AROS_TOOL_KERNEL(aros_kernel_cxx,cxx,$aros_kernel_cxx)
2332 # If it's set, make sure it's really there
2333 if test "x$aros_kernel_cxx" != "x" ; then
2334 AROS_REQUIRED(cxx,$aros_kernel_cxx)
2336 if test "x$aros_kernel_ld" = "x"; then
2337 aros_kernel_ld=$aros_host_ld
2339 AROS_TOOL_KERNEL(aros_kernel_ld,ld,$aros_kernel_ld)
2340 AROS_REQUIRED(ld,$aros_kernel_ld)
2341 if test "x$aros_kernel_as" = "x"; then
2342 aros_kernel_as=$aros_host_as
2343 if test "x$aros_kernel_as" = "x"; then
2344 aros_kernel_as=${HOST_TOOLCHAIN_PREFIX}as${HOST_TOOLCHAIN_SUFFIX}
2347 AROS_TOOL_KERNEL(aros_kernel_as,as,$aros_kernel_as)
2348 AROS_REQUIRED(as,$aros_kernel_as)
2349 if test "x$aros_kernel_ar" = "x"; then
2350 aros_kernel_ar=$aros_host_full_ar
2352 AROS_TOOL_KERNEL(aros_kernel_ar,ar,$aros_kernel_ar)
2353 AROS_REQUIRED(ar,$aros_kernel_ar)
2354 if test "x$aros_kernel_ranlib" = "x"; then
2355 aros_kernel_ranlib=$aros_host_ranlib
2357 AROS_TOOL_KERNEL(aros_kernel_ranlib,ranlib,$aros_kernel_ranlib)
2358 AROS_REQUIRED(ranlib,$aros_kernel_ranlib)
2359 if test "x$aros_kernel_nm" = "x"; then
2360 aros_kernel_nm=$aros_host_nm
2361 if test "x$aros_kernel_nm" = "x"; then
2362 aros_kernel_nm=${HOST_TOOLCHAIN_PREFIX}nm${HOST_TOOLCHAIN_SUFFIX}
2365 AROS_TOOL_KERNEL(aros_kernel_nm,nm,$aros_kernel_nm)
2366 AROS_REQUIRED(nm,$aros_kernel_nm)
2367 AROS_TOOL_KERNEL(aros_kernel_strip,strip,$aros_kernel_strip)
2368 AROS_REQUIRED(strip,$aros_kernel_strip)
2370 # Objcopy and objdump are not required for the kernel
2371 # toolchain on many architectures.
2372 # So we'll look for them, but not make them strictly required.
2373 if test "x$aros_kernel_objcopy" = "x"; then
2374 aros_kernel_objcopy=$aros_host_objcopy
2375 if test "x$aros_kernel_objcopy" = "x"; then
2376 aros_kernel_objcopy=${HOST_TOOLCHAIN_PREFIX}objcopy${HOST_TOOLCHAIN_SUFFIX}
2379 AROS_TOOL_KERNEL(aros_kernel_objcopy,objcopy,$aros_kernel_objcopy)
2380 if test "x$aros_kernel_objdump" = "x"; then
2381 aros_kernel_objdump=$aros_host_objdump
2382 if test "x$aros_kernel_objdump" = "x"; then
2383 aros_kernel_objdump=${HOST_TOOLCHAIN_PREFIX}objdump${HOST_TOOLCHAIN_SUFFIX}
2386 AROS_TOOL_KERNEL(aros_kernel_objdump,objdump,$aros_kernel_objdump)
2387 if test "x${crosstools}" != "xyes" ; then
2388 AROS_REQUIRED(objcopy,$aros_kernel_objcopy)
2389 AROS_REQUIRED(objdump,$aros_kernel_objdump)
2394 AC_MSG_CHECKING([which target tools to use])
2395 if test "$aros_target_toolchain" = "yes"; then
2396 if test "$aros_toolchain" = "llvm" ; then
2399 msg_result=$target_tool_prefix
2401 AC_MSG_RESULT([$msg_result])
2402 # We are building AROS crosstools
2403 tmp_tool_prefix="$AROS_CROSSTOOLSDIR/${target_tool_prefix}"
2404 orig_target_cc="${tmp_tool_prefix}${toolchain_c_compiler}${target_tool_version}"
2405 orig_target_cxx="${tmp_tool_prefix}${toolchain_cxx_compiler}${target_tool_version}"
2406 orig_target_cpp="${tmp_tool_prefix}${toolchain_cpp_preprocessor}"
2407 orig_target_ld="${tmp_tool_prefix}${toolchain_ld}"
2408 orig_target_as="${tmp_tool_prefix}${toolchain_as}"
2409 orig_target_ar="${tmp_tool_prefix}${toolchain_ar}"
2410 orig_target_ranlib="${tmp_tool_prefix}${toolchain_ranlib}"
2411 orig_target_nm="${tmp_tool_prefix}${toolchain_nm}"
2412 orig_target_strip="${tmp_tool_prefix}${toolchain_strip}"
2413 orig_target_objcopy="${tmp_tool_prefix}${toolchain_objcopy}"
2414 orig_target_objdump="${tmp_tool_prefix}${toolchain_objdump}"
2416 # Determine whether AROS or ELF tools should be used
2417 if test "$aros_tool_prefix" = "none"; then
2418 aros_tool_prefix="${elf_tool_prefix}"
2421 AC_MSG_RESULT([$aros_tool_prefix])
2422 # We are *not* building AROS crosstools - use the AROS or ELF tools
2423 AROS_TOOL_TARGET(orig_target_cpp,cpp,${aros_tool_prefix}${toolchain_cpp_preprocessor}${target_tool_version})
2424 AROS_REQUIRED(cpp,$orig_target_cpp)
2425 AROS_TOOL_TARGET(orig_target_cc,gcc,${aros_tool_prefix}${toolchain_c_compiler}${target_tool_version})
2426 AROS_REQUIRED(cc,$orig_target_cc)
2427 AROS_TOOL_TARGET(orig_target_cxx,g++,${aros_tool_prefix}${toolchain_cxx_compiler}${target_tool_version})
2428 AROS_REQUIRED(cxx,$orig_target_cxx)
2429 AROS_TOOL_TARGET(orig_target_ld,gcc,${aros_tool_prefix}${toolchain_ld})
2430 AROS_REQUIRED(ld,$orig_target_ld)
2431 AROS_TOOL_TARGET(orig_target_as,as,aros_tool_prefix}${toolchain_as})
2432 AROS_REQUIRED(as,$orig_target_as)
2433 AROS_TOOL_TARGET(orig_target_ar,ar,${aros_tool_prefix}${toolchain_ar})
2434 AROS_REQUIRED(ar,$orig_target_ar)
2435 AROS_TOOL_TARGET(orig_target_ranlib,ar,${aros_tool_prefix}${toolchain_ranlib})
2436 AROS_REQUIRED(ranlib,$orig_target_ranlib)
2437 AROS_TOOL_TARGET(orig_target_nm,nm,${aros_tool_prefix}${toolchain_nm})
2438 AROS_REQUIRED(nm,$orig_target_nm)
2439 AROS_TOOL_TARGET(orig_target_strip,strip,${aros_tool_prefix}${toolchain_strip})
2440 AROS_REQUIRED(strip,$orig_target_strip)
2441 AROS_TOOL_TARGET(orig_target_objcopy,objcopy,${aros_tool_prefix}${toolchain_objcopy})
2442 AROS_REQUIRED(objcopy,$orig_target_objcopy)
2443 AROS_TOOL_TARGET(orig_target_objdump,objdump,${aros_tool_prefix}${toolchain_objdump})
2444 AROS_REQUIRED(objdump,$orig_target_objdump)
2447 if test "$kernel_tool_prefix" = "none" ; then
2448 # No kernel tools specified
2449 # Assume target tools == kernel tools with ELF wrapper
2450 aros_kernel_cc=$orig_target_cc
2451 aros_kernel_cxx=$orig_target_cxx
2452 aros_kernel_cpp=$orig_target_cpp
2453 aros_kernel_ld=$orig_target_ld
2454 aros_kernel_as=$orig_target_as
2455 aros_kernel_ar=$orig_target_ar
2456 aros_kernel_ranlib=$orig_target_ranlib
2457 aros_kernel_nm=$orig_target_nm
2458 aros_kernel_strip=$orig_target_strip
2459 aros_kernel_objcopy=$orig_target_objcopy
2460 aros_kernel_objdump=$orig_target_objdump
2461 use_kernel_cc_wrapper=yes
2464 # At this point, all aros_kernel_* and aros_target_*
2465 # tools should be set up correctly
2467 CC="$aros_kernel_cc $kernel_tool_flags"
2468 CPP="$aros_kernel_cpp"
2470 #-----------------------------------------------------------------------------
2472 # Find all the tools we need to compile. This could be cross-compiling
2473 # though! If that is the case we use the GNU form of the target and
2474 # simply add this to the front of the binary name. This is rather simple,
2475 # but it should work under most circumstances.
2477 # The default tools are to use the same as the host, but only if the
2478 # host and target CPU are the same. With GCC this is normally enough.
2482 aros_shared_ld="$aros_host_ld"
2484 aros_target_mkdep="$aros_host_mkdep"
2486 # The default tools executables to be linked to.
2487 if test "$rescomp" != ""; then
2488 AC_PATH_PROG(aros_kernel_rescomp,${kernel_tool_prefix}$rescomp)
2489 AROS_REQUIRED($rescomp,$aros_kernel_rescomp)
2492 # Set up the sources for the symlink farm
2493 if test "$crosstools" = "yes"; then
2494 crosstools_target=tools-crosstools
2497 aros_kernel_cc="$aros_kernel_cc $kernel_tool_flags"
2498 aros_kernel_ar="$aros_kernel_ar $aros_kernel_ar_flags"
2500 aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/host/config"
2501 aros_targetcfg_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/config"
2502 aros_inc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Developer/include/aros"
2503 aros_gendir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen"
2504 aros_geninc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/include/aros"
2505 aros_tools_dir="bin/${aros_host_arch}-${aros_host_cpu}/tools"
2506 aros_scripts_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/scripts"
2508 # aros_cc_pre is a variable that is added to the front of the compiler name
2509 # in the generated aros-gcc shell script. We need this to enable the cache
2510 # to work across cleaned builds. Also, support DISTCC using the correct
2511 # environment variable.
2514 if test "x${DISTCC}" != "x" ; then
2515 if test "x${CCACHE}" != "x" ; then
2516 aros_cc_pre="env CCACHE_PREFIX=${DISTCC} ${CCACHE} "
2518 aros_cc_pre="${DISTCC} "
2521 if test "x${CCACHE}" != "x" ; then
2522 aros_cc_pre="${CCACHE} "
2526 AC_SUBST(aros_target_nostdinc_cflags,-nostdinc)
2527 AC_SUBST(aros_target_nostartup_ldflags,-nostartfiles)
2528 AC_SUBST(aros_target_nix_ldflags,-nix)
2529 AC_SUBST(aros_target_detach_ldflags,-detach)
2530 AC_SUBST(aros_target_nostdlib_ldflags,-nostdlib)
2532 aros_target_cc_path=
2535 AC_SUBST(aros_toolchain)
2536 if test "$aros_target_toolchain" != "yes"; then
2537 prefix="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-"
2538 if test "$GCC" = "yes"; then
2539 aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-`
2542 # We do not know which c compiler version we are going to build and what we need to know
2543 # here is different for different versions so this will be set later during the
2544 # build of crosstools.
2545 if test "$aros_toolchain" = "gnu" ; then
2546 prefix="$AROS_CROSSTOOLSDIR/${aros_target_cpu}-aros-"
2547 elif test "$aros_toolchain" = "llvm" ; then
2548 prefix="$AROS_CROSSTOOLSDIR/bin/"
2550 aros_target_cc_path=@aros_target_cc_path@
2552 aros_target_cpp="${prefix}${toolchain_cpp_preprocessor}"
2553 aros_target_cc="${prefix}${toolchain_c_compiler}"
2554 aros_target_cxx="${prefix}${toolchain_cxx_compiler}"
2555 aros_target_as="${prefix}${toolchain_as}"
2556 if test "${use_ld_wrapper}" = "yes"; then
2557 aros_target_ld="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${aros_ld}"
2559 aros_target_ld="${prefix}${toolchain_ld}"
2561 aros_toolchain_ld="${prefix}${toolchain_ld}"
2563 aros_target_ar="${prefix}${toolchain_ar} $aros_target_ar_flags"
2564 aros_target_objcopy="${prefix}${toolchain_objcopy}"
2565 aros_target_objdump="${prefix}${toolchain_objdump}"
2566 aros_target_ranlib="${prefix}${toolchain_ranlib} $aros_target_ranlib_flags"
2567 aros_target_nm="${prefix}${toolchain_nm} $aros_target_nm_flags"
2568 aros_target_strip="${prefix}${toolchain_strip}"
2569 aros_plain_nm="${prefix}${toolchain_nm}"
2570 aros_plain_ar="${prefix}${toolchain_ar}"
2572 AC_ARG_ENABLE(includes,
2573 AC_HELP_STRING([--enable-includes=dir],[Alternative system include directory]),
2574 [aros_target_incl=$enable_includes], [aros_target_incl=no])
2576 if test "x$aros_target_incl" = "xno"; then
2577 if test "x$test_kernel_cc" != "xno"; then
2578 aros_target_incl=`$aros_kernel_cc -print-sysroot 2>/dev/null`/`$aros_kernel_cc --print-sysroot-headers-suffix 2>/dev/null || echo usr/include`
2584 if test "x$aros_kernel_includes" = "x"; then
2585 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2586 if test "x$aros_target_incl" != "x"; then
2587 aros_kernel_includes="-isystem $aros_target_incl"
2592 if test "x$test_kernel_cc" != "xno"; then
2593 if test "$aros_kernel_includes" != "" ; then
2594 dnl find out about the kernel cc's include path
2595 AC_MSG_CHECKING([for the kernel compiler's include path])
2596 if test "$aros_kernel_cc_includes" = "" ; then
2597 # Try to guess where the directory is.
2598 aros_kernel_cc_includes=`dirname \`${aros_kernel_cc} ${aros_kernel_cflags} -print-libgcc-file-name\``/include
2599 if test -d $aros_kernel_cc_includes; then
2600 # Check if there is also an include-fixed directory and add it
2601 # to kernel compiler's include path as it may contain some of
2602 # the headers we need.
2603 if test -d "$aros_kernel_cc_includes"-fixed; then
2604 aros_kernel_cc_includes+=" -isystem $aros_kernel_cc_includes"-fixed
2606 # Check for specific includes directory. Needed for Ubuntu 11.10 and Debian
2607 if test -d "/usr/include/${aros_target_cpu}-linux-gnu"; then
2608 aros_kernel_cc_includes+=" -isystem /usr/include/${aros_target_cpu}-linux-gnu"
2611 # The directory doesn't exist, we need to do some more work.
2612 aros_kernel_cc_includes=${PWD}/${aros_gendir}/cc_include
2614 # These are the headers we're looking for.
2615 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
2616 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
2620 for h in $headers; do
2621 # Which other headers are needed by each of the above?
2622 deps=$(echo "#include <$h>" | \
2623 $aros_kernel_cc -E -M - 2>/dev/null | \
2624 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
2626 # Copy all the needed headers to a directory beneath gendir.
2629 dir=${aros_kernel_cc_includes}$(echo $(dirname $d) | \
2630 sed -n "s,^.*/include\(/.*\),\1,p")
2631 ! test -d $dir && mkdir -p $dir
2632 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
2637 AC_MSG_RESULT($aros_kernel_cc_includes)
2638 # Adding -nostdinc to kernel includes as they are always used together.
2639 aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes"
2643 if test "$crosstools" != "yes"; then
2644 dnl find out about the target cc's include path
2645 AC_MSG_CHECKING([for the target compiler's include path])
2646 if test "$aros_target_cc_includes" = "" ; then
2647 #try to guess where the directory is
2648 aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include
2649 if ! test -d $aros_target_cc_includes; then
2650 #the directory doesn't exist, we need to do some more work
2651 aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include
2653 #these are the headers we're looking for
2654 headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
2655 stddef.h xmmintrin.h iso646.h stdarg.h unwind.h \
2659 for h in $headers; do
2660 #which other headers each of the above headers needs?
2661 deps=$(echo "#include <$h>" | \
2662 $orig_target_cc -E -M - 2>/dev/null | \
2663 sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
2665 #copy all the needed headers to a directory beneath gendir
2668 dir=${aros_target_cc_includes}$(echo $(dirname $d) | \
2669 sed -n "s,^.*/include\(/.*\),\1,p")
2670 ! test -d $dir && mkdir -p $dir
2671 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
2676 AC_MSG_RESULT($aros_target_cc_includes)
2678 # We do not know which c compiler version we are going to build and what we need to know
2679 # here is different for different versions so this will be set later during the
2680 # build of crosstools.
2681 aros_target_cc_includes=@aros_target_cc_includes@
2685 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
2686 # On GCC >= 4.0 -iquote should be used
2690 save_cflags="$CFLAGS"
2691 if test "x$test_kernel_cc" != "xno"; then
2693 kernel_cflags_iquote=$host_cflags_iquote
2694 kernel_cflags_iquote_end=$host_cflags_iquote_end
2695 if test "x-$cross_compiling" = "x-yes"; then
2696 CC="$aros_kernel_cc"
2697 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
2698 if test "x-$crosstools" != "x-yes"; then
2699 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
2701 # we do know it is supported for the smallest version of gcc we are going to build
2702 # we assume it's also supported by later versions
2703 use_no_stack_protector=yes
2705 AC_MSG_RESULT($use_no_stack_protector)
2706 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
2707 if test "x-$crosstools" != "x-yes"; then
2708 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
2710 # we do know it is supported for the smallest version of gcc we are going to build
2711 # we assume it's also supported by later versions
2714 AC_MSG_RESULT($has_iquote)
2715 if test "x-$has_iquote" = "x-yes" ; then
2716 kernel_cflags_iquote=-iquote
2717 kernel_cflags_iquote_end=
2719 kernel_cflags_iquote=-I
2720 kernel_cflags_iquote_end=-I-
2723 if test "x-$use_no_stack_protector" = "x-yes" ; then
2724 aros_kernel_cflags="$aros_kernel_cflags -fno-stack-protector"
2727 #-----------------------------------------------------------------------------
2729 # Check if we can explicitly choose older version of symbol hashing
2731 CFLAGS="save_cflags -Wl,--hash-style=sysv"
2732 CC="$aros_kernel_cc"
2733 AC_MSG_CHECKING([whether ${CC} accepts -Wl,--hash-style=sysv])
2734 AC_TRY_LINK(,, use_hash_style="yes", use_hash_style="no")
2735 AC_MSG_RESULT($use_hash_style)
2736 if test "x-$use_hash_style" = "x-yes" ; then
2737 aros_kernel_cflags="$aros_kernel_cflags -Wl,--hash-style=sysv"
2740 kernel_cflags_iquote="$""(CFLAGS_IQUOTE)"
2741 kernel_cflags_iquote_end="$""(CFLAGS_IQUOTE_END)"
2744 CFLAGS="$save_cflags"
2746 AC_SUBST(host_cflags_iquote)
2747 AC_SUBST(host_cflags_iquote_end)
2748 AC_SUBST(kernel_cflags_iquote)
2749 AC_SUBST(kernel_cflags_iquote_end)
2752 dnl Check if user specified --with-resolution=XRESxYRESxDEPTH
2753 AC_MSG_CHECKING([for default resolution of WBScreen])
2754 AC_ARG_WITH(resolution,AC_HELP_STRING([--with-resolution=XRESxYRESxDEPTH],[Default resolution of the initial WorkbenchScreen]),resolution=$withval,resolution=none)
2755 # We require an argument, so map --with/--without ("yes"/"no") to "none" specified
2756 if test "$resolution" = "yes" ; then
2759 if test "$resolution" = "no" ; then
2762 if test "$resolution" != "none" ; then
2763 aros_nominal_width=`echo $resolution | cut -d'x' -f1`
2764 aros_nominal_height=`echo $resolution | cut -d'x' -f2`
2765 aros_nominal_depth=`echo $resolution | cut -d'x' -f3`
2767 AC_MSG_RESULT($aros_nominal_width x $aros_nominal_height x $aros_nominal_depth)
2768 aros_cv_nominal_width=$aros_nominal_width
2769 aros_cv_nominal_height=$aros_nominal_height
2770 aros_cv_nominal_depth=$aros_nominal_depth
2772 dnl See if the user wants the serial debug output for native flavour
2773 AC_MSG_CHECKING([whether serial debug is enabled])
2774 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)
2775 if test "$aros_serial_debug" = 0 ; then
2776 serial_debug_forced=""
2777 if test "$serial_debug" = "yes" ; then
2780 if test "$serial_debug" = "no" ; then
2784 serial_debug_forced="(forced)"
2785 serial_debug=$aros_serial_debug
2787 if test "$serial_debug" != "none" ; then
2788 aros_serial_debug=$serial_debug
2789 AC_MSG_RESULT($serial_debug_forced on port $serial_debug)
2794 dnl See if the user wants the palm debug output hack for palm native flavour
2795 AC_MSG_CHECKING([whether palm debug hack is enabled])
2796 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")
2797 if test "$palm_debug_hack" = "yes" ; then
2798 aros_palm_debug_hack="1"
2800 AC_MSG_RESULT($palm_debug_hack)
2802 dnl See if dev wants the usb3.0 code
2803 AC_MSG_CHECKING([whether usb3.0 code is enabled])
2804 AC_ARG_ENABLE(usb30_code,AC_HELP_STRING([--enable-usb30-code],[Enable usb3.0 code (default=no)]),usb30_code="yes",usb30_code="no")
2805 if test "$usb30_code" = "yes" ; then
2806 aros_config_cppflags="$aros_config_cppflags -DAROS_USB30_CODE"
2807 aros_kernel_cflags="$aros_kernel_cflags -DAROS_USB30_CODE"
2809 AC_MSG_RESULT($usb30_code)
2811 dnl See if the user wants nesting supervisor activated for unix flavour
2812 AC_MSG_CHECKING([whether nesting supervisor support is enabled])
2813 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")
2814 if test "$nesting_supervisor" = "yes" ; then
2815 aros_nesting_supervisor="1"
2817 AC_MSG_RESULT($nesting_supervisor)
2819 dnl See if the user wants to disable MMU support
2820 dnl This can be overriden on per-target basis,
2821 dnl set $aros_enable_mmu to "yes" or "no" to do this
2822 if test "$aros_enable_mmu" = "" ; then
2823 AC_MSG_CHECKING([whether MMU support is enabled])
2824 dnl Enabled by default
2825 AC_ARG_ENABLE(mmu,AC_HELP_STRING([--disable-mmu],[Disable MMU support (default=enabled)]),aros_enable_mmu=$enableval,aros_enable_mmu="yes")
2826 if test "$aros_enable_mmu" = "" ; then
2827 aros_enable_mmu="yes"
2829 AC_MSG_RESULT($aros_enable_mmu)
2831 if test "$aros_enable_mmu" = "no" ; then
2838 dnl things specifically required for hosted flavours
2839 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
2841 if test "x-$need_dlopen" != "x-no" ; then
2844 dnl some kind of dynamic library access system is required for hostlib.resource
2845 AC_CHECK_FUNC(dlopen, have_dl="yes", have_dl="no")
2846 if test "x-$have_dl" = "x-no" ; then
2847 AC_CHECK_LIB(dl, dlopen, [have_dl="yes"
2848 aros_host_ldflags="$aros_host_ldflags -ldl"],
2851 if test "x-$have_dl" = "x-no" ; then
2852 AC_MSG_ERROR([dlopen() dynamic linker functions not available])
2859 AC_ARG_ENABLE(x11_hidd, AC_HELP_STRING([--enable-x11-hidd],
2860 [build X11 hidd for hosted (default=auto)]),
2861 x11_hidd="$enableval",
2862 x11_hidd="$need_x11")
2863 case "x-$x11_hidd" in
2864 x-yes|x-no|x-auto) ;;
2865 *) x11_hidd="$need_x11" ;;
2871 if test "x-$x11_hidd" != "x-no" ; then
2876 if test -n "$x_includes"; then
2877 X_CFLAGS="$X_CFLAGS -I$x_includes"
2880 if test -n "$x_libraries"; then
2881 X_LIBS="$X_LIBS -L$x_libraries"
2884 if test "x-$no_x" = "x-yes" ; then
2887 if test "x-$x11_hidd" != "x-auto" ; then
2888 dnl and they explicitly asked for it, bail out
2889 AC_MSG_ERROR([X11 libs/headers not found, cannot build X11 hidd as requested])
2893 dnl found it, setup the metatarget
2894 aros_target_options+="$export_newline""# Enable X11 Gfx Driver$export_newline""OPT_HOST_X11GFX := yes$export_newline"
2895 if test "x-$host_feature_glx" != "x-no" ; then
2896 aros_target_options+="$export_newline""# Enable X11 HostGL 3D Passthrough$export_newline""OPT_HOST_X11_HOSTGL := yes$export_newline"
2900 aros_host_x11_cflags="$X_CFLAGS"
2901 aros_host_x11_ldflags="$X_LIBS -lX11"
2903 dnl setup shared memory extensions
2904 AC_ARG_ENABLE(x11_shm, AC_HELP_STRING([--enable-x11-shm],
2905 [use X11 shared memory (default=auto)]),
2906 x11_hidd_shm="$enableval",
2907 x11_hidd_shm="auto")
2908 case "x-$x11_hidd_shm" in
2909 x-yes|x-no|x-auto) ;;
2910 *) x11_hidd_shm="auto" ;;
2916 if test "x-$x11_hidd_shm" != "x-no" ; then
2918 dnl system shm headers
2919 AC_CHECK_HEADERS(sys/ipc.h)
2920 AC_CHECK_HEADERS(sys/shm.h)
2923 if test "x-$ac_cv_header_sys_ipc_h" = "x-yes" -a "x-$ac_cv_header_sys_shm_h" = "x-yes" ; then
2925 dnl make sure X libs have shm functions
2926 save_cflags="$CFLAGS"
2927 save_ldflags="$LDFLAGS"
2928 CFLAGS="$CFLAGS $X_CFLAGS"
2929 LDFLAGS="$LDFLAGS $X_LIBS"
2930 AC_CHECK_LIB(Xext, XShmQueryExtension, have_xshm=yes)
2931 CFLAGS="$save_cflags"
2932 LDFLAGS="$save_ldflags"
2936 dnl detection done, prepare output
2937 if test "x-$have_xshm" = "x-yes" ; then
2940 elif test "x-$x11_hidd_shm" = "x-yes" ; then
2941 dnl they explicitly asked for it, but we can't do it
2942 AC_MSG_ERROR([X11 has no support for shared memory, cannot enable it as requested])
2944 dnl otherwise just disable it
2949 dnl setup vidmode (fullscreen) extensions
2950 AC_ARG_ENABLE(x11_vidmode, AC_HELP_STRING([--enable-x11-vidmode],
2951 [use X11 vidmode extension (default=auto)]),
2952 x11_hidd_vidmode="$enableval",
2953 x11_hidd_vidmode="auto")
2954 case "x-$x11_hidd_vidmode" in
2955 x-yes|x-no|x-auto) ;;
2956 *) x11_hidd_vidmode="auto" ;;
2962 if test "x-$x11_hidd_vidmode" != "x-no" ; then
2964 dnl make sure X libs have vidmode functions
2965 save_cflags="$CFLAGS"
2966 save_ldflags="$LDFLAGS"
2967 CFLAGS="$CFLAGS $X_CFLAGS"
2968 LDFLAGS="$LDFLAGS $X_LIBS"
2969 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, have_vidmode=yes)
2970 CFLAGS="$save_cflags"
2971 LDFLAGS="$save_ldflags"
2974 dnl detection done, prepare output
2975 if test "x-$have_vidmode" = "x-yes" ; then
2976 dnl we can do vidmode
2977 DO_VIDMODE_SUPPORT="1"
2978 elif test "x-$x11_hidd_vidmode" = "x-yes" ; then
2979 dnl they explicitly asked for it, but we can't do it
2980 AC_MSG_ERROR([X11 vidmode extension not available, cannot enable it as requested])
2982 dnl otherwise just disable it
2983 DO_VIDMODE_SUPPORT="0"
2989 AC_ARG_ENABLE(sdl_hidd, AC_HELP_STRING([--enable-sdl-hidd],
2990 [build SDL hidd for hosted (default=auto)]),
2991 sdl_hidd="$enableval",
2993 case "x-$sdl_hidd" in
2994 x-yes|x-no|x-auto) ;;
2995 *) sdl_hidd="auto" ;;
2999 if test "x-$sdl_hidd" != "x-no" ; then
3003 AM_PATH_SDL($SDL_VERSION, [have_sdl="yes"],
3006 if test "x-$have_sdl" != "x-yes" ; then
3009 if test "x-$sdl_hidd" != "x-auto" ; then
3010 dnl and they explicitly asked for it, bail out
3011 AC_MSG_ERROR([SDL libs/headers not found, cannot build SDL hidd as requested])
3015 dnl found it, enable the build
3016 aros_target_options+="$export_newline""# Enable SDL Gfx Driver$export_newline""OPT_HOST_SDLGFX := yes$export_newline"
3017 aros_host_sdl_cflags=$SDL_CFLAGS
3018 aros_host_sdl_libs=$SDL_LIBS
3025 dnl See if the user wants dbus.library
3026 AC_MSG_CHECKING([whether building of dbus.library is enabled])
3027 AC_ARG_ENABLE(dbus,AC_HELP_STRING([--enable-dbus],[Enable DBUS support via dbus.library (default=no)]),dbus="yes",dbus="no")
3028 if test "$dbus" = "yes" ; then
3030 DBUS_CFLAGS=`pkg-config --cflags dbus-1`
3031 DBUS_LIBFLAGS=`pkg-config --libs dbus-1`
3032 KERNEL_DBUS_KOBJ=kernel-dbus-kobj
3033 KERNEL_DBUS_INCLUDES=kernel-dbus-includes
3037 AC_MSG_RESULT($dbus)
3039 if test "$use_kernel_cc_wrapper" = "yes" ; then
3040 aros_kernel_cc="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-${toolchain_c_compiler}"
3043 aros_kernel_cppflags=$aros_config_cppflags
3044 aros_optimization_cflags="$optimization_level"
3045 if test "$optimization" = "default"; then
3046 AC_MSG_CHECKING([default optimization level to use])
3047 AC_MSG_RESULT($optimization_level)
3050 if ! test "$gcc_default_cpu" = "" ; then
3051 target_extra_cfg+="$export_newline""# ARM gcc default target$export_newline""GCC_DEFAULT_CPU := $gcc_default_cpu$export_newline""GCC_DEFAULT_FPU := $gcc_default_fpu$export_newline""GCC_DEFAULT_FLOAT_ABI := $gcc_default_float_abi$export_newline""GCC_DEFAULT_MODE := $gcc_default_mode$export_newline"
3054 if test "$use_libatomic" = "yes" ; then
3055 aros_cxx_libs="$aros_cxx_libs -latomic"
3058 dnl --------------------------------------------------------------------
3059 dnl Configuration Output Section
3060 dnl --------------------------------------------------------------------
3065 AC_SUBST(aros_flavour)
3066 AC_SUBST(aros_flavour_uc)
3067 AC_SUBST(aros_target_toolchain)
3068 AC_SUBST(aros_toolchain_ld)
3069 AC_SUBST(aros_build_host)
3070 AC_SUBST(AROS_BUILDDIR)
3071 AC_SUBST(AROS_BUILDDIR_UNIX)
3073 AC_SUBST(AROS_CROSSTOOLSDIR)
3074 AC_SUBST(AROS_PORTSSRCDIR)
3076 # Compatability with other Amiga-like operating systems
3077 AC_SUBST(aros_amigaos_compliance)
3079 # Host Related ###########################
3080 AC_SUBST(host_stat_h__unused_used)
3081 AC_SUBST(ax_cv_flex_version)
3082 AC_SUBST(host_extra_cfg)
3083 AC_SUBST(aros_cc_pre)
3084 AC_SUBST(aros_host_strip)
3085 AC_SUBST(aros_host_arch)
3086 AC_SUBST(aros_host_cpu)
3087 AC_SUBST(aros_host_cpp)
3088 AC_SUBST(aros_host_def_cc)
3089 AC_SUBST(aros_host_cc)
3090 AC_SUBST(aros_host_cxx)
3091 AC_SUBST(aros_host_ar)
3092 AC_SUBST(aros_host_ranlib)
3093 AC_SUBST(aros_host_ld)
3094 AC_SUBST(aros_host_make)
3095 AC_SUBST(aros_host_cppflags)
3096 AC_SUBST(aros_host_cflags)
3097 AC_SUBST(aros_host_cxxflags)
3098 AC_SUBST(gnu89_inline)
3099 AC_SUBST(aros_host_ldflags)
3100 AC_SUBST(aros_host_debug)
3101 AC_SUBST(aros_host_mkdep)
3102 AC_SUBST(aros_host_mkargs)
3103 AC_SUBST(aros_host_exe_suffix)
3104 AC_SUBST(aros_host_lib_suffix)
3105 AC_SUBST(aros_tools_dir)
3106 AC_SUBST(aros_host_aclocal)
3107 AC_SUBST(aros_host_autoconf)
3108 AC_SUBST(aros_host_autoheader)
3109 AC_SUBST(aros_host_automake)
3111 # Target Related #########################
3112 AC_SUBST(aros_elf_translate)
3113 AC_SUBST(make_extra_commands)
3114 AC_SUBST(make_extra_targetcfg)
3115 AC_SUBST(target_extra_cfg)
3116 AC_SUBST(aros_target_options)
3118 AC_SUBST(aros_target_guitheme)
3119 AC_SUBST(aros_target_iconset)
3120 AC_SUBST(aros_target_bootloader)
3121 AC_SUBST(aros_target_arch)
3122 AC_SUBST(aros_target_family)
3123 AC_SUBST(aros_target_cpu)
3124 AC_SUBST(aros_target_cpu_mode)
3125 AC_SUBST(aros_target_variant)
3126 AC_SUBST(aros_target_suffix)
3127 AC_SUBST(aros_target_ar)
3128 AC_SUBST(aros_target_ranlib)
3129 AC_SUBST(aros_plain_nm)
3130 AC_SUBST(aros_plain_ar)
3131 AC_SUBST(aros_kernel_ar)
3132 AC_SUBST(aros_kernel_ranlib)
3133 AC_SUBST(orig_target_cc)
3134 AC_SUBST(aros_target_cc)
3135 AC_SUBST(aros_kernel_cc)
3136 AC_SUBST(orig_target_cxx)
3137 AC_SUBST(aros_target_cxx)
3138 AC_SUBST(aros_kernel_cxx)
3139 AC_SUBST(orig_target_cpp)
3140 AC_SUBST(aros_target_cpp)
3141 AC_SUBST(aros_kernel_cpp)
3142 AC_SUBST(orig_target_as)
3143 AC_SUBST(aros_target_as)
3144 AC_SUBST(aros_kernel_as)
3145 AC_SUBST(orig_target_ld)
3146 AC_SUBST(aros_target_ld)
3147 AC_SUBST(aros_kernel_ld)
3148 AC_SUBST(aros_target_cc_includes)
3149 AC_SUBST(aros_target_cc_path)
3150 AC_SUBST(aros_target_objdump)
3151 AC_SUBST(aros_target_objcopy)
3152 AC_SUBST(aros_target_strip)
3153 AC_SUBST(aros_target_nm)
3154 AC_SUBST(aros_kernel_rescomp)
3155 AC_SUBST(aros_shared_default)
3156 AC_SUBST(aros_shared_ld)
3157 AC_SUBST(aros_object_format)
3158 AC_SUBST(spec_obj_format)
3159 AC_SUBST(aros_c_libs)
3160 AC_SUBST(aros_cxx_libs)
3162 AC_SUBST(aros_shared_cflags)
3163 AC_SUBST(aros_shared_aflags)
3164 AC_SUBST(aros_shared_ldflags)
3166 AC_SUBST(aros_warn_flags)
3167 AC_SUBST(aros_nowarn_flags)
3168 AC_SUBST(aros_config_cppflags)
3169 AC_SUBST(aros_config_cflags)
3170 AC_SUBST(aros_config_cxxflags)
3171 AC_SUBST(aros_config_aflags)
3172 AC_SUBST(aros_config_ldflags)
3174 AC_SUBST(aros_kernel_sysroot)
3175 AC_SUBST(aros_kernel_cppflags)
3176 AC_SUBST(aros_kernel_cflags)
3177 AC_SUBST(aros_kernel_includes)
3178 AC_SUBST(aros_kernel_objcflags)
3179 AC_SUBST(aros_kernel_ldflags)
3180 AC_SUBST(aros_debug_cppflags)
3181 AC_SUBST(aros_debug_cflags)
3182 AC_SUBST(aros_debug_cxxflags)
3183 AC_SUBST(aros_debug_aflags)
3184 AC_SUBST(aros_debug_ldflags)
3185 AC_SUBST(aros_target_genmap)
3186 AC_SUBST(aros_target_strip_flags)
3187 AC_SUBST(aros_config_lto)
3188 AC_SUBST(aros_config_coverage)
3189 AC_SUBST(aros_optimization_cflags)
3190 AC_SUBST(aros_isa_extra)
3191 AC_SUBST(aros_isa_flags)
3193 AC_SUBST(crosstools_target)
3194 AC_SUBST(crosstools_cxx_target)
3196 AC_SUBST(use_libatomic)
3198 AC_SUBST(pci_hidd_target)
3200 AC_SUBST(aros_nominal_width)
3201 AC_SUBST(aros_nominal_height)
3202 AC_SUBST(aros_nominal_depth)
3204 # Native version related
3205 AC_SUBST(aros_serial_debug)
3206 AC_SUBST(PLATFORM_EXECSMP)
3207 AC_SUBST(ENABLE_EXECSMP)
3210 AC_SUBST(aros_enable_mmu)
3212 # Bootloader related
3213 AC_SUBST(target_grub2_version)
3215 # Unix/Hosted version related
3216 AC_SUBST(aros_nesting_supervisor)
3218 # ARM default GCC target related
3219 AC_SUBST(gcc_default_cpu)
3220 AC_SUBST(gcc_default_cpu_tune)
3221 AC_SUBST(gcc_default_fpu)
3222 AC_SUBST(gcc_default_float_abi)
3223 AC_SUBST(gcc_default_mode)
3225 # Palm native version related
3226 AC_SUBST(aros_palm_debug_hack)
3229 AC_SUBST(aros_ios_platform)
3230 AC_SUBST(aros_ios_version)
3231 AC_SUBST(aros_ios_sdk)
3235 AC_SUBST(android_tool)
3236 AC_SUBST(aros_android_level)
3237 AC_SUBST(aros_android_antapk)
3240 AC_SUBST(aros_debug)
3241 AC_SUBST(aros_mungwall_debug)
3242 AC_SUBST(aros_stack_debug)
3243 AC_SUBST(aros_modules_debug)
3245 # Collect-aros stuff: "-ius" to ignore undefined symbols
3246 AC_SUBST(ignore_undefined_symbols)
3248 # C compiler related
3249 AC_SUBST(gcc_target_cpu)
3250 AC_SUBST(target_binutils_version)
3251 AC_SUBST(target_gcc_version)
3253 #ObjC compiler related
3254 AC_SUBST(objc_target)
3257 AC_SUBST(java_target)
3260 AC_SUBST(ENABLE_DBUS)
3261 AC_SUBST(DBUS_CFLAGS)
3262 AC_SUBST(DBUS_LIBFLAGS)
3263 AC_SUBST(KERNEL_DBUS_KOBJ)
3264 AC_SUBST(KERNEL_DBUS_INCLUDES)
3267 AC_SUBST(ENABLE_X11)
3268 AC_SUBST(DO_XSHM_SUPPORT)
3269 AC_SUBST(DO_VIDMODE_SUPPORT)
3271 AC_SUBST(aros_host_x11_cflags)
3272 AC_SUBST(aros_host_x11_ldflags)
3275 AC_SUBST(aros_host_sdl_cflags)
3276 AC_SUBST(aros_host_sdl_libs)
3279 AC_SUBST(aros_usb30_code)
3281 dnl Prepare for output, make up all the generated patches
3282 case "$aros_flavour" in
3283 emulation) aros_flavour_uc="AROS_FLAVOUR_EMULATION"
3284 aros_flavour="emulation" ;;
3285 emulcompat) aros_flavour_uc="(AROS_FLAVOUR_EMULATION|AROS_FLAVOUR_BINCOMPAT)"
3286 aros_flavour="emulation" ;;
3287 standalone) aros_flavour_uc="AROS_FLAVOUR_STANDALONE"
3288 aros_flavour="standalone";;
3289 standcompat) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
3290 aros_flavour="standalone";;
3291 native) aros_flavour_uc="AROS_FLAVOUR_NATIVE"
3292 aros_flavour="native" ;;
3293 nativecompat) aros_flavour_uc="(AROS_FLAVOUR_NATIVE|AROS_FLAVOUR_BINCOMPAT)"
3294 aros_flavour="native" ;;
3295 linklib) aros_flavour_uc="AROS_FLAVOUR_LINKLIB"
3296 aros_flavour="linklib" ;;
3297 palmnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
3298 aros_flavour="palmnative" ;;
3299 mac68knative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
3300 aros_flavour="mac68knative" ;;
3301 ppcnative) aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
3302 aros_flavour="ppcnative" ;;
3305 if test ! -d ${aros_inc_dir} ; then
3306 ${MKDIR} ${aros_inc_dir}
3308 if test ! -d ${aros_geninc_dir} ; then
3309 ${MKDIR} ${aros_geninc_dir}
3311 if test ! -d ${aros_hostcfg_dir} ; then
3312 ${MKDIR} ${aros_hostcfg_dir}
3314 if test ! -d ${aros_targetcfg_dir} ; then
3315 ${MKDIR} ${aros_targetcfg_dir}
3317 if test ! -d ${aros_tools_dir} ; then
3318 ${MKDIR} ${aros_tools_dir}
3320 if test ! -d ${aros_scripts_dir} ; then
3321 ${MKDIR} ${aros_scripts_dir}
3324 AC_CONFIG_HEADERS(${aros_geninc_dir}/host-conf.h:config/host-conf.h.in)
3326 # Generic build tools (metamake, etc)
3327 AC_CONFIG_COMMANDS([genmf-executable-support],
3329 chmod a+x ${AROS_CROSSTOOLSDIR}/${aros_target_cpu}-aros-uname
3330 chmod a+x ${aros_tools_dir}/genmf.py
3333 AROS_CROSSTOOLSDIR=${AROS_CROSSTOOLSDIR}
3334 aros_tools_dir=${aros_tools_dir}
3340 ${aros_inc_dir}/config.h:config/config.h.in
3341 ${aros_geninc_dir}/config.h:config/config.h.in
3342 ${aros_hostcfg_dir}/host.cfg:config/host.cfg.in
3343 ${aros_targetcfg_dir}/target.cfg:config/target.cfg.in
3344 ${aros_targetcfg_dir}/build.cfg:config/build.cfg.in
3346 compiler/include/geninc.cfg:compiler/include/geninc.cfg.in
3347 ${aros_targetcfg_dir}/make.defaults:config/make.defaults.in
3348 ${aros_tools_dir}/genmf.py:tools/genmf/genmf.py
3349 ${AROS_CROSSTOOLSDIR}/${aros_target_cpu}-aros-uname:scripts/uname.in
3350 tools/collect-aros/env.h
3354 AC_CONFIG_COMMANDS([binutils-support],
3356 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3358 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
3360 chmod a+x ${prefix2}-ld
3362 ln -sf $orig_target_as$aros_host_exe_suffix ${prefix2}-as$aros_host_exe_suffix
3363 ln -sf $orig_target_nm$aros_host_exe_suffix ${prefix2}-nm$aros_host_exe_suffix
3364 ln -sf $orig_target_ar$aros_host_exe_suffix ${prefix2}-ar$aros_host_exe_suffix
3365 ln -sf $orig_target_ranlib$aros_host_exe_suffix ${prefix2}-ranlib$aros_host_exe_suffix
3366 ln -sf $orig_target_objcopy$aros_host_exe_suffix ${prefix2}-objcopy$aros_host_exe_suffix
3367 ln -sf $orig_target_objdump$aros_host_exe_suffix ${prefix2}-objdump$aros_host_exe_suffix
3368 ln -sf $orig_target_strip$aros_host_exe_suffix ${prefix2}-strip$aros_host_exe_suffix
3371 aros_host_exe_suffix=${aros_host_exe_suffix}
3372 aros_tools_dir=${aros_tools_dir}
3373 aros_target_cpu=${aros_target_cpu}
3374 aros_target_arch=${aros_target_arch}
3375 aros_target_suffix=${aros_target_suffix}
3376 orig_target_nm=${orig_target_nm}
3377 orig_target_as=${orig_target_as}
3378 orig_target_ar=${orig_target_ar}
3379 orig_target_ranlib=${orig_target_ranlib}
3380 orig_target_objdump=${orig_target_objdump}
3381 orig_target_objcopy=${orig_target_objcopy}
3382 orig_target_strip=${orig_target_strip}
3383 aros_kernel_ld=${aros_kernel_ld}
3386 if test "${use_ld_wrapper}" = "yes"; then
3388 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${aros_ld}:scripts/aros-ld.in
3391 # Bare Elf support script and spec
3392 if test "${use_kernel_cc_wrapper}" = "yes"; then
3393 AC_CONFIG_COMMANDS([elf-compiler-support],
3395 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3397 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf
3399 chmod a+x ${prefix2}-gcc
3401 ln -sf $aros_kernel_ld$aros_host_exe_suffix ${prefix2}-ld$aros_host_exe_suffix
3404 aros_host_exe_suffix=${aros_host_exe_suffix}
3405 aros_tools_dir=${aros_tools_dir}
3406 aros_target_cpu=${aros_target_cpu}
3407 aros_target_arch=${aros_target_arch}
3408 aros_target_suffix=${aros_target_suffix}
3409 aros_kernel_ld=${aros_kernel_ld}
3413 ${aros_targetcfg_dir}/elf-specs:${elf_specs_in}
3414 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-elf-gcc:scripts/elf-gcc.in
3418 # Host compiler support scripts and spec
3419 if test "${aros_target_toolchain}" = "no"; then
3420 AC_CONFIG_COMMANDS([host-compiler-wrapper-support],
3422 prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
3424 prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
3426 chmod a+x ${prefix2}-${toolchain_c_compiler} ${prefix2}-${toolchain_cxx_compiler} ${prefix2}-${toolchain_cpp_preprocessor}
3429 aros_host_exe_suffix=${aros_host_exe_suffix}
3430 aros_tools_dir=${aros_tools_dir}
3431 aros_target_cpu=${aros_target_cpu}
3432 aros_target_arch=${aros_target_arch}
3433 aros_target_suffix=${aros_target_suffix}
3437 ${aros_targetcfg_dir}/specs:config/specs.in
3438 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_cpp_preprocessor}:scripts/aros-${toolchain_cpp_preprocessor}.in
3439 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_c_compiler}:scripts/aros-${toolchain_c_compiler}.in
3440 ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-${toolchain_cxx_compiler}:scripts/aros-${toolchain_cxx_compiler}.in
3445 if test "$aros_target_variant" == "android"; then
3446 AC_CONFIG_FILES(${aros_gendir}/arch/all-android/bootstrap/app/default.properties:arch/all-android/bootstrap/app/default.properties.in)
3450 AC_CONFIG_FILES(${aros_targetcfg_dir}/conf.cmake:config/conf.cmake.in)
3454 dnl This is in order to not define SHARED_CFLAGS sometimes
3455 dnl We don't always do aros_shared_ar, aros_shared_cflags
3457 #XXX compatability...
3458 aros_shared_ar="$aros_shared_ld $aros_shared_ldflags -o"
3460 if test -n "$aros_shared_cflags" ; then
3461 echo "SHARED_CFLAGS := $aros_shared_cflags" >> ${aros_hostcfg_dir}/host.cfg
3462 echo "SHARED_AR := $aros_shared_ar" >> ${aros_hostcfg_dir}/host.cfg