configure: work around compilers that merely warn for unknown options
[oweals/musl.git] / configure
1 #!/bin/sh
2
3 usage () {
4 cat <<EOF
5 Usage: $0 [OPTION]... [VAR=VALUE]... [TARGET]
6
7 To assign environment variables (e.g., CC, CFLAGS...), specify them as
8 VAR=VALUE.  See below for descriptions of some of the useful variables.
9
10 Defaults for the options are specified in brackets.
11
12 Installation directories:
13   --prefix=PREFIX         main installation prefix [/usr/local/musl]
14   --exec-prefix=EPREFIX   installation prefix for executable files [PREFIX]
15
16 Fine 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
22 System types:
23   --target=TARGET         configure to run on target TARGET [detected]
24   --host=HOST             same as --target
25
26 Optional features:
27   --enable-optimize=...   optimize listed components for speed over size [auto]
28   --enable-debug          build with debugging information [disabled]
29   --enable-warnings       build with recommended warnings flags [disabled]
30   --enable-visibility     use global visibility options to optimize PIC [auto]
31   --enable-gcc-wrapper    build musl-gcc toolchain wrapper [auto]
32   --disable-shared        inhibit building shared library [enabled]
33   --disable-static        inhibit building static library [enabled]
34
35 Some influential environment variables:
36   CC                      C compiler command [detected]
37   CFLAGS                  C compiler flags [-Os -pipe ...]
38   CROSS_COMPILE           prefix for cross compiler and tools [none]
39   LIBCC                   compiler runtime library [detected]
40
41 Use these variables to override the choices made by configure.
42
43 EOF
44 exit 0
45 }
46
47 # Helper functions
48
49 quote () {
50 tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
51 $1
52 EOF
53 printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#"
54 }
55 echo () { printf "%s\n" "$*" ; }
56 fail () { echo "$*" ; exit 1 ; }
57 fnmatch () { eval "case \"\$2\" in $1) return 0 ;; *) return 1 ;; esac" ; }
58 cmdexists () { type "$1" >/dev/null 2>&1 ; }
59 trycc () { test -z "$CC" && cmdexists "$1" && CC=$1 ; }
60
61 stripdir () {
62 while eval "fnmatch '*/' \"\${$1}\"" ; do eval "$1=\${$1%/}" ; done
63 }
64
65 trycppif () {
66 printf "checking preprocessor condition %s... " "$1"
67 echo "typedef int x;" > "$tmpc"
68 echo "#if $1" >> "$tmpc"
69 echo "#error yes" >> "$tmpc"
70 echo "#endif" >> "$tmpc"
71 if $CC $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
72 printf "false\n"
73 return 1
74 else
75 printf "true\n"
76 return 0
77 fi
78 }
79
80 tryflag () {
81 printf "checking whether compiler accepts %s... " "$2"
82 echo "typedef int x;" > "$tmpc"
83 if $CC $CFLAGS_TRY $2 -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
84 printf "yes\n"
85 eval "$1=\"\${$1} \$2\""
86 eval "$1=\${$1# }"
87 return 0
88 else
89 printf "no\n"
90 return 1
91 fi
92 }
93
94 tryldflag () {
95 printf "checking whether linker accepts %s... " "$2"
96 echo "typedef int x;" > "$tmpc"
97 if $CC $LDFLAGS_TRY -nostdlib -shared "$2" -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
98 printf "yes\n"
99 eval "$1=\"\${$1} \$2\""
100 eval "$1=\${$1# }"
101 return 0
102 else
103 printf "no\n"
104 return 1
105 fi
106 }
107
108
109
110 # Beginning of actual script
111
112 CFLAGS_C99FSE=
113 CFLAGS_AUTO=
114 CFLAGS_MEMOPS=
115 CFLAGS_NOSSP=
116 CFLAGS_TRY=
117 LDFLAGS_AUTO=
118 LDFLAGS_TRY=
119 OPTIMIZE_GLOBS=
120 prefix=/usr/local/musl
121 exec_prefix='$(prefix)'
122 bindir='$(exec_prefix)/bin'
123 libdir='$(prefix)/lib'
124 includedir='$(prefix)/include'
125 syslibdir='/lib'
126 target=
127 optimize=auto
128 debug=no
129 warnings=no
130 visibility=auto
131 shared=auto
132 static=yes
133 wrapper=auto
134
135 for arg ; do
136 case "$arg" in
137 --help) usage ;;
138 --prefix=*) prefix=${arg#*=} ;;
139 --exec-prefix=*) exec_prefix=${arg#*=} ;;
140 --bindir=*) bindir=${arg#*=} ;;
141 --libdir=*) libdir=${arg#*=} ;;
142 --includedir=*) includedir=${arg#*=} ;;
143 --syslibdir=*) syslibdir=${arg#*=} ;;
144 --enable-shared|--enable-shared=yes) shared=yes ;;
145 --disable-shared|--enable-shared=no) shared=no ;;
146 --enable-static|--enable-static=yes) static=yes ;;
147 --disable-static|--enable-static=no) static=no ;;
148 --enable-optimize) optimize=yes ;;
149 --enable-optimize=*) optimize=${arg#*=} ;;
150 --disable-optimize) optimize=no ;;
151 --enable-debug|--enable-debug=yes) debug=yes ;;
152 --disable-debug|--enable-debug=no) debug=no ;;
153 --enable-warnings|--enable-warnings=yes) warnings=yes ;;
154 --disable-warnings|--enable-warnings=no) warnings=no ;;
155 --enable-visibility|--enable-visibility=yes) visibility=yes ;;
156 --disable-visibility|--enable-visibility=no) visibility=no ;;
157 --enable-gcc-wrapper|--enable-gcc-wrapper=yes) wrapper=yes ;;
158 --disable-gcc-wrapper|--enable-gcc-wrapper=no) wrapper=no ;;
159 --enable-*|--disable-*|--with-*|--without-*|--*dir=*|--build=*) ;;
160 --host=*|--target=*) target=${arg#*=} ;;
161 -* ) echo "$0: unknown option $arg" ;;
162 CC=*) CC=${arg#*=} ;;
163 CFLAGS=*) CFLAGS=${arg#*=} ;;
164 CPPFLAGS=*) CPPFLAGS=${arg#*=} ;;
165 LDFLAGS=*) LDFLAGS=${arg#*=} ;;
166 CROSS_COMPILE=*) CROSS_COMPILE=${arg#*=} ;;
167 LIBCC=*) LIBCC=${arg#*=} ;;
168 *=*) ;;
169 *) target=$arg ;;
170 esac
171 done
172
173 for i in prefix exec_prefix bindir libdir includedir syslibdir ; do
174 stripdir $i
175 done
176
177 #
178 # Get a temp filename we can use
179 #
180 i=0
181 set -C
182 while : ; do i=$(($i+1))
183 tmpc="./conf$$-$PPID-$i.c"
184 2>|/dev/null > "$tmpc" && break
185 test "$i" -gt 50 && fail "$0: cannot create temporary file $tmpc"
186 done
187 set +C
188 trap 'rm "$tmpc"' EXIT INT QUIT TERM HUP
189
190 #
191 # Find a C compiler to use
192 #
193 printf "checking for C compiler... "
194 trycc ${CROSS_COMPILE}gcc
195 trycc ${CROSS_COMPILE}c99
196 trycc ${CROSS_COMPILE}cc
197 printf "%s\n" "$CC"
198 test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
199
200 printf "checking whether C compiler works... "
201 echo "typedef int x;" > "$tmpc"
202 if output=$($CC $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" 2>&1) ; then
203 printf "yes\n"
204 else
205 printf "no; compiler output follows:\n%s\n" "$output"
206 exit 1
207 fi
208
209 #
210 # Figure out options to force errors on unknown flags.
211 #
212 tryflag   CFLAGS_TRY  -Werror=unknown-warning-option
213 tryflag   CFLAGS_TRY  -Werror=unused-command-line-argument
214 tryldflag LDFLAGS_TRY -Werror=unknown-warning-option
215 tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument
216
217 #
218 # Need to know if the compiler is gcc to decide whether to build the
219 # musl-gcc wrapper, and for critical bug detection in some gcc versions.
220 #
221 printf "checking whether compiler is gcc... "
222 if fnmatch '*gcc\ version*' "$(LC_ALL=C $CC -v 2>&1)" ; then
223 cc_is_gcc=yes
224 else
225 cc_is_gcc=no
226 fi
227 echo "$cc_is_gcc"
228
229 #
230 # Only build musl-gcc wrapper if toolchain does not already target musl
231 #
232 if test "$wrapper" = auto ; then
233 printf "checking whether to build musl-gcc wrapper... "
234 if test "$cc_is_gcc" = yes ; then
235 wrapper=yes
236 while read line ; do
237 case "$line" in */ld-musl-*) wrapper=no ;; esac
238 done <<EOF
239 $($CC -dumpspecs)
240 EOF
241 else
242 wrapper=no
243 fi
244 echo "$wrapper"
245 fi
246
247
248
249 #
250 # Find the target architecture
251 #
252 printf "checking target system type... "
253 test -n "$target" || target=$($CC -dumpmachine 2>/dev/null) || target=unknown
254 printf "%s\n" "$target"
255
256 #
257 # Convert to just ARCH
258 #
259 case "$target" in
260 # Catch these early to simplify matching for 32-bit archs
261 mips64*|powerpc64*) fail "$0: unsupported target \"$target\"" ;;
262 arm*) ARCH=arm ;;
263 aarch64*) ARCH=aarch64 ;;
264 i?86*) ARCH=i386 ;;
265 x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
266 x86_64*) ARCH=x86_64 ;;
267 mips*) ARCH=mips ;;
268 microblaze*) ARCH=microblaze ;;
269 or1k*) ARCH=or1k ;;
270 powerpc*) ARCH=powerpc ;;
271 sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
272 unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
273 *) fail "$0: unknown or unsupported target \"$target\"" ;;
274 esac
275
276 #
277 # Try to get a conforming C99 freestanding environment
278 #
279 tryflag CFLAGS_C99FSE -std=c99
280 tryflag CFLAGS_C99FSE -nostdinc
281 tryflag CFLAGS_C99FSE -ffreestanding \
282 || tryflag CFLAGS_C99FSE -fno-builtin
283 tryflag CFLAGS_C99FSE -fexcess-precision=standard \
284 || { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
285 tryflag CFLAGS_C99FSE -frounding-math
286
287 #
288 # We may use the may_alias attribute if __GNUC__ is defined, so
289 # if the compiler defines __GNUC__ but does not provide it,
290 # it must be defined away as part of the CFLAGS.
291 #
292 printf "checking whether compiler needs attribute((may_alias)) suppression... "
293 cat > "$tmpc" <<EOF
294 typedef int
295 #ifdef __GNUC__
296 __attribute__((__may_alias__))
297 #endif
298 x;
299 EOF
300 if $CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include $CPPFLAGS $CFLAGS \
301   -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
302 printf "no\n"
303 else
304 printf "yes\n"
305 CFLAGS_C99FSE="$CFLAGS_C99FSE -D__may_alias__="
306 fi
307
308 #
309 # Check for options to disable stack protector, which needs to be
310 # disabled for a few early-bootstrap translation units. If not found,
311 # this is not an error; we assume the toolchain does not do ssp.
312 #
313 tryflag CFLAGS_NOSSP -fno-stack-protector
314
315 #
316 # Check for options that may be needed to prevent the compiler from
317 # generating self-referential versions of memcpy,, memmove, memcmp,
318 # and memset. Really, we should add a check to determine if this
319 # option is sufficient, and if not, add a macro to cripple these
320 # functions with volatile...
321 #
322 tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
323
324 #
325 # Enable debugging if requessted.
326 #
327 test "$debug" = yes && CFLAGS_AUTO=-g
328
329 #
330 # Possibly add a -O option to CFLAGS and select modules to optimize with
331 # -O3 based on the status of --enable-optimize and provided CFLAGS.
332 #
333 printf "checking for optimization settings... "
334 case "x$optimize" in
335 xauto)
336 if fnmatch '-O*|*\ -O*' "$CFLAGS_AUTO $CFLAGS" ; then
337 printf "using provided CFLAGS\n" ;optimize=no
338 else
339 printf "using defaults\n" ; optimize=yes
340 fi
341 ;;
342 xsize|xnone) printf "minimize size\n" ; optimize=size ;;
343 xno|x) printf "disabled\n" ; optimize=no ;;
344 *) printf "custom\n" ;;
345 esac
346
347 test "$optimize" = no || tryflag CFLAGS_AUTO -Os || tryflag CFLAGS_AUTO -O2
348 test "$optimize" = yes && optimize="internal,malloc,string"
349
350 if fnmatch 'no|size' "$optimize" ; then :
351 else
352 printf "components to be optimized for speed:"
353 while test "$optimize" ; do
354 case "$optimize" in
355 *,*) this=${optimize%%,*} optimize=${optimize#*,} ;;
356 *) this=$optimize optimize=
357 esac
358 printf " $this"
359 case "$this" in
360 */*.c) ;;
361 */*) this=$this*.c ;;
362 *) this=$this/*.c ;;
363 esac
364 OPTIMIZE_GLOBS="$OPTIMIZE_GLOBS $this"
365 done
366 OPTIMIZE_GLOBS=${OPTIMIZE_GLOBS# }
367 printf "\n"
368 fi
369
370 # Always try -pipe
371 tryflag CFLAGS_AUTO -pipe
372
373 #
374 # If debugging is disabled, omit frame pointer. Modern GCC does this
375 # anyway on most archs even when debugging is enabled since the frame
376 # pointer is no longer needed for debugging.
377 #
378 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" ; then :
379 else 
380 tryflag CFLAGS_AUTO -fomit-frame-pointer
381 fi
382
383 #
384 # Modern GCC wants to put DWARF tables (used for debugging and
385 # unwinding) in the loaded part of the program where they are
386 # unstrippable. These options force them back to debug sections (and
387 # cause them not to get generated at all if debugging is off).
388 #
389 tryflag CFLAGS_AUTO -fno-unwind-tables
390 tryflag CFLAGS_AUTO -fno-asynchronous-unwind-tables
391
392 #
393 # The GNU toolchain defaults to assuming unmarked files need an
394 # executable stack, potentially exposing vulnerabilities in programs
395 # linked with such object files. Fix this.
396 #
397 tryflag CFLAGS_AUTO -Wa,--noexecstack
398
399 #
400 # On x86, make sure we don't have incompatible instruction set
401 # extensions enabled by default. This is bad for making static binaries.
402 # We cheat and use i486 rather than i386 because i386 really does not
403 # work anyway (issues with atomic ops).
404 # Some build environments pass -march and -mtune options via CC, so
405 # check both CC and CFLAGS.
406 #
407 if test "$ARCH" = "i386" ; then
408 fnmatch '-march=*|*\ -march=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
409 fnmatch '-mtune=*|*\ -mtune=*' "$CC $CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
410 fi
411
412 #
413 # Even with -std=c99, gcc accepts some constructs which are constraint
414 # violations. We want to treat these as errors regardless of whether
415 # other purely stylistic warnings are enabled -- especially implicit
416 # function declarations, which are a dangerous programming error.
417 #
418 tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
419 tryflag CFLAGS_AUTO -Werror=implicit-int
420 tryflag CFLAGS_AUTO -Werror=pointer-sign
421 tryflag CFLAGS_AUTO -Werror=pointer-arith
422
423 if test "x$warnings" = xyes ; then
424 tryflag CFLAGS_AUTO -Wall
425 tryflag CFLAGS_AUTO -Wno-parentheses
426 tryflag CFLAGS_AUTO -Wno-uninitialized
427 tryflag CFLAGS_AUTO -Wno-missing-braces
428 tryflag CFLAGS_AUTO -Wno-unused-value
429 tryflag CFLAGS_AUTO -Wno-unused-but-set-variable
430 tryflag CFLAGS_AUTO -Wno-unknown-pragmas
431 tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast
432 fi
433
434 if test "x$visibility" = xauto ; then
435 # This test checks toolchain support for several things:
436 # - the -include option
437 # - the attributes/pragmas used in vis.h
438 # - linking code that takes the address of protected symbols
439 printf "checking whether global visibility preinclude works... "
440 echo 'int (*fp)(void);' > "$tmpc"
441 echo 'int foo(void) { }' >> "$tmpc"
442 echo 'int bar(void) { fp = foo; return foo(); }' >> "$tmpc"
443 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS \
444   -DSHARED -fPIC -I./src/internal -include vis.h \
445   -nostdlib -shared -Wl,-Bsymbolic-functions \
446   -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
447 visibility=yes
448 else
449 visibility=no
450 fi
451 printf "%s\n" "$visibility"
452 fi
453
454 if test "x$visibility" = xyes ; then
455 CFLAGS_AUTO="$CFLAGS_AUTO -include vis.h"
456 CFLAGS_AUTO="${CFLAGS_AUTO# }"
457 fi
458
459 # Some patched GCC builds have these defaults messed up...
460 tryldflag LDFLAGS_AUTO -Wl,--hash-style=both
461
462 test "$shared" = "no" || {
463 # Disable dynamic linking if ld is broken and can't do -Bsymbolic-functions
464 LDFLAGS_DUMMY=
465 tryldflag LDFLAGS_DUMMY -Wl,-Bsymbolic-functions || {
466 test "$shared" = "yes" && fail "$0: error: linker cannot build shared library"
467 printf "warning: disabling dynamic linking support\n"
468 shared=no
469 }
470 }
471
472 # Find compiler runtime library
473 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
474 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
475 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
476                  && tryldflag LIBCC "$try_libcc"
477 printf "using compiler runtime libraries: %s\n" "$LIBCC"
478
479 # Figure out arch variants for archs with variants
480 SUBARCH=
481 t="$CFLAGS_C99FSE $CPPFLAGS $CFLAGS"
482
483 if test "$ARCH" = "x86_64" ; then
484 trycppif __ILP32__ "$t" && ARCH=x32
485 fi
486
487 if test "$ARCH" = "arm" ; then
488 trycppif __ARMEB__ "$t" && SUBARCH=${SUBARCH}eb
489 trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf
490 fi
491
492 if test "$ARCH" = "aarch64" ; then
493 trycppif __AARCH64EB__ "$t" && SUBARCH=${SUBARCH}_be
494 fi
495
496 if test "$ARCH" = "mips" ; then
497 trycppif "_MIPSEL || __MIPSEL || __MIPSEL__" "$t" && SUBARCH=${SUBARCH}el
498 trycppif __mips_soft_float "$t" && SUBARCH=${SUBARCH}-sf
499 fi
500
501 test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
502 && SUBARCH=${SUBARCH}el
503
504 if test "$ARCH" = "sh" ; then
505 trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb
506 if trycppif "__SH_FPU_ANY__ || __SH4__" "$t" ; then
507 # Some sh configurations are broken and replace double with float
508 # rather than using softfloat when the fpu is present but only
509 # supports single precision. Reject them.
510 printf "checking whether compiler's double type is IEEE double... "
511 echo 'typedef char dblcheck[(int)sizeof(double)-5];' > "$tmpc"
512 if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
513 printf "yes\n"
514 else
515 printf "no\n"
516 fail "$0: error: compiler's floating point configuration is unsupported"
517 fi
518 else
519 SUBARCH=${SUBARCH}-nofpu
520 fi
521 fi
522
523 test "$SUBARCH" \
524 && printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"
525
526 case "$ARCH$SUBARCH" in
527 arm) ASMSUBARCH=el ;;
528 *) ASMSUBARCH=$SUBARCH ;;
529 esac
530
531 #
532 # Some archs (powerpc) have different possible long double formats
533 # that the compiler can be configured for. The logic for whether this
534 # is supported is in bits/float.h; in general, it is not. We need to
535 # check for mismatches here or code in printf, strotd, and scanf will
536 # be dangerously incorrect because it depends on (1) the macros being
537 # correct, and (2) IEEE semantics.
538 #
539 printf "checking whether compiler's long double definition matches float.h... "
540 echo '#include <float.h>' > "$tmpc"
541 echo '#if LDBL_MANT_DIG == 53' >> "$tmpc"
542 echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc"
543 echo '#endif' >> "$tmpc"
544 if $CC $CFLAGS_C99FSE -I./arch/$ARCH -I./include $CPPFLAGS $CFLAGS \
545   -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
546 printf "yes\n"
547 else
548 printf "no\n"
549 fail "$0: error: unsupported long double type"
550 fi
551
552 printf "creating config.mak... "
553
554 cmdline=$(quote "$0")
555 for i ; do cmdline="$cmdline $(quote "$i")" ; done
556
557 exec 3>&1 1>config.mak
558
559
560 cat << EOF
561 # This version of config.mak was generated by:
562 # $cmdline
563 # Any changes made here will be lost if configure is re-run
564 ARCH = $ARCH
565 SUBARCH = $SUBARCH
566 ASMSUBARCH = $ASMSUBARCH
567 prefix = $prefix
568 exec_prefix = $exec_prefix
569 bindir = $bindir
570 libdir = $libdir
571 includedir = $includedir
572 syslibdir = $syslibdir
573 CC = $CC
574 CFLAGS = $CFLAGS_AUTO $CFLAGS
575 CFLAGS_C99FSE = $CFLAGS_C99FSE
576 CFLAGS_MEMOPS = $CFLAGS_MEMOPS
577 CFLAGS_NOSSP = $CFLAGS_NOSSP
578 CPPFLAGS = $CPPFLAGS
579 LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
580 CROSS_COMPILE = $CROSS_COMPILE
581 LIBCC = $LIBCC
582 OPTIMIZE_GLOBS = $OPTIMIZE_GLOBS
583 EOF
584 test "x$static" = xno && echo "STATIC_LIBS ="
585 test "x$shared" = xno && echo "SHARED_LIBS ="
586 test "x$wrapper" = xno && echo "ALL_TOOLS ="
587 test "x$wrapper" = xno && echo "TOOL_LIBS ="
588 exec 1>&3 3>&-
589
590 printf "done\n"