blob: 469b7d29df81405ae02f2c3518bd8653a987d4c3 [file] [log] [blame]
Rich Felker64d2f8e2012-05-04 23:24:51 -04001#!/bin/sh
2
3usage () {
4cat <<EOF
Rich Felker278883d2012-06-03 16:22:13 -04005Usage: $0 [OPTION]... [VAR=VALUE]... [TARGET]
Rich Felker64d2f8e2012-05-04 23:24:51 -04006
7To assign environment variables (e.g., CC, CFLAGS...), specify them as
8VAR=VALUE. See below for descriptions of some of the useful variables.
9
10Defaults for the options are specified in brackets.
11
12Installation directories:
13 --prefix=PREFIX main installation prefix [/usr/local/musl]
14 --exec-prefix=EPREFIX installation prefix for executable files [PREFIX]
15
16Fine tuning of the installation directories:
17 --bindir=DIR user executables [EPREFIX/bin]
18 --libdir=DIR library files for the linker [PREFIX/lib]
19 --includedir=DIR include files for the C compiler [PREFIX/include]
20 --syslibdir=DIR location for the dynamic linker [/lib]
21
22System types:
23 --target=TARGET configure to run on target TARGET [detected]
Rich Felker278883d2012-06-03 16:22:13 -040024 --host=HOST same as --target
Rich Felker64d2f8e2012-05-04 23:24:51 -040025
26Optional features:
Rich Felkera80847d2013-07-22 21:22:04 -040027 --enable-optimize=... optimize listed components for speed over size [auto]
Rich Felker64d2f8e2012-05-04 23:24:51 -040028 --enable-debug build with debugging information [disabled]
29 --enable-warnings build with recommended warnings flags [disabled]
30 --enable-gcc-wrapper build musl-gcc toolchain wrapper [auto]
31 --disable-shared inhibit building shared library [enabled]
32 --disable-static inhibit building static library [enabled]
33
34Some influential environment variables:
35 CC C compiler command [detected]
36 CFLAGS C compiler flags [-Os -pipe ...]
Rich Felker94e920d2012-08-14 22:50:16 -040037 CROSS_COMPILE prefix for cross compiler and tools [none]
Rich Felker2c1cd232012-09-10 15:30:52 -040038 LIBCC compiler runtime library [detected]
Rich Felker64d2f8e2012-05-04 23:24:51 -040039
40Use these variables to override the choices made by configure.
41
42EOF
43exit 0
44}
45
46# Helper functions
47
Rich Felker453f4622013-08-16 18:19:47 -040048quote () {
49tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
50$1
51EOF
Rich Felkere4499742013-08-20 13:51:46 -040052printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#"
Rich Felker453f4622013-08-16 18:19:47 -040053}
Rich Felker64d2f8e2012-05-04 23:24:51 -040054echo () { printf "%s\n" "$*" ; }
55fail () { echo "$*" ; exit 1 ; }
56fnmatch () { eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac" ; }
57cmdexists () { type "$1" >/dev/null 2>&1 ; }
58trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
59
Rich Felker3d9e3a32012-11-08 17:20:50 -050060stripdir () {
61while eval "fnmatch '*/' \"\${$1}\"" ; do eval "$1=\${$1%/}" ; done
Rich Felker64d2f8e2012-05-04 23:24:51 -040062}
63
Rich Felker3e7f1862013-07-18 20:30:58 -040064trycppif () {
65printf "checking preprocessor condition %s... " "$1"
Rich Felkerdf065782013-07-18 20:37:19 -040066echo "typedef int x;" > "$tmpc"
67echo "#if $1" >> "$tmpc"
Rich Felker3e7f1862013-07-18 20:30:58 -040068echo "#error yes" >> "$tmpc"
69echo "#endif" >> "$tmpc"
70if $CC $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
71printf "false\n"
72return 1
73else
74printf "true\n"
75return 0
76fi
77}
78
Rich Felker64d2f8e2012-05-04 23:24:51 -040079tryflag () {
80printf "checking whether compiler accepts %s... " "$2"
81echo "typedef int x;" > "$tmpc"
Rich Felkercd31a1f2012-10-26 18:15:51 -040082if $CC "$2" -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
Rich Felker64d2f8e2012-05-04 23:24:51 -040083printf "yes\n"
84eval "$1=\"\${$1} \$2\""
85eval "$1=\${$1# }"
86return 0
87else
88printf "no\n"
89return 1
90fi
91}
92
Rich Felker08f70a32012-06-06 20:45:52 -040093tryldflag () {
94printf "checking whether linker accepts %s... " "$2"
Rich Felker67a03832012-06-07 00:23:58 -040095echo "typedef int x;" > "$tmpc"
Rich Felkercd31a1f2012-10-26 18:15:51 -040096if $CC -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
Rich Felker08f70a32012-06-06 20:45:52 -040097printf "yes\n"
98eval "$1=\"\${$1} \$2\""
99eval "$1=\${$1# }"
100return 0
101else
102printf "no\n"
103return 1
104fi
105}
106
Rich Felker64d2f8e2012-05-04 23:24:51 -0400107
108
109# Beginning of actual script
110
Rich Felker08f70a32012-06-06 20:45:52 -0400111CFLAGS_C99FSE=
112CFLAGS_AUTO=
Rich Felker4a1f55e2013-08-01 17:12:23 -0400113CFLAGS_MEMOPS=
Rich Felker08f70a32012-06-06 20:45:52 -0400114LDFLAGS_AUTO=
Rich Felkera80847d2013-07-22 21:22:04 -0400115OPTIMIZE_GLOBS=
Rich Felker3d9e3a32012-11-08 17:20:50 -0500116prefix=/usr/local/musl
117exec_prefix='$(prefix)'
118bindir='$(exec_prefix)/bin'
119libdir='$(prefix)/lib'
120includedir='$(prefix)/include'
121syslibdir='/lib'
Rich Felker278883d2012-06-03 16:22:13 -0400122target=
Rich Felkera80847d2013-07-22 21:22:04 -0400123optimize=auto
Rich Felker64d2f8e2012-05-04 23:24:51 -0400124debug=no
Rich Felker3d9e3a32012-11-08 17:20:50 -0500125warnings=no
Rich Felker64d2f8e2012-05-04 23:24:51 -0400126shared=yes
127static=yes
128
129for arg ; do
130case "$arg" in
131--help) usage ;;
132--prefix=*) prefix=${arg#*=} ;;
133--exec-prefix=*) exec_prefix=${arg#*=} ;;
134--bindir=*) bindir=${arg#*=} ;;
135--libdir=*) libdir=${arg#*=} ;;
136--includedir=*) includedir=${arg#*=} ;;
137--syslibdir=*) syslibdir=${arg#*=} ;;
138--enable-shared|--enable-shared=yes) shared=yes ;;
139--disable-shared|--enable-shared=no) shared=no ;;
140--enable-static|--enable-static=yes) static=yes ;;
141--disable-static|--enable-static=no) static=no ;;
Rich Felkera80847d2013-07-22 21:22:04 -0400142--enable-optimize) optimize=yes ;;
143--enable-optimize=*) optimize=${arg#*=} ;;
144--disable-optimize) optimize=no ;;
Rich Felker64d2f8e2012-05-04 23:24:51 -0400145--enable-debug|--enable-debug=yes) debug=yes ;;
146--disable-debug|--enable-debug=no) debug=no ;;
147--enable-warnings|--enable-warnings=yes) warnings=yes ;;
148--disable-warnings|--enable-warnings=no) warnings=no ;;
149--enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ;;
150--disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
Rich Felker278883d2012-06-03 16:22:13 -0400151--enable-*|--disable-*|--with-*|--without-*|--*dir=*|--build=*) ;;
152--host=*|--target=*) target=${arg#*=} ;;
Rich Felker64d2f8e2012-05-04 23:24:51 -0400153-* ) echo "$0: unknown option $arg" ;;
154CC=*) CC=${arg#*=} ;;
155CFLAGS=*) CFLAGS=${arg#*=} ;;
156CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
157LDFLAGS=*) LDFLAGS=${arg#*=} ;;
Rich Felker94e920d2012-08-14 22:50:16 -0400158CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;;
Rich Felker2c1cd232012-09-10 15:30:52 -0400159LIBCC=*) LIBCC=${arg#*=} ;;
Rich Felker278883d2012-06-03 16:22:13 -0400160*=*) ;;
161*) target=$arg ;;
Rich Felker64d2f8e2012-05-04 23:24:51 -0400162esac
163done
164
Rich Felker3d9e3a32012-11-08 17:20:50 -0500165for i in prefix exec_prefix bindir libdir includedir syslibdir ; do
166stripdir $i
167done
Rich Felker64d2f8e2012-05-04 23:24:51 -0400168
169#
170# Get a temp filename we can use
171#
172i=0
173set -C
174while : ; do i=$(($i+1))
175tmpc="./conf$$-$PPID-$i.c"
Rich Felker6c0cba82012-11-18 23:15:47 -05001762>|/dev/null > "$tmpc" && break
Rich Felker64d2f8e2012-05-04 23:24:51 -0400177test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc"
178done
179set +C
180trap 'rm "$tmpc"' EXIT INT QUIT TERM HUP
181
182#
183# Find a C compiler to use
184#
185printf "checking for C compiler... "
Rich Felker94e920d2012-08-14 22:50:16 -0400186trycc ${CROSS_COMPILE}gcc
187trycc ${CROSS_COMPILE}c99
188trycc ${CROSS_COMPILE}cc
Rich Felker64d2f8e2012-05-04 23:24:51 -0400189printf "%s\n" "$CC"
190test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
191
192#
193# Only build musl-gcc wrapper if toolchain does not already target musl
194#
195if test -z "$wrapper" ; then
196printf "checking whether compiler is gcc... "
Rich Felker01e5a1b2012-10-18 23:02:53 -0400197if fnmatch '*gcc\ version*' "$($CC -v 2>&1)" ; then
Rich Felker64d2f8e2012-05-04 23:24:51 -0400198echo yes
199printf "checking whether to build musl-gcc wrapper... "
200wrapper=yes
201while read line ; do
202case "$line" in */ld-musl-*) wrapper=no ;; esac
203done <<EOF
204$($CC -dumpspecs)
205EOF
206echo $wrapper
207else
208echo no
209fi
210fi
211
212
213
214#
Rich Felker278883d2012-06-03 16:22:13 -0400215# Find the target architecture
Rich Felker64d2f8e2012-05-04 23:24:51 -0400216#
Rich Felker278883d2012-06-03 16:22:13 -0400217printf "checking target system type... "
Rich Felker01e5a1b2012-10-18 23:02:53 -0400218test -n "$target" || target=$($CC -dumpmachine 2>/dev/null) || target=unknown
Rich Felker278883d2012-06-03 16:22:13 -0400219printf "%s\n" "$target"
Rich Felker64d2f8e2012-05-04 23:24:51 -0400220
221#
222# Convert to just ARCH
223#
Rich Felker278883d2012-06-03 16:22:13 -0400224case "$target" in
Rich Felker64d2f8e2012-05-04 23:24:51 -0400225arm*) ARCH=arm ;;
226i?86*) ARCH=i386 ;;
227x86_64*) ARCH=x86_64 ;;
Rich Felker721564a2012-08-05 17:23:38 -0400228mips-*|mipsel-*) ARCH=mips ;;
Rich Felker8c0a3d92012-09-29 01:05:31 -0400229microblaze-*) ARCH=microblaze ;;
rofl0r1c8eb8b2012-11-09 23:36:55 +0100230powerpc-*) ARCH=powerpc ;;
Rich Felker278883d2012-06-03 16:22:13 -0400231unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
232*) fail "$0: unknown or unsupported target \"$target\"" ;;
Rich Felker64d2f8e2012-05-04 23:24:51 -0400233esac
234
235#
236# Try to get a conforming C99 freestanding environment
237#
238tryflag CFLAGS_C99FSE -std=c99
239tryflag CFLAGS_C99FSE -nostdinc
240tryflag CFLAGS_C99FSE -ffreestanding \
241|| tryflag CFLAGS_C99FSE -fno-builtin
242tryflag CFLAGS_C99FSE -fexcess-precision=standard \
Rich Felker2121b8a2012-07-03 23:53:05 -0400243|| { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
Rich Felkerb4ccc3c2012-05-05 17:18:31 -0400244tryflag CFLAGS_C99FSE -frounding-math
Rich Felker64d2f8e2012-05-04 23:24:51 -0400245
Rich Felker4a1f55e2013-08-01 17:12:23 -0400246#
247# Check for options that may be needed to prevent the compiler from
248# generating self-referential versions of memcpy,, memmove, memcmp,
249# and memset. Really, we should add a check to determine if this
250# option is sufficient, and if not, add a macro to cripple these
251# functions with volatile...
252#
253tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
Rich Felkera80847d2013-07-22 21:22:04 -0400254
Rich Felker64d2f8e2012-05-04 23:24:51 -0400255#
Rich Felkera80847d2013-07-22 21:22:04 -0400256# If debugging is explicitly enabled, don't auto-enable optimizations
Rich Felker64d2f8e2012-05-04 23:24:51 -0400257#
Rich Felkera80847d2013-07-22 21:22:04 -0400258if test "$debug" = yes ; then
259CFLAGS_AUTO=-g
260test "$optimize" = auto && optimize=no
Rich Felker64d2f8e2012-05-04 23:24:51 -0400261fi
Rich Felkera80847d2013-07-22 21:22:04 -0400262
263#
264# Possibly add a -O option to CFLAGS and select modules to optimize with
265# -O3 based on the status of --enable-optimize and provided CFLAGS.
266#
267printf "checking for optimization settings... "
268case "x$optimize" in
269xauto)
270if fnmatch '-O*|*\ -O*' "$CFLAGS_AUTO $CFLAGS" ; then
271printf "using provided CFLAGS\n" ;optimize=no
272else
273printf "using defaults\n" ; optimize=yes
274fi
275;;
276xsize|xnone) printf "minimize size\n" ; optimize=size ;;
277xno|x) printf "disabled\n" ; optimize=no ;;
278*) printf "custom\n" ;;
279esac
280
281test "$optimize" = no || tryflag CFLAGS_AUTO -Os || tryflag CFLAGS_AUTO -O2
Rich Felker43d25312013-07-24 23:21:45 -0400282test "$optimize" = yes && optimize="internal,malloc,string"
Rich Felkera80847d2013-07-22 21:22:04 -0400283
284if fnmatch 'no|size' "$optimize" ; then :
285else
286printf "components to be optimized for speed:"
287while test "$optimize" ; do
288case "$optimize" in
289*,*) this=${optimize%%,*} optimize=${optimize#*,} ;;
290*) this=$optimize optimize=
291esac
292printf " $this"
293case "$this" in
294*/*.c) ;;
295*/*) this=$this*.c ;;
296*) this=$this/*.c ;;
297esac
298OPTIMIZE_GLOBS="$OPTIMIZE_GLOBS $this"
299done
300OPTIMIZE_GLOBS=${OPTIMIZE_GLOBS# }
301printf "\n"
302fi
303
304# Always try -pipe
Rich Felker64d2f8e2012-05-04 23:24:51 -0400305tryflag CFLAGS_AUTO -pipe
306
307#
Rich Felkerb439c052012-08-29 09:36:02 -0400308# If debugging is disabled, omit frame pointer. Modern GCC does this
309# anyway on most archs even when debugging is enabled since the frame
310# pointer is no longer needed for debugging.
Rich Felker64d2f8e2012-05-04 23:24:51 -0400311#
312if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" ; then :
313else
Rich Felker64d2f8e2012-05-04 23:24:51 -0400314tryflag CFLAGS_AUTO -fomit-frame-pointer
315fi
316
317#
Rich Felkerb439c052012-08-29 09:36:02 -0400318# Modern GCC wants to put DWARF tables (used for debugging and
319# unwinding) in the loaded part of the program where they are
320# unstrippable. These options force them back to debug sections (and
321# cause them not to get generated at all if debugging is off).
322#
323tryflag CFLAGS_AUTO -fno-unwind-tables
324tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
325
326#
Rich Felkeradefe832012-10-03 11:49:58 -0400327# The GNU toolchain defaults to assuming unmarked files need an
328# executable stack, potentially exposing vulnerabilities in programs
329# linked with such object files. Fix this.
330#
331tryflag CFLAGS_AUTO -Wa,--noexecstack
332
333#
Rich Felker64d2f8e2012-05-04 23:24:51 -0400334# On x86, make sure we don't have incompatible instruction set
335# extensions enabled by default. This is bad for making static binaries.
336# We cheat and use i486 rather than i386 because i386 really does not
337# work anyway (issues with atomic ops).
338#
339if test "$ARCH" = "i386" ; then
Rich Felker80a45452012-10-25 14:52:12 -0400340fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
341fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
Rich Felker64d2f8e2012-05-04 23:24:51 -0400342fi
343
Rich Felker2384f272012-12-11 23:28:31 -0500344#
345# Even with -std=c99, gcc accepts some constructs which are constraint
346# violations. We want to treat these as errors regardless of whether
347# other purely stylistic warnings are enabled -- especially implicit
348# function declarations, which are a dangerous programming error.
349#
350tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
351tryflag CFLAGS_AUTO -Werror=implicit-int
352tryflag CFLAGS_AUTO -Werror=pointer-sign
353tryflag CFLAGS_AUTO -Werror=pointer-arith
354
Rich Felker64d2f8e2012-05-04 23:24:51 -0400355if test "x$warnings" = xyes ; then
356tryflag CFLAGS_AUTO -Wall
Rich Felker64d2f8e2012-05-04 23:24:51 -0400357tryflag CFLAGS_AUTO -Wcast-align
358tryflag CFLAGS_AUTO -Wno-parentheses
359tryflag CFLAGS_AUTO -Wno-uninitialized
360tryflag CFLAGS_AUTO -Wno-missing-braces
361tryflag CFLAGS_AUTO -Wno-unused-value
362tryflag CFLAGS_AUTO -Wno-unused-but-set-variable
363tryflag CFLAGS_AUTO -Wno-unknown-pragmas
364fi
365
Rich Felker0c5efde2012-06-06 22:00:08 -0400366# Some patched GCC builds have these defaults messed up...
367tryflag CFLAGS_AUTO -fno-stack-protector
Rich Felker2bd05a42012-08-25 17:13:28 -0400368tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
Rich Felker08f70a32012-06-06 20:45:52 -0400369
Rich Felker498a1002012-06-07 00:32:22 -0400370# Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions
371LDFLAGS_DUMMY=
372tryldflag LDFLAGS_DUMMY -Wl,-Bsymbolic-functions || {
373printf "warning: disabling dynamic linking support\n"
374shared=no
375}
376
Rich Felker2c1cd232012-09-10 15:30:52 -0400377# Find compiler runtime library
378test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
379test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
Rich Felkercd31a1f2012-10-26 18:15:51 -0400380test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
381 && tryldflag LIBCC "$try_libcc"
Rich Felker2c1cd232012-09-10 15:30:52 -0400382printf "using compiler runtime libraries: %s\n" "$LIBCC"
Rich Felkera1546e82012-07-12 14:24:10 -0400383
Rich Felker3e7f1862013-07-18 20:30:58 -0400384# Figure out arch variants for archs with variants
385SUBARCH=
386t="$CFLAGS_C99FSE $CPPFLAGS $CFLAGS_AUTO $CFLAGS"
387
388if test "$ARCH" = "arm" ; then
389trycppif __ARMEB__ "$t" && SUBARCH=${SUBARCH}eb
Rich Felker4918c2b2013-08-16 17:09:07 -0400390trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf
Rich Felker3e7f1862013-07-18 20:30:58 -0400391fi
392
393test "$ARCH" = "mips" && trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" \
394&& SUBARCH=${SUBARCH}el
395
396test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
397&& SUBARCH=${SUBARCH}el
398
399test "$SUBARCH" \
400&& printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"
Rich Felker64d2f8e2012-05-04 23:24:51 -0400401
Rich Felker90d77722013-08-11 03:27:35 -0400402case "$ARCH$SUBARCH" in
403arm) ASMSUBARCH=el ;;
404*) ASMSUBARCH=$SUBARCH ;;
405esac
406
Rich Felker86cc54b2013-08-02 19:34:22 -0400407#
408# Some archs (powerpc) have different possible long double formats
409# that the compiler can be configured for. The logic for whether this
410# is supported is in bits/float.h; in general, it is not. We need to
411# check for mismatches here or code in printf, strotd, and scanf will
412# be dangerously incorrect because it depends on (1) the macros being
413# correct, and (2) IEEE semantics.
414#
415printf "checking whether compiler's long double definition matches float.h... "
416echo '#include <float.h>' > "$tmpc"
417echo '#if LDBL_MANT_DIG == 53' >> "$tmpc"
418echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc"
419echo '#endif' >> "$tmpc"
420if $CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include $CPPFLAGS $CFLAGS \
421 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
422printf "yes\n"
423else
424printf "no\n"
425fail "$0: error: unsupported long double type"
426fi
427
Rich Felker64d2f8e2012-05-04 23:24:51 -0400428printf "creating config.mak... "
429
Rich Felker453f4622013-08-16 18:19:47 -0400430cmdline=$(quote "$0")
431for i ; do cmdline="$cmdline $(quote "$i")" ; done
432
Rich Felker64d2f8e2012-05-04 23:24:51 -0400433exec 3>&1 1>config.mak
434
435
436cat << EOF
Rich Felker453f4622013-08-16 18:19:47 -0400437# This version of config.mak was generated by:
438# $cmdline
Rich Felker64d2f8e2012-05-04 23:24:51 -0400439# Any changes made here will be lost if configure is re-run
440ARCH = $ARCH
Rich Felker3e7f1862013-07-18 20:30:58 -0400441SUBARCH = $SUBARCH
Rich Felker90d77722013-08-11 03:27:35 -0400442ASMSUBARCH = $ASMSUBARCH
Rich Felker64d2f8e2012-05-04 23:24:51 -0400443prefix = $prefix
444exec_prefix = $exec_prefix
445bindir = $bindir
446libdir = $libdir
447includedir = $includedir
448syslibdir = $syslibdir
449CC = $CC
450CFLAGS= $CFLAGS_AUTO $CFLAGS
451CFLAGS_C99FSE = $CFLAGS_C99FSE
Rich Felker4a1f55e2013-08-01 17:12:23 -0400452CFLAGS_MEMOPS = $CFLAGS_MEMOPS
Rich Felker64d2f8e2012-05-04 23:24:51 -0400453CPPFLAGS = $CPPFLAGS
Rich Felker08f70a32012-06-06 20:45:52 -0400454LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
Rich Felker94e920d2012-08-14 22:50:16 -0400455CROSS_COMPILE = $CROSS_COMPILE
Rich Felker2c1cd232012-09-10 15:30:52 -0400456LIBCC = $LIBCC
Rich Felkera80847d2013-07-22 21:22:04 -0400457OPTIMIZE_GLOBS = $OPTIMIZE_GLOBS
Rich Felker64d2f8e2012-05-04 23:24:51 -0400458EOF
459test "x$static" = xno && echo "STATIC_LIBS ="
460test "x$shared" = xno && echo "SHARED_LIBS ="
461test "x$wrapper" = xno && echo "ALL_TOOLS ="
462test "x$wrapper" = xno && echo "TOOL_LIBS ="
463exec 1>&3 3>&-
464
465printf "done\n"