licence plate number
[AROS.git] / configure.in
blobce3110788e57db9938598d05e2097de533e9d266
1 dnl Copyright © 1997-2010, The AROS Development Team. All rights reserved.
2 dnl $Id$
3 dnl
4 dnl Desc: Autoconf source for configuration file
5 dnl Lang: english
7 #TODO
8 # method of getting shared/non-shared ld/ar tool for target.
11 # ------------------------------------------------------------------------
12 # Here starts the first section of the configure.in file.
13 # ------------------------------------------------------------------------
15 AC_INIT(mmakefile)
16 AC_PREREQ(2.61)
17 AC_CONFIG_AUX_DIR(scripts/autoconf)
19 # Check what host we are running on.
20 # If a target is not suggested, we use this one.
21 # Note that what we call a target, Autoconf calls a host.
22 AC_CANONICAL_HOST
24 # The AROS target is slightly different to the normal GNU style
25 # format. We don't have the middle part, and we reverse the order
26 # of the $(CPU) and $(OS) bits.
28 # Don't strip the version of the target yet, it might be
29 # useful on some systems.
31 AC_MSG_CHECKING([for AROS style target])
33 if test "$target" = "NONE" ; then
34     target=$host_os-$host_cpu
35     cross_compile=no
36 else
37     if test "$target" = "" ; then
38         target=$host_os-$host_cpu
39         cross_compile=no
40     else
41         cross_compile=yes
42     fi
44 AC_MSG_RESULT($target)
46 if test "$host_os" = "mingw32" ; then
47     PWDCMD="pwd -W"
50 #don't know where else to put this...
51 AC_MSG_CHECKING([Building AROS in .. ])
52 AROS_BUILDDIR=`${PWDCMD-pwd}`
53 AROS_BUILDDIR_UNIX=${PWD}
54 AC_MSG_RESULT($AROS_BUILDDIR)
56 AC_MSG_CHECKING([AROS Source in .. ])
57 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
58 SRCDIR=${srcpwd}
59 AC_MSG_RESULT($SRCDIR)
61 # Parse the target field into something useful.
62 changequote(<<,>>)
63 target_os=`echo $target | sed 's/^\([^-]*\)-\(.*\)$/\1/'`
64 target_cpu=`echo $target | sed 's/^\([^-]*\)-\(.*\)$/\2/'`
65 changequote([,])
67 dnl --------------------------------------------------------------------
68 dnl Set the default Workbench resolution
69 dnl --------------------------------------------------------------------
70 aros_default_wbwidth=800
71 aros_default_wbheight=600
72 aros_default_wbdepth=4
74 dnl --------------------------------------------------------------------
75 dnl Host Configuration Section
76 dnl --------------------------------------------------------------------
77 dnl
78 dnl The idea here is to find out all the information we need about the
79 dnl host. This means things like tools for building directory structures,
80 dnl copying files around and the like.
82 # The first step is to find the host binaries.
83 # Check for a compiler.
84 AC_PROG_CC
85 AC_PROG_CC_STDC
86 AC_PROG_CPP
88 # Check for a compatible awk
89 AC_CHECK_PROGS(AWK,[gawk nawk])
90 AROS_REQUIRED(gawk,$AWK)
91 AROS_PROG(MMAKE,mmake)
93 # Perform some default variable assignments. Note all of these will be
94 # Regenerated from the script, so there is no need to cache them.
96 aros_host_cc="$CC"
97 AROS_TOOL_CCPATH(aros_host_ld,ld)
98 AROS_REQUIRED(ld,$aros_host_ld)
99 aros_host_make="make"
100 aros_host_cflags=$CFLAGS
101 aros_host_ldflags=$LDFLAGS
102 aros_host_debug="-g -O0"
103 aros_host_mkdep="\$(SRCDIR)/scripts/mkdep"
104 aros_host_mkargs="--no-print-directory"
105 aros_host_incl="/usr/include"
106 aros_host_exe_suffix="$EXEEXT"
107 aros_host_lib_suffix=""
109 AC_CHECK_PROGS(aros_host_aclocal,[aclocal aclocal19 aclocal-1.9])
110 AC_CHECK_PROGS(aros_host_autoconf,[autoconf autoconf259 autoconf253])
111 AC_CHECK_PROGS(aros_host_autoheader,[autoheader autoheader259 autoheader253])
112 AC_CHECK_PROGS(aros_host_automake,[automake automake19 automake-1.9])
114 AROS_REQUIRED(aclocal/aclocal19/aclocal-1.9, $aros_host_aclocal)
115 AROS_REQUIRED(automake/automake19/automake-1.9, $aros_host_automake)
117 case "$aros_host_cc" in
118     *gcc*)
119         aros_host_cc_pipe="-pipe"
120         ;;
121     icc)
122         aros_host_cc_pipe=""
123         ;;
124     *)
125         aros_host_cc_pipe=""
126         ;;
127 esac
129 aros_kernel_cc_includes=""
130 aros_target_cc_includes=""
132 # This is the main host configuration section. It is where the host
133 # can change the values of any variables it needs to change. We do
134 # not look at anything that compiles to the target yet, we'll get
135 # to that later.
137 case "$host_os" in
138     aros*)
139         aros_host_arch="aros"
140         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
141         case "$host_cpu" in
142             *i?86*)
143                 aros_host_cpu="i386"
144                 ;;
145             *x86_64*)
146                 aros_host_cpu="x86_64"
147                 ;;
148             *powerpc*)
149                 aros_host_cpu="ppc"
150                 ;;
151             *)
152                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
153                 aros_host_cpu="$host_cpu"
154                 ;;
155         esac
156         ;;
158     linux*)
159         aros_host_arch="linux"
160         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
161         case "$host_cpu" in
162             *i?86*)
163                 aros_host_cpu="i386"
164                 ;;
165             *x86_64*)
166                 aros_host_cpu="x86_64"
167                 ;;
168             *m68k*)
169                 aros_host_cpu="m68k"
170                 ;;
171             *powerpc*)
172                 aros_host_cpu="ppc"
173                 ;;
174             *arm*)
175                 aros_host_cpu="arm"
176                 ;;
177             *)
178                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
179                 aros_host_cpu="$host_cpu"
180                 ;;
181         esac
182         ;;
184     freebsd*)
185         aros_host_cc="$aros_host_cc $aros_host_cc_pipe -I/usr/local/include"
186         aros_host_make="gmake"
187         aros_host_arch="freebsd"
188         aros_host_cpu="i386"
190         aros_host_ldflags="$aros_host_ldflags -L/usr/local/lib -liconv"
192         dnl FreeBSD 5.x (and later) has changed the default object format.
193         dnl The double [[]] is necessary to get around m4's quoting rules.
194         case $host_os in
195             freebsd[[234]]*)
196                 aros_object_format="elf_i386"
197                 ;;
199             *)
200                 aros_object_format="elf_i386_fbsd"
201                 ;;
202         esac
204         ;;
206     darwin*)
207         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
208         aros_host_arch="darwin"
209         case "$host_cpu" in
210             *i?86*)
211                 aros_host_cpu="i386"
212                 ;;
213             *x86_64*)
214                 aros_host_cpu="x86_64"
215                 ;;
216             *powerpc*)
217                 aros_host_cpu="ppc"
218                 ;;
219             *)
220                 AC_MSG_WARN("Unknown CPU for Darwin host -- $host_cpu")
221                 aros_host_cpu="$host_cpu"
222                 ;;
223         esac
225         aros_host_ldflags="$aros_host_ldflags -liconv"
227         ;;
229     dragonfly*)
230         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
231         aros_host_make="gmake"
232         aros_host_arch="dragonfly"
233         case $host_cpu in
234             *i?86*)
235                 aros_host_cpu="i386"
236                 ;;
237             *amd64*)
238                 aros_host_cpu="x86_64"
239                 ;;
240             *)
241                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
242                 aros_host_cpu="$host_cpu"
243                 ;;
244         esac
245         ;;
247     netbsd*)
248         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
249         aros_host_make="gmake"
250         aros_host_arch="netbsd"
251         case "$host_cpu" in
252             *i?86*)
253                 aros_host_cpu="i386"
254                 ;;
255             *m68k*)
256                 aros_host_cpu="m68k"
257                 ;;
258             *)
259                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
260                 aros_host_cpu="$host_cpu"
261                 ;;
262         esac    
263         aros_host_lib_suffix=".0.0"
264         ;;
266     openbsd*)
267         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
268         aros_host_make="gmake"
269         aros_host_arch="openbsd"
270         case "$host_cpu" in
271             *i?86*)
272                 aros_host_cpu="i386"
273                 ;;
274             *)
275                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
276                 aros_host_cpu="$host_cpu"
277                 ;;
278         esac
279         ;;
280         
281     solaris*)
282         aros_host_arch="solaris"
283         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
284         case "$host_cpu" in
285             *i?86*)
286                 aros_host_cpu="i386"
287                 ;;
288             *sparc*)
289                 aros_host_cpu="sparc"
290                 ;;
291             *)
292                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
293                 aros_host_cpu="$host_cpu"
294                 ;;
295         esac
296         ;;
298     morphos*)
299         aros_host_arch="morphos"
300         aros_host_cpu="ppc"
301         ;;
303     amiga*)
304         aros_host_arch="amiga"
305         SORT="/gg/bin/sort"
306         TEST="/gg/bin/test"
307         UNIQ="/gg/bin/uniq"
308         FOR="for"
309         TOUCH="/gg/bin/touch"
310         case "$host_cpu" in
311             *m68k*)
312                 aros_host_cpu="m68k"
313                 ;;
314             *powerpc*)
315                 aros_host_cpu="ppc"
316                 ;;
317             *)
318                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
319                 aros_host_cpu="$host_cpu"
320                 ;;
321         esac
322         ;;
324     cygwin*)
325         aros_host_arch="cygwin"
326         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
327         case "$host_cpu" in
328             *i?86*)
329                 aros_host_cpu="i386"
330                 ;;
331             *)
332                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
333                 aros_host_cpu="$host_cpu"
334                 ;;
335         esac
336         ;;
338     mingw32*)
339         aros_host_arch="mingw32"
340         aros_host_cc="$aros_host_cc $aros_host_cc_pipe"
341         case "$host_cpu" in
342             *i?86*)
343                 aros_host_cpu="i386"
344                 ;;
345             *)
346                 AC_MSG_WARN("Unknown CPU for host -- $host_cpu")
347                 aros_host_cpu="$host_cpu"
348                 ;;
349         esac
350         ;;
351     *)
352         AC_MSG_ERROR([Unsupported host architecture $host])
353         ;;
354 esac
356 AROS_PROG(aros_host_ar,[ar],[cr])
357 AROS_REQUIRED(ar,$aros_host_ar)
358 AROS_PROG(aros_host_ranlib,ranlib)
359 AROS_REQUIRED(ranlib,$aros_host_ranlib)
360 AROS_PROG(aros_host_strip,strip)
361 AROS_REQUIRED(strip,$aros_host_strip)
363 AROS_PROG(RM,[rm],[-rf])
364 AROS_REQUIRED(rm,$RM)
365 AROS_PROG(CP,[cp])
366 AROS_REQUIRED(cp,$CP)
367 AROS_PROG(MV,[mv])
368 AROS_REQUIRED(mv,$MV)
369 AROS_PROG(ECHO,[echo])
370 AROS_REQUIRED(echo,$ECHO)
371 AROS_PROG(MKDIR,[mkdir],[-p])
372 AROS_REQUIRED(mkdir,$MKDIR)
373 AROS_PROG(TOUCH,[touch])
374 AROS_REQUIRED(touch,$TOUCH)
375 AROS_PROG(SORT,[sort])
376 AROS_REQUIRED(sort,$SORT)
377 AROS_PROG(UNIQ,[uniq])
378 AROS_REQUIRED(uniq,$UNIQ)
379 AROS_PROG(NOP,[true])
380 AROS_REQUIRED(true,$NOP)
381 AROS_PROG(CAT,[cat])
382 AROS_REQUIRED(cat,$CAT)
383 AROS_PROG(BISON,[bison])
384 AROS_REQUIRED(bison,$BISON)
385 AROS_PROG(FLEX,[flex])
386 AROS_REQUIRED(flex,$FLEX)
387 AROS_PROG(PNGTOPNM,[pngtopnm])
388 AROS_REQUIRED(pngtopnm,$PNGTOPNM)
389 AROS_PROG(PPMTOILBM,[ppmtoilbm])
390 AROS_REQUIRED(ppmtoilbm,$PPMTOILBM)
391 AROS_PROG(SED,[sed])
392 AROS_REQUIRED(sed,$SED)
393 AROS_PROG(CHMOD,[chmod])
394 AROS_REQUIRED(chmod,$CHMOD)
396 AM_PATH_PYTHON(2.5)
398 AC_SUBST(FOR, for)
399 AC_SUBST(IF, if)
400 AC_SUBST(TEST, test)
401 AC_SUBST(CMP, cmp)
403 dnl ---------------------------------------------------------------------------
404 dnl Look for things about the host system, good for hosted targets.
405 dnl ---------------------------------------------------------------------------
407 # Check for some includes for the X11 HIDD and the kernel
408 AC_CHECK_HEADERS([sys/ipc.h sys/shm.h \
409     sys/mmap.h sys/mman.h sysexits.h \
410     sys/statfs.h sys/statvfs.h sys/vfs.h sys/param.h \
413 AC_CHECK_HEADERS([sys/mount.h],,,[#include <sys/param.h>])
415 AC_HEADER_DIRENT
416 AC_HEADER_STAT
417 AC_HEADER_STDC
418 AC_HEADER_SYS_WAIT
419 AC_HEADER_TIME
420 AC_STRUCT_ST_BLKSIZE
421 AC_STRUCT_ST_BLOCKS
422 AC_STRUCT_ST_RDEV
423 AC_STRUCT_TM
424 AC_STRUCT_TIMEZONE
425 AC_TYPE_OFF_T
426 AC_TYPE_PID_T
427 AC_TYPE_SIZE_T
428 AC_TYPE_UID_T
430 AC_CHECK_MEMBERS(struct tm.tm_gmtoff)
432 # Look for some functions
433 AC_CHECK_FUNCS([getpagesize kqueue statfs statvfs \
434     clone kse_create rfork_thread thr_create sa_register \
435     getcontext makecontext setcontext sigaltstack swapcontext])
437 AC_FUNC_MMAP
440 dnl --------------------------------------------------------------------
441 dnl Target Configuration Section
442 dnl --------------------------------------------------------------------
444 dnl The target configuration section is responsible for setting up all
445 dnl the paths for includes, and tools required to build AROS to some
446 dnl particular target.
448 aros_config_cflags="-Wall -Werror-implicit-function-declaration"
449 aros_config_aflags="-Wall -x assembler-with-cpp -c"
450 aros_config_ldflags=""
452 aros_shared_default=yes
454 aros_shared_cflags="-fPIC"
455 aros_shared_aflags=""
456 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
457 aros_kernel_ldflags="-Wl,-rpath,./lib"
459 aros_target_ar_flags="cr"
460 aros_target_nm_flags="-C -ul"
461 aros_target_strip_flags="--strip-unneeded -R.comment"
463 aros_compiler_libs=
464 aros_arch_libs=
466 aros_target_genmap="-Wl,-Map -Xlinker"
468 # Native flavour stuff
469 aros_serial_debug="0"
471 # Palm native flavour stuff
472 aros_palm_debug_hack="0"
474 # Unix flavour stuff
475 aros_nesting_supervisor="0"
477 # Collect-aros stuff: "-ius" to ignore undefined symbols
478 ignore_undefined_symbols=""
480 #-----------------------------------------------------------------------------
483 # GCC 4.1+ has a stack protection feature that requires OS support. Ubuntu has
484 # it switched on by default, and we use the host compiler, so it compiles AROS
485 # code with this enabled resulting in link failures as we don't have support
486 # for it.
488 # We use two methods to disable it. For the host compiler (used to compile
489 # some hosted modules), we test to see if the compiler supports stack
490 # protection, and if it does we disable it in AROS_CONFIG_CFLAGS. This should
491 # work on all platforms.
493 # For the "cross" compiler we clear the "ssp_default" spec in config/specs.in
494 # (this is done unconditionally, as it should have no effect on compilers
495 # without the stack protection feature). This may be specific to the way that
496 # Ubuntu enables the feature, so may not work everywhere. My specs-fu isn't
497 # strong enough to disable it in a generic way though, so we'll live with it
498 # until another vendor ships GCC with it enabled in a different way, and deal
499 # with it then.
502 AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
503 save_cflags="$CFLAGS"
504 CFLAGS="$CFLAGS -fno-stack-protector"
505 AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
506 AC_MSG_RESULT($use_no_stack_protector)
507 if test "x-$use_no_stack_protector" = "x-yes" ; then
508     aros_host_cflags="$aros_host_cflags -fno-stack-protector"
510 CFLAGS="$save_cflags"
512 #-----------------------------------------------------------------------------
514 # Disable pointer-signedness warnings if the compiler recognises the option
515 # (this only works for the host compiler at the moment)
517 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
518 save_cflags="$CFLAGS"
519 CFLAGS="$CFLAGS -Wno-pointer-sign"
520 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
521 AC_MSG_RESULT($use_no_sign_warning)
522 if test "x-$use_no_sign_warning" = "x-yes" ; then
523     aros_host_cflags="$aros_host_cflags -Wno-pointer-sign"
525 CFLAGS="$save_cflags"
527 #-----------------------------------------------------------------------------
529 AC_MSG_CHECKING([for type of build])
530 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")
532 if test "$build_type" = "nightly"; then
533     build_type_string="NIGHTLY"
534 elif test "$build_type" = "snapshot"; then
535     build_type_string="SNAPSHOT"
536 elif test "$build_type" = "milestone"; then
537     build_type_string="MILESTONE"
538 elif test "$build_type" = "release"; then
539     build_type_string="RELEASE"
540 else
541     build_type_string="PERSONAL"
542     build_type="personal"
545 aros_config_cflags="$aros_config_cflags -DAROS_BUILD_TYPE=AROS_BUILD_TYPE_$build_type_string"
547 AC_MSG_RESULT($build_type)
549 #-----------------------------------------------------------------------------
550 all_debug_types="messages stack modules mungwall symbols"
552 AC_MSG_CHECKING([which debug types to enable])
553 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)]),
554  debug="$enableval",debug="")
556 if test "$debug" = "" -o "$debug" = "no"; then
557     debug="none"
558 elif test "$debug" = "yes"; then
559     debug="all"
562 if test "$debug" = "all" ; then
563     debug="messages stack modules symbols"
564     for d in $all_debug_types; do
565         export aros_${d}_debug="1"
566     done
567 else
568     for d in $all_debug_types; do
569         export aros_${d}_debug="0"
570     done
573 if test "$debug" != "none"; then
574     debug=`echo $debug | sed s/,/\ /g`
575     for d in $debug; do
576         found="0"
577         for d2 in $all_debug_types; do
578             if test "$d2" = "$d"; then
579                 found="1"
580                 break
581             fi
582         done
583         if test "$found" = "0"; then
584             AC_MSG_ERROR([unrecognized debug type "$d". Available types are: all none $all_debug_types])
585         fi
586         export aros_${d}_debug="1"
587     done
588     aros_debug="yes"
590 AC_MSG_RESULT($debug)
592 if test "$aros_messages_debug" = "1"; then
593     aros_messages_debug="-DADEBUG=1 -DMDEBUG=1"
594 else
595     aros_messages_debug=""
597 if test "$aros_symbols_debug" = "1"; then
598     aros_symbols_debug="-g"
599 else
600     aros_symbols_debug=""
603 # These are the flags to pass when compiling debugged programs
604 aros_debug_cflags="$aros_symbols_debug $aros_messages_debug"
605 aros_debug_aflags=""
606 aros_debug_ldflags="$aros_symbols_debug"
608 aros_crosstools="no"
610 #-----------------------------------------------------------------------------
611 #   Checking if we should build crosstools..
612 AC_MSG_CHECKING([whether to build crosstools])
613 AC_ARG_ENABLE(crosstools,AC_HELP_STRING([--enable-crosstools],[Build cross-compiler toolchains if necessary (default=no).]),crosstools="$enableval",crosstools="no")
614 if test "$crosstools" != "" -a "$crosstools" != "no"; then
615     AC_MSG_RESULT(yes)
616         aros_crosstools="yes"
617 else
618     AC_MSG_RESULT(no)
621 #-----------------------------------------------------------------------------
622 #   Checking for distcc and ccache.
624 #   Always apply the transforms in this particular order. Basically you should
625 #   always run 'ccache distcc compiler' in that order for the best performance.
627 AC_MSG_CHECKING([whether to enable distcc])
628 AC_ARG_ENABLE(distcc,AC_HELP_STRING([--enable-distcc],[Use distcc as a front end to the compiler (default=no).]),distcc="$enableval",distcc="no")
629 if test "$distcc" != "" -a "$distcc" != "no"; then
630     # AC_CHECK_PROG will print out the result in this case
631     AC_PATH_PROG(DISTCC,[distcc],distcc,)
632 else
633     AC_MSG_RESULT(no)
636 AC_MSG_CHECKING([whether to enable ccache])
637 AC_ARG_ENABLE(ccache,AC_HELP_STRING([--enable-ccache],[Use ccache as a front end to the compiler (default=no).]),ccache="$enableval",ccache="no")
638 if test "$ccache" != "" -a "$ccache" != "no"; then
639     # AC_CHECK_PROG will print out the result in this case
640     AC_CHECK_PROG(CCACHE,[ccache],ccache,)
641 else
642     AC_MSG_RESULT(no)
645 #-----------------------------------------------------------------------------
646 AC_MSG_CHECKING([what specific gcc version to use])
647 AC_ARG_WITH(gcc-version,AC_HELP_STRING([--with-gcc-version=VERSION],[Use gcc-VERSION for building AROS]),target_tool_version="$withval",target_tool_version="default")
648 AC_MSG_RESULT($target_tool_version)
650 #-----------------------------------------------------------------------------
651 AC_MSG_CHECKING([what optimization flags to use])
652 AC_ARG_WITH(optimization,AC_HELP_STRING([--with-optimization=FLAGS],[Use optimization flags FLAGS (default=-O2).]),optimization="$withval",optimization="unknown")
653 if test "$optimization" = "unknown"; then
654     dnl default is -O2 for normal builds, -O0 for debug builds
655     if test "$debug" != "none"; then
656         optimization="-O0"
657     else
658         optimization="-O2"
659     fi
661 aros_config_cflags="$aros_config_cflags $optimization"
662 AC_MSG_RESULT($optimization)
664 #-----------------------------------------------------------------------------
665 AC_MSG_CHECKING([what paranoia flags to use])
666 AC_ARG_WITH(paranoia,AC_HELP_STRING([--with-paranoia=FLAGS],[CC flags to enable paranoia]),[paranoia_flags="$withval"],[paranoia_flags="default"])
667 if test "$paranoia_flags" = "default"; then
668         paranoia_flags=""
669 else if test "$paranoia_flags" = "yes"; then
670         paranoia_flags="-Wall -Werror"
671 fi fi
672 AC_MSG_RESULT($paranoia_flags)
673 aros_paranoia_cflags="$paranoia_flags"
675 #-----------------------------------------------------------------------------
676 if test "$target_os" = "ios"; then
678 AC_MSG_CHECKING([XCode path])
679 AC_ARG_WITH(xcode-path,AC_HELP_STRING([--with-xcode=PATH],[Specify XCode path for iOS targets (default=/Developer).]),aros_xcode_path="$withval",aros_xcode_path="/Developer")
680 AC_MSG_RESULT($aros_xcode_path)
682 AC_MSG_CHECKING([for minimum supported iOS version])
683 AC_ARG_WITH(ios-version,AC_HELP_STRING([--with-ios-version=VERSION],[Specify minimum supported iOS version (default=2.0).]),aros_ios_version="$withval",aros_ios_version="2.0")
684 AC_MSG_RESULT($aros_ios_version)
686 AC_MSG_CHECKING([what iOS SDK version to use])
687 AC_ARG_WITH(ios-sdk,AC_HELP_STRING([--with-ios-sdk=VERSION],[Use iOS SDK version VERSION (default=4.1).]),aros_ios_sdk="$withval",aros_ios_sdk="4.1")
688 AC_MSG_RESULT($aros_ios_sdk)
692 #-----------------------------------------------------------------------------
693 AC_MSG_CHECKING([what target variant to enable])
694 AC_ARG_ENABLE(target_variant,AC_HELP_STRING([--enable-target-variant=NAME],[Enable a specific target variant(default=none)]),target_variant=$enableval,target_variant="")
695 if test "$target_variant" = ""; then
696     aros_target_variant=""
697     aros_target_suffix=""
698     enableval="none"
699 else
700     aros_target_variant="$target_variant"
701     aros_target_suffix="-$target_variant"
703 AC_MSG_RESULT($enableval)
705 target_bootloader="none"
707 #-----------------------------------------------------------------------------
708 # This is the target configuration switch.
709 case "$target_os" in
710     linux*)
711         aros_target_arch="linux"
712         aros_target_family="unix"
713         case "$target_cpu" in
714             *m68k*)
715                 aros_target_cpu="m68k"
716                 aros_object_format="m68kelf"
717                 aros_flavour="emulcompat"
718                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__linux__"
719                 aros_shared_ldflags="-Wl,-T,\$(TOP)/config/linux/m68k/script.so"
720                 aros_kernel_ldflags="-Wl,-rpath,./lib,-T,\$(TOP)/config/linux/m68k/script.normal"
721                 gcc_target_cpu="mc68000"
722                 ;;
723             *i?86*)
724                 aros_target_cpu="i386"
725                 aros_object_format="elf_i386"
726                 aros_flavour="emulation"
727                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__linux__"
728                 aros_config_cflags="$aros_config_cflags -m32 -march=i486"
729                 aros_kernel_cflags="$aros_kernel_cflags -m32 -march=i486"
730                 aros_config_aflags="$aros_config_aflags -m32 -march=i486"
731                 aros_config_ldflags="-m32 -march=i486"
732                 aros_kernel_ldflags="-melf_i386"
733                 aros_default_wbdepth=8
734                 gcc_target_cpu="i386"
735                 pci_hidd_target="hidd-pci-linux"
736                 ;;
737             *x86_64*)
738                 aros_target_cpu="x86_64"
739                 aros_object_format="elf_x86_64"
740                 aros_flavour="emulation"
741                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__linux__"
742                 aros_config_cflags="$aros_config_cflags -mno-red-zone"
743                 aros_default_wbdepth=8
744                 gcc_target_cpu="x86_64"
745                 pci_hidd_target="hidd-pci-linux"
746                 ;;
747             *powerpc*)
748                 aros_target_cpu="ppc"
749                 aros_object_format="elf32ppc"
750                 aros_flavour="emulation"
751                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
752                 aros_default_wbdepth=8
753                 gcc_target_cpu="ppc"
754                 ;;
755 # TODO
756 # Same as powerpc, but I need this for the nightly build to work again.
757 # Actually, the nightly should be made working with powerpc target.
758 # That just was too much work for the moment, another week or two.
759             *ppc*)
760                 aros_target_cpu="ppc"
761                 aros_object_format="elf32ppc"
762                 aros_flavour="emulation"
763                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc -D__linux__"
764                 aros_default_wbdepth=8
765                 gcc_target_cpu="ppc"
766                 ;;
767             *arm*)
768                 aros_target_cpu="arm"
769                 aros_object_format="armelf_linux_eabi"
770                 aros_flavour="emulation"
771                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm -D__linux__"
772                 gcc_target_cpu="arm"
773                 aros_config_cflags="$aros_config_cflags -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
774                 aros_config_aflags="$aros_config_aflags -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
775                 aros_arch_libs="-laeabi"
776                 ;;
777             *)
778                 AC_MSG_ERROR("Unknown CPU for Linux -- $target_cpu")
779                 ;;
780         esac
781     ;;
783     pc)
784         aros_target_arch="pc"
785         aros_shared_default="no"
786         target_bootloader="grub2"
787         case "$target_cpu" in
788             *i?86*)
789                 aros_target_cpu="i386"
791                 dnl If somebody hasn't already set the target object
792                 dnl format, then use this value. Mostly to support
793                 dnl FreeBSD cross-compilation.
794                 dnl TODO: Remove when we always use our compiler.
796                 if test "$aros_object_format" = "" ; then
797                     aros_object_format="elf_i386"
798                 fi
799                 aros_flavour="standalone"
800                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
801                 aros_config_cflags="$aros_config_cflags -m32 -march=i486"
802                 aros_kernel_cflags="$aros_kernel_cflags -m32 -march=i486"
803                 aros_config_aflags="$aros_config_aflags -m32 -march=i486"
804                 aros_config_ldflags="-m32 -march=i486"
805                 aros_kernel_ldflags="-melf_i386"
806                 aros_default_wbwidth=640
807                 aros_default_wbheight=480
808                 gcc_target_cpu="i386"
809                 ;;
810             *x86_64*)
811                 aros_target_cpu="x86_64"
812                 aros_serial_debug=1
813                 if test "$aros_object_format" = "" ; then
814                     aros_object_format="elf_x86_64"
815                 fi
816                 aros_flavour="standalone"
817                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
818                 aros_config_cflags="$aros_config_cflags -fno-asynchronous-unwind-tables -mno-red-zone"
819                 aros_kernel_ldflags=""
820                 aros_default_wbwidth=640
821                 aros_default_wbheight=480
822                 gcc_target_cpu="x86_64"
823                 ;;
824             *)
825                 AC_MSG_ERROR("Unknown native CPU -- $target_cpu")
826                 ;;
827         esac
828         ;;
830     prep)
831         aros_target_arch="prep"
832         aros_shared_default="no"
833         aros_target_cpu="ppc"
834         aros_object_format="elf32ppc"
835         aros_flavour="ppcnative"
836         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
837         aros_kernel_ldflags=""
838         aros_default_wbwidth=640
839         aros_default_wbheight=480
840         gcc_target_cpu="ppc"
841         ;;
843     freebsd*)
844         aros_target_arch="freebsd"
845         aros_target_family="unix"
846         aros_target_cpu="i386"
847         aros_flavour="emulation"
848         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
849         gcc_target_cpu="i386"
851         aros_target_strip_flags="-x"
852         ;;
854     darwin*)
855         aros_target_arch="darwin"
856         aros_target_family="unix"
857         aros_flavour="emulation"
858         case "$target_cpu" in
859             *i?86*)
860                 aros_target_cpu="i386"
861                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
862                 aros_kernel_cflags="$aros_kernel_cflags -m32"
863                 aros_kernel_ldflags="$aros_kernel_ldflags -m32"
864                 aros_default_wbdepth=8
865                 gcc_target_cpu="i386"
866                 aros_object_format="elf_i386"
867                 aros_target_strip_flags="-x"
868                 aros_target_cc="i386-aros-gcc"
869                 aros_target_cxx="i386-aros-g++"
870                 aros_target_ld="i386-aros-ld"
871                 aros_target_as="i386-aros-as"
872                 aros_target_ar="i386-aros-ar"
873                 aros_target_ranlib="i386-aros-ranlib"
874                 aros_target_nm="i386-aros-nm"
875                 aros_target_strip="i386-aros-strip"
876                 aros_target_objcopy="i386-aros-objcopy"
877                 aros_target_objdump="i386-aros-objdump"
878                 target_tool_prefix="i686-apple-darwin10-"
879                 ;;
880             *x86_64*)
881                 aros_target_cpu="x86_64"
882                 aros_object_format="elf_x86_64"
883                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
884                 aros_kernel_cflags="$aros_kernel_cflags -m64"
885                 aros_kernel_ldflags="$aros_kernel_ldflags -m64"
886                 aros_default_wbdepth=8
887                 gcc_target_cpu="x86_64"
888                 aros_target_cc="x86_64-aros-gcc"
889                 aros_target_cxx="x86_64-aros-g++"
890                 aros_target_ld="x86_64-aros-ld"
891                 aros_target_as="x86_64-aros-as"
892                 aros_target_ar="x86_64-aros-ar"
893                 aros_target_ranlib="x86_64-aros-ranlib"
894                 aros_target_nm="x86_64-aros-nm"
895                 aros_target_strip="x86_64-aros-strip"
896                 aros_target_objcopy="x86_64-aros-objcopy"
897                 aros_target_objdump="x86_64-aros-objdump"
898                 target_tool_prefix="i686-apple-darwin10-"
899                 ;;
900             *ppc*)
901                 aros_target_cpu="ppc"
902                 aros_object_format="elf32_ppc"
903                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
904                 aros_default_wbdepth=8
905                 gcc_target_cpu="ppc"
906                 aros_target_cc="ppc-aros-gcc"
907                 aros_target_cxx="ppc-aros-g++"
908                 aros_target_ld="ppc-aros-ld"
909                 aros_target_as="ppc-aros-as"
910                 aros_target_ar="ppc-aros-ar"
911                 aros_target_ranlib="ppc-aros-ranlib"
912                 aros_target_nm="ppc-aros-nm"
913                 aros_target_strip="ppc-aros-strip"
914                 aros_target_objcopy="ppc-aros-objcopy"
915                 aros_target_objdump="ppc-aros-objdump"
916                 target_tool_prefix="powerpc-apple-darwin10-"
917                 ;;
918             *)
919                 AC_MSG_ERROR("Unsupported target CPU for darwin hosted flavour -- $target_cpu")
920                 ;;
921         esac
922         ;;
924     ios*)
925         aros_target_arch="ios"
926         aros_target_family="unix"
927         aros_flavour="emulation"
928         # This is here because it may depend on iOS or SDK version
929         aros_kernel_objcflags="-fobjc-abi-version=2 -fobjc-legacy-dispatch"
930         case "$target_cpu" in
931             *i?86*)
932                 aros_ios_platform="iPhoneSimulator"
933                 aros_target_cpu="i386"
934                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
935                 aros_default_wbdepth=8
936                 gcc_target_cpu="i386"
937                 aros_object_format="elf_i386"
938                 aros_target_strip_flags="-x"
939                 aros_target_cc="i386-aros-gcc"
940                 aros_target_cxx="i386-aros-g++"
941                 aros_target_ld="i386-aros-ld"
942                 aros_target_as="i386-aros-as"
943                 aros_target_ar="i386-aros-ar"
944                 aros_target_ranlib="i386-aros-ranlib"
945                 aros_target_nm="i386-aros-nm"
946                 aros_target_strip="i386-aros-strip"
947                 aros_target_objcopy="i386-aros-objcopy"
948                 aros_target_objdump="i386-aros-objdump"
949                 target_tool_prefix="i686-apple-darwin10-"
950                 target_tool_flags="-m32"
951                 ;;
952             *arm*)
953                 aros_ios_platform="iPhoneOS"
954                 aros_target_cpu="arm"
955                 aros_object_format="armelf_linux_eabi"
956                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
957                 aros_config_cflags="$aros_config_cflags -march=armv6 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
958                 aros_config_aflags="$aros_config_aflags -march=armv6 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions"
959                 aros_arch_libs="-laeabi"
960                 aros_default_wbdepth=8
961                 gcc_target_cpu="arm"
962                 aros_kernel_ld="ld -arch armv6"
963                 aros_target_cc="arm-aros-gcc"
964                 aros_target_cxx="arm-aros-g++"
965                 aros_target_ld="arm-aros-ld"
966                 aros_target_as="arm-aros-as"
967                 aros_target_ar="arm-aros-ar"
968                 aros_target_ranlib="arm-aros-ranlib"
969                 aros_target_nm="arm-aros-nm"
970                 aros_target_strip="arm-aros-strip"
971                 aros_target_objcopy="arm-aros-objcopy"
972                 aros_target_objdump="arm-aros-objdump"
973                 target_tool_prefix="arm-apple-darwin10-" 
974                 aros_default_wbwidth=320
975                 aros_default_wbheight=480
976                 export PATH="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/usr/bin:$PATH"
977                 ;;
978             *)
979                 AC_MSG_ERROR("Unsupported target CPU for iOS hosted flavour -- $target_cpu")
980                 ;;
981         esac
982         aros_ios_sdk="$aros_xcode_path/Platforms/$aros_ios_platform.platform/Developer/SDKs/$aros_ios_platform$aros_ios_sdk.sdk"
983         target_tool_flags="$target_tool_flags --sysroot $aros_ios_sdk"
984         ;;
986     dragonfly*)
987         aros_target_arch="dragonfly"
988         aros_target_family="unix"
989         aros_flavour="emulation"
990         case "$target_cpu" in
991             *i?86*)
992                 aros_target_cpu="i386"
993                 aros_object_format="elf_i386"
994                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__DragonFly__"
995                 ;;
996             *x86_64*)
997                 aros_target_cpu="x86_64"
998                 aros_object_format="elf_x86_64"
999                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64 -D__DragonFly__"
1000                 ;;
1001             *)
1002                 AC_MSG_ERROR("Unknown CPU for DragonFly -- $target_cpu")
1003                 ;;
1004         esac
1005         ;;
1007     netbsd*)
1008         aros_target_arch="netbsd"
1009         aros_target_family="unix"
1010         case "$target_cpu" in
1011             *m68k*)
1012                 aros_target_cpu="m68k"
1013                 aros_object_format="m68kelf"
1014                 aros_flavour="emulcompat"
1015                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D__mc68000 -D__NetBSD__"
1016                 gcc_target_cpu="mc68000"
1017                 ;;
1018             *i?86*)
1019                 aros_target_cpu="i386"
1020                 aros_object_format="elf_i386"
1021                 aros_flavour="emulation"
1022                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__NetBSD__"
1023                 aros_default_wbdepth=8
1024                 gcc_target_cpu="i386"
1025                 ;;
1026             *)
1027                 AC_MSG_ERROR("Unknown CPU for NetBSD -- $target_cpu")
1028                 ;;
1029         esac
1030         aros_target_genmap="-Wl,-M -Xlinker >"
1031         aros_flavour="emulation"
1032         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1033         ;;   
1035     openbsd*)
1036         aros_target_arch="openbsd"
1037         aros_target_family="unix"
1038         case "$target_cpu" in
1039             *i?86*)
1040                 aros_target_cpu="i386"
1041                 aros_object_format="elf_i386"
1042                 aros_flavour="emulation"
1043                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__OpenBSD__"
1044                 gcc_target_cpu="i386"
1045                 ;;
1046             *)
1047                 AC_MSG_ERROR("Unknown CPU for OpenBSD -- $target_cpu")
1048                 ;;
1049         esac
1050         aros_target_genmap="-Wl,-M -Xlinker >"
1051         aros_target_nm_flags="-u"
1052         aros_flavour="emulation"
1053         ;;
1055     solaris*)
1056         aros_target_arch="solaris"
1057         aros_target_family="unix"
1058         case "$target_cpu" in
1059            *i?86*)
1060                aros_target_cpu="i386"
1061                aros_object_format="elf_i386"
1062                aros_flavour="emulation"
1063                aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386 -D__Solaris__"
1064                aros_default_wbdepth=8
1065                gcc_target_cpu="i386"
1066                ;;
1067             *sparc*)
1068                 aros_target_cpu="sparc"
1069                 aros_object_format="elf_sparc"
1070                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dsparc -D__Solaris__"
1071                 gcc_target_cpu="sparc"
1072                 ;;
1073             *)
1074                 AC_MSG_ERROR("Unknown CPU for Solaris -- $target_cpu")
1075                 ;;
1076         esac
1077         aros_config_cflags="$aros_config_cflags -D$aros_target_cpu"
1078         aros_flavour="emulation"
1079         ;;
1081     morphos*)
1082         aros_target_arch="morphos"
1083         aros_shared_default="no"
1084         aros_target_cpu="ppc"
1085         aros_object_format="elf_ppc"
1086         aros_flavour="nativecompat"
1087         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1088         gcc_target_cpu="ppc"
1089         ;;
1091     sam440)
1092         aros_target_arch="sam440"
1093         aros_shared_default="no"
1094         aros_target_cpu="ppc"
1095         aros_object_format="elf32ppc"
1096         aros_flavour="ppcnative"
1097         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1098         aros_kernel_ldflags=""
1099         aros_default_wbwidth=1024
1100         aros_default_wbheight=768
1101         aros_default_wbdepth=24
1102         aros_config_cflags="$aros_config_cflags -mcpu=440fp -mno-toc -fno-asynchronous-unwind-tables"
1103         gcc_target_cpu="powerpc"
1104         ;;
1106     efika)
1107         aros_target_arch="efika"
1108         aros_shared_default="no"
1109         aros_target_cpu="arm"
1110         aros_object_format="armelf_linux_eabi"
1111         aros_flavour="standalone"
1112         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1113         aros_kernel_ldflags=""
1114         aros_default_wbwidth=1024
1115         aros_default_wbheight=600
1116         aros_arch_libs="-laeabi"
1117         aros_config_cflags="$aros_config_cflags -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing"
1118         aros_config_aflags="$aros_config_aflags -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-asynchronous-unwind-tables -fno-exceptions -fno-strict-aliasing"
1119         ;;
1120         
1121     chrp)
1122     aros_target_arch="chrp"
1123     aros_shared_default="no"
1124     aros_target_cpu="ppc"
1125     aros_object_format="elf32ppc"
1126     aros_flavour="ppcnative"
1127     aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dppc"
1128     aros_kernel_ldflags=""
1129     aros_default_wbwidth=640
1130     aros_default_wbheight=480
1131     aros_config_cflags="$aros_config_cflags -mno-toc -fno-asynchronous-unwind-tables"    
1132     gcc_target_cpu="powerpc"
1133         case "$aros_target_variant" in
1134             efika)
1135             aros_config_cflags="$aros_config_cflags -DBIG_ENDIAN_OHCI=1 -mcpu=603e"
1136             ;;
1137         esac
1138     ;;
1140     amiga*)
1141         aros_target_arch="amiga"
1142         aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -D_AMIGA -DAMIGA"
1143         aros_shared_default="no"
1145         case "$target_cpu" in
1146             *m68k-eabi)
1147                 aros_target_cpu="m68k"
1148                 aros_object_format="m68kelf"
1149                 aros_flavour="standalone"
1150                 gcc_target_cpu="mc68000"
1151                 aros_config_cflags="$aros_config_cflags -g3 -fno-strict-aliasing -ffreestanding -fomit-frame-pointer -${gcc_target_cpu} -fbuiltin"
1152                 aros_config_aflags="$aros_config_aflags -g3 -fno-strict-aliasing -ffreestanding -fomit-frame-pointer -${gcc_target_cpu}"
1153                 aros_debug_cflags="-Wall -Werror-implicit-function-declaration $aros_symbols_debug  $aros_messages_debug -${gcc_target_cpu}"
1154                 target_tool_prefix="m68k-elf-"
1155                 aros_target_nostdlib_ldflags="" # We always need -lgcc
1156                 aros_target_strip_flags="-R.comment"
1157                 ;;
1158             *m68k*)
1159                 aros_target_cpu="m68k"
1160                 aros_object_format="m68kelf"
1161                 aros_flavour="standcompat"
1162                 gcc_target_cpu="mc68000"
1163                 aros_config_cflags="$aros_config_cflags -g3 -fno-strict-aliasing -ffreestanding -fomit-frame-pointer -${gcc_target_cpu} -fbuiltin -Wno-volatile-register-var -DAROS_CREATE_ROM"
1164                 aros_config_aflags="$aros_config_aflags -g3 -${gcc_target_cpu}"
1165                 aros_paranoia_cflags="$aros_paranoia_cflags -Wno-volatile-register-var"
1166                 aros_debug_cflags="-Wall -Werror-implicit-function-declaration $aros_symbols_debug  $aros_messages_debug -${gcc_target_cpu}"
1167                 target_tool_prefix="m68k-elf-"
1168                 aros_target_nostdlib_ldflags="" # We always need -lgcc
1169                 aros_target_strip_flags="-R.comment"
1170                 ;;
1171             *ppc*)
1172                 aros_cpu="ppc"
1173                 aros_flavour="native"
1174                 gcc_target_cpu="ppc"
1175                 ;;
1176             *)
1177                 AC_MSG_ERROR("Unknown CPU for Amiga $target_cpu")
1178                 ;;
1179         esac
1180         ;;
1182     mingw*)
1183         aros_target_arch="mingw32"
1184         aros_shared_default="no"
1185         aros_flavour="emulation"
1186         aros_shared_cflags=""
1187         need_dlopen="no"
1188         rescomp="windres"
1189         case "$target_cpu" in
1190             *i?86*)
1191                 aros_target_cpu="i386"
1192                 aros_object_format="elf_i386"
1193                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Di386"
1194                 aros_default_wbdepth=8
1195                 gcc_target_cpu="i386"
1196                 aros_target_cc="i386-aros-gcc"
1197                 aros_target_cxx="i386-aros-g++"
1198                 aros_target_ld="i386-aros-ld"
1199                 aros_target_as="i386-aros-as"
1200                 aros_target_ar="i386-aros-ar"
1201                 aros_target_ranlib="i386-aros-ranlib"
1202                 aros_target_nm="i386-aros-nm"
1203                 aros_target_strip="i386-aros-strip"
1204                 aros_target_objcopy="i386-aros-objcopy"
1205                 aros_target_objdump="i386-aros-objdump"
1206                 target_tool_prefix="i386-mingw32-"
1207                 ;;
1208             *x86_64*)
1209                 aros_target_cpu="x86_64"
1210                 aros_object_format="elf_x86_64"
1211                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dx86_64"
1212                 aros_default_wbdepth=8
1213                 gcc_target_cpu="x86_64"
1214                 aros_target_cc="x86_64-aros-gcc"
1215                 aros_target_cxx="x86_64-aros-g++"
1216                 aros_target_ld="x86_64-aros-ld"
1217                 aros_target_as="x86_64-aros-as"
1218                 aros_target_ar="x86_64-aros-ar"
1219                 aros_target_ranlib="x86_64-aros-ranlib"
1220                 aros_target_nm="x86_64-aros-nm"
1221                 aros_target_strip="x86_64-aros-strip"
1222                 aros_target_objcopy="x86_64-aros-objcopy"
1223                 aros_target_objdump="x86_64-aros-objdump"
1224                 target_tool_prefix="x86_64-w64-mingw32-"
1225                 ;;
1226             *arm*)
1227                 aros_target_cpu="arm"
1228                 aros_object_format="armelf_linux_eabi"
1229                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Darm"
1230                 aros_arch_libs="-laeabi"
1231                 aros_default_wbdepth=8
1232                 gcc_target_cpu="arm"
1233                 aros_target_cc="arm-aros-gcc"
1234                 aros_target_cxx="arm-aros-g++"
1235                 aros_target_ld="arm-aros-ld"
1236                 aros_target_as="arm-aros-as"
1237                 aros_target_ar="arm-aros-ar"
1238                 aros_target_ranlib="arm-aros-ranlib"
1239                 aros_target_nm="arm-aros-nm"
1240                 aros_target_strip="arm-aros-strip"
1241                 aros_target_objcopy="arm-aros-objcopy"
1242                 aros_target_objdump="arm-aros-objdump"
1243                 target_tool_prefix="arm-mingw32ce-"
1244                 aros_default_wbwidth=160
1245                 aros_default_wbheight=160
1246                 ;;
1247             *)
1248                 AC_MSG_ERROR("Unknown CPU for Mingw32 -- $target_cpu")
1249                 ;;
1250         esac
1251         if test $host_os = "cygwin"; then
1252                 aros_kernel_cflags="-mno-cygwin"
1253         fi
1254     ;;
1255     pp*)
1256         aros_target_arch="pp"
1257         aros_shared_default="no"
1258         case "$target_cpu" in
1259             *m68k*)
1260                 aros_target_cpu="m68k"
1261                 aros_object_format="m68kelf"
1262                 aros_flavour="palmnative"
1263                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1264                 aros_default_wbwidth=160
1265                 aros_default_wbheight=160
1266                 aros_default_wbdepth=1
1267                 aros_target_ar_flags="cru"
1268                 aros_compiler_libs="-lgcc1"
1269                 aros_shared_default=no
1270                 aros_shared_cflags="-fpic"
1271                 aros_shared_aflags=""
1272                 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1273                 aros_kernel_ldflags="-Wl,-rpath,./lib"
1274                 aros_debug_cflags="-Wall -Werror-implicit-function-declaration $aros_symbols_debug  $aros_messages_debug -mc68000 -Wa,-mc68000"
1275                 aros_debug_aflags=""
1276                 aros_debug_ldflags="$aros_symbols_debug"
1277                 aros_mungwall_debug="0"
1278                 aros_modules_debug="0"
1279                 gcc_target_cpu="mc68000"
1280                 ignore_undefined_symbols="-ius"
1281                 ;;
1282            *)
1283                 AC_MSG_ERROR("Unknown CPU for PalmPilot -- $target_cpu")
1284                 ;;
1285         esac
1286         ;;
1288     mac*)
1289         aros_target_arch="mac"
1290         aros_shared_default="no"
1291         case "$target_cpu" in
1292             *m68k*)
1293                 aros_target_cpu="m68k"
1294                 aros_object_format="m68kelf"
1295                 aros_flavour="mac68knative"
1296                 aros_target_mkdep="$aros_target_mkdep -D__GNUC__ -Dm68k"
1297                 aros_default_wbwidth=512
1298                 aros_default_wbheight=384
1299                 aros_default_wbdepth=8
1300                 aros_target_ar_flags="cru"
1301                 aros_compiler_libs="-lgcc1"
1302                 aros_shared_default=no
1303                 aros_shared_cflags="-fpic"
1304                 aros_shared_aflags=""
1305                 aros_shared_ldflags="-Wl,-rpath,./lib -shared"
1306                 aros_kernel_ldflags="-Wl,-rpath,./lib"
1307                 aros_debug_cflags="-Wall -Werror-implicit-function-declaration $aros_symbols_debug  $aros_messages_debug -mc68000"
1308                 aros_debug_aflags=""
1309                 aros_debug_ldflags="$aros_symbols_debug"
1310                 aros_mungwall_debug="0"
1311                 aros_modules_debug="0"
1312                 gcc_target_cpu="mc68000"
1313                 ignore_undefined_symbols="-ius"
1314                 ;;
1315            *)
1316                 AC_MSG_ERROR("Unknown CPU for Mac68k -- $target_cpu")
1317                 ;;
1318         esac
1319         ;;
1321     *)
1322         AC_MSG_ERROR([Unsupported target architecture $target])
1323         ;;
1324 esac
1326 # FIXME: for cross-compiling this should point to another location
1327 if test "$aros_flavour" = "emulation"; then
1328     aros_kernel_includes="-isystem /usr/include"
1330 if test "$aros_flavour" = "emulcompat"; then
1331     aros_kernel_includes="-isystem /usr/include"
1334 AC_MSG_CHECKING([Where to download sourcecode for external ports])
1335 AC_ARG_WITH(portssources,AC_HELP_STRING([--with-portssources=DIR],[Where to download sourcecode for external ports]),with_portssrcdir=$withval,with_portssrcdir="default")
1336 if test "$with_portssrcdir" = "default"; then
1337     AROS_PORTSSRCDIR="$AROS_BUILDDIR_UNIX/bin/Sources"
1338 else
1339     AROS_PORTSSRCDIR="$with_portssrcdir"
1341 AC_MSG_RESULT($AROS_PORTSSRCDIR)
1343 AC_MSG_CHECKING([which bootloader to use])
1344 AC_ARG_WITH(bootloader,AC_HELP_STRING([--with-bootloader=NAME],[Use a specific bootloader]),target_bootloader=$withval,target_bootloader=$target_bootloader)
1345 if test "$target_bootloader" = "none"; then
1346     aros_target_bootloader=""
1347 else
1348     aros_target_bootloader="$target_bootloader"
1350 AC_MSG_RESULT($target_bootloader)
1352 AC_MSG_CHECKING([which icon-set to use])
1353 AC_ARG_WITH(iconset,AC_HELP_STRING([--with-iconset=NAME],[Use a specific Icon-set (default=Gorilla).]),target_iconset=$withval,target_iconset="default")
1354 if test "$target_iconset" = "default"; then
1355     aros_target_iconset="Gorilla"
1356     target_iconset="default (Gorilla)"
1357 else
1358     aros_target_iconset="$target_iconset"
1360 AC_MSG_RESULT($target_iconset)
1362 AC_MSG_CHECKING([which GUI Theme to use])
1363 AC_ARG_WITH(theme,AC_HELP_STRING([--with-theme=NAME],[Use a specific GUI Theme]),target_guitheme=$withval,target_guitheme="default")
1364 if test "$target_guitheme" = "default"; then
1365     aros_target_guitheme="Ice"
1366 else
1367     aros_target_guitheme="$target_guitheme"
1369 AC_MSG_RESULT($aros_target_guitheme)
1371 # Find out if we are cross-compiling (i.e. if we can't use the host compiler
1372 # for target code)
1373 cross_compiling=no
1374 if test "$aros_host_cpu" != "$aros_target_cpu" ; then
1375     cross_compiling=yes
1377 if test "$aros_host_cpu" == "x86_64" ; then
1378     if test "$aros_target_cpu" == "i386" ; then
1379         if test "$aros_target_arch" != "mingw32"; then
1380             cross_compiling=no
1381         fi
1382     fi
1384 if test "$aros_host_arch" == "darwin" ; then
1385     if test "$aros_target_arch" != "darwin" ; then
1386         cross_compiling=yes
1387     fi
1390 # Set prefix for target compiler etc. if we're cross-compiling
1391 # (should possibly be earlier but needs to be after AC_PROG_CC)
1392 if test "$cross_compiling" = "yes" ; then
1393     if test "$target_tool_prefix" = ""; then
1394         target_tool_prefix=${target_cpu}-elf-
1395     fi
1396     CC=${target_tool_prefix}gcc
1397     dnl CPP is needed for AC_CHECK_HEADER to work correctly
1398     CPP=${target_tool_prefix}cpp
1399     if test "$target_tool_version" != "default"; then
1400         CC="$CC-$target_tool_version"
1401         CPP="$CC-$target_tool_version"
1402     fi
1403     AC_PATH_PROG(CC,$CC)
1404     AROS_REQUIRED(gcc,$CC)
1406 CC="$CC $target_tool_flags"
1408 #-----------------------------------------------------------------------------
1410 # Disable pointer-signedness warnings if the compiler recognises the option
1412 AC_MSG_CHECKING([whether ${CC} accepts -Wno-pointer-sign])
1413 save_cflags="$CFLAGS"
1414 CFLAGS="$CFLAGS -Wno-pointer-sign"
1415 AC_TRY_COMPILE(,, use_no_sign_warning="yes", use_no_sign_warning="no")
1416 AC_MSG_RESULT($use_no_sign_warning)
1417 if test "x-$use_no_sign_warning" = "x-yes" ; then
1418     aros_config_cflags="$aros_config_cflags -Wno-pointer-sign"
1420 CFLAGS="$save_cflags"
1422 #-----------------------------------------------------------------------------
1424 # Find all the tools we need to compile. This could be cross-compiling
1425 # though! If that is the case we use the GNU form of the target and
1426 # simply add this to the front of the binary name. This is rather simple,
1427 # but it should work under most circumstances.
1429 # The default tools are to use the same as the host, but only if the
1430 # host and target CPU are the same. With GCC this is normally enough.
1433 aros_cc_pre=""
1434 aros_shared_ld="$aros_host_ld"
1436 aros_target_mkdep="$aros_host_mkdep"
1437 aros_target_incl_def="$aros_host_incl"
1439 aros_kernel_cc="$CC"
1441 # The default tools executables to be linked to.
1442 if test "$aros_target_cc" != ""; then
1443     AC_PATH_PROG(aros_target_cc,$aros_target_cc)
1444     AROS_REQUIRED(gcc,$aros_target_cc)
1446 if test "$aros_target_ld" != ""; then
1447     AC_PATH_PROG(aros_target_ld,$aros_target_ld)
1448     AROS_REQUIRED(ld,$aros_target_ld)
1451 if test "$crosstools" != "yes"; then
1452     AROS_TOOL_TARGET(aros_target_as_ln,as,$aros_target_as)
1453     AROS_REQUIRED(as,$aros_target_as_ln)
1454     AROS_TOOL_TARGET(aros_kernel_ld,ld,$aros_kernel_ld)
1455     AROS_REQUIRED(ld,$aros_kernel_ld)
1456     AROS_TOOL_TARGET(aros_target_ar_ln,ar,$aros_target_ar)
1457     AROS_REQUIRED(ar,$aros_target_ar_ln)
1458     AROS_TOOL_TARGET(aros_target_nm_ln,nm,$aros_target_nm)
1459     AROS_REQUIRED(nm,$aros_target_nm_ln)
1460     AROS_TOOL_TARGET(aros_target_objcopy_ln,objcopy,$aros_target_objcopy)
1461     AROS_REQUIRED(objcopy,$aros_target_objcopy_ln)
1462     AROS_TOOL_TARGET(aros_target_objdump_ln,objdump,$aros_target_objdump)
1463     AROS_REQUIRED(objdump,$aros_target_objdump_ln)
1464     AROS_TOOL_TARGET(aros_target_ranlib_ln,ranlib,$aros_target_ranlib)
1465     AROS_REQUIRED(ranlib,$aros_target_ranlib_ln)
1466     AROS_TOOL_TARGET(aros_target_strip_ln,strip,$aros_target_strip)
1467     AROS_REQUIRED(strip,$aros_target_strip_ln)
1468     if test "$aros_target_cxx" != ""; then
1469         AC_PATH_PROG(aros_target_cxx,$aros_target_cxx)
1470 # Temporarily disabled in order to let Mingw32-hosted nightly build to work
1471 #       AROS_REQUIRED(c++,$aros_target_cxx)
1472     fi
1473 else
1474 # Cancel preinstalled C++ compiler because it will be built as part of crosstools
1475     aros_target_cxx=""
1478 # Build crosstools if we have no C++ - temporary thing 
1479 if test "$aros_target_cxx" = ""; then
1480     crosstools_target=tools-crosstools
1483 if test "$rescomp" != ""; then
1484     if test "$cross_compiling" = "yes" ; then
1485         rescomp=${target_tool_prefix}${rescomp}
1486     fi
1487     AC_PATH_PROG(aros_kernel_rescomp,$rescomp)
1488     AROS_REQUIRED($rescomp,$aros_kernel_rescomp)
1491 aros_hostcfg_dir="bin/${aros_host_arch}-${aros_host_cpu}/gen/config"
1492 aros_targetcfg_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/config"
1493 aros_inc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/AROS/Development/include/aros"
1494 aros_gendir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen"
1495 aros_geninc_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/include/aros"
1496 aros_tools_dir="bin/${aros_host_arch}-${aros_host_cpu}/tools"
1497 aros_scripts_dir="bin/${aros_target_arch}-${aros_target_cpu}${aros_target_suffix}/gen/scripts"
1499 # aros_cc_pre is a variable that is added to the front of the compiler name
1500 # in the generated aros-gcc shell script. We need this to enable the cache
1501 # to work across cleaned builds. Also, support DISTCC using the correct
1502 # environment variable.
1505 if test "x${DISTCC}" != "x" ; then
1506     if test "x${CCACHE}" != "x" ; then
1507         aros_cc_pre="env CCACHE_PREFIX=${DISTCC} ${CCACHE} "
1508     else
1509         aros_cc_pre="${DISTCC} "
1510     fi
1511 else
1512     if test "x${CCACHE}" != "x" ; then
1513         aros_cc_pre="${CCACHE} "
1514     fi
1517 prefix="${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros"
1519 AC_SUBST(aros_target_nostdinc_cflags,-nostdinc)
1520 AC_SUBST(aros_target_nostartup_ldflags,-nostartfiles)
1521 AC_SUBST(aros_target_nix_ldflags,-nix)
1522 AC_SUBST(aros_target_detach_ldflags,-detach)
1523 AC_SUBST(aros_target_nostdlib_ldflags,-nostdlib)
1525 # Target tools
1526 if test "$aros_target_cc" = ""; then
1527     orig_target_cc=$aros_kernel_cc
1528 else
1529     orig_target_cc=$aros_target_cc
1531 if test "$aros_target_ld" = ""; then
1532     orig_target_ld=$aros_kernel_ld
1533 else
1534     orig_target_ld=$aros_target_ld
1536 if test "$GCC" = "yes"; then
1537     aros_target_cc_path=`$orig_target_cc -print-search-dirs | grep "programs: =" | cut -c 12-`
1539 aros_target_cc="${prefix}-gcc"
1540 aros_target_as="${prefix}-as"
1541 aros_target_ld="${prefix}-ld"
1542 aros_target_ar="${prefix}-ar $aros_target_ar_flags"
1543 aros_target_objcopy=${prefix}-objcopy
1544 aros_target_objdump=${prefix}-objdump
1545 aros_target_ranlib="${prefix}-ranlib $aros_target_ranlib_flags"
1546 aros_target_nm="${prefix}-nm $aros_target_nm_flags"
1547 aros_kernel_nm="${prefix}-nm"
1548 aros_target_strip=${prefix}-strip
1550 # Find the system include path. We can suggest that an alternative is
1551 # used if we don't get it correct. The default is to use /usr/include.
1552 # Which is set in the aros_target_incl_def variable.
1554 AC_ARG_ENABLE(includes,
1555 AC_HELP_STRING([--enable-includes=dir],[Alternative system include directory]),
1556 [aros_target_incl=$enable_includes], [aros_target_incl=$aros_target_incl_def])
1558 if test "$aros_kernel_includes" != "" ; then
1559     dnl find out about the kernel cc's include path
1560     AC_MSG_CHECKING([for the kernel compiler's include path])
1561     if test "$aros_kernel_cc_includes" = "" ; then
1562         # Try to guess where the directory is.
1563         aros_kernel_cc_includes=`dirname \`${aros_kernel_cc} ${aros_kernel_cflags} -print-libgcc-file-name\``/include
1564         if ! test -d $aros_kernel_cc_includes; then
1565             # The directory doesn't exist, we need to do some more work.
1566             aros_kernel_cc_includes=${PWD}/${aros_gendir}/cc_include
1568             # These are the headers we're looking for.
1569             headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
1570                      stddef.h xmmintrin.h iso646.h stdarg.h unwind.h   \
1571                      zutil.h"
1573             dirs=
1574             for h in $headers; do
1575                 # Which other headers are needed by each of the above?
1576                 deps=$(echo "#include <$h>" | \
1577                        $aros_kernel_cc -E -M - 2>/dev/null | \
1578                        sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
1580                 # Copy all the needed headers to a directory beneath gendir.
1581                 for d in $deps; do
1582                     h=$(basename $d)
1583                     dir=${aros_kernel_cc_includes}$(echo $(dirname $d) | \
1584                                                 sed -n "s,^.*/include\(/.*\),\1,p")
1585                     ! test -d $dir && mkdir -p $dir
1586                     ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
1587                 done
1588             done            
1589         fi
1590     fi
1591     AC_MSG_RESULT($aros_kernel_cc_includes)
1592     # Adding -nostdinc to kernel includes as they are always used together.
1593     aros_kernel_includes="$aros_kernel_includes $aros_target_nostdinc_cflags -isystem $aros_kernel_cc_includes"
1596 dnl find out about the target cc's include path
1597 AC_MSG_CHECKING([for the target compiler's include path])
1598 if test "$aros_target_cc_includes" = "" ; then
1599     #try to guess where the directory is
1600     aros_target_cc_includes=`dirname \`${orig_target_cc} -print-libgcc-file-name\``/include
1601     if ! test -d $aros_target_cc_includes; then
1602         #the directory doesn't exist, we need to do some more work
1603         aros_target_cc_includes=${PWD}/${aros_gendir}/cc_include
1604         
1605         #these are the headers we're looling for
1606         headers="limits.h mmintrin.h stdbool.h syslimits.h float.h \
1607                  stddef.h xmmintrin.h iso646.h stdarg.h unwind.h   \
1608                  zutil.h"
1610         dirs=
1611         for h in $headers; do
1612             #which other headers each of the above headers needs?
1613             deps=$(echo "#include <$h>" | \
1614                    $orig_target_cc -E -M - 2>/dev/null | \
1615                    sed 's/^.*://; s/\\$/ /g; s/[[ \t]]\+/ /g')
1616             
1617             #copy all the needed headers to a directory beneath gendir
1618             for d in $deps; do
1619                 h=$(basename $d)
1620                 dir=${aros_target_cc_includes}$(echo $(dirname $d) | \
1621                                                 sed -n "s,^.*/include\(/.*\),\1,p")
1622                 ! test -d $dir && mkdir -p $dir
1623                 ! test -f $dir/$h && { cp $d $dir; chmod u+w $dir/$h; }
1624             done
1625         done        
1626     fi
1628 AC_MSG_RESULT($aros_target_cc_includes)
1631 # For GCC < 4.0 -I- is used for giving the search path for '#include "..."'
1632 # On GCC >= 4.0 -iquote should be used
1635 save_cc="$CC"
1636 save_cflags="$CFLAGS"
1637 CFLAGS="-iquote."
1638 AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1639 AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1640 AC_MSG_RESULT($has_iquote)
1641 if test "x-$has_iquote" = "x-yes" ; then
1642     host_cflags_iquote=-iquote
1643     host_cflags_iquote_end=
1644 else
1645     host_cflags_iquote=-I
1646     host_cflags_iquote_end=-I-
1648 kernel_cflags_iquote=$host_cflags_iquote
1649 kernel_cflags_iquote_end=$host_cflags_iquote_end
1650 if test "x-$cross_compiling" = "x-yes"; then
1651     CC="$aros_kernel_cc"
1652     AC_MSG_CHECKING([whether ${CC} accepts -fno-stack-protector])
1653     AC_TRY_COMPILE(,, use_no_stack_protector="yes", use_no_stack_protector="no")
1654     AC_MSG_RESULT($use_no_stack_protector)
1655     AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1656     AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1657     AC_MSG_RESULT($has_iquote)
1658     if test "x-$has_iquote" = "x-yes" ; then
1659         kernel_cflags_iquote=-iquote
1660         kernel_cflags_iquote_end=
1661     else
1662         kernel_cflags_iquote=-I
1663         kernel_cflags_iquote_end=-I-
1664     fi
1666 aros_cflags_iquote=$kernel_cflags_iquote
1667 aros_cflags_iquote_end=$kernel_cflags_iquote_end
1668 if test "$orig_target_cc" != "$aros_kernel_cc"; then
1669     CC="$orig_target_cc"
1670     AC_MSG_CHECKING([whether ${CC} accepts -iquote])
1671     AC_TRY_COMPILE(,, has_iquote="yes", has_iquote="no")
1672     AC_MSG_RESULT($has_iquote)
1673     if test "x-$has_iquote" = "x-yes" ; then
1674         aros_cflags_iquote=-iquote
1675         aros_cflags_iquote_end=
1676     else
1677         aros_cflags_iquote=-I
1678         aros_cflags_iquote_end=-I-
1679     fi
1681 if test "x-$use_no_stack_protector" = "x-yes" ; then
1682     aros_kernel_cflags="$aros_kernel_cflags -fno-stack-protector"
1685 #-----------------------------------------------------------------------------
1687 # Check if we can explicitly choose older version of symbol hashing
1689 CFLAGS="save_cflags -Wl,--hash-style=sysv"
1690 CC="$aros_kernel_cc"
1691 AC_MSG_CHECKING([whether ${CC} accepts -Wl,--hash-style=sysv])
1692 AC_TRY_LINK(,, use_hash_style="yes", use_hash_style="no")
1693 AC_MSG_RESULT($use_hash_style)
1694 if test "x-$use_hash_style" = "x-yes" ; then
1695     aros_kernel_cflags="$aros_kernel_cflags -Wl,--hash-style=sysv"
1697 CC="$save_cc"
1698 CFLAGS="$save_cflags"
1700 AC_SUBST(host_cflags_iquote)
1701 AC_SUBST(host_cflags_iquote_end)
1702 AC_SUBST(kernel_cflags_iquote)
1703 AC_SUBST(kernel_cflags_iquote_end)
1704 AC_SUBST(aros_cflags_iquote)
1705 AC_SUBST(aros_cflags_iquote_end)
1708 dnl Check if user specified --with-resolution=XRESxYRESxDEPTH
1709 AC_MSG_CHECKING([for default resolution of WBScreen])
1710 AC_ARG_WITH(resolution,AC_HELP_STRING([--with-resolution=XRESxYRESxDEPTH],[Default resolution of the initial WorkbenchScreen]),resolution=$withval,resolution=none)
1711 # We require an argument, so map --with/--without ("yes"/"no") to "none" specified
1712 if test "$resolution" = "yes" ; then
1713     resolution="none"
1715 if test "$resolution" = "no" ; then
1716     resolution="none"
1718 if test "$resolution" != "none" ; then
1719     aros_default_wbwidth=`echo $resolution | cut -d'x' -f1`
1720     aros_default_wbheight=`echo $resolution | cut -d'x' -f2`
1721     aros_default_wbdepth=`echo $resolution | cut -d'x' -f3`
1723 AC_MSG_RESULT($aros_default_wbwidth x $aros_default_wbheight x $aros_default_wbdepth)
1724 aros_cv_default_wbwidth=$aros_default_wbwidth
1725 aros_cv_default_wbheight=$aros_default_wbheight
1726 aros_cv_default_wbdepth=$aros_default_wbdepth
1728 dnl See if the user wants the serial debug output for native flavour
1729 AC_MSG_CHECKING([if serial debug is enabled])
1730 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)
1731 if test "$aros_serial_debug" = 0 ; then
1732     serial_debug_forced=""
1733     if test "$serial_debug" = "yes" ; then
1734         serial_debug="2"
1735     fi
1736     if test "$serial_debug" = "no" ; then
1737         serial_debug="none"
1738     fi
1739 else
1740     serial_debug_forced="(forced)"
1741     serial_debug=$aros_serial_debug
1743 if test "$serial_debug" != "none" ; then
1744     aros_serial_debug=$serial_debug
1745     AC_MSG_RESULT($serial_debug_forced on port $serial_debug)
1746 else
1747     AC_MSG_RESULT(no)
1750 dnl See if the user wants the palm debug output hack for palm native flavour
1751 AC_MSG_CHECKING([if palm debug hack is enabled])
1752 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")
1753 if test "$palm_debug_hack" = "yes" ; then
1754     aros_palm_debug_hack="1"
1756 AC_MSG_RESULT($palm_debug_hack)
1759 dnl See if the user wants nesting supervisor activated for unix flavour
1760 AC_MSG_CHECKING([if nesting supervisor support is enabled])
1761 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")
1762 if test "$nesting_supervisor" = "yes" ; then
1763     aros_nesting_supervisor="1"
1765 AC_MSG_RESULT($nesting_supervisor)
1768 dnl things specifically required for hosted flavours
1769 if test "x-$aros_flavour" = "x-emulation" -o "x-$aros_flavour" = "x-emulcompat" ; then
1771     if test "x-$need_dlopen" != "x-no" ; then
1772       dnl some kind of dynamic library access system is required for hostlib.resource
1773       AC_CHECK_FUNC(dlopen, have_dl="yes", have_dl="no")
1774       if test "x-$have_dl" = "x-no" ; then
1775           AC_CHECK_LIB(dl, dlopen, [have_dl="yes"
1776                                     aros_host_ldflags="$aros_host_ldflags -ldl"],
1777                                     have_dl="no")
1778       fi
1779       if test "x-$have_dl" = "x-no" ; then
1780           AC_MSG_ERROR([dlopen() dynamic linker functions not available])
1781       fi
1782     fi
1785     dnl x11 hidd
1786     AC_ARG_ENABLE(x11_hidd, AC_HELP_STRING([--enable-x11-hidd],
1787                                            [build X11 hidd for hosted (default=auto)]),
1788                                            x11_hidd="$enableval",
1789                                            x11_hidd="auto")
1790     case "x-$x11_hidd" in
1791         x-yes|x-no|x-auto)                 ;;
1792         *)                 x11_hidd="auto" ;;
1793     esac
1795     ENABLE_X11=0
1797     dnl they want it
1798     if test "x-$x11_hidd" != "x-no" ; then
1800         dnl find x11 stuff
1801         AC_PATH_X
1803         x_cflags=
1804         for path in $x_libraries
1805         do
1806             x_cflags="$x_cflags -L$path"
1807         done
1809         for path in $x_includes
1810         do
1811             x_cflags="$x_cflags -I$path"
1812         done
1813         
1814         if test "x-$no_x" = "x-yes" ; then
1816             dnl didn't find it
1817             if test "x-$x11_hidd" != "x-auto" ; then
1818                 dnl and they explicitly asked for it, bail out
1819                 AC_MSG_ERROR([X11 libs/headers not found, cannot build X11 hidd as requested])
1820             fi
1821         
1822         else
1823             dnl found it, setup the metatarget
1824             x11_hidd_target=kernel-x11gfx-kobj
1825             ENABLE_X11=1
1827             dnl setup shared memory extensions
1828             AC_ARG_ENABLE(x11_shm, AC_HELP_STRING([--enable-x11-shm],
1829                                                   [use X11 shared memory (default=auto)]),
1830                                                   x11_hidd_shm="$enableval",
1831                                                   x11_hidd_shm="auto")
1832             case "x-$x11_hidd_shm" in
1833                 x-yes|x-no|x-auto)                     ;;
1834                 *)                 x11_hidd_shm="auto" ;;
1835             esac
1837             have_xshm=no
1839             dnl they want it
1840             if test "x-$x11_hidd_shm" != "x-no" ; then
1842                 dnl system shm headers
1843                 AC_CHECK_HEADERS(sys/ipc.h)
1844                 AC_CHECK_HEADERS(sys/shm.h)
1846                 dnl got them
1847                 if test "x-$ac_cv_header_sys_ipc_h" = "x-yes" -a "x-$ac_cv_header_sys_shm_h" = "x-yes" ; then
1849                     dnl make sure X libs have shm functions
1850                     save_cflags="$CFLAGS"
1851                     CFLAGS="$CFLAGS $x_cflags"
1852                     AC_CHECK_LIB(Xext, XShmQueryExtension, have_xshm=yes)
1853                     CFLAGS="$save_cflags"
1854                 fi
1855             fi
1857             dnl detection done, prepare output
1858             if test "x-$have_xshm" = "x-yes" ; then
1859                 dnl we can do shm
1860                 DO_XSHM_SUPPORT="1"
1861             elif test "x-$x11_hidd_shm" = "x-yes" ; then
1862                 dnl they explicitly asked for it, but we can't do it
1863                 AC_MSG_ERROR([X11 has no support for shared memory, cannot enable it as requested])
1864             else
1865                 dnl otherwise just disable it
1866                 DO_XSHM_SUPPORT="0"
1867             fi
1869             
1870             dnl setup vidmode (fullscreen) extensions
1871             AC_ARG_ENABLE(x11_vidmode, AC_HELP_STRING([--enable-x11-vidmode],
1872                                                       [use X11 vidmode extension (default=auto)]),
1873                                                       x11_hidd_vidmode="$enableval",
1874                                                       x11_hidd_vidmode="auto")
1875             case "x-$x11_hidd_vidmode" in
1876                 x-yes|x-no|x-auto)                         ;;
1877                 *)                 x11_hidd_vidmode="auto" ;;
1878             esac
1880             have_vidmode=no
1882             dnl they want it
1883             if test "x-$x11_hidd_vidmode" != "x-no" ; then
1885                 dnl make sure X libs have vidmode functions
1886                 save_cflags="$CFLAGS"
1887                 CFLAGS="$CFLAGS $x_cflags"
1888                 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, have_vidmode=yes)
1889                 CFLAGS="$save_cflags"
1890             fi
1892             dnl detection done, prepare output
1893             if test "x-$have_vidmode" = "x-yes" ; then
1894                 dnl we can do vidmode
1895                 DO_VIDMODE_SUPPORT="1"
1896             elif test "x-$x11_hidd_vidmode" = "x-yes" ; then
1897                 dnl they explicitly asked for it, but we can't do it
1898                 AC_MSG_ERROR([X11 vidmode extension not available, cannot enable it as requested])
1899             else
1900                 dnl otherwise just disable it
1901                 DO_VIDMODE_SUPPORT="0"
1902             fi
1903         fi
1905         aros_host_x11_includes=$x_includes 
1906         aros_host_x11_libdirs=$x_libraries
1907     fi
1910     dnl sdl hidd
1911     AC_ARG_ENABLE(sdl_hidd, AC_HELP_STRING([--enable-sdl-hidd],
1912                                            [build SDL hidd for hosted (default=auto)]),
1913                                            sdl_hidd="$enableval",
1914                                            sdl_hidd="auto")
1915     case "x-$sdl_hidd" in
1916         x-yes|x-no|x-auto)                 ;;
1917         *)                 sdl_hidd="auto" ;;
1918     esac
1920     dnl they want it
1921     if test "x-$sdl_hidd" != "x-no" ; then
1923         dnl find sdl
1924         AM_PATH_SDL([1.2.10], have_sdl="yes", have_sdl="no")
1926         if test "x-$have_sdl" != "x-yes" ; then
1928             dnl didn't find it
1929             if test "x-$sdl_hidd" != "x-auto" ; then
1930                 dnl and they explicitly asked for it, bail out
1931                 AC_MSG_ERROR([SDL libs/headers not found, cannot build SDL hidd as requested])
1932             fi
1934         else
1935             dnl found it, set up the metatarget
1936             sdl_hidd_target=kernel-hidd-sdl
1937             aros_host_sdl_cflags=SDL_CFLAGS
1938             aros_host_sdl_libs=SDL_LIBS
1939         fi
1940     fi
1942     dnl oss.library
1943     AC_CHECK_HEADER(sys/soundcard.h)
1944     if test "x-$ac_cv_header_sys_soundcard_h" = "x-yes" ; then
1945         oss_library_target=workbench-libs-oss-unix
1946     fi
1950 dnl See if the user wants dbus.library
1951 AC_MSG_CHECKING([if building of dbus.library is enabled])
1952 AC_ARG_ENABLE(dbus,AC_HELP_STRING([--enable-dbus],[Enable DBUS support via dbus.library (default=no)]),dbus="yes",dbus="no")
1953 if test "$dbus" = "yes" ; then
1954     ENABLE_DBUS=1
1955     DBUS_CFLAGS=`pkg-config --cflags dbus-1`
1956     DBUS_LIBFLAGS=`pkg-config --libs dbus-1`
1957     KERNEL_DBUS_KOBJ=kernel-dbus-kobj
1958     KERNEL_DBUS_INCLUDES=kernel-dbus-includes
1959 else
1960     ENABLE_DBUS=0
1962 AC_MSG_RESULT($dbus)
1965 dnl --------------------------------------------------------------------
1966 dnl Configuration Output Section
1967 dnl --------------------------------------------------------------------
1969 # Generic
1970 AC_SUBST(aros_arch)
1971 AC_SUBST(aros_cpu)
1972 AC_SUBST(aros_flavour)
1973 AC_SUBST(aros_flavour_uc)
1974 AC_SUBST(AROS_BUILDDIR)
1975 AC_SUBST(AROS_BUILDDIR_UNIX)
1976 AC_SUBST(SRCDIR)
1977 AC_SUBST(AROS_PORTSSRCDIR)
1979 # Host related
1980 AC_SUBST(aros_cc_pre)
1981 AC_SUBST(aros_host_strip)
1982 AC_SUBST(aros_host_arch)
1983 AC_SUBST(aros_host_cpu)
1984 AC_SUBST(aros_host_cc)
1985 AC_SUBST(aros_host_ar)
1986 AC_SUBST(aros_host_ranlib)
1987 AC_SUBST(aros_host_ld)
1988 AC_SUBST(aros_host_make)
1989 AC_SUBST(aros_host_cflags)
1990 AC_SUBST(aros_host_ldflags)
1991 AC_SUBST(aros_host_debug)
1992 AC_SUBST(aros_host_mkdep)
1993 AC_SUBST(aros_host_mkargs)
1994 AC_SUBST(aros_host_exe_suffix)
1995 AC_SUBST(aros_host_lib_suffix)
1996 AC_SUBST(aros_tools_dir)
1997 AC_SUBST(aros_host_aclocal)
1998 AC_SUBST(aros_host_autoconf)
1999 AC_SUBST(aros_host_autoheader)
2000 AC_SUBST(aros_host_automake)
2002 # Target Related
2003 AC_SUBST(aros_target_guitheme)
2004 AC_SUBST(aros_target_iconset)
2005 AC_SUBST(aros_target_bootloader)
2006 AC_SUBST(aros_target_arch)
2007 AC_SUBST(aros_target_family)
2008 AC_SUBST(aros_target_cpu)
2009 AC_SUBST(aros_target_variant)
2010 AC_SUBST(aros_target_suffix)
2011 AC_SUBST(aros_target_incl)
2012 AC_SUBST(aros_target_ar)
2013 AC_SUBST(aros_target_ranlib)
2014 AC_SUBST(aros_kernel_nm)
2015 AC_SUBST(orig_target_cc)
2016 AC_SUBST(aros_target_cc)
2017 AC_SUBST(aros_target_cxx)
2018 AC_SUBST(aros_kernel_cc)
2019 AC_SUBST(aros_target_as)
2020 AC_SUBST(orig_target_ld)
2021 AC_SUBST(aros_target_ld)
2022 AC_SUBST(aros_kernel_ld)
2023 AC_SUBST(aros_target_cc_includes)
2024 AC_SUBST(aros_target_cc_path)
2025 AC_SUBST(aros_target_objdump)
2026 AC_SUBST(aros_target_objcopy)
2027 AC_SUBST(aros_target_strip)
2028 AC_SUBST(aros_target_nm)
2029 AC_SUBST(aros_kernel_rescomp)
2030 AC_SUBST(aros_shared_default)
2031 AC_SUBST(aros_shared_ld)
2032 AC_SUBST(aros_object_format)
2033 AC_SUBST(aros_compiler_libs)
2034 AC_SUBST(aros_arch_libs)
2036 AC_SUBST(aros_config_cflags)
2037 AC_SUBST(aros_config_aflags)
2038 AC_SUBST(aros_config_ldflags)
2040 AC_SUBST(aros_shared_cflags)
2041 AC_SUBST(aros_shared_aflags)
2042 AC_SUBST(aros_shared_ldflags)
2043 AC_SUBST(aros_kernel_cflags)
2044 AC_SUBST(aros_kernel_includes)
2045 AC_SUBST(aros_kernel_objcflags)
2046 AC_SUBST(aros_kernel_ldflags)
2047 AC_SUBST(aros_debug_cflags)
2048 AC_SUBST(aros_debug_aflags)
2049 AC_SUBST(aros_debug_ldflags)
2050 AC_SUBST(aros_paranoia_cflags)
2051 AC_SUBST(aros_target_genmap)
2052 AC_SUBST(aros_target_strip_flags)
2054 AC_SUBST(crosstools_target)
2056 # Graphics Related
2057 AC_SUBST(x11_hidd_target)
2058 AC_SUBST(sdl_hidd_target)
2059 AC_SUBST(pci_hidd_target)
2060 AC_SUBST(oss_library_target)
2062 AC_SUBST(aros_default_wbwidth)
2063 AC_SUBST(aros_default_wbheight)
2064 AC_SUBST(aros_default_wbdepth)
2065 AC_SUBST(DO_XSHM_SUPPORT)
2066 AC_SUBST(DO_VIDMODE_SUPPORT)
2068 AC_SUBST(aros_host_x11_includes)
2069 AC_SUBST(aros_host_x11_libdirs)
2070 AC_SUBST(aros_host_sdl_cflags)
2071 AC_SUBST(aros_host_sdl_libs)
2073 # Native version related
2074 AC_SUBST(aros_serial_debug)
2076 # Palm native version related
2077 AC_SUBST(aros_palm_debug_hack)
2079 # Unix/Hosted version related
2080 AC_SUBST(aros_nesting_supervisor)
2082 # Apple iOS related
2083 AC_SUBST(aros_ios_platform)
2084 AC_SUBST(aros_ios_version)
2085 AC_SUBST(aros_ios_sdk)
2087 # DBUS related
2088 AC_SUBST(ENABLE_DBUS)
2089 AC_SUBST(DBUS_CFLAGS)
2090 AC_SUBST(DBUS_LIBFLAGS)
2091 AC_SUBST(KERNEL_DBUS_KOBJ)
2092 AC_SUBST(KERNEL_DBUS_INCLUDES)
2094 #X11 related
2095 AC_SUBST(ENABLE_X11)
2097 # Debug related
2098 AC_SUBST(aros_debug)
2099 AC_SUBST(aros_mungwall_debug)
2100 AC_SUBST(aros_stack_debug)
2101 AC_SUBST(aros_modules_debug)
2103 # Collect-aros stuff: "-ius" to ignore undefined symbols
2104 AC_SUBST(ignore_undefined_symbols)
2106 # C compiler related
2107 AC_SUBST(gcc_target_cpu)
2109 dnl Prepare for output, make up all the generated patches
2110 case "$aros_flavour" in
2111 emulation)      aros_flavour_uc="AROS_FLAVOUR_EMULATION"
2112                 aros_flavour="emulation" ;;
2113 emulcompat)     aros_flavour_uc="(AROS_FLAVOUR_EMULATION|AROS_FLAVOUR_BINCOMPAT)"
2114                 aros_flavour="emulation" ;;
2115 standalone)     aros_flavour_uc="AROS_FLAVOUR_STANDALONE"
2116                 aros_flavour="standalone";;
2117 standcompat)    aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2118                 aros_flavour="standalone";;
2119 native)         aros_flavour_uc="AROS_FLAVOUR_NATIVE"
2120                 aros_flavour="native" ;;
2121 nativecompat)   aros_flavour_uc="(AROS_FLAVOUR_NATIVE|AROS_FLAVOUR_BINCOMPAT)"
2122                 aros_flavour="native" ;;
2123 linklib)        aros_flavour_uc="AROS_FLAVOUR_LINKLIB"
2124                 aros_flavour="linklib" ;;
2125 palmnative)     aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2126                 aros_flavour="palmnative" ;;
2127 mac68knative)   aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_EMULATION)"
2128                 aros_flavour="mac68knative" ;;
2129 ppcnative)      aros_flavour_uc="(AROS_FLAVOUR_STANDALONE|AROS_FLAVOUR_BINCOMPAT)"
2130                 aros_flavour="ppcnative" ;;
2131 esac
2133 if test ! -d ${aros_inc_dir} ; then
2134     ${MKDIR} ${aros_inc_dir}
2136 if test ! -d ${aros_geninc_dir} ; then
2137     ${MKDIR} ${aros_geninc_dir}
2139 if test ! -d ${aros_hostcfg_dir} ; then
2140     ${MKDIR} ${aros_hostcfg_dir}
2142 if test ! -d ${aros_targetcfg_dir} ; then
2143     ${MKDIR} ${aros_targetcfg_dir}
2145 if test ! -d ${aros_tools_dir} ; then
2146     ${MKDIR} ${aros_tools_dir}
2148 if test ! -d ${aros_scripts_dir} ; then
2149     ${MKDIR} ${aros_scripts_dir}
2152 AC_CONFIG_HEADERS(${aros_geninc_dir}/host-conf.h:config/host-conf.h.in)
2154 AC_CONFIG_COMMANDS([compiler_executable],
2155     [
2156         prefix=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}
2157         mkdir -p $prefix
2158         prefix="${prefix}/${aros_target_cpu}-aros"
2159         prefix2=${PWD}/${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros
2161         echo ${prefix}
2162         echo ${prefix2}
2163         chmod a+x ${prefix2}-gcc ${prefix2}-ld
2165         ln -sf ${prefix2}-gcc          ${prefix}-gcc
2166         ln -sf ${prefix2}-ld           ${prefix}-ld
2168         ln -sf $aros_target_as_ln$aros_host_exe_suffix      ${prefix}-as
2169         ln -sf $aros_target_nm_ln$aros_host_exe_suffix      ${prefix}-nm
2170         ln -sf $aros_target_ar_ln$aros_host_exe_suffix      ${prefix}-ar
2171         ln -sf $aros_target_ranlib_ln$aros_host_exe_suffix  ${prefix}-ranlib
2172         ln -sf $aros_target_objcopy_ln$aros_host_exe_suffix ${prefix}-objcopy
2173         ln -sf $aros_target_objdump_ln$aros_host_exe_suffix ${prefix}-objdump
2174         ln -sf $aros_target_strip_ln$aros_host_exe_suffix   ${prefix}-strip
2176         ln -sf $aros_target_as_ln$aros_host_exe_suffix      ${prefix2}-as
2177         ln -sf $aros_target_nm_ln$aros_host_exe_suffix      ${prefix2}-nm
2178         ln -sf $aros_target_ar_ln$aros_host_exe_suffix      ${prefix2}-ar
2179         ln -sf $aros_target_ranlib_ln$aros_host_exe_suffix  ${prefix2}-ranlib
2180         ln -sf $aros_target_objcopy_ln$aros_host_exe_suffix ${prefix2}-objcopy
2181         ln -sf $aros_target_objdump_ln$aros_host_exe_suffix ${prefix2}-objdump
2182         ln -sf $aros_target_strip_ln$aros_host_exe_suffix   ${prefix2}-strip
2183     ],
2184     [
2185         aros_host_exe_suffix=${aros_host_exe_suffix}
2186         aros_tools_dir=${aros_tools_dir}
2187         aros_target_cpu=${aros_target_cpu}
2188         aros_target_arch=${aros_target_arch}
2189         aros_target_suffix=${aros_target_suffix}
2190         aros_target_nm_ln=${aros_target_nm_ln}
2191         aros_target_as_ln=${aros_target_as_ln}
2192         aros_target_ar_ln=${aros_target_ar_ln}
2193         aros_target_ranlib_ln=${aros_target_ranlib_ln}
2194         aros_target_objdump_ln=${aros_target_objdump_ln}
2195         aros_target_objcopy_ln=${aros_target_objcopy_ln}
2196         aros_target_strip_ln=${aros_target_strip_ln}
2197     ]
2199 AC_CONFIG_COMMANDS([genshared_executable],
2200     [chmod a+x ${aros_scripts_dir}/genshared],
2201     [aros_scripts_dir=${aros_scripts_dir}]
2203 AC_CONFIG_COMMANDS([genmf_executable],
2204     [chmod a+x ${aros_tools_dir}/genmf.py],
2205     [aros_tools_dir=${aros_tools_dir}]
2208 AC_CONFIG_FILES(
2209     Makefile
2210     config/make.cfg
2211     ${aros_inc_dir}/config.h:config/config.h.in
2212     ${aros_geninc_dir}/config.h:config/config.h.in
2213     ${aros_hostcfg_dir}/host.cfg:config/host.cfg.in
2214     ${aros_targetcfg_dir}/target.cfg:config/target.cfg.in
2215     mmake.config
2216     ${aros_targetcfg_dir}/make.defaults:config/make.defaults.in
2217     ${aros_targetcfg_dir}/specs:config/specs.in
2218     ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-gcc:scripts/aros-gcc.in
2219     ${aros_tools_dir}/${aros_target_cpu}-${aros_target_arch}${aros_target_suffix}-aros-ld:scripts/aros-ld.in
2220     ${aros_scripts_dir}/genshared:compiler/c_lib/source/lib_source/genshared.in
2221     ${aros_tools_dir}/genmf.py:tools/genmf/genmf.py
2222     tools/collect-aros/env.h
2225 AC_OUTPUT
2227 dnl This is in order to not define SHARED_CFLAGS sometimes
2228 dnl We don't always do aros_shared_ar, aros_shared_cflags
2230 #XXX compatability...
2231 aros_shared_ar="$aros_shared_ld $aros_shared_ldflags -o"
2233 if test -n "$aros_shared_cflags" ; then
2234     echo "SHARED_CFLAGS := $aros_shared_cflags" >> ${aros_hostcfg_dir}/host.cfg
2235     echo "SHARED_AR := $aros_shared_ar" >> ${aros_hostcfg_dir}/host.cfg