xref: /haiku/configure (revision ff3409e005096a604d862a776e470aae2089865d)
1#!/bin/sh
2#
3# configure [ <options> ]
4
5# usage
6#
7# Prints usage.
8#
9usage()
10{
11	cat << EOF
12
13Usage: $0 <options>
14options:
15  --alternative-gcc-output-dir <dir>
16                              Build a Haiku installation that supports running
17                              executables built with a gcc version incompatible
18                              with the primary gcc (e.g. gcc 2 executables under
19                              a gcc 4 Haiku or vice versa). <dir> specifies the
20                              output directory of the other gcc. The directory
21                              must already be fully configured.
22                              Note, that a sub-jam will be executed when
23                              building Haiku. When using a jam that is not
24                              simply invoked by "jam", the JAM build variable
25                              needs to be set accordingly.
26                              To disable building the alternative libraries
27                              the variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS can be
28                              unset in the UserBuildConfig file.
29  --build-cross-tools <build tools dir>
30                              Assume cross compilation. <build tools dir>
31                              defines the location of the build tools sources.
32                              They will be compiled and placed in the output
33                              directory under "cross-tools". The HAIKU_* tools
34                              variables will be set accordingly.
35  --build-cross-tools-gcc4 <arch> <build tools dir>
36                              Like "--build-cross-tools" just that gcc 4 will
37                              be used for cross-compilation. Note, that the
38                              resulting Haiku installation built with gcc 4
39                              will not be binary compatible with BeOS R5.
40                              <arch> specifies the target architecture, either
41                              "x86", "x86_64", "ppc", "m68k", "arm" or "mipsel".
42  --cross-tools-prefix <prefix>
43                              Assume cross compilation. <prefix> should be a
44                              path to the directory where the cross
45                              compilation tools are located, plus the platform
46                              prefix, e.g. "/path/to/tools/i586-pc-haiku-".
47                              This overrides the HAIKU_* tool variables.
48  --distro-compatibility <level>
49                              The distribution's level of compatibility with
50                              the official Haiku distribution. The generated
51                              files will contain the respective trademarks
52                              accordingly.
53                              official -- the official Haiku distribution.
54                              compatible -- a Haiku Compatible (tm) distro.
55                              default -- any other distro (default value).
56  --enable-multiuser          Enable experimental multiuser support.
57  --help                      Prints out this help.
58  --include-gpl-addons        Include GPL licensed add-ons.
59  --include-patented-code     Enable code that is known to implemented patented
60                              ideas and techniques. If this option is not
61                              specified, the resulting distribution may still
62                              implement patented ideas and techniques. This
63                              option only disables code that is currently known
64                              to be problematic.
65  --include-sources           Includes the source code of projects that require
66                              either an offer of source code or a copy of the
67                              patched sources. This is preferable when
68                              distributing on physical mediums.
69  --include-3rdparty          Include 3rdparty/ in the build system.
70  -j<n>                       Only relevant for --build-cross-tools and
71                              --build-cross-tools-gcc4. Is passed on to the
72                              make building the build tools.
73  --target=TARGET             Select build target platform.
74                              [default=${TARGET_PLATFORM}]
75                              valid targets=r5,bone,dano,haiku
76  --update                    re-runs last configure invocation [must be given
77                              as first option!]
78  --use-gcc-pipe              Build with GCC option -pipe. Speeds up the build
79                              process, but uses more memory.
80  --use-32bit                 Use -m32 flag on 64bit host gcc compiler.
81  --use-xattr                 Use Linux xattr support for BeOS attribute
82                              emulation. Warning: Make sure your file system
83                              supports sufficient attribute sizes (4 KB per
84                              file for all attributes won't suffice).
85
86environment variables:
87  HAIKU_AR                    The static library archiver. Defaults to "ar".
88  HAIKU_CC                    The compiler. Defaults to "gcc".
89  HAIKU_LD                    The linker. Defaults to "ld".
90  HAIKU_OBJCOPY               The objcopy to be used. Defaults to "objcopy".
91  HAIKU_RANLIB                The static library indexer. Defaults to "ranlib".
92  HAIKU_YASM                  The yasm assembler (x86 only).
93  HAIKU_CPPFLAGS              The preprocessor flags. Defaults to "".
94  HAIKU_CCFLAGS               The C flags. Defaults to "".
95  HAIKU_CXXFLAGS              The C++ flags. Defaults to "".
96  HAIKU_LDFLAGS               The linker flags. Defaults to "".
97  HAIKU_ARFLAGS               The flags passed to HAIKU_AR for archiving.
98                              Defaults to "cru".
99  HAIKU_UNARFLAGS             The flags passed to HAIKU_AR for unarchiving.
100                              Defaults to "x".
101
102Non-standard output directories:
103  By default all objects, build configuration, and other related files are
104  stored in /path/to/haiku_source/generated.  To store objects in a non-default
105  location, run "../../relative/path/to/haiku_source/configure <options>" from
106  within your non-default location.  "jam [ options ] targets" can then be run
107  directly inside your non-default location.  Another option is to invoke "jam
108  [ options ] targets" from within haiku_source.  This can be accomplished by
109  either "export HAIKU_OUTPUT_DIR=your non-default location" before invoking
110  jam or by creating a symlink of haiku_source/generated pointing to your
111  non-default location and running jam.
112
113
114EOF
115}
116
117# assertparam
118#
119# Checks whether at least one parameter is left.
120#
121assertparam()
122{
123	if [ $2 -lt 2 ]; then
124		echo $0: \`$1\': Parameter expected.
125		exit 1
126	fi
127}
128
129# assertparams
130#
131# Checks whether at least a certain number of parameters is left.
132#
133assertparams()
134{
135	if [ $3 -le $2 ]; then
136		echo $0: \`$1\': Not enough parameters.
137		exit 1
138	fi
139}
140
141# real_path
142#
143# returns the realpath of a symbolic link.
144#
145real_path()
146{
147	perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1"
148}
149
150# standard_gcc_settings
151#
152# Sets the variables for a GCC platform.
153#
154standard_gcc_settings()
155{
156	if which greadlink > /dev/null 2>&1; then
157		readlink="greadlink -e"
158	elif which realpath > /dev/null 2>&1; then
159		readlink=realpath
160	elif readlink -e / > /dev/null 2>&1; then
161		readlink="readlink -e"
162	else
163		readlink=real_path
164	fi
165
166	# PLATFORM_LINKLIBS
167	gcclib=`$HAIKU_CC -print-libgcc-file-name`
168	gccdir=`dirname ${gcclib}`
169
170	HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion`
171	HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine`
172
173	HAIKU_GCC_LIB_DIR=${gccdir}
174	HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a
175	HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o"
176	HAIKU_GCC_HEADERS_DIR="${gccdir}/include
177		${gccdir}/include-fixed"
178	HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o`
179		# Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and
180		# neither needed nor wanted.
181
182	case $HAIKU_GCC_RAW_VERSION in
183		4.*)
184			# for gcc 4 we use the libstdc++ and libsupc++ that come with the
185			# compiler
186			HAIKU_STATIC_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.a`
187			HAIKU_SHARED_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.so`
188			HAIKU_STATIC_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.a`
189			HAIKU_SHARED_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.so`
190
191			# If the architecture has separate runtime libraries for the
192			# kernel, use them.
193			HAIKU_KERNEL_LIBGCC=`$HAIKU_CC -print-file-name=libgcc-kernel.a`
194			if [ $HAIKU_KERNEL_LIBGCC = libgcc-kernel.a ]; then
195				HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC
196			fi
197			HAIKU_KERNEL_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++-kernel.a`
198			if [ $HAIKU_KERNEL_LIBSUPCXX = libsupc++-kernel.a ]; then
199				HAIKU_KERNEL_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX
200			fi
201
202			local headers
203			if [ -d $gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION ]; then
204				headers=$gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION
205			else
206				headers=$gccdir/../../../../include/c++/$HAIKU_GCC_RAW_VERSION
207			fi
208
209			HAIKU_CXX_HEADERS_DIR=$headers
210			for d in $HAIKU_GCC_MACHINE backward ext; do
211				# Note: We need the line break, otherwise the line might become
212				# too long for jam (512 bytes max).
213				HAIKU_CXX_HEADERS_DIR="$HAIKU_CXX_HEADERS_DIR
214					$headers/$d"
215			done
216
217			# Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the
218			# compiler didn't give us actual file names. Otherwise resolve
219			# symlinks to avoid problems when copying the libraries to the
220			# image.
221
222			if [ $HAIKU_STATIC_LIBSTDCXX = libstdc++.a ]; then
223				HAIKU_STATIC_LIBSTDCXX=
224			else
225				HAIKU_STATIC_LIBSTDCXX=`$readlink $HAIKU_STATIC_LIBSTDCXX`
226			fi
227
228			if [ $HAIKU_SHARED_LIBSTDCXX = libstdc++.so ]; then
229				HAIKU_SHARED_LIBSTDCXX=
230			else
231				HAIKU_SHARED_LIBSTDCXX=`$readlink $HAIKU_SHARED_LIBSTDCXX`
232			fi
233
234			if [ $HAIKU_STATIC_LIBSUPCXX = libsupc++.a ]; then
235				HAIKU_STATIC_LIBSUPCXX=
236			else
237				HAIKU_STATIC_LIBSUPCXX=`$readlink $HAIKU_STATIC_LIBSUPCXX`
238			fi
239
240			if [ $HAIKU_SHARED_LIBSUPCXX = libsupc++.so ]; then
241				HAIKU_SHARED_LIBSUPCXX=
242			else
243				HAIKU_SHARED_LIBSUPCXX=`$readlink $HAIKU_SHARED_LIBSUPCXX`
244			fi
245		;;
246		2.9*)
247			# check for correct (most up-to-date) legacy compiler and complain
248			# if an older one is installed
249			if [ $HAIKU_GCC_RAW_VERSION != $haikuRequiredLegacyGCCVersion ]; then
250				echo "GCC version $haikuRequiredLegacyGCCVersion is required!";
251				echo "Please download it from www.haiku-os.org...";
252				exit 1;
253			fi
254
255			HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC
256			HAIKU_KERNEL_LIBSUPCXX=
257		;;
258	esac
259
260	case $HAIKU_GCC_MACHINE in
261		x86_64-*)
262			# Boot loader is 32-bit, need the 32-bit libs.
263			HAIKU_BOOT_LIBGCC=`$HAIKU_CC -m32 -print-libgcc-file-name`
264			HAIKU_BOOT_LIBSUPCXX=`$HAIKU_CC -m32 -print-file-name=libsupc++.a`
265		;;
266		*)
267			HAIKU_BOOT_LIBGCC=$HAIKU_GCC_LIBGCC
268			HAIKU_BOOT_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX
269		;;
270	esac
271}
272
273# set_default_value
274#
275# Set the value for a variable, if no value is set yet.
276#
277set_default_value()
278{
279	eval "$1=\${$1-$2}"
280}
281
282# get_build_tool_path
283#
284# Gets a usable absolute path of a build tool.
285#
286get_build_tool_path()
287{
288	local var="HAIKU_$1"
289	local tool=$2
290	local path="${crossToolsPrefix}$tool"
291
292	if [ -f "$path" ]; then
293		# get absolute path
294		local oldPwd="`pwd`"
295		cd "`dirname "$path"`"
296		path="`pwd`/`basename "$path"`"
297		cd $oldPwd
298	else
299		which "$path" > /dev/null 2>&1 || {
300			echo "Build tool \"$path\" not found." >&2
301			exit 1
302		}
303	fi
304
305	eval "$var=$path"
306}
307
308# get cwd and the source directory
309currentDir=`pwd`
310cd `dirname "$0"`
311sourceDir=`pwd`
312cd "$currentDir"
313
314# backup the passed arguments
315configureArgs="$@"
316
317# internal default parameter values
318#
319platform=`uname`
320platformMachine=`uname  -m`
321targetArch=x86
322crossToolsPrefix=
323buildCrossTools=
324buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools"
325buildCrossToolsMachine=
326buildCrossToolsJobs=
327
328# exported (BuildSetup) default parameter values
329#
330HAIKU_GCC_RAW_VERSION=
331HAIKU_GCC_MACHINE=i586-pc-haiku
332HAIKU_STATIC_LIBSTDCXX=
333HAIKU_SHARED_LIBSTDCXX=
334HAIKU_STATIC_LIBSUPCXX=
335HAIKU_SHARED_LIBSUPCXX=
336HAIKU_CXX_HEADERS_DIR=
337HOST_GCC_RAW_VERSION=`gcc -dumpversion`
338HOST_GCC_MACHINE=`gcc -dumpmachine`
339HAIKU_INCLUDE_GPL_ADDONS=0
340HAIKU_INCLUDE_PATENTED_CODE=0
341HAIKU_INCLUDE_SOURCES=0
342HAIKU_INCLUDE_3RDPARTY=0
343HAIKU_ENABLE_MULTIUSER=0
344HAIKU_DISTRO_COMPATIBILITY=default
345TARGET_PLATFORM=haiku
346HAIKU_USE_GCC_PIPE=0
347HAIKU_HOST_USE_32BIT=0
348HAIKU_HOST_USE_XATTR=0
349HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=
350HAIKU_ADD_ALTERNATIVE_GCC_LIBS=0
351HOST_GCC_LD=`gcc -print-prog-name=ld`
352HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy`
353SFDISK_BINARY=sfdisk
354HOST_SFDISK=$SFDISK_BINARY
355
356haikuRequiredLegacyGCCVersion="2.95.3-haiku-121101"
357export haikuRequiredLegacyGCCVersion
358	# version of legacy gcc required to build haiku
359
360set_default_value HAIKU_AR			ar
361set_default_value HAIKU_CC			gcc
362set_default_value HAIKU_LD			ld
363set_default_value HAIKU_OBJCOPY		objcopy
364set_default_value HAIKU_RANLIB		ranlib
365set_default_value HAIKU_ELFEDIT		elfedit
366set_default_value HAIKU_YASM		yasm
367set_default_value HAIKU_CPPFLAGS	""
368set_default_value HAIKU_CCFLAGS		""
369set_default_value HAIKU_CXXFLAGS	""
370set_default_value HAIKU_LDFLAGS		""
371set_default_value HAIKU_ARFLAGS		cru
372set_default_value HAIKU_UNARFLAGS	x
373
374# determine output directory
375if [ "$currentDir" = "$sourceDir" ]; then
376	outputDir=$currentDir/generated
377else
378	outputDir=$currentDir
379fi
380buildOutputDir="$outputDir/build"
381HAIKU_BUILD_ATTRIBUTES_DIR="$outputDir/attributes"
382buildConfigFile="$buildOutputDir/BuildConfig"
383
384# check for update request
385if [ "$1" = "--update" ]; then
386	if ! [ -e "$buildConfigFile" ]; then
387		echo $0 --update: \'$buildConfigFile\' not found - updating not possible.
388		exit 1
389	fi
390	if ! type perl >/dev/null 2>&1; then
391		echo $0 --update: \'perl\' not found - updating not possible.
392		exit 1
393	fi
394	# convert BuildConfig from jam format to shell format and evaluate it
395	shellConfigFile="${buildConfigFile}.shell"
396	perl "$sourceDir/build/scripts/convert_build_config_to_shell_format.pl" \
397		<"$buildConfigFile" >"$shellConfigFile"
398	. "$shellConfigFile"
399	rm "$shellConfigFile"
400	shift
401fi
402
403# parse parameters
404#
405while [ $# -gt 0 ] ; do
406	case "$1" in
407		--alternative-gcc-output-dir)
408			assertparam "$1" $#
409			cd $2 || exit 1
410			HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=`pwd`
411			HAIKU_ADD_ALTERNATIVE_GCC_LIBS=1
412			cd $currentDir
413			shift 2
414			;;
415		--build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;;
416		--build-cross-tools-gcc4)
417			assertparams "$1" 2 $#
418			buildCrossTools=$3
419			buildCrossToolsScript="${buildCrossToolsScript}_gcc4"
420			case "$2" in
421				x86)	HAIKU_GCC_MACHINE=i586-pc-haiku;;
422				x86_64)	HAIKU_GCC_MACHINE=x86_64-unknown-haiku; targetArch=x86_64;;
423				ppc)	HAIKU_GCC_MACHINE=powerpc-apple-haiku; targetArch=ppc;;
424				m68k)	HAIKU_GCC_MACHINE=m68k-unknown-haiku; targetArch=m68k;;
425				arm)	HAIKU_GCC_MACHINE=arm-unknown-haiku; targetArch=arm;;
426				mipsel)	HAIKU_GCC_MACHINE=mipsel-unknown-haiku; targetArch=mips;;
427				*)		echo "Unsupported target architecture: $2"
428						exit 1;;
429			esac
430			buildCrossToolsMachine=$HAIKU_GCC_MACHINE
431			shift 3
432			;;
433		--cross-tools-prefix)
434			assertparam "$1" $#
435			crossToolsPrefix=$2
436			shift 2
437			;;
438		--distro-compatibility)
439			assertparam "$1" $#
440			HAIKU_DISTRO_COMPATIBILITY=$2
441			case "$HAIKU_DISTRO_COMPATIBILITY" in
442				official)	;;
443				compatible)	;;
444				default)	;;
445				*)			echo "Invalid distro compatibility" \
446								"level: $HAIKU_DISTRO_COMPATIBILITY"
447							exit 1;;
448			esac
449			shift 2
450			;;
451		--enable-multiuser)	HAIKU_ENABLE_MULTIUSER=1; shift 1;;
452		--help | -h)	usage; exit 0;;
453		--include-gpl-addons)	HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;;
454		--include-patented-code)	HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;;
455		--include-sources)	HAIKU_INCLUDE_SOURCES=1; shift 1;;
456		--include-3rdparty)	HAIKU_INCLUDE_3RDPARTY=1; shift 1;;
457        -j*)				buildCrossToolsJobs="$1"; shift 1;;
458		--target=*)     TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;;
459		--use-gcc-pipe)	HAIKU_USE_GCC_PIPE=1; shift 1;;
460		--use-32bit)	HAIKU_HOST_USE_32BIT=1; shift 1;;
461		--use-xattr)	HAIKU_HOST_USE_XATTR=1; shift 1;;
462		*)				echo Invalid argument: \`$1\'; exit 1;;
463	esac
464done
465
466# detect the build platform
467case "${platform}" in
468	BeOS)	revision=`uname -r`
469			case "$revision" in
470				6.*)	HOST_PLATFORM=dano ;;
471				5.1)	HOST_PLATFORM=dano ;;
472				5.0.4)	HOST_PLATFORM=bone ;;
473				5.0*)	HOST_PLATFORM=r5 ;;
474				*)		echo Unknown BeOS version: $revision
475						exit 1 ;;
476			esac
477			;;
478	Darwin)	HOST_PLATFORM=darwin ;;
479	FreeBSD)	HOST_PLATFORM=freebsd
480				SFDISK_BINARY=sfdisk-linux
481				if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then
482					echo Unsupported platform: FreeBSD ${platformMachine}
483					exit 1
484				fi	;;
485	Haiku)	HOST_PLATFORM=haiku_host ;;
486	Linux)	HOST_PLATFORM=linux ;;
487	OpenBSD) HOST_PLATFORM=openbsd ;;
488	SunOS)	HOST_PLATFORM=sunos ;;
489	CYGWIN_NT-*) HOST_PLATFORM=cygwin ;;
490	*)		echo Unsupported platform: ${platform}
491			exit 1 ;;
492esac
493
494# check common locations for sfdisk
495for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
496	if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then
497		HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY}
498	fi
499done
500
501# check for case-sensitive filesystem
502mkdir haikuCaseTest 2>/dev/null
503mkdir haikucasetest 2>/dev/null
504caseInsensitive=$?
505rmdir haikuCaseTest haikucasetest 2>/dev/null
506if [ $caseInsensitive != 0 ]; then
507	echo "You need a case-sensitive file-system to build Haiku."
508	if [ $HOST_PLATFORM = "darwin" ]; then
509		echo "You can create a case-sensitive disk image using Disk Utility and use"
510		echo "it to store the Haiku sources on."
511	fi
512	exit 1
513fi
514
515# create output directory
516mkdir -p "$buildOutputDir" || exit 1
517
518# build cross tools from sources
519if [ -n "$buildCrossTools" ]; then
520	"$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \
521		"$buildCrossTools" "$outputDir" $buildCrossToolsJobs || exit 1
522	crossToolsPrefix="$outputDir/cross-tools/bin/${HAIKU_GCC_MACHINE}-"
523fi
524
525# cross tools
526if [ -n "$crossToolsPrefix" ]; then
527	get_build_tool_path AR ar
528	get_build_tool_path CC gcc
529	get_build_tool_path LD ld
530	get_build_tool_path OBJCOPY objcopy
531	get_build_tool_path RANLIB ranlib
532fi
533
534# prepare gcc settings
535standard_gcc_settings
536
537# cross tools for gcc4 builds
538if [ -n "$crossToolsPrefix" ]; then
539	case $HAIKU_GCC_RAW_VERSION in
540		4.*)
541			get_build_tool_path ELFEDIT elfedit
542		;;
543	esac
544fi
545
546# check whether the Haiku compiler really targets Haiku or BeOS
547case "$HAIKU_GCC_MACHINE" in
548	*-*-haiku)	;;
549	*-*-beos)	;;
550	*) echo The compiler specified as Haiku target compiler is not a valid \
551			Haiku cross-compiler. Please see ReadMe.cross-compile. >&2
552	   echo compiler: $HAIKU_CC
553	   echo compiler is configured for target: $HAIKU_GCC_MACHINE
554	   exit 1 ;;
555esac
556
557# Generate BuildConfig
558cat << EOF > "$buildConfigFile"
559# BuildConfig
560# Note: This file has been automatically generated by configure with the
561# following arguments:
562# ${configureArgs}
563
564TARGET_PLATFORM 			?= "${TARGET_PLATFORM}" ;
565HOST_PLATFORM				?= "${HOST_PLATFORM}" ;
566
567HAIKU_INCLUDE_GPL_ADDONS			?= "${HAIKU_INCLUDE_GPL_ADDONS}" ;
568HAIKU_INCLUDE_PATENTED_CODE			?= "${HAIKU_INCLUDE_PATENTED_CODE}" ;
569HAIKU_INCLUDE_SOURCES				?= "${HAIKU_INCLUDE_SOURCES}" ;
570HAIKU_INCLUDE_3RDPARTY				?= "${HAIKU_INCLUDE_3RDPARTY}" ;
571HAIKU_ENABLE_MULTIUSER				?= "${HAIKU_ENABLE_MULTIUSER}" ;
572HAIKU_DISTRO_COMPATIBILITY			?= "${HAIKU_DISTRO_COMPATIBILITY}" ;
573HAIKU_USE_GCC_PIPE					?= "${HAIKU_USE_GCC_PIPE}" ;
574HAIKU_HOST_USE_32BIT				?= "${HAIKU_HOST_USE_32BIT}" ;
575HAIKU_HOST_USE_XATTR				?= "${HAIKU_HOST_USE_XATTR}" ;
576HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR	?= ${HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR} ;
577HAIKU_ADD_ALTERNATIVE_GCC_LIBS		?= ${HAIKU_ADD_ALTERNATIVE_GCC_LIBS} ;
578
579HAIKU_GCC_RAW_VERSION		?= ${HAIKU_GCC_RAW_VERSION} ;
580HAIKU_GCC_MACHINE			?= ${HAIKU_GCC_MACHINE} ;
581HAIKU_GCC_LIB_DIR			?= ${HAIKU_GCC_LIB_DIR} ;
582HAIKU_GCC_HEADERS_DIR		?= ${HAIKU_GCC_HEADERS_DIR} ;
583HAIKU_GCC_LIBGCC			?= ${HAIKU_GCC_LIBGCC} ;
584
585HAIKU_STATIC_LIBSTDC++		?= ${HAIKU_STATIC_LIBSTDCXX} ;
586HAIKU_SHARED_LIBSTDC++		?= ${HAIKU_SHARED_LIBSTDCXX} ;
587HAIKU_STATIC_LIBSUPC++		?= ${HAIKU_STATIC_LIBSUPCXX} ;
588HAIKU_SHARED_LIBSUPC++		?= ${HAIKU_SHARED_LIBSUPCXX} ;
589HAIKU_C++_HEADERS_DIR		?= ${HAIKU_CXX_HEADERS_DIR} ;
590
591HAIKU_KERNEL_LIBGCC			?= ${HAIKU_KERNEL_LIBGCC} ;
592HAIKU_KERNEL_LIBSUPC++		?= ${HAIKU_KERNEL_LIBSUPCXX} ;
593HAIKU_BOOT_LIBGCC			?= ${HAIKU_BOOT_LIBGCC} ;
594HAIKU_BOOT_LIBSUPC++		?= ${HAIKU_BOOT_LIBSUPCXX} ;
595
596HAIKU_BUILD_ATTRIBUTES_DIR	?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ;
597
598HAIKU_AR					?= ${HAIKU_AR} ;
599HAIKU_CC					?= ${HAIKU_CC} ;
600HAIKU_LD					?= ${HAIKU_LD} ;
601HAIKU_OBJCOPY				?= ${HAIKU_OBJCOPY} ;
602HAIKU_RANLIB				?= ${HAIKU_RANLIB} ;
603HAIKU_ELFEDIT				?= ${HAIKU_ELFEDIT} ;
604HAIKU_YASM					?= ${HAIKU_YASM} ;
605HAIKU_CPPFLAGS				?= ${HAIKU_CPPFLAGS} ;
606HAIKU_CCFLAGS				?= ${HAIKU_CCFLAGS} ;
607HAIKU_C++FLAGS				?= ${HAIKU_CXXFLAGS} ;
608HAIKU_LDFLAGS				?= ${HAIKU_LDFLAGS} ;
609HAIKU_ARFLAGS				?= ${HAIKU_ARFLAGS} ;
610HAIKU_UNARFLAGS				?= ${HAIKU_UNARFLAGS} ;
611
612HOST_GCC_RAW_VERSION		?= ${HOST_GCC_RAW_VERSION} ;
613HOST_GCC_MACHINE			?= ${HOST_GCC_MACHINE} ;
614HOST_LD						?= ${HOST_GCC_LD} ;
615HOST_OBJCOPY				?= ${HOST_GCC_OBJCOPY} ;
616HOST_SFDISK					?= ${HOST_SFDISK} ;
617
618EOF
619
620# Libgcc.a objects
621
622cat << EOF > "$buildOutputDir/libgccObjects"
623# libgcc.a objects to be linked against libroot.so
624# Note: This file has been automatically generated by configure.
625
626HAIKU_GCC_LIBGCC_OBJECTS	?= ${HAIKU_GCC_LIBGCC_OBJECTS} ;
627EOF
628
629# Generate a boot strap Jamfile in the output directory.
630
631cat << EOF > $outputDir/Jamfile
632# automatically generated Jamfile
633
634HAIKU_TOP			= ${sourceDir} ;
635HAIKU_OUTPUT_DIR	= ${outputDir} ;
636
637include [ FDirName \$(HAIKU_TOP) Jamfile ] ;
638
639EOF
640