]> git.saurik.com Git - apple/icu.git/blame - icuSources/configure
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / configure
CommitLineData
b75a7d8f 1#! /bin/sh
b75a7d8f 2# Guess values for system-dependent variables and create Makefiles.
f3c0d7a5 3# Generated by GNU Autoconf 2.69 for ICU 59.1.
729e4ab9 4#
b331163b 5# Report bugs to <http://icu-project.org/bugs>.
729e4ab9 6#
f3c0d7a5 7# Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html
729e4ab9 8#
b331163b
A
9#
10# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
729e4ab9 11#
b75a7d8f
A
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
729e4ab9
A
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
73c04bcf 18
729e4ab9
A
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
73c04bcf
A
22 emulate sh
23 NULLCMD=:
729e4ab9 24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
73c04bcf
A
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
729e4ab9
A
27 setopt NO_GLOB_SUBST
28else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34esac
73c04bcf 35fi
73c04bcf 36
729e4ab9
A
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
73c04bcf
A
83fi
84
85
729e4ab9
A
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
4388f060 94as_myself=
729e4ab9
A
95case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104IFS=$as_save_IFS
105
106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
73c04bcf
A
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
729e4ab9
A
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
b331163b
A
139# Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144# neutralization value for shells without unset; and this also
145# works around shells that cannot unset nonexistent variables.
146# Preserve -v and -x to the replacement shell.
147BASH_ENV=/dev/null
148ENV=/dev/null
149(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155esac
156exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157# Admittedly, this is quite paranoid, since all the known shells bail
158# out after a failed `exec'.
159$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160as_fn_exit 255
161 fi
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
729e4ab9
A
164if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
177 ;;
178esac
179fi
180"
181 as_required="as_fn_return () { (exit \$1); }
182as_fn_success () { as_fn_return 0; }
183as_fn_failure () { as_fn_return 1; }
184as_fn_ret_success () { return 0; }
185as_fn_ret_failure () { return 1; }
186
187exitcode=0
188as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194else
195 exitcode=1; echo positional parameters were not saved.
196fi
b331163b
A
197test x\$exitcode = x0 || exit 1
198test -x / || exit 1"
729e4ab9
A
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206else
207 as_have_required=no
208fi
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213as_found=false
214for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
73c04bcf 215do
729e4ab9
A
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
220 /*)
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
229fi
230fi
231 done;;
232 esac
233 as_found=false
234done
235$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238fi; }
239IFS=$as_save_IFS
240
241
242 if test "x$CONFIG_SHELL" != x; then :
b331163b
A
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245# neutralization value for shells without unset; and this also
246# works around shells that cannot unset nonexistent variables.
247# Preserve -v and -x to the replacement shell.
248BASH_ENV=/dev/null
249ENV=/dev/null
250(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256esac
257exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258# Admittedly, this is quite paranoid, since all the known shells bail
259# out after a failed `exec'.
260$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261exit 255
729e4ab9
A
262fi
263
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
73c04bcf 270 else
b331163b
A
271 $as_echo "$0: Please tell bug-autoconf@gnu.org and
272$0: http://icu-project.org/bugs about your system,
729e4ab9
A
273$0: including any error possibly output before this
274$0: message. Then install a modern shell, or manually run
275$0: the script under such a shell if you do have one."
73c04bcf 276 fi
729e4ab9
A
277 exit 1
278fi
279fi
280fi
281SHELL=${CONFIG_SHELL-/bin/sh}
282export SHELL
283# Unset more variables known to interfere with behavior of common tools.
284CLICOLOR_FORCE= GREP_OPTIONS=
285unset CLICOLOR_FORCE GREP_OPTIONS
286
287## --------------------- ##
288## M4sh Shell Functions. ##
289## --------------------- ##
290# as_fn_unset VAR
291# ---------------
292# Portably unset VAR.
293as_fn_unset ()
294{
295 { eval $1=; unset $1;}
296}
297as_unset=as_fn_unset
298
299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304 return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312 set +e
313 as_fn_set_status $1
314 exit $1
315} # as_fn_exit
316
317# as_fn_mkdir_p
318# -------------
319# Create "$as_dir" as a directory, including parents if necessary.
320as_fn_mkdir_p ()
321{
322
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339$as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
342 q
343 }
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
346 q
347 }
348 /^X\(\/\/\)$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\).*/{
353 s//\1/
354 q
355 }
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363} # as_fn_mkdir_p
b331163b
A
364
365# as_fn_executable_p FILE
366# -----------------------
367# Test if FILE is an executable regular file.
368as_fn_executable_p ()
369{
370 test -f "$1" && test -x "$1"
371} # as_fn_executable_p
729e4ab9
A
372# as_fn_append VAR VALUE
373# ----------------------
374# Append the text in VALUE to the end of the definition contained in VAR. Take
375# advantage of any shell optimizations that allow amortized linear growth over
376# repeated appends, instead of the typical quadratic growth present in naive
377# implementations.
378if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
380 {
381 eval $1+=\$2
382 }'
383else
384 as_fn_append ()
385 {
386 eval $1=\$$1\$2
387 }
388fi # as_fn_append
389
390# as_fn_arith ARG...
391# ------------------
392# Perform arithmetic evaluation on the ARGs, and store the result in the
393# global $as_val. Take advantage of shells that can avoid forks. The arguments
394# must be portable across $(()) and expr.
395if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
397 {
398 as_val=$(( $* ))
399 }'
400else
401 as_fn_arith ()
402 {
403 as_val=`expr "$@" || test $? -eq 1`
404 }
405fi # as_fn_arith
406
407
408# as_fn_error STATUS ERROR [LINENO LOG_FD]
409# ----------------------------------------
410# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412# script with STATUS, using 1 if that was 0.
413as_fn_error ()
414{
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419 fi
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422} # as_fn_error
73c04bcf 423
729e4ab9
A
424if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
73c04bcf
A
426 as_expr=expr
427else
428 as_expr=false
429fi
430
729e4ab9 431if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
73c04bcf
A
432 as_basename=basename
433else
434 as_basename=false
435fi
436
729e4ab9
A
437if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439else
440 as_dirname=false
441fi
73c04bcf 442
729e4ab9 443as_me=`$as_basename -- "$0" ||
73c04bcf
A
444$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
729e4ab9
A
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447$as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
450 q
451 }
452 /^X\/\(\/\/\)$/{
453 s//\1/
454 q
455 }
456 /^X\/\(\/\).*/{
457 s//\1/
458 q
459 }
460 s/.*/./; q'`
73c04bcf 461
73c04bcf
A
462# Avoid depending upon Character Ranges.
463as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466as_cr_digits='0123456789'
467as_cr_alnum=$as_cr_Letters$as_cr_digits
468
73c04bcf 469
729e4ab9
A
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
476 p
477 /[$]LINENO/=
478 ' <$as_myself |
73c04bcf 479 sed '
729e4ab9
A
480 s/[$]LINENO.*/&-/
481 t lineno
482 b
483 :lineno
73c04bcf 484 N
729e4ab9
A
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
73c04bcf 487 t loop
729e4ab9 488 s/-\n.*//
73c04bcf 489 ' >$as_me.lineno &&
729e4ab9
A
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
73c04bcf 492
b331163b
A
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
73c04bcf
A
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
729e4ab9
A
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
73c04bcf
A
501 # Exit status is that of the last command.
502 exit
503}
504
729e4ab9
A
505ECHO_C= ECHO_N= ECHO_T=
506case `echo -n x` in #(((((
507-n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
514*)
515 ECHO_N='-n';;
73c04bcf
A
516esac
517
729e4ab9
A
518rm -f conf$$ conf$$.exe conf$$.file
519if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
73c04bcf 521else
729e4ab9
A
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
73c04bcf 524fi
729e4ab9
A
525if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
73c04bcf 527 as_ln_s='ln -s'
729e4ab9
A
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
b331163b 531 # In both cases, we have to default to `cp -pR'.
729e4ab9 532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
b331163b 533 as_ln_s='cp -pR'
729e4ab9
A
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
b331163b 537 as_ln_s='cp -pR'
73c04bcf 538 fi
73c04bcf 539else
b331163b 540 as_ln_s='cp -pR'
73c04bcf 541fi
729e4ab9
A
542rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543rmdir conf$$.dir 2>/dev/null
73c04bcf
A
544
545if mkdir -p . 2>/dev/null; then
729e4ab9 546 as_mkdir_p='mkdir -p "$as_dir"'
73c04bcf
A
547else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
550fi
551
b331163b
A
552as_test_x='test -x'
553as_executable_p=as_fn_executable_p
73c04bcf
A
554
555# Sed expression to map a string onto a valid CPP name.
556as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558# Sed expression to map a string onto a valid variable name.
559as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
729e4ab9
A
562test -n "$DJDIR" || exec 7<&0 </dev/null
563exec 6>&1
73c04bcf
A
564
565# Name of the host.
729e4ab9 566# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
73c04bcf
A
567# so uname gets run too.
568ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
b75a7d8f 569
73c04bcf
A
570#
571# Initializations.
572#
b75a7d8f 573ac_default_prefix=/usr/local
729e4ab9 574ac_clean_files=
73c04bcf 575ac_config_libobj_dir=.
729e4ab9 576LIBOBJS=
73c04bcf
A
577cross_compiling=no
578subdirs=
579MFLAGS=
580MAKEFLAGS=
73c04bcf
A
581
582# Identity of this package.
b331163b
A
583PACKAGE_NAME='ICU'
584PACKAGE_TARNAME='International Components for Unicode'
f3c0d7a5
A
585PACKAGE_VERSION='59.1'
586PACKAGE_STRING='ICU 59.1'
b331163b
A
587PACKAGE_BUGREPORT='http://icu-project.org/bugs'
588PACKAGE_URL='http://icu-project.org'
589
73c04bcf
A
590ac_unique_file="common/unicode/utypes.h"
591# Factoring default headers for most tests.
592ac_includes_default="\
593#include <stdio.h>
729e4ab9 594#ifdef HAVE_SYS_TYPES_H
73c04bcf
A
595# include <sys/types.h>
596#endif
729e4ab9 597#ifdef HAVE_SYS_STAT_H
73c04bcf
A
598# include <sys/stat.h>
599#endif
729e4ab9 600#ifdef STDC_HEADERS
73c04bcf
A
601# include <stdlib.h>
602# include <stddef.h>
603#else
729e4ab9 604# ifdef HAVE_STDLIB_H
73c04bcf
A
605# include <stdlib.h>
606# endif
607#endif
729e4ab9
A
608#ifdef HAVE_STRING_H
609# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
73c04bcf
A
610# include <memory.h>
611# endif
612# include <string.h>
613#endif
729e4ab9 614#ifdef HAVE_STRINGS_H
73c04bcf
A
615# include <strings.h>
616#endif
729e4ab9 617#ifdef HAVE_INTTYPES_H
73c04bcf 618# include <inttypes.h>
73c04bcf 619#endif
729e4ab9
A
620#ifdef HAVE_STDINT_H
621# include <stdint.h>
622#endif
623#ifdef HAVE_UNISTD_H
73c04bcf
A
624# include <unistd.h>
625#endif"
626
57a6839d
A
627ac_subst_vars='UCONFIG_CXXFLAGS
628UCONFIG_CFLAGS
629UCONFIG_CPPFLAGS
630LTLIBOBJS
729e4ab9 631LIBOBJS
4388f060
A
632LIBCXXFLAGS
633LIBCFLAGS
729e4ab9
A
634platform_make_fragment
635platform_make_fragment_name
636platform
637ICUDATA_CHAR
2ca993e8 638U_HAVE_SAMPLES
729e4ab9 639SAMPLES_TRUE
2ca993e8 640U_HAVE_TESTS
729e4ab9
A
641TESTS_TRUE
642ICULIBSUFFIXCNAME
643U_HAVE_LIB_SUFFIX
644ICULIBSUFFIX
645DATA_PACKAGING_MODE
646thepkgicudatadir
647pkgicudatadir
2ca993e8 648U_HAVE_TOOLS
57a6839d 649TOOLS_TRUE
2ca993e8 650U_HAVE_LAYOUTEX
b331163b 651LAYOUTEX_TRUE
2ca993e8 652U_HAVE_ICUIO
729e4ab9 653ICUIO_TRUE
2ca993e8 654U_HAVE_EXTRAS
729e4ab9 655EXTRAS_TRUE
729e4ab9
A
656U_HAVE_WCSCPY
657U_HAVE_WCHAR_H
f3c0d7a5 658U_HAVE_STRTOD_L
729e4ab9
A
659U_TIMEZONE
660U_HAVE_TIMEZONE
661U_TZNAME
662U_HAVE_TZNAME
663U_TZSET
664U_HAVE_TZSET
665U_HAVE_POPEN
729e4ab9
A
666U_HAVE_PLACEMENT_NEW
667U_OVERRIDE_CXX_ALLOCATION
729e4ab9
A
668U_NL_LANGINFO_CODESET
669U_HAVE_NL_LANGINFO_CODESET
670U_IS_BIG_ENDIAN
729e4ab9
A
671U_HAVE_DIRENT_H
672U_HAVE_INTTYPES_H
673GENCCODE_ASSEMBLY
674HAVE_MMAP
675LIB_THREAD
57a6839d 676U_HAVE_ATOMIC
729e4ab9 677ENABLE_RPATH
729e4ab9 678U_ENABLE_DYLOAD
2ca993e8
A
679U_HAVE_PLUGINS
680PLUGINS_TRUE
729e4ab9
A
681U_ENABLE_TRACING
682U_DISABLE_RENAMING
683AR
f3c0d7a5 684SED
729e4ab9 685RANLIB
729e4ab9
A
686U_DEFAULT_SHOW_DRAFT
687UCLN_NO_AUTO_CLEANUP
688ENABLE_STATIC
689ENABLE_SHARED
690LIB_M
691COMPILE_LINK_ENVVAR
692ARFLAGS
693EGREP
694GREP
695DOXYGEN
696cross_buildroot
697U_MAKE
698cross_compiling
699INSTALL_DATA
700INSTALL_SCRIPT
701INSTALL_PROGRAM
702CPP
b331163b
A
703ICULEHB_LIBS
704ICULEHB_CFLAGS
2ca993e8
A
705PKG_CONFIG_LIBDIR
706PKG_CONFIG_PATH
b331163b 707PKG_CONFIG
729e4ab9
A
708ac_ct_CXX
709CXXFLAGS
710CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714LDFLAGS
715CFLAGS
716CC
717ENABLE_RELEASE
718ENABLE_DEBUG
719CPPFLAGS
729e4ab9
A
720host_os
721host_vendor
722host_cpu
723host
724build_os
725build_vendor
726build_cpu
727build
728UNICODE_VERSION
729LIB_VERSION_MAJOR
730LIB_VERSION
731VERSION
732ICU_ECHO_T
733ICU_ECHO_C
734ICU_ECHO_N
735PACKAGE
736target_alias
737host_alias
738build_alias
739LIBS
740ECHO_T
741ECHO_N
742ECHO_C
743DEFS
744mandir
745localedir
746libdir
747psdir
748pdfdir
749dvidir
750htmldir
751infodir
752docdir
753oldincludedir
754includedir
755localstatedir
756sharedstatedir
757sysconfdir
758datadir
759datarootdir
760libexecdir
761sbindir
762bindir
763program_transform_name
764prefix
765exec_prefix
766PACKAGE_URL
767PACKAGE_BUGREPORT
768PACKAGE_STRING
769PACKAGE_VERSION
770PACKAGE_TARNAME
771PACKAGE_NAME
772PATH_SEPARATOR
773SHELL'
73c04bcf 774ac_subst_files=''
729e4ab9
A
775ac_user_opts='
776enable_option_checking
777enable_debug
778enable_release
779with_cross_build
780enable_strict
781enable_64bit_libs
782with_library_bits
783enable_shared
784enable_static
785enable_auto_cleanup
786enable_draft
787enable_renaming
788enable_tracing
2ca993e8 789enable_plugins
729e4ab9
A
790enable_dyload
791enable_rpath
729e4ab9 792enable_weak_threads
729e4ab9
A
793enable_extras
794enable_icuio
b331163b 795enable_layoutex
f3c0d7a5 796enable_layout
57a6839d 797enable_tools
729e4ab9
A
798with_data_packaging
799with_library_suffix
800enable_tests
801enable_samples
802'
803 ac_precious_vars='build_alias
804host_alias
805target_alias
806CC
807CFLAGS
808LDFLAGS
809LIBS
810CPPFLAGS
811CXX
812CXXFLAGS
813CCC
b331163b 814PKG_CONFIG
2ca993e8
A
815PKG_CONFIG_PATH
816PKG_CONFIG_LIBDIR
b331163b
A
817ICULEHB_CFLAGS
818ICULEHB_LIBS
729e4ab9
A
819CPP'
820
b75a7d8f
A
821
822# Initialize some variables set by options.
73c04bcf
A
823ac_init_help=
824ac_init_version=false
729e4ab9
A
825ac_unrecognized_opts=
826ac_unrecognized_sep=
b75a7d8f
A
827# The variables have the same names as the options, with
828# dashes changed to underlines.
73c04bcf 829cache_file=/dev/null
b75a7d8f 830exec_prefix=NONE
b75a7d8f 831no_create=
b75a7d8f
A
832no_recursion=
833prefix=NONE
834program_prefix=NONE
835program_suffix=NONE
836program_transform_name=s,x,x,
837silent=
838site=
839srcdir=
b75a7d8f
A
840verbose=
841x_includes=NONE
842x_libraries=NONE
73c04bcf
A
843
844# Installation directory options.
845# These are left unexpanded so users can "make install exec_prefix=/foo"
846# and all the variables that are supposed to be based on exec_prefix
847# by default will actually change.
848# Use braces instead of parens because sh, perl, etc. also accept them.
729e4ab9 849# (The list follows the same order as the GNU Coding Standards.)
b75a7d8f
A
850bindir='${exec_prefix}/bin'
851sbindir='${exec_prefix}/sbin'
852libexecdir='${exec_prefix}/libexec'
46f4442e
A
853datarootdir='${prefix}/share'
854datadir='${datarootdir}'
b75a7d8f
A
855sysconfdir='${prefix}/etc'
856sharedstatedir='${prefix}/com'
857localstatedir='${prefix}/var'
b75a7d8f
A
858includedir='${prefix}/include'
859oldincludedir='/usr/include'
b331163b 860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
729e4ab9
A
861infodir='${datarootdir}/info'
862htmldir='${docdir}'
863dvidir='${docdir}'
864pdfdir='${docdir}'
865psdir='${docdir}'
866libdir='${exec_prefix}/lib'
867localedir='${datarootdir}/locale'
868mandir='${datarootdir}/man'
b75a7d8f 869
b75a7d8f 870ac_prev=
729e4ab9 871ac_dashdash=
b75a7d8f
A
872for ac_option
873do
b75a7d8f
A
874 # If the previous option needs an argument, assign it.
875 if test -n "$ac_prev"; then
729e4ab9 876 eval $ac_prev=\$ac_option
b75a7d8f
A
877 ac_prev=
878 continue
879 fi
880
729e4ab9
A
881 case $ac_option in
882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
883 *=) ac_optarg= ;;
884 *) ac_optarg=yes ;;
885 esac
b75a7d8f
A
886
887 # Accept the important Cygnus configure options, so we can diagnose typos.
888
729e4ab9
A
889 case $ac_dashdash$ac_option in
890 --)
891 ac_dashdash=yes ;;
b75a7d8f
A
892
893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
894 ac_prev=bindir ;;
895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
73c04bcf 896 bindir=$ac_optarg ;;
b75a7d8f
A
897
898 -build | --build | --buil | --bui | --bu)
73c04bcf 899 ac_prev=build_alias ;;
b75a7d8f 900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
73c04bcf 901 build_alias=$ac_optarg ;;
b75a7d8f
A
902
903 -cache-file | --cache-file | --cache-fil | --cache-fi \
904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
905 ac_prev=cache_file ;;
906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
73c04bcf
A
908 cache_file=$ac_optarg ;;
909
910 --config-cache | -C)
911 cache_file=config.cache ;;
729e4ab9
A
912
913 -datadir | --datadir | --datadi | --datad)
914 ac_prev=datadir ;;
915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
916 datadir=$ac_optarg ;;
917
46f4442e
A
918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
919 | --dataroo | --dataro | --datar)
920 ac_prev=datarootdir ;;
729e4ab9 921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
46f4442e
A
922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
923 datarootdir=$ac_optarg ;;
729e4ab9 924
b75a7d8f 925 -disable-* | --disable-*)
729e4ab9 926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
b75a7d8f 927 # Reject names that are not valid shell variable names.
729e4ab9
A
928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
929 as_fn_error $? "invalid feature name: $ac_useropt"
930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934"enable_$ac_useropt"
935"*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=no ;;
940
941 -docdir | --docdir | --docdi | --doc | --do)
942 ac_prev=docdir ;;
943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
944 docdir=$ac_optarg ;;
945
946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
947 ac_prev=dvidir ;;
948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
949 dvidir=$ac_optarg ;;
b75a7d8f
A
950
951 -enable-* | --enable-*)
729e4ab9 952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
b75a7d8f 953 # Reject names that are not valid shell variable names.
729e4ab9
A
954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
955 as_fn_error $? "invalid feature name: $ac_useropt"
956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
b75a7d8f 964 esac
729e4ab9 965 eval enable_$ac_useropt=\$ac_optarg ;;
b75a7d8f
A
966
967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
73c04bcf 974 exec_prefix=$ac_optarg ;;
b75a7d8f
A
975
976 -gas | --gas | --ga | --g)
977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
979
73c04bcf
A
980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
b75a7d8f
A
986
987 -host | --host | --hos | --ho)
73c04bcf 988 ac_prev=host_alias ;;
b75a7d8f 989 -host=* | --host=* | --hos=* | --ho=*)
73c04bcf 990 host_alias=$ac_optarg ;;
b75a7d8f 991
729e4ab9
A
992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
b75a7d8f
A
998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
73c04bcf 1003 includedir=$ac_optarg ;;
b75a7d8f
A
1004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
73c04bcf 1008 infodir=$ac_optarg ;;
b75a7d8f
A
1009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
73c04bcf 1013 libdir=$ac_optarg ;;
b75a7d8f
A
1014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
73c04bcf 1020 libexecdir=$ac_optarg ;;
b75a7d8f 1021
729e4ab9
A
1022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
b75a7d8f 1027 -localstatedir | --localstatedir | --localstatedi | --localstated \
729e4ab9 1028 | --localstate | --localstat | --localsta | --localst | --locals)
b75a7d8f
A
1029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
729e4ab9 1031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
73c04bcf 1032 localstatedir=$ac_optarg ;;
b75a7d8f
A
1033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
73c04bcf 1037 mandir=$ac_optarg ;;
b75a7d8f
A
1038
1039 -nfp | --nfp | --nf)
1040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
1042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
73c04bcf 1044 | --no-cr | --no-c | -n)
b75a7d8f
A
1045 no_create=yes ;;
1046
1047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
1050
1051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
73c04bcf 1058 oldincludedir=$ac_optarg ;;
b75a7d8f
A
1059
1060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
73c04bcf 1063 prefix=$ac_optarg ;;
b75a7d8f
A
1064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
73c04bcf 1070 program_prefix=$ac_optarg ;;
b75a7d8f
A
1071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
73c04bcf 1077 program_suffix=$ac_optarg ;;
b75a7d8f
A
1078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
1087 -program-transform-name=* | --program-transform-name=* \
1088 | --program-transform-nam=* | --program-transform-na=* \
1089 | --program-transform-n=* | --program-transform-=* \
1090 | --program-transform=* | --program-transfor=* \
1091 | --program-transfo=* | --program-transf=* \
1092 | --program-trans=* | --program-tran=* \
1093 | --progr-tra=* | --program-tr=* | --program-t=*)
73c04bcf 1094 program_transform_name=$ac_optarg ;;
b75a7d8f 1095
729e4ab9
A
1096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
b75a7d8f
A
1106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
1110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
73c04bcf 1114 sbindir=$ac_optarg ;;
b75a7d8f
A
1115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
73c04bcf 1125 sharedstatedir=$ac_optarg ;;
b75a7d8f
A
1126
1127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
73c04bcf 1130 site=$ac_optarg ;;
b75a7d8f
A
1131
1132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
73c04bcf 1135 srcdir=$ac_optarg ;;
b75a7d8f
A
1136
1137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
73c04bcf 1142 sysconfdir=$ac_optarg ;;
b75a7d8f
A
1143
1144 -target | --target | --targe | --targ | --tar | --ta | --t)
73c04bcf 1145 ac_prev=target_alias ;;
b75a7d8f 1146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
73c04bcf 1147 target_alias=$ac_optarg ;;
b75a7d8f
A
1148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
73c04bcf
A
1152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
b75a7d8f
A
1154
1155 -with-* | --with-*)
729e4ab9 1156 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
b75a7d8f 1157 # Reject names that are not valid shell variable names.
729e4ab9
A
1158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159 as_fn_error $? "invalid package name: $ac_useropt"
1160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
b75a7d8f 1168 esac
729e4ab9 1169 eval with_$ac_useropt=\$ac_optarg ;;
b75a7d8f
A
1170
1171 -without-* | --without-*)
729e4ab9 1172 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
b75a7d8f 1173 # Reject names that are not valid shell variable names.
729e4ab9
A
1174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1175 as_fn_error $? "invalid package name: $ac_useropt"
1176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=no ;;
b75a7d8f
A
1186
1187 --x)
1188 # Obsolete; use --with-x.
1189 with_x=yes ;;
1190
1191 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1192 | --x-incl | --x-inc | --x-in | --x-i)
1193 ac_prev=x_includes ;;
1194 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1195 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
73c04bcf 1196 x_includes=$ac_optarg ;;
b75a7d8f
A
1197
1198 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1199 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1200 ac_prev=x_libraries ;;
1201 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1202 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
73c04bcf 1203 x_libraries=$ac_optarg ;;
b75a7d8f 1204
729e4ab9
A
1205 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1206Try \`$0 --help' for more information"
b75a7d8f
A
1207 ;;
1208
73c04bcf
A
1209 *=*)
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names.
729e4ab9
A
1212 case $ac_envvar in #(
1213 '' | [0-9]* | *[!_$as_cr_alnum]* )
1214 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1215 esac
1216 eval $ac_envvar=\$ac_optarg
73c04bcf
A
1217 export $ac_envvar ;;
1218
b75a7d8f 1219 *)
73c04bcf 1220 # FIXME: should be removed in autoconf 3.0.
729e4ab9 1221 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
73c04bcf 1222 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
729e4ab9 1223 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
4388f060 1224 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
b75a7d8f
A
1225 ;;
1226
1227 esac
1228done
1229
1230if test -n "$ac_prev"; then
73c04bcf 1231 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
729e4ab9 1232 as_fn_error $? "missing argument to $ac_option"
b75a7d8f 1233fi
b75a7d8f 1234
729e4ab9
A
1235if test -n "$ac_unrecognized_opts"; then
1236 case $enable_option_checking in
1237 no) ;;
1238 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1239 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
73c04bcf 1240 esac
729e4ab9 1241fi
b75a7d8f 1242
729e4ab9
A
1243# Check all directory arguments for consistency.
1244for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1245 datadir sysconfdir sharedstatedir localstatedir includedir \
1246 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1247 libdir localedir mandir
b75a7d8f 1248do
729e4ab9
A
1249 eval ac_val=\$$ac_var
1250 # Remove trailing slashes.
1251 case $ac_val in
1252 */ )
1253 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1254 eval $ac_var=\$ac_val;;
1255 esac
1256 # Be sure to have absolute directory names.
73c04bcf 1257 case $ac_val in
729e4ab9
A
1258 [\\/$]* | ?:[\\/]* ) continue;;
1259 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
b75a7d8f 1260 esac
729e4ab9 1261 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
b75a7d8f
A
1262done
1263
73c04bcf
A
1264# There might be people who depend on the old broken behavior: `$host'
1265# used to hold the argument of --host etc.
1266# FIXME: To remove some day.
1267build=$build_alias
1268host=$host_alias
1269target=$target_alias
1270
1271# FIXME: To remove some day.
1272if test "x$host_alias" != x; then
1273 if test "x$build_alias" = x; then
1274 cross_compiling=maybe
73c04bcf
A
1275 elif test "x$build_alias" != "x$host_alias"; then
1276 cross_compiling=yes
1277 fi
1278fi
b75a7d8f 1279
73c04bcf
A
1280ac_tool_prefix=
1281test -n "$host_alias" && ac_tool_prefix=$host_alias-
1282
1283test "$silent" = yes && exec 6>/dev/null
b75a7d8f 1284
b75a7d8f 1285
729e4ab9
A
1286ac_pwd=`pwd` && test -n "$ac_pwd" &&
1287ac_ls_di=`ls -di .` &&
1288ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1289 as_fn_error $? "working directory cannot be determined"
1290test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1291 as_fn_error $? "pwd does not report name of working directory"
1292
1293
b75a7d8f
A
1294# Find the source files, if location was not specified.
1295if test -z "$srcdir"; then
1296 ac_srcdir_defaulted=yes
729e4ab9
A
1297 # Try the directory containing this script, then the parent directory.
1298 ac_confdir=`$as_dirname -- "$as_myself" ||
1299$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1300 X"$as_myself" : 'X\(//\)[^/]' \| \
1301 X"$as_myself" : 'X\(//\)$' \| \
1302 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1303$as_echo X"$as_myself" |
1304 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)[^/].*/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\/\)$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\).*/{
1317 s//\1/
1318 q
1319 }
1320 s/.*/./; q'`
b75a7d8f 1321 srcdir=$ac_confdir
729e4ab9 1322 if test ! -r "$srcdir/$ac_unique_file"; then
b75a7d8f
A
1323 srcdir=..
1324 fi
1325else
1326 ac_srcdir_defaulted=no
1327fi
729e4ab9
A
1328if test ! -r "$srcdir/$ac_unique_file"; then
1329 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1330 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1331fi
1332ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1333ac_abs_confdir=`(
1334 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1335 pwd)`
1336# When building in place, set srcdir=.
1337if test "$ac_abs_confdir" = "$ac_pwd"; then
1338 srcdir=.
1339fi
1340# Remove unnecessary trailing slashes from srcdir.
1341# Double slashes in file names in object file debugging info
1342# mess up M-x gdb in Emacs.
1343case $srcdir in
1344*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1345esac
1346for ac_var in $ac_precious_vars; do
1347 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_env_${ac_var}_value=\$${ac_var}
1349 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1351done
b75a7d8f 1352
73c04bcf
A
1353#
1354# Report the --help message.
1355#
1356if test "$ac_init_help" = "long"; then
1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF
f3c0d7a5 1360\`configure' configures ICU 59.1 to adapt to many kinds of systems.
73c04bcf
A
1361
1362Usage: $0 [OPTION]... [VAR=VALUE]...
1363
1364To assign environment variables (e.g., CC, CFLAGS...), specify them as
1365VAR=VALUE. See below for descriptions of some of the useful variables.
1366
1367Defaults for the options are specified in brackets.
1368
1369Configuration:
1370 -h, --help display this help and exit
1371 --help=short display options specific to this package
1372 --help=recursive display the short help of all the included packages
1373 -V, --version display version information and exit
729e4ab9 1374 -q, --quiet, --silent do not print \`checking ...' messages
73c04bcf
A
1375 --cache-file=FILE cache test results in FILE [disabled]
1376 -C, --config-cache alias for \`--cache-file=config.cache'
1377 -n, --no-create do not create output files
1378 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1379
73c04bcf
A
1380Installation directories:
1381 --prefix=PREFIX install architecture-independent files in PREFIX
729e4ab9 1382 [$ac_default_prefix]
73c04bcf 1383 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
729e4ab9 1384 [PREFIX]
73c04bcf
A
1385
1386By default, \`make install' will install all the files in
1387\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1388an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1389for instance \`--prefix=\$HOME'.
1390
1391For better control, use the options below.
1392
1393Fine tuning of the installation directories:
729e4ab9
A
1394 --bindir=DIR user executables [EPREFIX/bin]
1395 --sbindir=DIR system admin executables [EPREFIX/sbin]
1396 --libexecdir=DIR program executables [EPREFIX/libexec]
1397 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1398 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1399 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1400 --libdir=DIR object code libraries [EPREFIX/lib]
1401 --includedir=DIR C header files [PREFIX/include]
1402 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1403 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1404 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1405 --infodir=DIR info documentation [DATAROOTDIR/info]
1406 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1407 --mandir=DIR man documentation [DATAROOTDIR/man]
b331163b
A
1408 --docdir=DIR documentation root [DATAROOTDIR/doc/International
1409 Components for Unicode]
729e4ab9
A
1410 --htmldir=DIR html documentation [DOCDIR]
1411 --dvidir=DIR dvi documentation [DOCDIR]
1412 --pdfdir=DIR pdf documentation [DOCDIR]
1413 --psdir=DIR ps documentation [DOCDIR]
73c04bcf
A
1414_ACEOF
1415
1416 cat <<\_ACEOF
1417
1418System types:
1419 --build=BUILD configure for building on BUILD [guessed]
1420 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1421_ACEOF
1422fi
1423
1424if test -n "$ac_init_help"; then
b331163b 1425 case $ac_init_help in
f3c0d7a5 1426 short | recursive ) echo "Configuration of ICU 59.1:";;
b331163b 1427 esac
73c04bcf
A
1428 cat <<\_ACEOF
1429
1430Optional Features:
729e4ab9 1431 --disable-option-checking ignore unrecognized --enable/--with options
73c04bcf
A
1432 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1433 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
4388f060 1434 --enable-debug build debug libraries and enable the U_DEBUG define default=no
73c04bcf 1435 --enable-release build release libraries default=yes
729e4ab9
A
1436 --enable-strict compile with strict compiler options default=yes
1437 --enable-64bit-libs (deprecated, use --with-library-bits) build 64-bit libraries default= platform default
1438 --enable-shared build shared libraries default=yes
1439 --enable-static build static libraries default=no
1440 --enable-auto-cleanup enable auto cleanup of libraries default=no
1441 --enable-draft enable draft APIs (and internal APIs) default=yes
73c04bcf 1442 --enable-renaming add a version suffix to symbols default=yes
46f4442e 1443 --enable-tracing enable function and data tracing default=no
2ca993e8 1444 --enable-plugins enable plugins default=no
729e4ab9 1445 --disable-dyload disable dynamic loading default=no
73c04bcf 1446 --enable-rpath use rpath when linking default is only if necessary
46f4442e 1447 --enable-weak-threads weakly reference the threading library default=no
73c04bcf
A
1448 --enable-extras build ICU extras default=yes
1449 --enable-icuio build ICU's icuio library default=yes
f3c0d7a5
A
1450 --enable-layoutex build ICU's Paragraph Layout library default=yes.
1451 icu-le-hb must be installed via pkg-config. See http://harfbuzz.org
1452
57a6839d 1453 --enable-tools build ICU's tools default=yes
73c04bcf
A
1454 --enable-tests build ICU tests default=yes
1455 --enable-samples build ICU samples default=yes
46f4442e
A
1456
1457Additionally, the variable FORCE_LIBS may be set before calling configure.
1458If set, it will REPLACE any automatic list of libraries.
73c04bcf
A
1459
1460Optional Packages:
1461 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1462 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
729e4ab9
A
1463 --with-cross-build=dir specify an absolute path to the build directory of an ICU built for the current platform default=no cross dir
1464 --with-library-bits=bits specify how many bits to use for the library (32, 64, 64else32, nochange) default=nochange
b331163b
A
1465 --with-data-packaging specify how to package ICU data. Possible values:
1466 files raw files (.res, etc)
1467 archive build a single icudtXX.dat file
1468 library shared library (.dll/.so/etc.)
1469 static static library (.a/.lib/etc.)
1470 auto build shared if possible (default)
1471 See http://userguide.icu-project.org/icudata for more info.
73c04bcf
A
1472 --with-library-suffix=suffix tag a suffix to the library names default=
1473
1474Some influential environment variables:
1475 CC C compiler command
1476 CFLAGS C compiler flags
1477 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1478 nonstandard directory <lib dir>
729e4ab9
A
1479 LIBS libraries to pass to the linker, e.g. -l<library>
1480 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1481 you have headers in a nonstandard directory <include dir>
73c04bcf
A
1482 CXX C++ compiler command
1483 CXXFLAGS C++ compiler flags
b331163b 1484 PKG_CONFIG path to pkg-config utility
2ca993e8
A
1485 PKG_CONFIG_PATH
1486 directories to add to pkg-config's search path
1487 PKG_CONFIG_LIBDIR
1488 path overriding pkg-config's built-in search path
b331163b
A
1489 ICULEHB_CFLAGS
1490 C compiler flags for ICULEHB, overriding pkg-config
1491 ICULEHB_LIBS
1492 linker flags for ICULEHB, overriding pkg-config
73c04bcf
A
1493 CPP C preprocessor
1494
1495Use these variables to override the choices made by `configure' or to help
1496it to find libraries and programs with nonstandard names/locations.
1497
b331163b
A
1498Report bugs to <http://icu-project.org/bugs>.
1499ICU home page: <http://icu-project.org>.
73c04bcf 1500_ACEOF
729e4ab9 1501ac_status=$?
73c04bcf
A
1502fi
1503
1504if test "$ac_init_help" = "recursive"; then
1505 # If there are subdirs, report their specific --help.
73c04bcf 1506 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
729e4ab9
A
1507 test -d "$ac_dir" ||
1508 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1509 continue
73c04bcf
A
1510 ac_builddir=.
1511
729e4ab9
A
1512case "$ac_dir" in
1513.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1514*)
1515 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1516 # A ".." for each directory in $ac_dir_suffix.
1517 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1518 case $ac_top_builddir_sub in
1519 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1520 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1521 esac ;;
1522esac
1523ac_abs_top_builddir=$ac_pwd
1524ac_abs_builddir=$ac_pwd$ac_dir_suffix
1525# for backward compatibility:
1526ac_top_builddir=$ac_top_build_prefix
73c04bcf
A
1527
1528case $srcdir in
729e4ab9 1529 .) # We are building in place.
73c04bcf 1530 ac_srcdir=.
729e4ab9
A
1531 ac_top_srcdir=$ac_top_builddir_sub
1532 ac_abs_top_srcdir=$ac_pwd ;;
1533 [\\/]* | ?:[\\/]* ) # Absolute name.
73c04bcf 1534 ac_srcdir=$srcdir$ac_dir_suffix;
729e4ab9
A
1535 ac_top_srcdir=$srcdir
1536 ac_abs_top_srcdir=$srcdir ;;
1537 *) # Relative name.
1538 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1539 ac_top_srcdir=$ac_top_build_prefix$srcdir
1540 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
73c04bcf 1541esac
729e4ab9
A
1542ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1543
1544 cd "$ac_dir" || { ac_status=$?; continue; }
1545 # Check for guested configure.
1546 if test -f "$ac_srcdir/configure.gnu"; then
1547 echo &&
1548 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1549 elif test -f "$ac_srcdir/configure"; then
1550 echo &&
1551 $SHELL "$ac_srcdir/configure" --help=recursive
73c04bcf 1552 else
729e4ab9
A
1553 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1554 fi || ac_status=$?
1555 cd "$ac_pwd" || { ac_status=$?; break; }
73c04bcf
A
1556 done
1557fi
1558
729e4ab9 1559test -n "$ac_init_help" && exit $ac_status
73c04bcf
A
1560if $ac_init_version; then
1561 cat <<\_ACEOF
f3c0d7a5 1562ICU configure 59.1
b331163b 1563generated by GNU Autoconf 2.69
73c04bcf 1564
b331163b 1565Copyright (C) 2012 Free Software Foundation, Inc.
73c04bcf
A
1566This configure script is free software; the Free Software Foundation
1567gives unlimited permission to copy, distribute and modify it.
729e4ab9 1568
f3c0d7a5 1569 Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html
73c04bcf 1570_ACEOF
729e4ab9 1571 exit
73c04bcf 1572fi
73c04bcf 1573
729e4ab9
A
1574## ------------------------ ##
1575## Autoconf initialization. ##
1576## ------------------------ ##
73c04bcf 1577
729e4ab9
A
1578# ac_fn_c_try_compile LINENO
1579# --------------------------
1580# Try to compile conftest.$ac_ext, and return whether this succeeded.
1581ac_fn_c_try_compile ()
1582{
1583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1584 rm -f conftest.$ac_objext
1585 if { { ac_try="$ac_compile"
1586case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_compile") 2>conftest.err
1593 ac_status=$?
1594 if test -s conftest.err; then
1595 grep -v '^ *+' conftest.err >conftest.er1
1596 cat conftest.er1 >&5
1597 mv -f conftest.er1 conftest.err
1598 fi
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; } && {
1601 test -z "$ac_c_werror_flag" ||
1602 test ! -s conftest.err
1603 } && test -s conftest.$ac_objext; then :
1604 ac_retval=0
1605else
1606 $as_echo "$as_me: failed program was:" >&5
1607sed 's/^/| /' conftest.$ac_ext >&5
73c04bcf 1608
729e4ab9
A
1609 ac_retval=1
1610fi
4388f060 1611 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1612 as_fn_set_status $ac_retval
1613
1614} # ac_fn_c_try_compile
1615
1616# ac_fn_cxx_try_compile LINENO
1617# ----------------------------
1618# Try to compile conftest.$ac_ext, and return whether this succeeded.
1619ac_fn_cxx_try_compile ()
73c04bcf 1620{
729e4ab9
A
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 rm -f conftest.$ac_objext
1623 if { { ac_try="$ac_compile"
1624case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627esac
1628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629$as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_compile") 2>conftest.err
1631 ac_status=$?
1632 if test -s conftest.err; then
1633 grep -v '^ *+' conftest.err >conftest.er1
1634 cat conftest.er1 >&5
1635 mv -f conftest.er1 conftest.err
1636 fi
1637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638 test $ac_status = 0; } && {
1639 test -z "$ac_cxx_werror_flag" ||
1640 test ! -s conftest.err
1641 } && test -s conftest.$ac_objext; then :
1642 ac_retval=0
1643else
1644 $as_echo "$as_me: failed program was:" >&5
1645sed 's/^/| /' conftest.$ac_ext >&5
73c04bcf 1646
729e4ab9
A
1647 ac_retval=1
1648fi
4388f060 1649 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9 1650 as_fn_set_status $ac_retval
73c04bcf 1651
729e4ab9 1652} # ac_fn_cxx_try_compile
73c04bcf 1653
729e4ab9
A
1654# ac_fn_c_try_cpp LINENO
1655# ----------------------
1656# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1657ac_fn_c_try_cpp ()
1658{
1659 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1660 if { { ac_try="$ac_cpp conftest.$ac_ext"
1661case "(($ac_try" in
1662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1663 *) ac_try_echo=$ac_try;;
1664esac
1665eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1666$as_echo "$ac_try_echo"; } >&5
1667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1668 ac_status=$?
1669 if test -s conftest.err; then
1670 grep -v '^ *+' conftest.err >conftest.er1
1671 cat conftest.er1 >&5
1672 mv -f conftest.er1 conftest.err
1673 fi
1674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1675 test $ac_status = 0; } > conftest.i && {
1676 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1677 test ! -s conftest.err
1678 }; then :
1679 ac_retval=0
1680else
1681 $as_echo "$as_me: failed program was:" >&5
1682sed 's/^/| /' conftest.$ac_ext >&5
1683
1684 ac_retval=1
1685fi
4388f060 1686 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1687 as_fn_set_status $ac_retval
1688
1689} # ac_fn_c_try_cpp
1690
1691# ac_fn_cxx_try_link LINENO
1692# -------------------------
1693# Try to link conftest.$ac_ext, and return whether this succeeded.
1694ac_fn_cxx_try_link ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 rm -f conftest.$ac_objext conftest$ac_exeext
1698 if { { ac_try="$ac_link"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_link") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1711 fi
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; } && {
1714 test -z "$ac_cxx_werror_flag" ||
1715 test ! -s conftest.err
1716 } && test -s conftest$ac_exeext && {
1717 test "$cross_compiling" = yes ||
b331163b 1718 test -x conftest$ac_exeext
729e4ab9
A
1719 }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=1
1726fi
1727 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1728 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1729 # interfere with the next link command; also delete a directory that is
1730 # left behind by Apple's compiler. We do this before executing the actions.
1731 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4388f060 1732 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1733 as_fn_set_status $ac_retval
1734
1735} # ac_fn_cxx_try_link
1736
1737# ac_fn_c_try_run LINENO
1738# ----------------------
1739# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1740# that executables *can* be run.
1741ac_fn_c_try_run ()
1742{
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if { { ac_try="$ac_link"
1745case "(($ac_try" in
1746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1747 *) ac_try_echo=$ac_try;;
1748esac
1749eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1750$as_echo "$ac_try_echo"; } >&5
1751 (eval "$ac_link") 2>&5
1752 ac_status=$?
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1755 { { case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_try") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; }; }; then :
1765 ac_retval=0
1766else
1767 $as_echo "$as_me: program exited with status $ac_status" >&5
1768 $as_echo "$as_me: failed program was:" >&5
1769sed 's/^/| /' conftest.$ac_ext >&5
1770
1771 ac_retval=$ac_status
1772fi
1773 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4388f060 1774 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1775 as_fn_set_status $ac_retval
1776
1777} # ac_fn_c_try_run
1778
1779# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1780# --------------------------------------------
1781# Tries to find the compile-time value of EXPR in a program that includes
1782# INCLUDES, setting VAR accordingly. Returns whether the value could be
1783# computed
1784ac_fn_c_compute_int ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 if test "$cross_compiling" = yes; then
1788 # Depending upon the size, compute the lo and hi bounds.
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792int
1793main ()
1794{
1795static int test_array [1 - 2 * !(($2) >= 0)];
b331163b
A
1796test_array [0] = 0;
1797return test_array [0];
729e4ab9
A
1798
1799 ;
1800 return 0;
1801}
1802_ACEOF
1803if ac_fn_c_try_compile "$LINENO"; then :
1804 ac_lo=0 ac_mid=0
1805 while :; do
1806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808$4
1809int
1810main ()
1811{
1812static int test_array [1 - 2 * !(($2) <= $ac_mid)];
b331163b
A
1813test_array [0] = 0;
1814return test_array [0];
729e4ab9
A
1815
1816 ;
1817 return 0;
1818}
1819_ACEOF
1820if ac_fn_c_try_compile "$LINENO"; then :
1821 ac_hi=$ac_mid; break
1822else
1823 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1824 if test $ac_lo -le $ac_mid; then
1825 ac_lo= ac_hi=
1826 break
1827 fi
1828 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831 done
1832else
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839static int test_array [1 - 2 * !(($2) < 0)];
b331163b
A
1840test_array [0] = 0;
1841return test_array [0];
729e4ab9
A
1842
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 ac_hi=-1 ac_mid=-1
1849 while :; do
1850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851/* end confdefs.h. */
1852$4
1853int
1854main ()
1855{
1856static int test_array [1 - 2 * !(($2) >= $ac_mid)];
b331163b
A
1857test_array [0] = 0;
1858return test_array [0];
729e4ab9
A
1859
1860 ;
1861 return 0;
1862}
1863_ACEOF
1864if ac_fn_c_try_compile "$LINENO"; then :
1865 ac_lo=$ac_mid; break
1866else
1867 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1868 if test $ac_mid -le $ac_hi; then
1869 ac_lo= ac_hi=
1870 break
1871 fi
1872 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875 done
1876else
1877 ac_lo= ac_hi=
1878fi
1879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1880fi
1881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1882# Binary search between lo and hi bounds.
1883while test "x$ac_lo" != "x$ac_hi"; do
1884 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886/* end confdefs.h. */
1887$4
1888int
1889main ()
1890{
1891static int test_array [1 - 2 * !(($2) <= $ac_mid)];
b331163b
A
1892test_array [0] = 0;
1893return test_array [0];
729e4ab9
A
1894
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 ac_hi=$ac_mid
1901else
1902 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905done
1906case $ac_lo in #((
1907?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1908'') ac_retval=1 ;;
1909esac
1910 else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914static long int longval () { return $2; }
1915static unsigned long int ulongval () { return $2; }
1916#include <stdio.h>
1917#include <stdlib.h>
1918int
1919main ()
1920{
1921
1922 FILE *f = fopen ("conftest.val", "w");
1923 if (! f)
1924 return 1;
1925 if (($2) < 0)
1926 {
1927 long int i = longval ();
1928 if (i != ($2))
1929 return 1;
1930 fprintf (f, "%ld", i);
1931 }
1932 else
1933 {
1934 unsigned long int i = ulongval ();
1935 if (i != ($2))
1936 return 1;
1937 fprintf (f, "%lu", i);
1938 }
1939 /* Do not output a trailing newline, as this causes \r\n confusion
1940 on some platforms. */
1941 return ferror (f) || fclose (f) != 0;
1942
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_run "$LINENO"; then :
1948 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1949else
1950 ac_retval=1
1951fi
1952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1953 conftest.$ac_objext conftest.beam conftest.$ac_ext
1954rm -f conftest.val
1955
1956 fi
4388f060 1957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1958 as_fn_set_status $ac_retval
1959
1960} # ac_fn_c_compute_int
1961
1962# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1963# -------------------------------------------------------
1964# Tests whether HEADER exists and can be compiled using the include files in
1965# INCLUDES, setting the cache variable VAR accordingly.
1966ac_fn_c_check_header_compile ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1970$as_echo_n "checking for $2... " >&6; }
4388f060 1971if eval \${$3+:} false; then :
729e4ab9
A
1972 $as_echo_n "(cached) " >&6
1973else
1974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1975/* end confdefs.h. */
1976$4
1977#include <$2>
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 eval "$3=yes"
1981else
1982 eval "$3=no"
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
4388f060 1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
1990
1991} # ac_fn_c_check_header_compile
1992
1993# ac_fn_c_try_link LINENO
1994# -----------------------
1995# Try to link conftest.$ac_ext, and return whether this succeeded.
1996ac_fn_c_try_link ()
1997{
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 rm -f conftest.$ac_objext conftest$ac_exeext
2000 if { { ac_try="$ac_link"
2001case "(($ac_try" in
2002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2003 *) ac_try_echo=$ac_try;;
2004esac
2005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2006$as_echo "$ac_try_echo"; } >&5
2007 (eval "$ac_link") 2>conftest.err
2008 ac_status=$?
2009 if test -s conftest.err; then
2010 grep -v '^ *+' conftest.err >conftest.er1
2011 cat conftest.er1 >&5
2012 mv -f conftest.er1 conftest.err
2013 fi
2014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2015 test $ac_status = 0; } && {
2016 test -z "$ac_c_werror_flag" ||
2017 test ! -s conftest.err
2018 } && test -s conftest$ac_exeext && {
2019 test "$cross_compiling" = yes ||
b331163b 2020 test -x conftest$ac_exeext
729e4ab9
A
2021 }; then :
2022 ac_retval=0
2023else
2024 $as_echo "$as_me: failed program was:" >&5
2025sed 's/^/| /' conftest.$ac_ext >&5
2026
2027 ac_retval=1
2028fi
2029 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2030 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2031 # interfere with the next link command; also delete a directory that is
2032 # left behind by Apple's compiler. We do this before executing the actions.
2033 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4388f060 2034 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
2035 as_fn_set_status $ac_retval
2036
2037} # ac_fn_c_try_link
2038
2039# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2040# -------------------------------------------------------
2041# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2042# the include files in INCLUDES and setting the cache variable VAR
2043# accordingly.
2044ac_fn_c_check_header_mongrel ()
2045{
2046 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4388f060 2047 if eval \${$3+:} false; then :
729e4ab9
A
2048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2049$as_echo_n "checking for $2... " >&6; }
4388f060 2050if eval \${$3+:} false; then :
729e4ab9
A
2051 $as_echo_n "(cached) " >&6
2052fi
2053eval ac_res=\$$3
2054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2055$as_echo "$ac_res" >&6; }
2056else
2057 # Is the header compilable?
2058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2059$as_echo_n "checking $2 usability... " >&6; }
2060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063#include <$2>
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_header_compiler=yes
2067else
2068 ac_header_compiler=no
2069fi
2070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2072$as_echo "$ac_header_compiler" >&6; }
2073
2074# Is the header present?
2075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2076$as_echo_n "checking $2 presence... " >&6; }
2077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079#include <$2>
2080_ACEOF
2081if ac_fn_c_try_cpp "$LINENO"; then :
2082 ac_header_preproc=yes
2083else
2084 ac_header_preproc=no
2085fi
2086rm -f conftest.err conftest.i conftest.$ac_ext
2087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2088$as_echo "$ac_header_preproc" >&6; }
2089
2090# So? What about this header?
2091case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2092 yes:no: )
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2094$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2096$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2097 ;;
2098 no:yes:* )
2099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2100$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2102$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2104$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2106$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2107 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2108$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
b331163b
A
2109( $as_echo "## ------------------------------------------ ##
2110## Report this to http://icu-project.org/bugs ##
2111## ------------------------------------------ ##"
2112 ) | sed "s/^/$as_me: WARNING: /" >&2
729e4ab9
A
2113 ;;
2114esac
2115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2116$as_echo_n "checking for $2... " >&6; }
4388f060 2117if eval \${$3+:} false; then :
729e4ab9
A
2118 $as_echo_n "(cached) " >&6
2119else
2120 eval "$3=\$ac_header_compiler"
2121fi
2122eval ac_res=\$$3
2123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124$as_echo "$ac_res" >&6; }
2125fi
4388f060 2126 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
2127
2128} # ac_fn_c_check_header_mongrel
2129
2130# ac_fn_c_check_func LINENO FUNC VAR
2131# ----------------------------------
2132# Tests whether FUNC exists, setting the cache variable VAR accordingly
2133ac_fn_c_check_func ()
2134{
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2137$as_echo_n "checking for $2... " >&6; }
4388f060 2138if eval \${$3+:} false; then :
729e4ab9
A
2139 $as_echo_n "(cached) " >&6
2140else
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2144 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2145#define $2 innocuous_$2
2146
2147/* System header to define __stub macros and hopefully few prototypes,
2148 which can conflict with char $2 (); below.
2149 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2150 <limits.h> exists even on freestanding compilers. */
2151
2152#ifdef __STDC__
2153# include <limits.h>
2154#else
2155# include <assert.h>
2156#endif
2157
2158#undef $2
2159
2160/* Override any GCC internal prototype to avoid an error.
2161 Use char because int might match the return type of a GCC
2162 builtin and then its argument prototype would still apply. */
2163#ifdef __cplusplus
2164extern "C"
2165#endif
2166char $2 ();
2167/* The GNU C library defines this for functions which it implements
2168 to always fail with ENOSYS. Some functions are actually named
2169 something starting with __ and the normal name is an alias. */
2170#if defined __stub_$2 || defined __stub___$2
2171choke me
2172#endif
2173
2174int
2175main ()
2176{
2177return $2 ();
2178 ;
2179 return 0;
2180}
2181_ACEOF
2182if ac_fn_c_try_link "$LINENO"; then :
2183 eval "$3=yes"
2184else
2185 eval "$3=no"
2186fi
2187rm -f core conftest.err conftest.$ac_objext \
2188 conftest$ac_exeext conftest.$ac_ext
2189fi
2190eval ac_res=\$$3
2191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2192$as_echo "$ac_res" >&6; }
4388f060 2193 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
2194
2195} # ac_fn_c_check_func
2196
2197# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2198# -------------------------------------------
2199# Tests whether TYPE exists after having included INCLUDES, setting cache
2200# variable VAR accordingly.
2201ac_fn_c_check_type ()
2202{
2203 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
4388f060 2206if eval \${$3+:} false; then :
729e4ab9
A
2207 $as_echo_n "(cached) " >&6
2208else
2209 eval "$3=no"
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213int
2214main ()
2215{
2216if (sizeof ($2))
2217 return 0;
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_compile "$LINENO"; then :
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226int
2227main ()
2228{
2229if (sizeof (($2)))
2230 return 0;
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_compile "$LINENO"; then :
2236
2237else
2238 eval "$3=yes"
2239fi
2240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241fi
2242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2243fi
2244eval ac_res=\$$3
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2246$as_echo "$ac_res" >&6; }
4388f060 2247 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
729e4ab9
A
2248
2249} # ac_fn_c_check_type
2250cat >config.log <<_ACEOF
2251This file contains any messages produced by compilers while
2252running configure, to aid debugging if configure makes a mistake.
2253
f3c0d7a5 2254It was created by ICU $as_me 59.1, which was
b331163b 2255generated by GNU Autoconf 2.69. Invocation command line was
729e4ab9
A
2256
2257 $ $0 $@
2258
2259_ACEOF
2260exec 5>>config.log
2261{
2262cat <<_ASUNAME
2263## --------- ##
2264## Platform. ##
2265## --------- ##
2266
2267hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2268uname -m = `(uname -m) 2>/dev/null || echo unknown`
2269uname -r = `(uname -r) 2>/dev/null || echo unknown`
2270uname -s = `(uname -s) 2>/dev/null || echo unknown`
2271uname -v = `(uname -v) 2>/dev/null || echo unknown`
2272
2273/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2274/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2275
2276/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2277/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2278/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2279/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
73c04bcf
A
2280/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2281/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2282/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2283
2284_ASUNAME
2285
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
729e4ab9
A
2291 $as_echo "PATH: $as_dir"
2292 done
2293IFS=$as_save_IFS
73c04bcf
A
2294
2295} >&5
2296
2297cat >&5 <<_ACEOF
2298
2299
2300## ----------- ##
2301## Core tests. ##
2302## ----------- ##
2303
2304_ACEOF
2305
2306
2307# Keep a trace of the command line.
2308# Strip out --no-create and --no-recursion so they do not pile up.
2309# Strip out --silent because we don't want to record it for future runs.
2310# Also quote any args containing shell meta-characters.
2311# Make two passes to allow for proper duplicate-argument suppression.
2312ac_configure_args=
2313ac_configure_args0=
2314ac_configure_args1=
73c04bcf
A
2315ac_must_keep_next=false
2316for ac_pass in 1 2
2317do
2318 for ac_arg
2319 do
2320 case $ac_arg in
2321 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2322 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2323 | -silent | --silent | --silen | --sile | --sil)
2324 continue ;;
729e4ab9
A
2325 *\'*)
2326 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
73c04bcf
A
2327 esac
2328 case $ac_pass in
729e4ab9 2329 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
73c04bcf 2330 2)
729e4ab9 2331 as_fn_append ac_configure_args1 " '$ac_arg'"
73c04bcf
A
2332 if test $ac_must_keep_next = true; then
2333 ac_must_keep_next=false # Got value, back to normal.
2334 else
2335 case $ac_arg in
2336 *=* | --config-cache | -C | -disable-* | --disable-* \
2337 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2338 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2339 | -with-* | --with-* | -without-* | --without-* | --x)
2340 case "$ac_configure_args0 " in
2341 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2342 esac
2343 ;;
2344 -* ) ac_must_keep_next=true ;;
2345 esac
2346 fi
729e4ab9 2347 as_fn_append ac_configure_args " '$ac_arg'"
73c04bcf
A
2348 ;;
2349 esac
2350 done
2351done
729e4ab9
A
2352{ ac_configure_args0=; unset ac_configure_args0;}
2353{ ac_configure_args1=; unset ac_configure_args1;}
73c04bcf
A
2354
2355# When interrupted or exit'd, cleanup temporary files, and complete
2356# config.log. We remove comments because anyway the quotes in there
2357# would cause problems or look ugly.
729e4ab9
A
2358# WARNING: Use '\'' to represent an apostrophe within the trap.
2359# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
73c04bcf
A
2360trap 'exit_status=$?
2361 # Save into config.log some information that might help in debugging.
2362 {
2363 echo
2364
729e4ab9 2365 $as_echo "## ---------------- ##
73c04bcf 2366## Cache variables. ##
729e4ab9 2367## ---------------- ##"
73c04bcf
A
2368 echo
2369 # The following way of writing the cache mishandles newlines in values,
729e4ab9
A
2370(
2371 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2372 eval ac_val=\$$ac_var
2373 case $ac_val in #(
2374 *${as_nl}*)
2375 case $ac_var in #(
2376 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2377$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2378 esac
2379 case $ac_var in #(
2380 _ | IFS | as_nl) ;; #(
2381 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2382 *) { eval $ac_var=; unset $ac_var;} ;;
2383 esac ;;
2384 esac
2385 done
73c04bcf 2386 (set) 2>&1 |
729e4ab9
A
2387 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2388 *${as_nl}ac_space=\ *)
73c04bcf 2389 sed -n \
729e4ab9
A
2390 "s/'\''/'\''\\\\'\'''\''/g;
2391 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2392 ;; #(
73c04bcf 2393 *)
729e4ab9 2394 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
73c04bcf 2395 ;;
729e4ab9
A
2396 esac |
2397 sort
2398)
73c04bcf
A
2399 echo
2400
729e4ab9 2401 $as_echo "## ----------------- ##
73c04bcf 2402## Output variables. ##
729e4ab9 2403## ----------------- ##"
73c04bcf
A
2404 echo
2405 for ac_var in $ac_subst_vars
2406 do
729e4ab9
A
2407 eval ac_val=\$$ac_var
2408 case $ac_val in
2409 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2410 esac
2411 $as_echo "$ac_var='\''$ac_val'\''"
73c04bcf
A
2412 done | sort
2413 echo
2414
2415 if test -n "$ac_subst_files"; then
729e4ab9
A
2416 $as_echo "## ------------------- ##
2417## File substitutions. ##
2418## ------------------- ##"
73c04bcf
A
2419 echo
2420 for ac_var in $ac_subst_files
2421 do
729e4ab9
A
2422 eval ac_val=\$$ac_var
2423 case $ac_val in
2424 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2425 esac
2426 $as_echo "$ac_var='\''$ac_val'\''"
73c04bcf
A
2427 done | sort
2428 echo
2429 fi
2430
2431 if test -s confdefs.h; then
729e4ab9 2432 $as_echo "## ----------- ##
73c04bcf 2433## confdefs.h. ##
729e4ab9 2434## ----------- ##"
73c04bcf 2435 echo
729e4ab9 2436 cat confdefs.h
73c04bcf
A
2437 echo
2438 fi
2439 test "$ac_signal" != 0 &&
729e4ab9
A
2440 $as_echo "$as_me: caught signal $ac_signal"
2441 $as_echo "$as_me: exit $exit_status"
73c04bcf 2442 } >&5
729e4ab9
A
2443 rm -f core *.core core.conftest.* &&
2444 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
73c04bcf 2445 exit $exit_status
729e4ab9 2446' 0
73c04bcf 2447for ac_signal in 1 2 13 15; do
729e4ab9 2448 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
73c04bcf
A
2449done
2450ac_signal=0
2451
2452# confdefs.h avoids OS command line length limits that DEFS can exceed.
729e4ab9
A
2453rm -f -r conftest* confdefs.h
2454
2455$as_echo "/* confdefs.h */" > confdefs.h
73c04bcf
A
2456
2457# Predefined preprocessor variables.
2458
2459cat >>confdefs.h <<_ACEOF
2460#define PACKAGE_NAME "$PACKAGE_NAME"
2461_ACEOF
2462
73c04bcf
A
2463cat >>confdefs.h <<_ACEOF
2464#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2465_ACEOF
2466
729e4ab9
A
2467cat >>confdefs.h <<_ACEOF
2468#define PACKAGE_VERSION "$PACKAGE_VERSION"
2469_ACEOF
73c04bcf 2470
729e4ab9
A
2471cat >>confdefs.h <<_ACEOF
2472#define PACKAGE_STRING "$PACKAGE_STRING"
2473_ACEOF
73c04bcf 2474
729e4ab9
A
2475cat >>confdefs.h <<_ACEOF
2476#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2477_ACEOF
73c04bcf 2478
729e4ab9
A
2479cat >>confdefs.h <<_ACEOF
2480#define PACKAGE_URL "$PACKAGE_URL"
2481_ACEOF
73c04bcf 2482
73c04bcf 2483
729e4ab9
A
2484# Let the site file select an alternate cache file if it wants to.
2485# Prefer an explicitly selected file to automatically selected ones.
2486ac_site_file1=NONE
2487ac_site_file2=NONE
2488if test -n "$CONFIG_SITE"; then
2489 # We do not want a PATH search for config.site.
2490 case $CONFIG_SITE in #((
2491 -*) ac_site_file1=./$CONFIG_SITE;;
2492 */*) ac_site_file1=$CONFIG_SITE;;
2493 *) ac_site_file1=./$CONFIG_SITE;;
2494 esac
2495elif test "x$prefix" != xNONE; then
2496 ac_site_file1=$prefix/share/config.site
2497 ac_site_file2=$prefix/etc/config.site
b75a7d8f 2498else
729e4ab9
A
2499 ac_site_file1=$ac_default_prefix/share/config.site
2500 ac_site_file2=$ac_default_prefix/etc/config.site
2501fi
2502for ac_site_file in "$ac_site_file1" "$ac_site_file2"
73c04bcf 2503do
729e4ab9
A
2504 test "x$ac_site_file" = xNONE && continue
2505 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2507$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2508 sed 's/^/| /' "$ac_site_file" >&5
2509 . "$ac_site_file" \
2510 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2512as_fn_error $? "failed to load site script $ac_site_file
2513See \`config.log' for more details" "$LINENO" 5; }
73c04bcf
A
2514 fi
2515done
73c04bcf 2516
729e4ab9
A
2517if test -r "$cache_file"; then
2518 # Some versions of bash will fail to source /dev/null (special files
2519 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2520 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2522$as_echo "$as_me: loading cache $cache_file" >&6;}
2523 case $cache_file in
2524 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2525 *) . "./$cache_file";;
2526 esac
b75a7d8f 2527 fi
b75a7d8f 2528else
729e4ab9
A
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2530$as_echo "$as_me: creating cache $cache_file" >&6;}
2531 >$cache_file
b75a7d8f
A
2532fi
2533
729e4ab9
A
2534# Check that the precious variables saved in the cache have kept the same
2535# value.
2536ac_cache_corrupted=false
2537for ac_var in $ac_precious_vars; do
2538 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2539 eval ac_new_set=\$ac_env_${ac_var}_set
2540 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2541 eval ac_new_val=\$ac_env_${ac_var}_value
2542 case $ac_old_set,$ac_new_set in
2543 set,)
2544 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2545$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2546 ac_cache_corrupted=: ;;
2547 ,set)
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2549$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2550 ac_cache_corrupted=: ;;
2551 ,);;
2552 *)
2553 if test "x$ac_old_val" != "x$ac_new_val"; then
2554 # differences in whitespace do not lead to failure.
2555 ac_old_val_w=`echo x $ac_old_val`
2556 ac_new_val_w=`echo x $ac_new_val`
2557 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2559$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2560 ac_cache_corrupted=:
2561 else
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2563$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2564 eval $ac_var=\$ac_old_val
2565 fi
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2567$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2568 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2569$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2570 fi;;
2571 esac
2572 # Pass precious variables to config.status.
2573 if test "$ac_new_set" = set; then
2574 case $ac_new_val in
2575 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2576 *) ac_arg=$ac_var=$ac_new_val ;;
2577 esac
2578 case " $ac_configure_args " in
2579 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2580 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2581 esac
73c04bcf
A
2582 fi
2583done
729e4ab9
A
2584if $ac_cache_corrupted; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2588$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2589 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
b75a7d8f 2590fi
729e4ab9
A
2591## -------------------- ##
2592## Main body of script. ##
2593## -------------------- ##
73c04bcf 2594
729e4ab9
A
2595ac_ext=c
2596ac_cpp='$CPP $CPPFLAGS'
2597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2599ac_compiler_gnu=$ac_cv_c_compiler_gnu
73c04bcf 2600
73c04bcf 2601
b75a7d8f 2602
4388f060 2603
73c04bcf 2604
73c04bcf 2605
729e4ab9 2606PACKAGE="icu"
73c04bcf 2607
73c04bcf 2608
729e4ab9
A
2609# Use custom echo test for newline option
2610# Current autoconf (2.65) gives incorrect echo newline option
2611# for icu-config
2612# This may be removed later - mow (June 17, 2010)
2613ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T=
2614case `/bin/sh -c "echo -n x"` in
2615-n*)
2616 case `/bin/sh -c "echo 'x\c'"` in
2617 *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character.
2618 *) ICU_ECHO_C='\c';;
2619 esac;;
2620*)
2621 ICU_ECHO_N='-n';;
2622esac
73c04bcf 2623
73c04bcf 2624
b75a7d8f 2625
73c04bcf 2626
729e4ab9
A
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU version numbers" >&5
2628$as_echo_n "checking for ICU version numbers... " >&6; }
73c04bcf 2629
729e4ab9
A
2630# Get the ICU version from uversion.h or other headers
2631geticuversion() {
2632 sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"
2633}
2634getuversion() {
2635 sed -n 's/^[ ]*#[ ]*define[ ]*U_UNICODE_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"
2636}
2637VERSION=`geticuversion $srcdir/common/unicode/uvernum.h`
2638if test x"$VERSION" = x; then
4388f060 2639 as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5
729e4ab9 2640fi
73c04bcf 2641
4388f060
A
2642#TODO: IcuBug:8502
2643#if test "$VERSION" != "$PACKAGE_VERSION"; then
2644# AC_MSG_ERROR([configure was generated for $PACKAGE_VERSION but uvernum.h has $VERSION - please rerun autoconf])
2645#fi
2646
729e4ab9
A
2647UNICODE_VERSION=`getuversion $srcdir/common/unicode/uchar.h`
2648if test x"$UNICODE_VERSION" = x; then
4388f060 2649 as_fn_error $? "Cannot determine Unicode version number from uchar.h header file" "$LINENO" 5
b75a7d8f 2650fi
729e4ab9
A
2651# Compute a reasonable library version from the release version. This is
2652# very bad, but that's wanted... We want to make sure that the LIB_VERSION
2653# has at least a dot in it, so we'll add a .0 if needed.
4388f060
A
2654#[LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'`]
2655LIB_VERSION=$VERSION
729e4ab9 2656LIB_VERSION_MAJOR=`echo $LIB_VERSION | sed 's/\..*//'`
73c04bcf 2657
729e4ab9
A
2658
2659
2660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: release $VERSION, library $LIB_VERSION, unicode version $UNICODE_VERSION" >&5
2661$as_echo "release $VERSION, library $LIB_VERSION, unicode version $UNICODE_VERSION" >&6; }
2662
2663
2664
2665# Determine the host system
2666ac_aux_dir=
2667for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2668 if test -f "$ac_dir/install-sh"; then
2669 ac_aux_dir=$ac_dir
2670 ac_install_sh="$ac_aux_dir/install-sh -c"
2671 break
2672 elif test -f "$ac_dir/install.sh"; then
2673 ac_aux_dir=$ac_dir
2674 ac_install_sh="$ac_aux_dir/install.sh -c"
2675 break
2676 elif test -f "$ac_dir/shtool"; then
2677 ac_aux_dir=$ac_dir
2678 ac_install_sh="$ac_aux_dir/shtool install -c"
2679 break
2680 fi
73c04bcf 2681done
729e4ab9
A
2682if test -z "$ac_aux_dir"; then
2683 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
b75a7d8f
A
2684fi
2685
729e4ab9
A
2686# These three variables are undocumented and unsupported,
2687# and are intended to be withdrawn in a future Autoconf release.
2688# They can cause serious problems if a builder's source tree is in a directory
2689# whose full name contains unusual characters.
2690ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2691ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2692ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
73c04bcf 2693
73c04bcf 2694
729e4ab9
A
2695# Make sure we can run config.sub.
2696$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2697 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2698
2699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2700$as_echo_n "checking build system type... " >&6; }
4388f060 2701if ${ac_cv_build+:} false; then :
729e4ab9
A
2702 $as_echo_n "(cached) " >&6
2703else
2704 ac_build_alias=$build_alias
2705test "x$ac_build_alias" = x &&
2706 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2707test "x$ac_build_alias" = x &&
2708 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2709ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2710 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2711
2712fi
2713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2714$as_echo "$ac_cv_build" >&6; }
2715case $ac_cv_build in
2716*-*-*) ;;
2717*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2718esac
2719build=$ac_cv_build
2720ac_save_IFS=$IFS; IFS='-'
2721set x $ac_cv_build
2722shift
2723build_cpu=$1
2724build_vendor=$2
2725shift; shift
2726# Remember, the first character of IFS is used to create $*,
2727# except with old shells:
2728build_os=$*
2729IFS=$ac_save_IFS
2730case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
b75a7d8f 2731
73c04bcf 2732
729e4ab9
A
2733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2734$as_echo_n "checking host system type... " >&6; }
4388f060 2735if ${ac_cv_host+:} false; then :
729e4ab9
A
2736 $as_echo_n "(cached) " >&6
2737else
2738 if test "x$host_alias" = x; then
2739 ac_cv_host=$ac_cv_build
2740else
2741 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2742 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
b75a7d8f
A
2743fi
2744
73c04bcf 2745fi
729e4ab9
A
2746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2747$as_echo "$ac_cv_host" >&6; }
2748case $ac_cv_host in
2749*-*-*) ;;
2750*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2751esac
2752host=$ac_cv_host
2753ac_save_IFS=$IFS; IFS='-'
2754set x $ac_cv_host
2755shift
2756host_cpu=$1
2757host_vendor=$2
2758shift; shift
2759# Remember, the first character of IFS is used to create $*,
2760# except with old shells:
2761host_os=$*
2762IFS=$ac_save_IFS
2763case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
73c04bcf 2764
73c04bcf 2765
b75a7d8f 2766
73c04bcf 2767
b75a7d8f 2768
729e4ab9
A
2769# This variable is needed on z/OS because the C++ compiler only recognizes .C
2770_CXX_CXXSUFFIX=cpp
2771export _CXX_CXXSUFFIX
b75a7d8f 2772
4388f060 2773# Accumulate #defines
57a6839d
A
2774
2775# CONFIG_CPPFLAGS: These are defines that are set for ICU Build time only.
2776# They are only needed for building ICU itself. Example: platform stuff
4388f060 2777CONFIG_CPPFLAGS=""
57a6839d
A
2778# UCONFIG_CPPFLAGS: These are defines which are set for ICU build time,
2779# and also a notice is output that they need to be set
2780# for end-users of ICU also. uconfig.h.prepend is generated
2781# with, for example, "#define U_DISABLE_RENAMING 1"
2782# Example: ICU configuration stuff
4388f060 2783UCONFIG_CPPFLAGS=""
57a6839d
A
2784# UCONFIG_CFLAGS: contains a copy of anything that needs to be set by end users
2785# such as -std
2786UCONFIG_CFLAGS=""
4388f060 2787
729e4ab9
A
2788# Check whether to build debug libraries
2789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build debug libraries" >&5
2790$as_echo_n "checking whether to build debug libraries... " >&6; }
2791enabled=no
2792ENABLE_DEBUG=0
2793# Check whether --enable-debug was given.
2794if test "${enable_debug+set}" = set; then :
2795 enableval=$enable_debug; case "${enableval}" in
4388f060 2796 yes|"") enabled=yes; ENABLE_DEBUG=1; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEBUG=1" ;;
729e4ab9
A
2797 *) ;;
2798 esac
73c04bcf 2799fi
b75a7d8f 2800
729e4ab9
A
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
2802$as_echo "$enabled" >&6; }
b75a7d8f 2803
73c04bcf 2804
729e4ab9
A
2805# Check whether to build release libraries
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build release libraries" >&5
2807$as_echo_n "checking whether to build release libraries... " >&6; }
2808enabled=yes
2809ENABLE_RELEASE=1
2810# Check whether --enable-release was given.
2811if test "${enable_release+set}" = set; then :
2812 enableval=$enable_release; case "${enableval}" in
2813 no) enabled=no; ENABLE_RELEASE=0 ;;
2814 *) ;;
2815 esac
73c04bcf 2816fi
73c04bcf 2817
729e4ab9
A
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
2819$as_echo "$enabled" >&6; }
73c04bcf 2820
73c04bcf 2821
729e4ab9
A
2822# Don't use the default C/CXXFLags
2823: ${CFLAGS=""}
2824: ${CXXFLAGS=""}
2825
51004dcb 2826# Checks for compilers
b75a7d8f 2827ac_ext=c
b75a7d8f 2828ac_cpp='$CPP $CPPFLAGS'
73c04bcf
A
2829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2831ac_compiler_gnu=$ac_cv_c_compiler_gnu
73c04bcf 2832if test -n "$ac_tool_prefix"; then
51004dcb 2833 for ac_prog in clang gcc cc c99 c89 xlc_r xlc cl.exe icc
729e4ab9
A
2834 do
2835 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2836set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838$as_echo_n "checking for $ac_word... " >&6; }
4388f060 2839if ${ac_cv_prog_CC+:} false; then :
729e4ab9 2840 $as_echo_n "(cached) " >&6
b75a7d8f 2841else
729e4ab9
A
2842 if test -n "$CC"; then
2843 ac_cv_prog_CC="$CC" # Let the user override the test.
2844else
2845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
73c04bcf
A
2846for as_dir in $PATH
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
729e4ab9 2850 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 2851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
2852 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
73c04bcf
A
2854 break 2
2855 fi
2856done
729e4ab9
A
2857 done
2858IFS=$as_save_IFS
73c04bcf 2859
b75a7d8f 2860fi
729e4ab9
A
2861fi
2862CC=$ac_cv_prog_CC
2863if test -n "$CC"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2865$as_echo "$CC" >&6; }
b75a7d8f 2866else
729e4ab9
A
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
b75a7d8f
A
2869fi
2870
b75a7d8f 2871
729e4ab9
A
2872 test -n "$CC" && break
2873 done
2874fi
2875if test -z "$CC"; then
2876 ac_ct_CC=$CC
51004dcb 2877 for ac_prog in clang gcc cc c99 c89 xlc_r xlc cl.exe icc
729e4ab9
A
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
4388f060 2883if ${ac_cv_prog_ac_ct_CC+:} false; then :
729e4ab9 2884 $as_echo_n "(cached) " >&6
b75a7d8f 2885else
729e4ab9
A
2886 if test -n "$ac_ct_CC"; then
2887 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
73c04bcf
A
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
729e4ab9 2894 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
2896 ac_cv_prog_ac_ct_CC="$ac_prog"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
73c04bcf
A
2898 break 2
2899 fi
2900done
729e4ab9
A
2901 done
2902IFS=$as_save_IFS
73c04bcf 2903
b75a7d8f 2904fi
729e4ab9
A
2905fi
2906ac_ct_CC=$ac_cv_prog_ac_ct_CC
2907if test -n "$ac_ct_CC"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2909$as_echo "$ac_ct_CC" >&6; }
b75a7d8f 2910else
729e4ab9
A
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
b75a7d8f
A
2913fi
2914
2915
729e4ab9
A
2916 test -n "$ac_ct_CC" && break
2917done
b75a7d8f 2918
729e4ab9
A
2919 if test "x$ac_ct_CC" = x; then
2920 CC=""
2921 else
2922 case $cross_compiling:$ac_tool_warned in
2923yes:)
2924{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2925$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2926ac_tool_warned=yes ;;
73c04bcf 2927esac
729e4ab9
A
2928 CC=$ac_ct_CC
2929 fi
73c04bcf 2930fi
73c04bcf 2931
73c04bcf 2932
729e4ab9
A
2933test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2935as_fn_error $? "no acceptable C compiler found in \$PATH
2936See \`config.log' for more details" "$LINENO" 5; }
73c04bcf 2937
729e4ab9
A
2938# Provide some information about the compiler.
2939$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2940set X $ac_compile
2941ac_compiler=$2
2942for ac_option in --version -v -V -qversion; do
2943 { { ac_try="$ac_compiler $ac_option >&5"
2944case "(($ac_try" in
2945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2946 *) ac_try_echo=$ac_try;;
2947esac
2948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2949$as_echo "$ac_try_echo"; } >&5
2950 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
73c04bcf 2951 ac_status=$?
729e4ab9
A
2952 if test -s conftest.err; then
2953 sed '10a\
2954... rest of stderr output deleted ...
2955 10q' conftest.err >conftest.er1
2956 cat conftest.er1 >&5
2957 fi
2958 rm -f conftest.er1 conftest.err
2959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2960 test $ac_status = 0; }
2961done
73c04bcf 2962
729e4ab9 2963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 2964/* end confdefs.h. */
729e4ab9
A
2965
2966int
2967main ()
2968{
2969
2970 ;
2971 return 0;
2972}
73c04bcf 2973_ACEOF
729e4ab9
A
2974ac_clean_files_save=$ac_clean_files
2975ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2976# Try to create an executable without -o first, disregard a.out.
2977# It will help us diagnose broken compilers, and finding out an intuition
2978# of exeext.
2979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2980$as_echo_n "checking whether the C compiler works... " >&6; }
2981ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
73c04bcf 2982
729e4ab9
A
2983# The possible output files:
2984ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
b75a7d8f 2985
729e4ab9
A
2986ac_rmfiles=
2987for ac_file in $ac_files
2988do
2989 case $ac_file in
2990 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2991 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2992 esac
2993done
2994rm -f $ac_rmfiles
b75a7d8f 2995
729e4ab9
A
2996if { { ac_try="$ac_link_default"
2997case "(($ac_try" in
2998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999 *) ac_try_echo=$ac_try;;
3000esac
3001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3002$as_echo "$ac_try_echo"; } >&5
3003 (eval "$ac_link_default") 2>&5
3004 ac_status=$?
3005 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3006 test $ac_status = 0; }; then :
3007 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3008# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3009# in a Makefile. We should not override ac_cv_exeext if it was cached,
3010# so that the user can short-circuit this test for compilers unknown to
3011# Autoconf.
3012for ac_file in $ac_files ''
3013do
3014 test -f "$ac_file" || continue
3015 case $ac_file in
3016 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3017 ;;
3018 [ab].out )
3019 # We found the default executable, but exeext='' is most
3020 # certainly right.
3021 break;;
3022 *.* )
3023 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3024 then :; else
3025 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3026 fi
3027 # We set ac_cv_exeext here because the later test for it is not
3028 # safe: cross compilers may not add the suffix if given an `-o'
3029 # argument, so we may need to know it at that point already.
3030 # Even if this section looks crufty: it has the advantage of
3031 # actually working.
3032 break;;
3033 * )
3034 break;;
3035 esac
3036done
3037test "$ac_cv_exeext" = no && ac_cv_exeext=
b75a7d8f 3038
729e4ab9
A
3039else
3040 ac_file=''
3041fi
3042if test -z "$ac_file"; then :
3043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044$as_echo "no" >&6; }
3045$as_echo "$as_me: failed program was:" >&5
3046sed 's/^/| /' conftest.$ac_ext >&5
b75a7d8f 3047
729e4ab9
A
3048{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3050as_fn_error 77 "C compiler cannot create executables
3051See \`config.log' for more details" "$LINENO" 5; }
3052else
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3054$as_echo "yes" >&6; }
3055fi
3056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3057$as_echo_n "checking for C compiler default output file name... " >&6; }
3058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3059$as_echo "$ac_file" >&6; }
3060ac_exeext=$ac_cv_exeext
b75a7d8f 3061
729e4ab9
A
3062rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3063ac_clean_files=$ac_clean_files_save
3064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3065$as_echo_n "checking for suffix of executables... " >&6; }
3066if { { ac_try="$ac_link"
3067case "(($ac_try" in
3068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3069 *) ac_try_echo=$ac_try;;
3070esac
3071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3072$as_echo "$ac_try_echo"; } >&5
3073 (eval "$ac_link") 2>&5
3074 ac_status=$?
3075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3076 test $ac_status = 0; }; then :
3077 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3078# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3079# work properly (i.e., refer to `conftest.exe'), while it won't with
3080# `rm'.
3081for ac_file in conftest.exe conftest conftest.*; do
3082 test -f "$ac_file" || continue
3083 case $ac_file in
3084 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3085 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3086 break;;
3087 * ) break;;
3088 esac
3089done
b75a7d8f 3090else
729e4ab9
A
3091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3093as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3094See \`config.log' for more details" "$LINENO" 5; }
3095fi
3096rm -f conftest conftest$ac_cv_exeext
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3098$as_echo "$ac_cv_exeext" >&6; }
73c04bcf 3099
729e4ab9
A
3100rm -f conftest.$ac_ext
3101EXEEXT=$ac_cv_exeext
3102ac_exeext=$EXEEXT
3103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e 3104/* end confdefs.h. */
729e4ab9 3105#include <stdio.h>
46f4442e
A
3106int
3107main ()
3108{
729e4ab9
A
3109FILE *f = fopen ("conftest.out", "w");
3110 return ferror (f) || fclose (f) != 0;
46f4442e
A
3111
3112 ;
3113 return 0;
3114}
3115_ACEOF
729e4ab9
A
3116ac_clean_files="$ac_clean_files conftest.out"
3117# Check that the compiler produces executables we can run. If not, either
3118# the compiler is broken, or we cross compile.
3119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3120$as_echo_n "checking whether we are cross compiling... " >&6; }
3121if test "$cross_compiling" != yes; then
3122 { { ac_try="$ac_link"
3123case "(($ac_try" in
3124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3125 *) ac_try_echo=$ac_try;;
b75a7d8f 3126esac
729e4ab9
A
3127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3128$as_echo "$ac_try_echo"; } >&5
3129 (eval "$ac_link") 2>&5
3130 ac_status=$?
3131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3132 test $ac_status = 0; }
3133 if { ac_try='./conftest$ac_cv_exeext'
3134 { { case "(($ac_try" in
3135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3136 *) ac_try_echo=$ac_try;;
3137esac
3138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3139$as_echo "$ac_try_echo"; } >&5
3140 (eval "$ac_try") 2>&5
3141 ac_status=$?
3142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3143 test $ac_status = 0; }; }; then
3144 cross_compiling=no
3145 else
3146 if test "$cross_compiling" = maybe; then
3147 cross_compiling=yes
3148 else
3149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3151as_fn_error $? "cannot run C compiled programs.
3152If you meant to cross compile, use \`--host'.
3153See \`config.log' for more details" "$LINENO" 5; }
3154 fi
3155 fi
73c04bcf 3156fi
729e4ab9
A
3157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3158$as_echo "$cross_compiling" >&6; }
b75a7d8f 3159
729e4ab9
A
3160rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3161ac_clean_files=$ac_clean_files_save
3162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3163$as_echo_n "checking for suffix of object files... " >&6; }
4388f060 3164if ${ac_cv_objext+:} false; then :
729e4ab9 3165 $as_echo_n "(cached) " >&6
b75a7d8f 3166else
729e4ab9 3167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
3168/* end confdefs.h. */
3169
73c04bcf
A
3170int
3171main ()
3172{
729e4ab9 3173
73c04bcf
A
3174 ;
3175 return 0;
3176}
3177_ACEOF
729e4ab9
A
3178rm -f conftest.o conftest.obj
3179if { { ac_try="$ac_compile"
3180case "(($ac_try" in
3181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3182 *) ac_try_echo=$ac_try;;
3183esac
3184eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3185$as_echo "$ac_try_echo"; } >&5
3186 (eval "$ac_compile") 2>&5
3187 ac_status=$?
3188 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3189 test $ac_status = 0; }; then :
3190 for ac_file in conftest.o conftest.obj conftest.*; do
3191 test -f "$ac_file" || continue;
3192 case $ac_file in
3193 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3194 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3195 break;;
3196 esac
3197done
73c04bcf 3198else
729e4ab9 3199 $as_echo "$as_me: failed program was:" >&5
73c04bcf
A
3200sed 's/^/| /' conftest.$ac_ext >&5
3201
729e4ab9
A
3202{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3204as_fn_error $? "cannot compute suffix of object files: cannot compile
3205See \`config.log' for more details" "$LINENO" 5; }
73c04bcf 3206fi
729e4ab9 3207rm -f conftest.$ac_cv_objext conftest.$ac_ext
b75a7d8f 3208fi
729e4ab9
A
3209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3210$as_echo "$ac_cv_objext" >&6; }
3211OBJEXT=$ac_cv_objext
3212ac_objext=$OBJEXT
3213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3214$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4388f060 3215if ${ac_cv_c_compiler_gnu+:} false; then :
729e4ab9 3216 $as_echo_n "(cached) " >&6
73c04bcf 3217else
729e4ab9 3218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
3219/* end confdefs.h. */
3220
73c04bcf
A
3221int
3222main ()
3223{
729e4ab9
A
3224#ifndef __GNUC__
3225 choke me
3226#endif
3227
73c04bcf
A
3228 ;
3229 return 0;
3230}
3231_ACEOF
729e4ab9
A
3232if ac_fn_c_try_compile "$LINENO"; then :
3233 ac_compiler_gnu=yes
73c04bcf 3234else
729e4ab9 3235 ac_compiler_gnu=no
73c04bcf 3236fi
729e4ab9
A
3237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3238ac_cv_c_compiler_gnu=$ac_compiler_gnu
b75a7d8f 3239
b75a7d8f 3240fi
729e4ab9
A
3241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3242$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3243if test $ac_compiler_gnu = yes; then
3244 GCC=yes
b75a7d8f 3245else
729e4ab9 3246 GCC=
374ca955 3247fi
729e4ab9
A
3248ac_test_CFLAGS=${CFLAGS+set}
3249ac_save_CFLAGS=$CFLAGS
3250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3251$as_echo_n "checking whether $CC accepts -g... " >&6; }
4388f060 3252if ${ac_cv_prog_cc_g+:} false; then :
729e4ab9
A
3253 $as_echo_n "(cached) " >&6
3254else
3255 ac_save_c_werror_flag=$ac_c_werror_flag
3256 ac_c_werror_flag=yes
3257 ac_cv_prog_cc_g=no
3258 CFLAGS="-g"
3259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260/* end confdefs.h. */
374ca955 3261
729e4ab9
A
3262int
3263main ()
3264{
374ca955 3265
729e4ab9
A
3266 ;
3267 return 0;
3268}
46f4442e 3269_ACEOF
729e4ab9
A
3270if ac_fn_c_try_compile "$LINENO"; then :
3271 ac_cv_prog_cc_g=yes
3272else
3273 CFLAGS=""
3274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e 3275/* end confdefs.h. */
729e4ab9 3276
46f4442e
A
3277int
3278main ()
3279{
729e4ab9 3280
46f4442e
A
3281 ;
3282 return 0;
3283}
3284_ACEOF
729e4ab9
A
3285if ac_fn_c_try_compile "$LINENO"; then :
3286
b75a7d8f 3287else
729e4ab9
A
3288 ac_c_werror_flag=$ac_save_c_werror_flag
3289 CFLAGS="-g"
3290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3291/* end confdefs.h. */
73c04bcf 3292
729e4ab9
A
3293int
3294main ()
3295{
3296
3297 ;
3298 return 0;
3299}
3300_ACEOF
3301if ac_fn_c_try_compile "$LINENO"; then :
3302 ac_cv_prog_cc_g=yes
3303fi
3304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3305fi
3306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3307fi
3308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3309 ac_c_werror_flag=$ac_save_c_werror_flag
3310fi
3311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3312$as_echo "$ac_cv_prog_cc_g" >&6; }
3313if test "$ac_test_CFLAGS" = set; then
3314 CFLAGS=$ac_save_CFLAGS
3315elif test $ac_cv_prog_cc_g = yes; then
3316 if test "$GCC" = yes; then
3317 CFLAGS="-g -O2"
3318 else
3319 CFLAGS="-g"
3320 fi
3321else
3322 if test "$GCC" = yes; then
3323 CFLAGS="-O2"
3324 else
3325 CFLAGS=
3326 fi
b75a7d8f 3327fi
729e4ab9
A
3328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3329$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4388f060 3330if ${ac_cv_prog_cc_c89+:} false; then :
729e4ab9 3331 $as_echo_n "(cached) " >&6
73c04bcf 3332else
729e4ab9
A
3333 ac_cv_prog_cc_c89=no
3334ac_save_CC=$CC
3335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e 3336/* end confdefs.h. */
729e4ab9
A
3337#include <stdarg.h>
3338#include <stdio.h>
b331163b 3339struct stat;
729e4ab9
A
3340/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3341struct buf { int x; };
3342FILE * (*rcsopen) (struct buf *, struct stat *, int);
3343static char *e (p, i)
3344 char **p;
3345 int i;
3346{
3347 return p[i];
3348}
3349static char *f (char * (*g) (char **, int), char **p, ...)
3350{
3351 char *s;
3352 va_list v;
3353 va_start (v,p);
3354 s = g (p, va_arg (v,int));
3355 va_end (v);
3356 return s;
3357}
3358
3359/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3360 function prototypes and stuff, but not '\xHH' hex character constants.
3361 These don't provoke an error unfortunately, instead are silently treated
3362 as 'x'. The following induces an error, until -std is added to get
3363 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3364 array size at least. It's necessary to write '\x00'==0 to get something
3365 that's true only with -std. */
3366int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3367
3368/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3369 inside strings and character constants. */
3370#define FOO(x) 'x'
3371int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3372
3373int test (int i, double x);
3374struct s1 {int (*f) (int a);};
3375struct s2 {int (*f) (double a);};
3376int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3377int argc;
3378char **argv;
46f4442e
A
3379int
3380main ()
3381{
729e4ab9 3382return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
46f4442e
A
3383 ;
3384 return 0;
3385}
3386_ACEOF
729e4ab9
A
3387for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3388 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3389do
3390 CC="$ac_save_CC $ac_arg"
3391 if ac_fn_c_try_compile "$LINENO"; then :
3392 ac_cv_prog_cc_c89=$ac_arg
46f4442e 3393fi
729e4ab9
A
3394rm -f core conftest.err conftest.$ac_objext
3395 test "x$ac_cv_prog_cc_c89" != "xno" && break
3396done
3397rm -f conftest.$ac_ext
3398CC=$ac_save_CC
46f4442e 3399
729e4ab9
A
3400fi
3401# AC_CACHE_VAL
3402case "x$ac_cv_prog_cc_c89" in
3403 x)
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3405$as_echo "none needed" >&6; } ;;
3406 xno)
3407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3408$as_echo "unsupported" >&6; } ;;
3409 *)
3410 CC="$CC $ac_cv_prog_cc_c89"
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3412$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3413esac
3414if test "x$ac_cv_prog_cc_c89" != xno; then :
46f4442e 3415
729e4ab9 3416fi
46f4442e 3417
729e4ab9
A
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
46f4442e 3423
51004dcb
A
3424# Make sure that we try clang++ first, which provides C++11 support.
3425# The g++ compiler is less likely to support C++11.
729e4ab9
A
3426ac_ext=cpp
3427ac_cpp='$CXXCPP $CPPFLAGS'
3428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3431if test -z "$CXX"; then
3432 if test -n "$CCC"; then
3433 CXX=$CCC
3434 else
3435 if test -n "$ac_tool_prefix"; then
51004dcb 3436 for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC
729e4ab9
A
3437 do
3438 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3441$as_echo_n "checking for $ac_word... " >&6; }
4388f060 3442if ${ac_cv_prog_CXX+:} false; then :
729e4ab9 3443 $as_echo_n "(cached) " >&6
46f4442e 3444else
729e4ab9
A
3445 if test -n "$CXX"; then
3446 ac_cv_prog_CXX="$CXX" # Let the user override the test.
46f4442e
A
3447else
3448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
729e4ab9 3453 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 3454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
3455 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46f4442e
A
3457 break 2
3458 fi
3459done
729e4ab9
A
3460 done
3461IFS=$as_save_IFS
46f4442e
A
3462
3463fi
3464fi
729e4ab9
A
3465CXX=$ac_cv_prog_CXX
3466if test -n "$CXX"; then
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3468$as_echo "$CXX" >&6; }
46f4442e 3469else
729e4ab9
A
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3471$as_echo "no" >&6; }
46f4442e
A
3472fi
3473
729e4ab9
A
3474
3475 test -n "$CXX" && break
3476 done
46f4442e 3477fi
729e4ab9
A
3478if test -z "$CXX"; then
3479 ac_ct_CXX=$CXX
51004dcb 3480 for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC
729e4ab9
A
3481do
3482 # Extract the first word of "$ac_prog", so it can be a program name with args.
3483set dummy $ac_prog; ac_word=$2
3484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3485$as_echo_n "checking for $ac_word... " >&6; }
4388f060 3486if ${ac_cv_prog_ac_ct_CXX+:} false; then :
729e4ab9 3487 $as_echo_n "(cached) " >&6
b75a7d8f 3488else
729e4ab9
A
3489 if test -n "$ac_ct_CXX"; then
3490 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
73c04bcf
A
3491else
3492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3493for as_dir in $PATH
3494do
3495 IFS=$as_save_IFS
3496 test -z "$as_dir" && as_dir=.
729e4ab9 3497 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 3498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
3499 ac_cv_prog_ac_ct_CXX="$ac_prog"
3500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
73c04bcf
A
3501 break 2
3502 fi
3503done
729e4ab9
A
3504 done
3505IFS=$as_save_IFS
73c04bcf 3506
73c04bcf
A
3507fi
3508fi
729e4ab9
A
3509ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3510if test -n "$ac_ct_CXX"; then
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3512$as_echo "$ac_ct_CXX" >&6; }
73c04bcf 3513else
729e4ab9
A
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3515$as_echo "no" >&6; }
73c04bcf
A
3516fi
3517
b75a7d8f 3518
729e4ab9 3519 test -n "$ac_ct_CXX" && break
73c04bcf
A
3520done
3521
729e4ab9
A
3522 if test "x$ac_ct_CXX" = x; then
3523 CXX="g++"
3524 else
3525 case $cross_compiling:$ac_tool_warned in
3526yes:)
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3529ac_tool_warned=yes ;;
b75a7d8f 3530esac
729e4ab9
A
3531 CXX=$ac_ct_CXX
3532 fi
b75a7d8f 3533fi
73c04bcf 3534
729e4ab9 3535 fi
b75a7d8f 3536fi
729e4ab9
A
3537# Provide some information about the compiler.
3538$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3539set X $ac_compile
3540ac_compiler=$2
3541for ac_option in --version -v -V -qversion; do
3542 { { ac_try="$ac_compiler $ac_option >&5"
3543case "(($ac_try" in
3544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545 *) ac_try_echo=$ac_try;;
3546esac
3547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3548$as_echo "$ac_try_echo"; } >&5
3549 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3550 ac_status=$?
3551 if test -s conftest.err; then
3552 sed '10a\
3553... rest of stderr output deleted ...
3554 10q' conftest.err >conftest.er1
3555 cat conftest.er1 >&5
3556 fi
3557 rm -f conftest.er1 conftest.err
3558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3559 test $ac_status = 0; }
3560done
b75a7d8f 3561
729e4ab9
A
3562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3563$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4388f060 3564if ${ac_cv_cxx_compiler_gnu+:} false; then :
729e4ab9 3565 $as_echo_n "(cached) " >&6
b75a7d8f 3566else
729e4ab9 3567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
3568/* end confdefs.h. */
3569
3570int
3571main ()
3572{
729e4ab9
A
3573#ifndef __GNUC__
3574 choke me
3575#endif
3576
73c04bcf
A
3577 ;
3578 return 0;
3579}
3580_ACEOF
729e4ab9
A
3581if ac_fn_cxx_try_compile "$LINENO"; then :
3582 ac_compiler_gnu=yes
b75a7d8f 3583else
729e4ab9 3584 ac_compiler_gnu=no
b75a7d8f 3585fi
729e4ab9
A
3586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3587ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
b75a7d8f 3588
73c04bcf 3589fi
729e4ab9
A
3590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3591$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3592if test $ac_compiler_gnu = yes; then
3593 GXX=yes
b75a7d8f 3594else
729e4ab9 3595 GXX=
b75a7d8f 3596fi
729e4ab9
A
3597ac_test_CXXFLAGS=${CXXFLAGS+set}
3598ac_save_CXXFLAGS=$CXXFLAGS
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3600$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4388f060 3601if ${ac_cv_prog_cxx_g+:} false; then :
729e4ab9
A
3602 $as_echo_n "(cached) " >&6
3603else
3604 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3605 ac_cxx_werror_flag=yes
3606 ac_cv_prog_cxx_g=no
3607 CXXFLAGS="-g"
3608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3609/* end confdefs.h. */
3610
73c04bcf
A
3611int
3612main ()
3613{
729e4ab9 3614
73c04bcf
A
3615 ;
3616 return 0;
3617}
3618_ACEOF
729e4ab9
A
3619if ac_fn_cxx_try_compile "$LINENO"; then :
3620 ac_cv_prog_cxx_g=yes
b75a7d8f 3621else
729e4ab9
A
3622 CXXFLAGS=""
3623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
3624/* end confdefs.h. */
3625
73c04bcf
A
3626int
3627main ()
3628{
729e4ab9 3629
73c04bcf
A
3630 ;
3631 return 0;
3632}
3633_ACEOF
729e4ab9 3634if ac_fn_cxx_try_compile "$LINENO"; then :
73c04bcf 3635
729e4ab9
A
3636else
3637 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3638 CXXFLAGS="-g"
3639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
3640/* end confdefs.h. */
3641
73c04bcf
A
3642int
3643main ()
3644{
729e4ab9 3645
73c04bcf
A
3646 ;
3647 return 0;
3648}
3649_ACEOF
729e4ab9
A
3650if ac_fn_cxx_try_compile "$LINENO"; then :
3651 ac_cv_prog_cxx_g=yes
3652fi
3653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3654fi
3655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3656fi
3657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3658 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3659fi
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3661$as_echo "$ac_cv_prog_cxx_g" >&6; }
3662if test "$ac_test_CXXFLAGS" = set; then
3663 CXXFLAGS=$ac_save_CXXFLAGS
3664elif test $ac_cv_prog_cxx_g = yes; then
3665 if test "$GXX" = yes; then
3666 CXXFLAGS="-g -O2"
3667 else
3668 CXXFLAGS="-g"
3669 fi
b75a7d8f 3670else
729e4ab9
A
3671 if test "$GXX" = yes; then
3672 CXXFLAGS="-O2"
3673 else
3674 CXXFLAGS=
3675 fi
3676fi
3677ac_ext=c
3678ac_cpp='$CPP $CPPFLAGS'
3679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3681ac_compiler_gnu=$ac_cv_c_compiler_gnu
73c04bcf 3682
729e4ab9 3683
b331163b
A
3684# pkg-config is needed for harfbuzz support
3685
3686
2ca993e8
A
3687
3688
3689
3690
3691
b331163b
A
3692if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3693 if test -n "$ac_tool_prefix"; then
3694 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3695set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
3698if ${ac_cv_path_PKG_CONFIG+:} false; then :
3699 $as_echo_n "(cached) " >&6
3700else
3701 case $PKG_CONFIG in
3702 [\\/]* | ?:[\\/]*)
3703 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3704 ;;
3705 *)
3706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
3711 for ac_exec_ext in '' $ac_executable_extensions; do
3712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3713 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3715 break 2
3716 fi
3717done
3718 done
3719IFS=$as_save_IFS
3720
3721 ;;
3722esac
3723fi
3724PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3725if test -n "$PKG_CONFIG"; then
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
3727$as_echo "$PKG_CONFIG" >&6; }
3728else
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3730$as_echo "no" >&6; }
3731fi
3732
3733
3734fi
3735if test -z "$ac_cv_path_PKG_CONFIG"; then
3736 ac_pt_PKG_CONFIG=$PKG_CONFIG
3737 # Extract the first word of "pkg-config", so it can be a program name with args.
3738set dummy pkg-config; ac_word=$2
3739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3740$as_echo_n "checking for $ac_word... " >&6; }
3741if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
3742 $as_echo_n "(cached) " >&6
3743else
3744 case $ac_pt_PKG_CONFIG in
3745 [\\/]* | ?:[\\/]*)
3746 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3747 ;;
3748 *)
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750for as_dir in $PATH
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
3754 for ac_exec_ext in '' $ac_executable_extensions; do
3755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3756 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3758 break 2
3759 fi
3760done
3761 done
3762IFS=$as_save_IFS
3763
3764 ;;
3765esac
3766fi
3767ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3768if test -n "$ac_pt_PKG_CONFIG"; then
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
3770$as_echo "$ac_pt_PKG_CONFIG" >&6; }
3771else
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3773$as_echo "no" >&6; }
3774fi
3775
3776 if test "x$ac_pt_PKG_CONFIG" = x; then
3777 PKG_CONFIG=""
3778 else
3779 case $cross_compiling:$ac_tool_warned in
3780yes:)
3781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3783ac_tool_warned=yes ;;
3784esac
3785 PKG_CONFIG=$ac_pt_PKG_CONFIG
3786 fi
3787else
3788 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3789fi
3790
3791fi
3792if test -n "$PKG_CONFIG"; then
3793 _pkg_min_version=0.20
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
3795$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
3796 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3798$as_echo "yes" >&6; }
3799 else
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
3802 PKG_CONFIG=""
3803 fi
b331163b
A
3804fi
3805
3806pkg_failed=no
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICULEHB" >&5
3808$as_echo_n "checking for ICULEHB... " >&6; }
3809
3810if test -n "$ICULEHB_CFLAGS"; then
3811 pkg_cv_ICULEHB_CFLAGS="$ICULEHB_CFLAGS"
3812 elif test -n "$PKG_CONFIG"; then
3813 if test -n "$PKG_CONFIG" && \
3814 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5
3815 ($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5
3816 ac_status=$?
3817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3818 test $ac_status = 0; }; then
3819 pkg_cv_ICULEHB_CFLAGS=`$PKG_CONFIG --cflags "icu-le-hb" 2>/dev/null`
2ca993e8 3820 test "x$?" != "x0" && pkg_failed=yes
b331163b
A
3821else
3822 pkg_failed=yes
3823fi
3824 else
3825 pkg_failed=untried
3826fi
3827if test -n "$ICULEHB_LIBS"; then
3828 pkg_cv_ICULEHB_LIBS="$ICULEHB_LIBS"
3829 elif test -n "$PKG_CONFIG"; then
3830 if test -n "$PKG_CONFIG" && \
3831 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5
3832 ($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5
3833 ac_status=$?
3834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3835 test $ac_status = 0; }; then
3836 pkg_cv_ICULEHB_LIBS=`$PKG_CONFIG --libs "icu-le-hb" 2>/dev/null`
2ca993e8 3837 test "x$?" != "x0" && pkg_failed=yes
b331163b
A
3838else
3839 pkg_failed=yes
3840fi
3841 else
3842 pkg_failed=untried
3843fi
3844
3845
3846
3847if test $pkg_failed = yes; then
2ca993e8
A
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
b331163b
A
3850
3851if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
3852 _pkg_short_errors_supported=yes
3853else
3854 _pkg_short_errors_supported=no
3855fi
3856 if test $_pkg_short_errors_supported = yes; then
2ca993e8 3857 ICULEHB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-le-hb" 2>&1`
b331163b 3858 else
2ca993e8 3859 ICULEHB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-le-hb" 2>&1`
b331163b
A
3860 fi
3861 # Put the nasty error message in config.log where it belongs
3862 echo "$ICULEHB_PKG_ERRORS" >&5
3863
2ca993e8 3864 :
b331163b 3865elif test $pkg_failed = untried; then
2ca993e8
A
3866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
b331163b
A
3868 :
3869else
3870 ICULEHB_CFLAGS=$pkg_cv_ICULEHB_CFLAGS
3871 ICULEHB_LIBS=$pkg_cv_ICULEHB_LIBS
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3873$as_echo "yes" >&6; }
3874 have_icu_le_hb=true
3875fi
3876
729e4ab9
A
3877# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
3878# The release mode use is the default one for autoconf
3879if test "$GCC" = yes; then
3880 if test "$CFLAGS" = ""; then
3881 if test "$ENABLE_DEBUG" = 1; then
3882 CFLAGS=-g
3883 fi
3884 if test "$ENABLE_RELEASE" = 1; then
3885 CFLAGS="$CFLAGS -O2"
3886 fi
3887 fi
3888 if test "$CXXFLAGS" = ""; then
3889 if test "$ENABLE_DEBUG" = 1; then
3890 CXXFLAGS=-g
3891 fi
3892 if test "$ENABLE_RELEASE" = 1; then
3893 CXXFLAGS="$CXXFLAGS -O2"
3894 fi
3895 fi
b75a7d8f 3896fi
729e4ab9
A
3897
3898ac_ext=c
3899ac_cpp='$CPP $CPPFLAGS'
3900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3902ac_compiler_gnu=$ac_cv_c_compiler_gnu
3903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3904$as_echo_n "checking how to run the C preprocessor... " >&6; }
3905# On Suns, sometimes $CPP names a directory.
3906if test -n "$CPP" && test -d "$CPP"; then
3907 CPP=
b75a7d8f 3908fi
729e4ab9 3909if test -z "$CPP"; then
4388f060 3910 if ${ac_cv_prog_CPP+:} false; then :
729e4ab9
A
3911 $as_echo_n "(cached) " >&6
3912else
3913 # Double quotes because CPP needs to be expanded
3914 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3915 do
3916 ac_preproc_ok=false
3917for ac_c_preproc_warn_flag in '' yes
3918do
3919 # Use a header file that comes with gcc, so configuring glibc
3920 # with a fresh cross-compiler works.
3921 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3922 # <limits.h> exists even on freestanding compilers.
3923 # On the NeXT, cc -E runs the code through the compiler's parser,
3924 # not just through cpp. "Syntax error" is here to catch this case.
3925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3926/* end confdefs.h. */
3927#ifdef __STDC__
3928# include <limits.h>
3929#else
3930# include <assert.h>
3931#endif
3932 Syntax error
3933_ACEOF
3934if ac_fn_c_try_cpp "$LINENO"; then :
3935
3936else
3937 # Broken: fails on valid input.
3938continue
b75a7d8f 3939fi
729e4ab9 3940rm -f conftest.err conftest.i conftest.$ac_ext
73c04bcf 3941
729e4ab9
A
3942 # OK, works on sane cases. Now check whether nonexistent headers
3943 # can be detected and how.
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945/* end confdefs.h. */
3946#include <ac_nonexistent.h>
3947_ACEOF
3948if ac_fn_c_try_cpp "$LINENO"; then :
3949 # Broken: success on invalid input.
3950continue
3951else
3952 # Passes both tests.
3953ac_preproc_ok=:
3954break
3955fi
3956rm -f conftest.err conftest.i conftest.$ac_ext
73c04bcf 3957
729e4ab9
A
3958done
3959# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3960rm -f conftest.i conftest.err conftest.$ac_ext
3961if $ac_preproc_ok; then :
3962 break
b75a7d8f
A
3963fi
3964
729e4ab9
A
3965 done
3966 ac_cv_prog_CPP=$CPP
73c04bcf 3967
729e4ab9
A
3968fi
3969 CPP=$ac_cv_prog_CPP
73c04bcf 3970else
729e4ab9
A
3971 ac_cv_prog_CPP=$CPP
3972fi
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3974$as_echo "$CPP" >&6; }
3975ac_preproc_ok=false
3976for ac_c_preproc_warn_flag in '' yes
3977do
3978 # Use a header file that comes with gcc, so configuring glibc
3979 # with a fresh cross-compiler works.
3980 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3981 # <limits.h> exists even on freestanding compilers.
3982 # On the NeXT, cc -E runs the code through the compiler's parser,
3983 # not just through cpp. "Syntax error" is here to catch this case.
3984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 3985/* end confdefs.h. */
729e4ab9
A
3986#ifdef __STDC__
3987# include <limits.h>
3988#else
3989# include <assert.h>
73c04bcf 3990#endif
729e4ab9 3991 Syntax error
73c04bcf 3992_ACEOF
729e4ab9
A
3993if ac_fn_c_try_cpp "$LINENO"; then :
3994
73c04bcf 3995else
729e4ab9
A
3996 # Broken: fails on valid input.
3997continue
3998fi
3999rm -f conftest.err conftest.i conftest.$ac_ext
4000
4001 # OK, works on sane cases. Now check whether nonexistent headers
4002 # can be detected and how.
4003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4004/* end confdefs.h. */
4005#include <ac_nonexistent.h>
4006_ACEOF
4007if ac_fn_c_try_cpp "$LINENO"; then :
4008 # Broken: success on invalid input.
4009continue
4010else
4011 # Passes both tests.
4012ac_preproc_ok=:
4013break
4014fi
4015rm -f conftest.err conftest.i conftest.$ac_ext
4016
4017done
4018# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4019rm -f conftest.i conftest.err conftest.$ac_ext
4020if $ac_preproc_ok; then :
4021
4022else
4023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4025as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4026See \`config.log' for more details" "$LINENO" 5; }
4027fi
4028
4029ac_ext=c
4030ac_cpp='$CPP $CPPFLAGS'
4031ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4032ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4033ac_compiler_gnu=$ac_cv_c_compiler_gnu
4034
4035
4036# Find a good install program. We prefer a C program (faster),
4037# so one script is as good as another. But avoid the broken or
4038# incompatible versions:
4039# SysV /etc/install, /usr/sbin/install
4040# SunOS /usr/etc/install
4041# IRIX /sbin/install
4042# AIX /bin/install
4043# AmigaOS /C/install, which installs bootblocks on floppy discs
4044# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4045# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4046# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4047# OS/2's system install, which has a completely different semantic
4048# ./install, which can be erroneously created by make from ./install.sh.
4049# Reject install programs that cannot install multiple files.
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4051$as_echo_n "checking for a BSD-compatible install... " >&6; }
4052if test -z "$INSTALL"; then
4388f060 4053if ${ac_cv_path_install+:} false; then :
729e4ab9
A
4054 $as_echo_n "(cached) " >&6
4055else
4056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4057for as_dir in $PATH
4058do
4059 IFS=$as_save_IFS
4060 test -z "$as_dir" && as_dir=.
4061 # Account for people who put trailing slashes in PATH elements.
4062case $as_dir/ in #((
4063 ./ | .// | /[cC]/* | \
4064 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4065 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4066 /usr/ucb/* ) ;;
4067 *)
4068 # OSF1 and SCO ODT 3.0 have their own names for install.
4069 # Don't use installbsd from OSF since it installs stuff as root
4070 # by default.
4071 for ac_prog in ginstall scoinst install; do
4072 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 4073 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
729e4ab9
A
4074 if test $ac_prog = install &&
4075 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4076 # AIX install. It has an incompatible calling convention.
4077 :
4078 elif test $ac_prog = install &&
4079 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4080 # program-specific install script used by HP pwplus--don't use.
4081 :
4082 else
4083 rm -rf conftest.one conftest.two conftest.dir
4084 echo one > conftest.one
4085 echo two > conftest.two
4086 mkdir conftest.dir
4087 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4088 test -s conftest.one && test -s conftest.two &&
4089 test -s conftest.dir/conftest.one &&
4090 test -s conftest.dir/conftest.two
4091 then
4092 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4093 break 3
4094 fi
4095 fi
4096 fi
4097 done
4098 done
4099 ;;
4100esac
4101
4102 done
4103IFS=$as_save_IFS
4104
4105rm -rf conftest.one conftest.two conftest.dir
73c04bcf 4106
73c04bcf 4107fi
729e4ab9
A
4108 if test "${ac_cv_path_install+set}" = set; then
4109 INSTALL=$ac_cv_path_install
4110 else
4111 # As a last resort, use the slow shell script. Don't cache a
4112 # value for INSTALL within a source directory, because that will
4113 # break other packages using the cache if that directory is
4114 # removed, or if the value is a relative name.
4115 INSTALL=$ac_install_sh
4116 fi
73c04bcf 4117fi
729e4ab9
A
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4119$as_echo "$INSTALL" >&6; }
73c04bcf 4120
729e4ab9
A
4121# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4122# It thinks the first close brace ends the variable substitution.
4123test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
73c04bcf 4124
729e4ab9 4125test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
73c04bcf 4126
729e4ab9 4127test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
73c04bcf 4128
73c04bcf 4129
73c04bcf 4130
73c04bcf 4131
729e4ab9
A
4132ac_ext=cpp
4133ac_cpp='$CXXCPP $CPPFLAGS'
4134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
73c04bcf 4137
729e4ab9
A
4138
4139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4140/* end confdefs.h. */
73c04bcf
A
4141
4142int
4143main ()
4144{
729e4ab9 4145
73c04bcf
A
4146 ;
4147 return 0;
4148}
4149_ACEOF
729e4ab9 4150if ac_fn_cxx_try_link "$LINENO"; then :
73c04bcf 4151
73c04bcf 4152fi
729e4ab9
A
4153rm -f core conftest.err conftest.$ac_objext \
4154 conftest$ac_exeext conftest.$ac_ext
4155ac_ext=c
4156ac_cpp='$CPP $CPPFLAGS'
4157ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4158ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4159ac_compiler_gnu=$ac_cv_c_compiler_gnu
73c04bcf
A
4160
4161
729e4ab9
A
4162# make sure install is relative to srcdir - if a script
4163if test "$srcdir" = "."; then
4164 # If srcdir isn't just ., then (srcdir) is already prepended.
4165 if test "${ac_install_sh}" = "${INSTALL}"; then
4166 INSTALL="\\\$(top_srcdir)/${ac_install_sh}"
73c04bcf 4167 fi
73c04bcf
A
4168fi
4169
729e4ab9
A
4170#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
4171#AC_CHECK_PROG(STRIP, strip, strip, true)
73c04bcf 4172
729e4ab9
A
4173# Check for the platform make
4174for ac_prog in gmake gnumake
4175do
4176 # Extract the first word of "$ac_prog", so it can be a program name with args.
4177set dummy $ac_prog; ac_word=$2
4178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4179$as_echo_n "checking for $ac_word... " >&6; }
4388f060 4180if ${ac_cv_path_U_MAKE+:} false; then :
729e4ab9
A
4181 $as_echo_n "(cached) " >&6
4182else
4183 case $U_MAKE in
4184 [\\/]* | ?:[\\/]*)
4185 ac_cv_path_U_MAKE="$U_MAKE" # Let the user override the test with a path.
4186 ;;
4187 *)
4188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4189for as_dir in $PATH
4190do
4191 IFS=$as_save_IFS
4192 test -z "$as_dir" && as_dir=.
4193 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 4194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
4195 ac_cv_path_U_MAKE="$as_dir/$ac_word$ac_exec_ext"
4196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4197 break 2
4198 fi
4199done
4200 done
4201IFS=$as_save_IFS
73c04bcf 4202
729e4ab9
A
4203 ;;
4204esac
4205fi
4206U_MAKE=$ac_cv_path_U_MAKE
4207if test -n "$U_MAKE"; then
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $U_MAKE" >&5
4209$as_echo "$U_MAKE" >&6; }
4210else
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4212$as_echo "no" >&6; }
4213fi
46f4442e
A
4214
4215
729e4ab9
A
4216 test -n "$U_MAKE" && break
4217done
4218test -n "$U_MAKE" || U_MAKE="make"
73c04bcf 4219
73c04bcf 4220
73c04bcf 4221
73c04bcf 4222
73c04bcf 4223
729e4ab9
A
4224# Check whether --with-cross-build was given.
4225if test "${with_cross_build+set}" = set; then :
4226 withval=$with_cross_build; cross_buildroot="${withval}"
4227else
4228 cross_buildroot=""
73c04bcf
A
4229fi
4230
4231
729e4ab9
A
4232if test "X$cross_buildroot" = "X"; then
4233 if test "$cross_compiling" = "yes"; then
4234 as_fn_error $? "Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root" "$LINENO" 5
4235 fi
4236else
4237 if test -f "${cross_buildroot}/config/icucross.mk"; then
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using cross buildroot: $cross_buildroot" >&5
4239$as_echo "Using cross buildroot: $cross_buildroot" >&6; }
46f4442e 4240 else
729e4ab9
A
4241 if test -d "${cross_buildroot}"; then
4242 as_fn_error $? "${cross_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_buildroot} first." "$LINENO" 5
4243 else
4244 as_fn_error $? "No such directory ${cross_buildroot} supplied as the argument to --with-cross-build. Use an absolute path." "$LINENO" 5
4245 fi
4246 fi
4247fi
73c04bcf
A
4248
4249
729e4ab9
A
4250# Check for doxygen to generate documentation
4251# Extract the first word of "doxygen", so it can be a program name with args.
4252set dummy doxygen; ac_word=$2
4253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4254$as_echo_n "checking for $ac_word... " >&6; }
4388f060 4255if ${ac_cv_path_DOXYGEN+:} false; then :
729e4ab9 4256 $as_echo_n "(cached) " >&6
73c04bcf 4257else
729e4ab9
A
4258 case $DOXYGEN in
4259 [\\/]* | ?:[\\/]*)
4260 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
4261 ;;
4262 *)
4263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4264as_dummy="$PATH:/usr/local/bin:/usr/bin"
4265for as_dir in $as_dummy
73c04bcf 4266do
729e4ab9
A
4267 IFS=$as_save_IFS
4268 test -z "$as_dir" && as_dir=.
4269 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 4270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
4271 ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
4272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4273 break 2
73c04bcf 4274 fi
729e4ab9
A
4275done
4276 done
4277IFS=$as_save_IFS
4278
4279 ;;
4280esac
73c04bcf 4281fi
729e4ab9
A
4282DOXYGEN=$ac_cv_path_DOXYGEN
4283if test -n "$DOXYGEN"; then
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
4285$as_echo "$DOXYGEN" >&6; }
73c04bcf 4286else
729e4ab9
A
4287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288$as_echo "no" >&6; }
4289fi
4290
4291
4292
4293# Check that the linker is usable
4294
4295case "${host}" in
4296 *-*-cygwin*|*-*-mingw*)
4297 if test "$GCC" != yes && test -n "`link --version 2>&1 | grep 'GNU coreutils'`"; then
4298 as_fn_error $? "link.exe is not a valid linker. Your PATH is incorrect.
4299 Please follow the directions in ICU's readme." "$LINENO" 5
4300 fi;;
4301 *);;
4302esac
4303
4304# Determine the executable suffix
4305# We don't use AC_EXEEXT because some compilers output separate debugging
4306# files, which confuses the AC_EXEEXT macro.
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for executable suffix" >&5
4308$as_echo_n "checking checking for executable suffix... " >&6; }
4309case "${host}" in
4310 *-*-cygwin*|*-*-mingw*) EXEEXT=.exe ;;
4311 *) EXEEXT="" ;;
4312esac
4313ac_exeext=$EXEEXT
4314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4315$as_echo "$EXEEXT" >&6; }
73c04bcf 4316
73c04bcf 4317
729e4ab9
A
4318# Determine how strict we want to be when compiling
4319
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strict compiling is on" >&5
4321$as_echo_n "checking whether strict compiling is on... " >&6; }
4322 # Check whether --enable-strict was given.
4323if test "${enable_strict+set}" = set; then :
4324 enableval=$enable_strict;
4325 if test "$enableval" = no
4326 then
4327 ac_use_strict_options=no
4328 else
4329 ac_use_strict_options=yes
4330 fi
4331
73c04bcf 4332else
729e4ab9 4333 ac_use_strict_options=yes
73c04bcf 4334fi
73c04bcf 4335
729e4ab9
A
4336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_use_strict_options" >&5
4337$as_echo "$ac_use_strict_options" >&6; }
73c04bcf 4338
729e4ab9
A
4339 if test "$ac_use_strict_options" = yes
4340 then
4341 if test "$GCC" = yes
4342 then
57a6839d 4343 case "${host}" in
f3c0d7a5
A
4344 *-*-solaris*)
4345 # Don't use -std=c99 on Solaris because of timezone check fails
4346 ;;
57a6839d
A
4347 *)
4348 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
4349 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
4350 CFLAGS="$CFLAGS -std=c99"
4351 ;;
4352 esac
4353
4354 CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
729e4ab9
A
4355 else
4356 case "${host}" in
4357 *-*-cygwin)
4358 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
4359 then
4360 CFLAGS="$CFLAGS /W4"
b331163b
A
4361 fi ;;
4362 *-*-mingw*)
4363 CFLAGS="$CFLAGS -W4" ;;
729e4ab9
A
4364 esac
4365 fi
4366 if test "$GXX" = yes
4367 then
51004dcb 4368 CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
729e4ab9
A
4369 else
4370 case "${host}" in
4371 *-*-cygwin)
4372 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
4373 then
4374 CXXFLAGS="$CXXFLAGS /W4"
b331163b
A
4375 fi ;;
4376 *-*-mingw*)
4377 CFLAGS="$CFLAGS -W4" ;;
729e4ab9
A
4378 esac
4379 fi
4380 fi
73c04bcf 4381
73c04bcf 4382
729e4ab9
A
4383# Check if we can build and use 64-bit libraries
4384
4385
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4387$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4388f060 4388if ${ac_cv_path_GREP+:} false; then :
729e4ab9 4389 $as_echo_n "(cached) " >&6
73c04bcf 4390else
729e4ab9
A
4391 if test -z "$GREP"; then
4392 ac_path_GREP_found=false
4393 # Loop through the user's path and test for each of PROGNAME-LIST
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
73c04bcf 4396do
729e4ab9
A
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_prog in grep ggrep; do
4400 for ac_exec_ext in '' $ac_executable_extensions; do
4401 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
b331163b 4402 as_fn_executable_p "$ac_path_GREP" || continue
729e4ab9
A
4403# Check for GNU ac_path_GREP and select it if it is found.
4404 # Check for GNU $ac_path_GREP
4405case `"$ac_path_GREP" --version 2>&1` in
4406*GNU*)
4407 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4408*)
4409 ac_count=0
4410 $as_echo_n 0123456789 >"conftest.in"
4411 while :
4412 do
4413 cat "conftest.in" "conftest.in" >"conftest.tmp"
4414 mv "conftest.tmp" "conftest.in"
4415 cp "conftest.in" "conftest.nl"
4416 $as_echo 'GREP' >> "conftest.nl"
4417 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4419 as_fn_arith $ac_count + 1 && ac_count=$as_val
4420 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4421 # Best one so far, save it but keep looking for a better one
4422 ac_cv_path_GREP="$ac_path_GREP"
4423 ac_path_GREP_max=$ac_count
4424 fi
4425 # 10*(2^10) chars as input seems more than enough
4426 test $ac_count -gt 10 && break
4427 done
4428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4429esac
4430
4431 $ac_path_GREP_found && break 3
4432 done
4433 done
4434 done
4435IFS=$as_save_IFS
4436 if test -z "$ac_cv_path_GREP"; then
4437 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
73c04bcf
A
4438 fi
4439else
729e4ab9 4440 ac_cv_path_GREP=$GREP
73c04bcf 4441fi
73c04bcf 4442
73c04bcf 4443fi
729e4ab9
A
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4445$as_echo "$ac_cv_path_GREP" >&6; }
4446 GREP="$ac_cv_path_GREP"
73c04bcf 4447
73c04bcf 4448
729e4ab9
A
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4450$as_echo_n "checking for egrep... " >&6; }
4388f060 4451if ${ac_cv_path_EGREP+:} false; then :
729e4ab9
A
4452 $as_echo_n "(cached) " >&6
4453else
4454 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4455 then ac_cv_path_EGREP="$GREP -E"
4456 else
4457 if test -z "$EGREP"; then
4458 ac_path_EGREP_found=false
4459 # Loop through the user's path and test for each of PROGNAME-LIST
4460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4462do
4463 IFS=$as_save_IFS
4464 test -z "$as_dir" && as_dir=.
4465 for ac_prog in egrep; do
4466 for ac_exec_ext in '' $ac_executable_extensions; do
4467 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
b331163b 4468 as_fn_executable_p "$ac_path_EGREP" || continue
729e4ab9
A
4469# Check for GNU ac_path_EGREP and select it if it is found.
4470 # Check for GNU $ac_path_EGREP
4471case `"$ac_path_EGREP" --version 2>&1` in
4472*GNU*)
4473 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4474*)
4475 ac_count=0
4476 $as_echo_n 0123456789 >"conftest.in"
4477 while :
4478 do
4479 cat "conftest.in" "conftest.in" >"conftest.tmp"
4480 mv "conftest.tmp" "conftest.in"
4481 cp "conftest.in" "conftest.nl"
4482 $as_echo 'EGREP' >> "conftest.nl"
4483 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4484 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4485 as_fn_arith $ac_count + 1 && ac_count=$as_val
4486 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4487 # Best one so far, save it but keep looking for a better one
4488 ac_cv_path_EGREP="$ac_path_EGREP"
4489 ac_path_EGREP_max=$ac_count
4490 fi
4491 # 10*(2^10) chars as input seems more than enough
4492 test $ac_count -gt 10 && break
4493 done
4494 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4495esac
73c04bcf 4496
729e4ab9
A
4497 $ac_path_EGREP_found && break 3
4498 done
4499 done
4500 done
4501IFS=$as_save_IFS
4502 if test -z "$ac_cv_path_EGREP"; then
4503 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4504 fi
73c04bcf 4505else
729e4ab9 4506 ac_cv_path_EGREP=$EGREP
73c04bcf
A
4507fi
4508
729e4ab9 4509 fi
73c04bcf 4510fi
729e4ab9
A
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4512$as_echo "$ac_cv_path_EGREP" >&6; }
4513 EGREP="$ac_cv_path_EGREP"
73c04bcf
A
4514
4515
729e4ab9
A
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4517$as_echo_n "checking for ANSI C header files... " >&6; }
4388f060 4518if ${ac_cv_header_stdc+:} false; then :
729e4ab9 4519 $as_echo_n "(cached) " >&6
73c04bcf 4520else
729e4ab9 4521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
4522/* end confdefs.h. */
4523#include <stdlib.h>
4524#include <stdarg.h>
4525#include <string.h>
4526#include <float.h>
4527
4528int
4529main ()
4530{
4531
4532 ;
4533 return 0;
4534}
4535_ACEOF
729e4ab9 4536if ac_fn_c_try_compile "$LINENO"; then :
73c04bcf
A
4537 ac_cv_header_stdc=yes
4538else
729e4ab9 4539 ac_cv_header_stdc=no
73c04bcf 4540fi
729e4ab9 4541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73c04bcf
A
4542
4543if test $ac_cv_header_stdc = yes; then
4544 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
729e4ab9 4545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
4546/* end confdefs.h. */
4547#include <string.h>
4548
4549_ACEOF
4550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
729e4ab9
A
4551 $EGREP "memchr" >/dev/null 2>&1; then :
4552
73c04bcf
A
4553else
4554 ac_cv_header_stdc=no
b75a7d8f
A
4555fi
4556rm -f conftest*
b75a7d8f
A
4557
4558fi
b75a7d8f 4559
73c04bcf
A
4560if test $ac_cv_header_stdc = yes; then
4561 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
729e4ab9 4562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
4563/* end confdefs.h. */
4564#include <stdlib.h>
b75a7d8f 4565
73c04bcf
A
4566_ACEOF
4567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
729e4ab9
A
4568 $EGREP "free" >/dev/null 2>&1; then :
4569
b75a7d8f 4570else
73c04bcf 4571 ac_cv_header_stdc=no
b75a7d8f 4572fi
73c04bcf 4573rm -f conftest*
b75a7d8f 4574
73c04bcf 4575fi
b75a7d8f 4576
73c04bcf
A
4577if test $ac_cv_header_stdc = yes; then
4578 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
729e4ab9 4579 if test "$cross_compiling" = yes; then :
73c04bcf 4580 :
b75a7d8f 4581else
729e4ab9 4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
4583/* end confdefs.h. */
4584#include <ctype.h>
729e4ab9 4585#include <stdlib.h>
73c04bcf
A
4586#if ((' ' & 0x0FF) == 0x020)
4587# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4588# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
b75a7d8f 4589#else
73c04bcf
A
4590# define ISLOWER(c) \
4591 (('a' <= (c) && (c) <= 'i') \
4592 || ('j' <= (c) && (c) <= 'r') \
4593 || ('s' <= (c) && (c) <= 'z'))
4594# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
b75a7d8f
A
4595#endif
4596
73c04bcf
A
4597#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4598int
4599main ()
4600{
4601 int i;
4602 for (i = 0; i < 256; i++)
4603 if (XOR (islower (i), ISLOWER (i))
4604 || toupper (i) != TOUPPER (i))
729e4ab9
A
4605 return 2;
4606 return 0;
73c04bcf
A
4607}
4608_ACEOF
729e4ab9 4609if ac_fn_c_try_run "$LINENO"; then :
73c04bcf 4610
729e4ab9
A
4611else
4612 ac_cv_header_stdc=no
73c04bcf 4613fi
729e4ab9
A
4614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4615 conftest.$ac_objext conftest.beam conftest.$ac_ext
b75a7d8f 4616fi
729e4ab9 4617
b75a7d8f 4618fi
b75a7d8f 4619fi
729e4ab9
A
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4621$as_echo "$ac_cv_header_stdc" >&6; }
73c04bcf 4622if test $ac_cv_header_stdc = yes; then
b75a7d8f 4623
729e4ab9 4624$as_echo "#define STDC_HEADERS 1" >>confdefs.h
b75a7d8f 4625
b75a7d8f
A
4626fi
4627
73c04bcf 4628# On IRIX 5.3, sys/types and inttypes.h are conflicting.
729e4ab9
A
4629for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4630 inttypes.h stdint.h unistd.h
4631do :
4632 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4633ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4634"
4635if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4636 cat >>confdefs.h <<_ACEOF
4637#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4638_ACEOF
b75a7d8f 4639
729e4ab9 4640fi
b75a7d8f 4641
729e4ab9 4642done
b75a7d8f 4643
b75a7d8f 4644
b75a7d8f 4645
729e4ab9
A
4646 BITS_REQ=nochange
4647 ENABLE_64BIT_LIBS=unknown
4648 ## revisit this for cross-compile.
b75a7d8f 4649
729e4ab9
A
4650 # Check whether --enable-64bit-libs was given.
4651if test "${enable_64bit_libs+set}" = set; then :
4652 enableval=$enable_64bit_libs; echo "note, use --with-library-bits instead of --*-64bit-libs"
4653 case "${enableval}" in
4654 no|false|32) with_library_bits=32; ;;
4655 yes|true|64) with_library_bits=64else32 ;;
4656 nochange) with_library_bits=nochange; ;;
4657 *) as_fn_error $? "bad value ${enableval} for '--*-64bit-libs'" "$LINENO" 5 ;;
4658 esac
4659fi
374ca955
A
4660
4661
4662
73c04bcf 4663
729e4ab9
A
4664# Check whether --with-library-bits was given.
4665if test "${with_library_bits+set}" = set; then :
4666 withval=$with_library_bits; case "${withval}" in
4667 ""|nochange) BITS_REQ=$withval ;;
4668 32|64|64else32) BITS_REQ=$withval ;;
4669 *) as_fn_error $? "bad value ${withval} for --with-library-bits" "$LINENO" 5 ;;
4670 esac
4671fi
4672
4673
4674 # don't use these for cross compiling
4675 if test "$cross_compiling" = "yes" -a "${BITS_REQ}" != "nochange"; then
4676 as_fn_error $? "Don't specify bitness when cross compiling. See readme.html for help with cross compilation., and set compiler options manually." "$LINENO" 5
4677 fi
4678 # The cast to long int works around a bug in the HP C Compiler
4679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4681# This bug is HP SR number 8606223364.
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
4683$as_echo_n "checking size of void *... " >&6; }
4388f060 4684if ${ac_cv_sizeof_void_p+:} false; then :
729e4ab9 4685 $as_echo_n "(cached) " >&6
73c04bcf 4686else
729e4ab9 4687 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
73c04bcf 4688
729e4ab9
A
4689else
4690 if test "$ac_cv_type_void_p" = yes; then
4691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4693as_fn_error 77 "cannot compute sizeof (void *)
4694See \`config.log' for more details" "$LINENO" 5; }
4695 else
4696 ac_cv_sizeof_void_p=0
4697 fi
73c04bcf 4698fi
73c04bcf 4699
b75a7d8f 4700fi
729e4ab9
A
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
4702$as_echo "$ac_cv_sizeof_void_p" >&6; }
73c04bcf
A
4703
4704
4705
729e4ab9
A
4706cat >>confdefs.h <<_ACEOF
4707#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
73c04bcf 4708_ACEOF
729e4ab9
A
4709
4710
4711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether runnable 64 bit binaries are built by default" >&5
4712$as_echo_n "checking whether runnable 64 bit binaries are built by default... " >&6; }
4713 case $ac_cv_sizeof_void_p in
4714 8) DEFAULT_64BIT=yes ;;
4715 4) DEFAULT_64BIT=no ;;
4716 *) DEFAULT_64BIT=unknown
4717 esac
4718 BITS_GOT=unknown
4719
4720 # 'OK' here means, we can exit any further checking, everything's copa
4721 BITS_OK=yes
4722
4723 # do we need to check for buildable/runnable 32 or 64 bit?
4724 BITS_CHECK_32=no
4725 BITS_CHECK_64=no
4726
4727 # later, can we run the 32/64 bit binaries so made?
4728 BITS_RUN_32=no
4729 BITS_RUN_64=no
4730
4731 if test "$DEFAULT_64BIT" = "yes"; then
4732 # we get 64 bits by default.
4733 BITS_GOT=64
4734 case "$BITS_REQ" in
4735 32)
4736 # need to look for 32 bit support.
4737 BITS_CHECK_32=yes
4738 # not copa.
4739 BITS_OK=no;;
4740 # everyone else is happy.
4741 nochange) ;;
4742 *) ;;
4743 esac
4744 elif test "$DEFAULT_64BIT" = "no"; then
4745 # not 64 bit by default.
4746 BITS_GOT=32
4747 case "$BITS_REQ" in
4748 64|64else32)
4749 BITS_CHECK_64=yes
4750 #BITS_CHECK_32=yes
4751 BITS_OK=no;;
4752 nochange) ;;
4753 *) ;;
4754 esac
4755 elif test "$DEFAULT_64BIT" = "unknown"; then
4756 # cross compiling.
4757 BITS_GOT=unknown
4758 case "$BITS_REQ" in
4759 64|64else32) BITS_OK=no
4760 BITS_CHECK_32=yes
4761 BITS_CHECK_64=yes ;;
4762 32) BITS_OK=no;;
4763 nochange) ;;
4764 *) ;;
4765 esac
4766 fi
4767
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_64BIT" >&5
4769$as_echo "$DEFAULT_64BIT" >&6; };
4770
4771 if test "$BITS_OK" != "yes"; then
4772 # not copa. back these up.
4773 CFLAGS_OLD="${CFLAGS}"
4774 CXXFLAGS_OLD="${CXXFLAGS}"
4775 LDFLAGS_OLD="${LDFLAGS}"
4776 ARFLAGS_OLD="${ARFLAGS}"
4777
4778 CFLAGS_32="${CFLAGS}"
4779 CXXFLAGS_32="${CXXFLAGS}"
4780 LDFLAGS_32="${LDFLAGS}"
4781 ARFLAGS_32="${ARFLAGS}"
4782
4783 CFLAGS_64="${CFLAGS}"
4784 CXXFLAGS_64="${CXXFLAGS}"
4785 LDFLAGS_64="${LDFLAGS}"
4786 ARFLAGS_64="${ARFLAGS}"
4787
4788 CAN_BUILD_64=unknown
4789 CAN_BUILD_32=unknown
4790 # These results can't be cached because is sets compiler flags.
4791 if test "$BITS_CHECK_64" = "yes"; then
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build 64-bit executables" >&5
4793$as_echo_n "checking how to build 64-bit executables... " >&6; }
4794 CAN_BUILD_64=no
4795 ####
4796 # Find out if we think we can *build* for 64 bit. Doesn't check whether we can run it.
4797 # Note, we don't have to actually check if the options work- we'll try them before using them.
4798 # So, only try actually testing the options, if you are trying to decide between multiple options.
4799 # On exit from the following clauses:
4800 # if CAN_BUILD_64=yes:
4801 # *FLAGS are assumed to contain the right settings for 64bit
4802 # else if CAN_BUILD_64=no: (default)
4803 # *FLAGS are assumed to be trashed, and will be reset from *FLAGS_OLD
4804
4805 if test "$GCC" = yes; then
4806 CFLAGS="${CFLAGS} -m64"
4807 CXXFLAGS="${CXXFLAGS} -m64"
4808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 4809/* end confdefs.h. */
729e4ab9 4810int main(void) {return (sizeof(void*)*8==64)?0:1;}
73c04bcf 4811_ACEOF
729e4ab9
A
4812if ac_fn_c_try_compile "$LINENO"; then :
4813 CAN_BUILD_64=yes
73c04bcf 4814else
729e4ab9 4815 CAN_BUILD_64=no
73c04bcf 4816fi
729e4ab9
A
4817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4818 else
4819 case "${host}" in
4820 sparc*-*-solaris*)
4821 # 1. try -m64
4822 CFLAGS="${CFLAGS} -m64"
4823 CXXFLAGS="${CXXFLAGS} -m64"
4388f060
A
4824 if test "$cross_compiling" = yes; then :
4825 CAN_BUILD_64=unknown
4826else
4827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
729e4ab9
A
4828/* end confdefs.h. */
4829int main(void) {return (sizeof(void*)*8==64)?0:1;}
4830_ACEOF
4388f060 4831if ac_fn_c_try_run "$LINENO"; then :
729e4ab9
A
4832 CAN_BUILD_64=yes
4833else
4834 CAN_BUILD_64=no
4835fi
4388f060
A
4836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4837 conftest.$ac_objext conftest.beam conftest.$ac_ext
4838fi
4839
729e4ab9
A
4840 if test "$CAN_BUILD_64" != yes; then
4841 # Nope. back out changes.
4842 CFLAGS="${CFLAGS_OLD}"
b331163b 4843 CXXFLAGS="${CXXFLAGS_OLD}"
729e4ab9
A
4844 # 2. try xarch=v9 [deprecated]
4845 ## TODO: cross compile: the following won't work.
4846 SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
4847 SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
4848 # "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs"
4849 if test -z "$SOL64" && test -n "$SPARCV9"; then
4850 CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
4851 CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
4852 LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
4853 CAN_BUILD_64=yes
4854 fi
4855 fi
4856 ;;
4857 i386-*-solaris*)
4858 # 1. try -m64
4859 CFLAGS="${CFLAGS} -m64"
4860 CXXFLAGS="${CXXFLAGS} -m64"
4388f060
A
4861 if test "$cross_compiling" = yes; then :
4862 CAN_BUILD_64=unknown
4863else
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
729e4ab9
A
4865/* end confdefs.h. */
4866int main(void) {return (sizeof(void*)*8==64)?0:1;}
4867_ACEOF
4388f060 4868if ac_fn_c_try_run "$LINENO"; then :
729e4ab9
A
4869 CAN_BUILD_64=yes
4870else
4871 CAN_BUILD_64=no
4872fi
4388f060
A
4873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4874 conftest.$ac_objext conftest.beam conftest.$ac_ext
4875fi
4876
729e4ab9
A
4877 if test "$CAN_BUILD_64" != yes; then
4878 # Nope. back out changes.
4879 CFLAGS="${CFLAGS_OLD}"
4880 CXXFLAGS="${CXXFLAGS_OLD}"
4881 # 2. try the older compiler option
4882 ## TODO: cross compile problem
4388f060 4883 AMD64=`isainfo -n 2>&1 | grep amd64`
729e4ab9
A
4884 SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
4885 if test -z "$SOL64" && test -n "$AMD64"; then
4886 CFLAGS="${CFLAGS} -xtarget=generic64"
4887 CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
4888 CAN_BUILD_64=yes
4889 fi
4890 fi
4891 ;;
4892 ia64-*-linux*)
4893 # check for ecc/ecpc compiler support
4894 ## TODO: cross compiler problem
4895 if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
4896 if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
4897 CAN_BUILD_64=yes
4898 fi
4899 fi
4900 ;;
4901 *-*-cygwin)
4902 # vcvarsamd64.bat should have been used to enable 64-bit builds.
4903 # We only do this check to display the correct answer.
4904 ## TODO: cross compiler problem
4905 if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
4906 CAN_BUILD_64=yes
4907 fi
4908 ;;
4909 *-*-aix*|powerpc64-*-linux*)
4910 CFLAGS="${CFLAGS} -q64"
4911 CXXFLAGS="${CXXFLAGS} -q64"
4912 LDFLAGS="${LDFLAGS} -q64"
4913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914/* end confdefs.h. */
4915int main(void) {return (sizeof(void*)*8==64)?0:1;}
73c04bcf 4916_ACEOF
729e4ab9
A
4917if ac_fn_c_try_compile "$LINENO"; then :
4918 CAN_BUILD_64=yes
4919else
4920 CAN_BUILD_64=no
4921fi
4922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 if test "$CAN_BUILD_64" = yes; then
4924 # worked- set other options.
4925 case "${host}" in
4926 *-*-aix*)
4927 # tell AIX what executable mode to use.
4928 ARFLAGS="${ARFLAGS} -X64"
4929 esac
4930 fi
4931 ;;
4932 *-*-hpux*)
4933 # First we try the newer +DD64, if that doesn't work,
4934 # try other options.
4935
4936 CFLAGS="${CFLAGS} +DD64"
4937 CXXFLAGS="${CXXFLAGS} +DD64"
4938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 4939/* end confdefs.h. */
729e4ab9
A
4940int main(void) {return (sizeof(void*)*8==64)?0:1;}
4941_ACEOF
4942if ac_fn_c_try_compile "$LINENO"; then :
4943 CAN_BUILD_64=yes
4944else
4945 CAN_BUILD_64=no
4946fi
4947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4948 if test "$CAN_BUILD_64" != yes; then
4949 # reset
4950 CFLAGS="${CFLAGS_OLD}"
4951 CXXFLAGS="${CXXFLAGS_OLD}"
4952 # append
4953 CFLAGS="${CFLAGS} +DA2.0W"
4954 CXXFLAGS="${CXXFLAGS} +DA2.0W"
4955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4956/* end confdefs.h. */
4957int main(void) {return (sizeof(void*)*8==64)?0:1;}
73c04bcf 4958_ACEOF
729e4ab9
A
4959if ac_fn_c_try_compile "$LINENO"; then :
4960 CAN_BUILD_64=yes
b75a7d8f 4961else
729e4ab9 4962 CAN_BUILD_64=no
b75a7d8f 4963fi
729e4ab9
A
4964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4965 fi
4966 ;;
4967 *-*ibm-openedition*|*-*-os390*)
4968 CFLAGS="${CFLAGS} -Wc,lp64"
4969 CXXFLAGS="${CXXFLAGS} -Wc,lp64"
4970 LDFLAGS="${LDFLAGS} -Wl,lp64"
4971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4972/* end confdefs.h. */
4973int main(void) {return (sizeof(void*)*8==64)?0:1;}
4974_ACEOF
4975if ac_fn_c_try_compile "$LINENO"; then :
4976 CAN_BUILD_64=yes
b75a7d8f 4977else
729e4ab9 4978 CAN_BUILD_64=no
b75a7d8f 4979fi
729e4ab9
A
4980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4981 ;;
4982 *)
4983 # unknown platform.
4984 ;;
4985 esac
4986 fi
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAN_BUILD_64" >&5
4988$as_echo "$CAN_BUILD_64" >&6; }
4989 if test "$CAN_BUILD_64" = yes; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether runnable 64-bit binaries are being built " >&5
4991$as_echo_n "checking whether runnable 64-bit binaries are being built ... " >&6; }
4992 if test "$cross_compiling" = yes; then :
4993 BITS_RUN_64=unknown
4994else
4995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4996/* end confdefs.h. */
4997int main(void) {return (sizeof(void*)*8==64)?0:1;}
4998_ACEOF
4999if ac_fn_c_try_run "$LINENO"; then :
5000 BITS_RUN_64=yes
73c04bcf 5001else
729e4ab9 5002 BITS_RUN_64=no
b75a7d8f 5003fi
729e4ab9
A
5004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5005 conftest.$ac_objext conftest.beam conftest.$ac_ext
b75a7d8f 5006fi
73c04bcf 5007
729e4ab9
A
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BITS_RUN_64" >&5
5009$as_echo "$BITS_RUN_64" >&6; };
b75a7d8f 5010
729e4ab9
A
5011 CFLAGS_64="${CFLAGS}"
5012 CXXFLAGS_64="${CXXFLAGS}"
5013 LDFLAGS_64="${LDFLAGS}"
5014 ARFLAGS_64="${ARFLAGS}"
5015 fi
5016 # put it back.
5017 CFLAGS="${CFLAGS_OLD}"
5018 CXXFLAGS="${CXXFLAGS_OLD}"
5019 LDFLAGS="${LDFLAGS_OLD}"
5020 ARFLAGS="${ARFLAGS_OLD}"
5021 fi
5022 if test "$BITS_CHECK_32" = "yes"; then
5023 # see comment under 'if BITS_CHECK_64', above.
5024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build 32-bit executables" >&5
5025$as_echo_n "checking how to build 32-bit executables... " >&6; }
5026 if test "$GCC" = yes; then
5027 CFLAGS="${CFLAGS} -m32"
5028 CXXFLAGS="${CXXFLAGS} -m32"
5029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5030/* end confdefs.h. */
5031int main(void) {return (sizeof(void*)*8==32)?0:1;}
5032_ACEOF
5033if ac_fn_c_try_compile "$LINENO"; then :
5034 CAN_BUILD_32=yes
b75a7d8f 5035else
729e4ab9 5036 CAN_BUILD_32=no
b75a7d8f 5037fi
729e4ab9
A
5038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5039 fi
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAN_BUILD_32" >&5
5041$as_echo "$CAN_BUILD_32" >&6; }
5042 if test "$CAN_BUILD_32" = yes; then
5043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether runnable 32-bit binaries are being built " >&5
5044$as_echo_n "checking whether runnable 32-bit binaries are being built ... " >&6; }
5045 if test "$cross_compiling" = yes; then :
5046 BITS_RUN_32=unknown
5047else
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049/* end confdefs.h. */
5050int main(void) {return (sizeof(void*)*8==32)?0:1;}
5051_ACEOF
5052if ac_fn_c_try_run "$LINENO"; then :
5053 BITS_RUN_32=yes
5054else
5055 BITS_RUN_32=no
5056fi
5057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5058 conftest.$ac_objext conftest.beam conftest.$ac_ext
b75a7d8f
A
5059fi
5060
729e4ab9
A
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BITS_RUN_32" >&5
5062$as_echo "$BITS_RUN_32" >&6; };
5063 CFLAGS_32="${CFLAGS}"
5064 CXXFLAGS_32="${CXXFLAGS}"
5065 LDFLAGS_32="${LDFLAGS}"
5066 ARFLAGS_32="${ARFLAGS}"
5067 fi
5068 # put it back.
5069 CFLAGS="${CFLAGS_OLD}"
5070 CXXFLAGS="${CXXFLAGS_OLD}"
5071 LDFLAGS="${LDFLAGS_OLD}"
5072 ARFLAGS="${ARFLAGS_OLD}"
5073 fi
b75a7d8f 5074
729e4ab9
A
5075 ##
5076 # OK. Now, we've tested for 32 and 64 bitness. Let's see what we'll do.
5077 #
b75a7d8f 5078
729e4ab9
A
5079 # First, implement 64else32
5080 if test "$BITS_REQ" = "64else32"; then
5081 if test "$BITS_RUN_64" = "yes"; then
5082 BITS_REQ=64
5083 else
5084 # no changes.
5085 BITS_OK=yes
5086 fi
5087 fi
73c04bcf 5088
729e4ab9
A
5089 # implement.
5090 if test "$BITS_REQ" = "32" -a "$BITS_RUN_32" = "yes"; then
5091 CFLAGS="${CFLAGS_32}"
5092 CXXFLAGS="${CXXFLAGS_32}"
5093 LDFLAGS="${LDFLAGS_32}"
5094 ARFLAGS="${ARFLAGS_32}"
5095 BITS_OK=yes
5096 elif test "$BITS_REQ" = "64" -a "$BITS_RUN_64" = "yes"; then
5097 CFLAGS="${CFLAGS_64}"
5098 CXXFLAGS="${CXXFLAGS_64}"
5099 LDFLAGS="${LDFLAGS_64}"
5100 ARFLAGS="${ARFLAGS_64}"
5101 BITS_OK=yes
5102 elif test "$BITS_OK" != "yes"; then
5103 as_fn_error $? "Requested $BITS_REQ bit binaries but could not compile and execute them. See readme.html for help with cross compilation., and set compiler options manually." "$LINENO" 5
5104 fi
5105 fi
b75a7d8f 5106
73c04bcf
A
5107
5108
b75a7d8f 5109
729e4ab9 5110# Determine the Makefile fragment
73c04bcf 5111
729e4ab9
A
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Makefile fragment to use for ${host}" >&5
5113$as_echo_n "checking which Makefile fragment to use for ${host}... " >&6; }
4388f060 5114if ${icu_cv_host_frag+:} false; then :
729e4ab9
A
5115 $as_echo_n "(cached) " >&6
5116else
5117
5118case "${host}" in
5119*-*-solaris*)
5120 if test "$GCC" = yes; then
5121 icu_cv_host_frag=mh-solaris-gcc
5122 else
5123 icu_cv_host_frag=mh-solaris
5124 fi ;;
5125alpha*-*-linux-gnu)
5126 if test "$GCC" = yes; then
5127 icu_cv_host_frag=mh-alpha-linux-gcc
5128 else
5129 icu_cv_host_frag=mh-alpha-linux-cc
5130 fi ;;
5131powerpc*-*-linux*)
5132 if test "$GCC" = yes; then
5133 icu_cv_host_frag=mh-linux
5134 else
5135 icu_cv_host_frag=mh-linux-va
5136 fi ;;
5137*-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-linux ;;
b331163b 5138i[34567]86-*-cygwin)
729e4ab9 5139 if test "$GCC" = yes; then
b331163b
A
5140 icu_cv_host_frag=mh-cygwin
5141 else
5142 icu_cv_host_frag=mh-cygwin-msvc
5143 fi ;;
5144x86_64-*-cygwin)
5145 if test "$GCC" = yes; then
5146 icu_cv_host_frag=mh-cygwin64
5147 else
5148 icu_cv_host_frag=mh-cygwin-msvc
5149 fi ;;
5150*-*-mingw*)
5151 if test "$GCC" = yes; then
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51004dcb
A
5153/* end confdefs.h. */
5154
5155#ifndef __MINGW64__
5156#error This is not MinGW64
5157#endif
5158int
5159main ()
5160{
5161
5162 ;
5163 return 0;
5164}
5165_ACEOF
5166if ac_fn_c_try_compile "$LINENO"; then :
5167 icu_cv_host_frag=mh-mingw64
5168else
729e4ab9 5169 icu_cv_host_frag=mh-mingw
51004dcb 5170fi
729e4ab9
A
5171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5172 else
b331163b
A
5173 case "${host}" in
5174 *-*-mingw*) icu_cv_host_frag=mh-msys-msvc ;;
5175 *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;;
5176 esac
729e4ab9
A
5177 fi ;;
5178*-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;;
5179*-*-aix*)
5180 if test "$GCC" = yes; then
5181 icu_cv_host_frag=mh-aix-gcc
5182 else
5183 icu_cv_host_frag=mh-aix-va
5184 fi ;;
5185*-*-hpux*)
5186 if test "$GCC" = yes; then
5187 icu_cv_host_frag=mh-hpux-gcc
5188 else
5189 case "$CXX" in
5190 *aCC) icu_cv_host_frag=mh-hpux-acc ;;
5191 esac
5192 fi ;;
5193*-*ibm-openedition*|*-*-os390*) icu_cv_host_frag=mh-os390 ;;
5194*-*-os400*) icu_cv_host_frag=mh-os400 ;;
5195*-apple-rhapsody*) icu_cv_host_frag=mh-darwin ;;
5196*-apple-darwin*) icu_cv_host_frag=mh-darwin ;;
5197*-*-beos) icu_cv_host_frag=mh-beos ;;
5198*-*-haiku) icu_cv_host_frag=mh-haiku ;;
5199*-*-irix*) icu_cv_host_frag=mh-irix ;;
5200*-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;;
5201*-*-nto*) icu_cv_host_frag=mh-qnx ;;
5202*-ncr-*) icu_cv_host_frag=mh-mpras ;;
5203*) icu_cv_host_frag=mh-unknown ;;
5204esac
5205
73c04bcf 5206
b75a7d8f 5207fi
729e4ab9
A
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $icu_cv_host_frag" >&5
5209$as_echo "$icu_cv_host_frag" >&6; }
5210
5211
5212# Checks for libraries and other host specific stuff
5213# On HP/UX, don't link to -lm from a shared lib because it isn't
5214# PIC (at least on 10.2)
5215case "${host}" in
5216 *-*-hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
5217$as_echo_n "checking for floor in -lm... " >&6; }
4388f060 5218if ${ac_cv_lib_m_floor+:} false; then :
729e4ab9 5219 $as_echo_n "(cached) " >&6
73c04bcf 5220else
729e4ab9
A
5221 ac_check_lib_save_LIBS=$LIBS
5222LIBS="-lm $LIBS"
5223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 5224/* end confdefs.h. */
729e4ab9
A
5225
5226/* Override any GCC internal prototype to avoid an error.
5227 Use char because int might match the return type of a GCC
5228 builtin and then its argument prototype would still apply. */
5229#ifdef __cplusplus
5230extern "C"
5231#endif
5232char floor ();
73c04bcf
A
5233int
5234main ()
5235{
729e4ab9 5236return floor ();
73c04bcf
A
5237 ;
5238 return 0;
5239}
5240_ACEOF
729e4ab9
A
5241if ac_fn_c_try_link "$LINENO"; then :
5242 ac_cv_lib_m_floor=yes
b75a7d8f 5243else
729e4ab9 5244 ac_cv_lib_m_floor=no
b75a7d8f 5245fi
729e4ab9
A
5246rm -f core conftest.err conftest.$ac_objext \
5247 conftest$ac_exeext conftest.$ac_ext
5248LIBS=$ac_check_lib_save_LIBS
b75a7d8f 5249fi
729e4ab9
A
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
5251$as_echo "$ac_cv_lib_m_floor" >&6; }
4388f060 5252if test "x$ac_cv_lib_m_floor" = xyes; then :
729e4ab9 5253 LIB_M="-lm"
b75a7d8f 5254fi
729e4ab9 5255 ;;
b75a7d8f 5256
729e4ab9
A
5257 *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
5258$as_echo_n "checking for floor in -lm... " >&6; }
4388f060 5259if ${ac_cv_lib_m_floor+:} false; then :
729e4ab9 5260 $as_echo_n "(cached) " >&6
73c04bcf 5261else
729e4ab9
A
5262 ac_check_lib_save_LIBS=$LIBS
5263LIBS="-lm $LIBS"
5264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 5265/* end confdefs.h. */
b75a7d8f 5266
729e4ab9
A
5267/* Override any GCC internal prototype to avoid an error.
5268 Use char because int might match the return type of a GCC
5269 builtin and then its argument prototype would still apply. */
5270#ifdef __cplusplus
5271extern "C"
5272#endif
5273char floor ();
73c04bcf
A
5274int
5275main ()
5276{
729e4ab9 5277return floor ();
73c04bcf
A
5278 ;
5279 return 0;
5280}
5281_ACEOF
729e4ab9
A
5282if ac_fn_c_try_link "$LINENO"; then :
5283 ac_cv_lib_m_floor=yes
5284else
5285 ac_cv_lib_m_floor=no
5286fi
5287rm -f core conftest.err conftest.$ac_objext \
5288 conftest$ac_exeext conftest.$ac_ext
5289LIBS=$ac_check_lib_save_LIBS
5290fi
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
5292$as_echo "$ac_cv_lib_m_floor" >&6; }
4388f060 5293if test "x$ac_cv_lib_m_floor" = xyes; then :
729e4ab9
A
5294 cat >>confdefs.h <<_ACEOF
5295#define HAVE_LIBM 1
73c04bcf 5296_ACEOF
729e4ab9
A
5297
5298 LIBS="-lm $LIBS"
5299
5300fi
5301
5302 LIB_M="" ;;
5303esac
5304
5305
5306# Check whether to build shared libraries
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
5308$as_echo_n "checking whether to build shared libraries... " >&6; }
5309enabled=no
5310# Check whether --enable-shared was given.
5311if test "${enable_shared+set}" = set; then :
5312 enableval=$enable_shared; case "${enableval}" in
5313 yes|"") enabled=yes; ENABLE_SHARED=YES ;;
5314 no);;
5315 *) ;;
5316 esac
5317else
5318 enabled=yes; ENABLE_SHARED=YES
5319
5320fi
5321
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5323$as_echo "$enabled" >&6; }
5324
5325
5326# Check whether to build static libraries
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
5328$as_echo_n "checking whether to build static libraries... " >&6; }
5329enabled=no
5330# Check whether --enable-static was given.
5331if test "${enable_static+set}" = set; then :
5332 enableval=$enable_static; case "${enableval}" in
5333 yes|"") enabled=yes; ENABLE_STATIC=YES ;;
5334 no) ;;
5335 *) ;;
5336 esac
5337fi
5338
5339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5340$as_echo "$enabled" >&6; }
5341
5342
4388f060
A
5343# When building release static library, there might be some optimization flags we can use
5344if test "$ENABLE_STATIC" = "YES"; then
5345 if test "$ENABLE_SHARED" != "YES"; then
5346 if test "$ENABLE_RELEASE" = 1; then
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use static library optimization option" >&5
5348$as_echo_n "checking whether we can use static library optimization option... " >&6; }
5349 CHECK_STATIC_OPT_FLAG=no
5350
5351 OLD_CPPFLAGS="${CPPFLAGS}"
5352 OLD_LDFLAGS="${LDFLAGS}"
5353
5354 case "${host}" in
5355 *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
51004dcb 5356 if test "$GCC" = yes; then
4388f060
A
5357 CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
5358 LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
5359 fi
5360 ;;
5361 *)
5362 ;;
5363 esac
5364
5365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h. */
5367
5368int
5369main ()
5370{
5371
5372 ;
5373 return 0;
5374}
5375_ACEOF
5376if ac_fn_c_try_link "$LINENO"; then :
5377 CHECK_STATIC_OPT_FLAG=yes
5378else
5379 CHECK_STATIC_OPT_FLAG=no
5380fi
5381rm -f core conftest.err conftest.$ac_objext \
5382 conftest$ac_exeext conftest.$ac_ext
5383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_STATIC_OPT_FLAG" >&5
5384$as_echo "$CHECK_STATIC_OPT_FLAG" >&6; }
5385 if test "$CHECK_STATIC_OPT_FLAG" = no; then
5386 CPPFLAGS="${OLD_CPPFLAGS}"
5387 LDFLAGS="${OLD_LDFLAGS}"
5388 fi
5389 fi
5390 fi
5391fi
5392
5393
729e4ab9
A
5394# Check whether to enable auto cleanup of libraries
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable auto cleanup of libraries" >&5
5396$as_echo_n "checking whether to enable auto cleanup of libraries... " >&6; }
5397enabled=no
5398UCLN_NO_AUTO_CLEANUP=1
5399# Check whether --enable-auto-cleanup was given.
5400if test "${enable_auto_cleanup+set}" = set; then :
5401 enableval=$enable_auto_cleanup; case "${enableval}" in
4388f060
A
5402 yes) enabled=yes;
5403 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0";
5404 UCLN_NO_AUTO_CLEANUP=0
5405 ;;
729e4ab9
A
5406 *) ;;
5407 esac
5408fi
5409
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5411$as_echo "$enabled" >&6; }
5412
5413
5414# MSVC floating-point option
5415MSVC_RELEASE_FLAG=""
5416if test $enabled = yes
5417then
b331163b 5418 if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc
729e4ab9
A
5419 then
5420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 5421/* end confdefs.h. */
729e4ab9
A
5422
5423 #if defined _MSC_VER && _MSC_VER >= 1400
5424 #else
5425 Microsoft Visual C++ < 2005
5426 #endif
b75a7d8f 5427
73c04bcf
A
5428int
5429main ()
5430{
73c04bcf
A
5431
5432 ;
5433 return 0;
5434}
5435_ACEOF
729e4ab9
A
5436if ac_fn_c_try_compile "$LINENO"; then :
5437 MSVC_RELEASE_FLAG="/fp:precise"
b75a7d8f 5438else
729e4ab9
A
5439 MSVC_RELEASE_FLAG="/Op"
5440fi
5441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73c04bcf 5442
729e4ab9
A
5443 CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}"
5444 CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}"
5445 fi
b75a7d8f 5446fi
73c04bcf 5447
729e4ab9
A
5448# Check whether to enabled draft APIs
5449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable draft APIs" >&5
5450$as_echo_n "checking whether to enable draft APIs... " >&6; }
5451enabled=yes
5452U_DEFAULT_SHOW_DRAFT=1
5453# Check whether --enable-draft was given.
5454if test "${enable_draft+set}" = set; then :
5455 enableval=$enable_draft; case "${enableval}" in
4388f060
A
5456 no) enabled=no; U_DEFAULT_SHOW_DRAFT=0;
5457 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0"
5458 ;;
729e4ab9
A
5459 *) ;;
5460 esac
5461fi
5462
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5464$as_echo "$enabled" >&6; }
5465# Make sure that we can use draft API in ICU.
5466if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
4388f060 5467 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
729e4ab9 5468fi
729e4ab9
A
5469
5470
5471if test -n "$ac_tool_prefix"; then
5472 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5473set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
4388f060 5476if ${ac_cv_prog_RANLIB+:} false; then :
729e4ab9
A
5477 $as_echo_n "(cached) " >&6
5478else
5479 if test -n "$RANLIB"; then
5480 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5481else
5482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485 IFS=$as_save_IFS
5486 test -z "$as_dir" && as_dir=.
5487 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 5488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
5489 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491 break 2
5492 fi
5493done
5494 done
5495IFS=$as_save_IFS
5496
5497fi
5498fi
5499RANLIB=$ac_cv_prog_RANLIB
5500if test -n "$RANLIB"; then
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5502$as_echo "$RANLIB" >&6; }
5503else
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
73c04bcf 5508
b75a7d8f 5509fi
729e4ab9
A
5510if test -z "$ac_cv_prog_RANLIB"; then
5511 ac_ct_RANLIB=$RANLIB
5512 # Extract the first word of "ranlib", so it can be a program name with args.
5513set dummy ranlib; ac_word=$2
5514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515$as_echo_n "checking for $ac_word... " >&6; }
4388f060 5516if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
729e4ab9
A
5517 $as_echo_n "(cached) " >&6
5518else
5519 if test -n "$ac_ct_RANLIB"; then
5520 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5521else
5522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523for as_dir in $PATH
5524do
5525 IFS=$as_save_IFS
5526 test -z "$as_dir" && as_dir=.
5527 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 5528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
5529 ac_cv_prog_ac_ct_RANLIB="ranlib"
5530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531 break 2
5532 fi
5533done
5534 done
5535IFS=$as_save_IFS
5536
b75a7d8f 5537fi
b75a7d8f 5538fi
729e4ab9
A
5539ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5540if test -n "$ac_ct_RANLIB"; then
5541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5542$as_echo "$ac_ct_RANLIB" >&6; }
5543else
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
b75a7d8f
A
5546fi
5547
729e4ab9
A
5548 if test "x$ac_ct_RANLIB" = x; then
5549 RANLIB=":"
5550 else
5551 case $cross_compiling:$ac_tool_warned in
5552yes:)
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5555ac_tool_warned=yes ;;
73c04bcf 5556esac
729e4ab9
A
5557 RANLIB=$ac_ct_RANLIB
5558 fi
5559else
5560 RANLIB="$ac_cv_prog_RANLIB"
5561fi
b75a7d8f 5562
729e4ab9 5563
f3c0d7a5
A
5564# need sed
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5566$as_echo_n "checking for a sed that does not truncate output... " >&6; }
5567if ${ac_cv_path_SED+:} false; then :
5568 $as_echo_n "(cached) " >&6
5569else
5570 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5571 for ac_i in 1 2 3 4 5 6 7; do
5572 ac_script="$ac_script$as_nl$ac_script"
5573 done
5574 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5575 { ac_script=; unset ac_script;}
5576 if test -z "$SED"; then
5577 ac_path_SED_found=false
5578 # Loop through the user's path and test for each of PROGNAME-LIST
5579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582 IFS=$as_save_IFS
5583 test -z "$as_dir" && as_dir=.
5584 for ac_prog in sed gsed; do
5585 for ac_exec_ext in '' $ac_executable_extensions; do
5586 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5587 as_fn_executable_p "$ac_path_SED" || continue
5588# Check for GNU ac_path_SED and select it if it is found.
5589 # Check for GNU $ac_path_SED
5590case `"$ac_path_SED" --version 2>&1` in
5591*GNU*)
5592 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5593*)
5594 ac_count=0
5595 $as_echo_n 0123456789 >"conftest.in"
5596 while :
5597 do
5598 cat "conftest.in" "conftest.in" >"conftest.tmp"
5599 mv "conftest.tmp" "conftest.in"
5600 cp "conftest.in" "conftest.nl"
5601 $as_echo '' >> "conftest.nl"
5602 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5603 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5604 as_fn_arith $ac_count + 1 && ac_count=$as_val
5605 if test $ac_count -gt ${ac_path_SED_max-0}; then
5606 # Best one so far, save it but keep looking for a better one
5607 ac_cv_path_SED="$ac_path_SED"
5608 ac_path_SED_max=$ac_count
5609 fi
5610 # 10*(2^10) chars as input seems more than enough
5611 test $ac_count -gt 10 && break
5612 done
5613 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5614esac
5615
5616 $ac_path_SED_found && break 3
5617 done
5618 done
5619 done
5620IFS=$as_save_IFS
5621 if test -z "$ac_cv_path_SED"; then
5622 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5623 fi
5624else
5625 ac_cv_path_SED=$SED
5626fi
5627
5628fi
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5630$as_echo "$ac_cv_path_SED" >&6; }
5631 SED="$ac_cv_path_SED"
5632 rm -f conftest.sed
5633
5634
729e4ab9 5635# look for 'ar' the proper way
729e4ab9
A
5636if test -n "$ac_tool_prefix"; then
5637 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5638set dummy ${ac_tool_prefix}ar; ac_word=$2
5639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5640$as_echo_n "checking for $ac_word... " >&6; }
4388f060 5641if ${ac_cv_prog_AR+:} false; then :
729e4ab9 5642 $as_echo_n "(cached) " >&6
b75a7d8f 5643else
729e4ab9
A
5644 if test -n "$AR"; then
5645 ac_cv_prog_AR="$AR" # Let the user override the test.
5646else
5647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5648for as_dir in $PATH
5649do
5650 IFS=$as_save_IFS
5651 test -z "$as_dir" && as_dir=.
5652 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 5653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
5654 ac_cv_prog_AR="${ac_tool_prefix}ar"
5655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5656 break 2
5657 fi
5658done
5659 done
5660IFS=$as_save_IFS
5661
5662fi
5663fi
5664AR=$ac_cv_prog_AR
5665if test -n "$AR"; then
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5667$as_echo "$AR" >&6; }
5668else
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
b75a7d8f
A
5671fi
5672
5673
729e4ab9
A
5674fi
5675if test -z "$ac_cv_prog_AR"; then
5676 ac_ct_AR=$AR
5677 # Extract the first word of "ar", so it can be a program name with args.
5678set dummy ar; ac_word=$2
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5680$as_echo_n "checking for $ac_word... " >&6; }
4388f060 5681if ${ac_cv_prog_ac_ct_AR+:} false; then :
729e4ab9
A
5682 $as_echo_n "(cached) " >&6
5683else
5684 if test -n "$ac_ct_AR"; then
5685 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5686else
5687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5688for as_dir in $PATH
5689do
5690 IFS=$as_save_IFS
5691 test -z "$as_dir" && as_dir=.
5692 for ac_exec_ext in '' $ac_executable_extensions; do
b331163b 5693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
729e4ab9
A
5694 ac_cv_prog_ac_ct_AR="ar"
5695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5696 break 2
5697 fi
5698done
5699 done
5700IFS=$as_save_IFS
5701
5702fi
5703fi
5704ac_ct_AR=$ac_cv_prog_ac_ct_AR
5705if test -n "$ac_ct_AR"; then
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5707$as_echo "$ac_ct_AR" >&6; }
5708else
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711fi
5712
5713 if test "x$ac_ct_AR" = x; then
4388f060 5714 AR="false"
729e4ab9
A
5715 else
5716 case $cross_compiling:$ac_tool_warned in
5717yes:)
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5720ac_tool_warned=yes ;;
5721esac
5722 AR=$ac_ct_AR
5723 fi
73c04bcf 5724else
729e4ab9
A
5725 AR="$ac_cv_prog_AR"
5726fi
5727
729e4ab9
A
5728
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable renaming of symbols" >&5
5730$as_echo_n "checking whether to enable renaming of symbols... " >&6; }
5731enabled=yes
5732U_DISABLE_RENAMING=0
5733# Check whether --enable-renaming was given.
5734if test "${enable_renaming+set}" = set; then :
5735 enableval=$enable_renaming; case "${enableval}" in
5736 yes|"") enabled=yes ;;
4388f060
A
5737 no) enabled=no; U_DISABLE_RENAMING=1;
5738 UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1"
5739 ;;
729e4ab9
A
5740 *) ;;
5741 esac
5742fi
5743
5744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5745$as_echo "$enabled" >&6; }
5746
5747
5748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable function and data tracing" >&5
5749$as_echo_n "checking whether to enable function and data tracing... " >&6; }
5750enabled=no
5751U_ENABLE_TRACING=0
5752# Check whether --enable-tracing was given.
5753if test "${enable_tracing+set}" = set; then :
5754 enableval=$enable_tracing; case "${enableval}" in
4388f060
A
5755 yes|"") enabled=yes;
5756 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1";
5757 U_ENABLE_TRACING=1 ;;
729e4ab9
A
5758 no) enabled=no; U_ENABLE_TRACING=0 ;;
5759 *) ;;
5760 esac
5761fi
5762
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enabled" >&5
5764$as_echo "$enabled" >&6; }
5765
5766
57a6839d
A
5767# check if elf.h is present.
5768for ac_header in elf.h
5769do :
5770 ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
5771if test "x$ac_cv_header_elf_h" = xyes; then :
5772 cat >>confdefs.h <<_ACEOF
5773#define HAVE_ELF_H 1
5774_ACEOF
5775
5776fi
5777
5778done
5779
5780if test "x$ac_cv_header_elf_h" = "xyes"; then
5781 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
5782fi
729e4ab9 5783
2ca993e8
A
5784# Enable/disable plugins
5785# Check whether --enable-plugins was given.
5786if test "${enable_plugins+set}" = set; then :
5787 enableval=$enable_plugins; case "${enableval}" in
5788 yes) plugins=true ;;
5789 no) plugins=false ;;
5790 *) as_fn_error $? "bad value ${enableval} for --enable-plugins" "$LINENO" 5 ;;
5791 esac
5792else
5793 plugins=false
5794fi
5795
5796
5797
5798if test "$plugins" = true; then
5799 PLUGINS_TRUE=
5800 U_HAVE_PLUGINS=1
5801else
5802 PLUGINS_TRUE='#'
5803 U_HAVE_PLUGINS=0
5804fi
5805
5806if test "x$plugins" = "xtrue"; then
5807 UCONFIG_CPPFLAGS="$UCONFIG_CPPFLAGS -DUCONFIG_ENABLE_PLUGINS=1"
5808fi
5809
5810
729e4ab9 5811U_ENABLE_DYLOAD=1
4388f060 5812enable=yes
2ca993e8
A
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins. Ignored if plugins disabled." >&5
5814$as_echo_n "checking whether to enable dynamic loading of plugins. Ignored if plugins disabled.... " >&6; }
729e4ab9
A
5815# Check whether --enable-dyload was given.
5816if test "${enable_dyload+set}" = set; then :
5817 enableval=$enable_dyload; case "${enableval}" in
5818 yes|"")
5819 U_ENABLE_DYLOAD=1
4388f060
A
5820 enable=yes
5821 ;;
729e4ab9
A
5822 no)
5823 U_ENABLE_DYLOAD=0;
4388f060
A
5824 enable=no;
5825 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0";
5826 ;;
729e4ab9
A
5827 *) ;;
5828 esac
5829fi
5830
4388f060
A
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable" >&5
5832$as_echo "$enable" >&6; }
729e4ab9
A
5833
5834
4388f060
A
5835if test "$enable" = "yes"; then
5836 for ac_header in dlfcn.h
729e4ab9
A
5837do :
5838 ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
4388f060 5839if test "x$ac_cv_header_dlfcn_h" = xyes; then :
729e4ab9
A
5840 cat >>confdefs.h <<_ACEOF
5841#define HAVE_DLFCN_H 1
73c04bcf 5842_ACEOF
73c04bcf 5843
729e4ab9 5844fi
73c04bcf 5845
729e4ab9 5846done
b75a7d8f 5847
4388f060
A
5848 #AC_MSG_RESULT($enabled)
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
729e4ab9 5850$as_echo_n "checking for library containing dlopen... " >&6; }
4388f060 5851if ${ac_cv_search_dlopen+:} false; then :
729e4ab9
A
5852 $as_echo_n "(cached) " >&6
5853else
5854 ac_func_search_save_LIBS=$LIBS
5855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5856/* end confdefs.h. */
b75a7d8f 5857
729e4ab9
A
5858/* Override any GCC internal prototype to avoid an error.
5859 Use char because int might match the return type of a GCC
73c04bcf 5860 builtin and then its argument prototype would still apply. */
73c04bcf 5861#ifdef __cplusplus
729e4ab9 5862extern "C"
b75a7d8f 5863#endif
729e4ab9 5864char dlopen ();
73c04bcf
A
5865int
5866main ()
5867{
729e4ab9 5868return dlopen ();
73c04bcf
A
5869 ;
5870 return 0;
5871}
5872_ACEOF
729e4ab9
A
5873for ac_lib in '' dl; do
5874 if test -z "$ac_lib"; then
5875 ac_res="none required"
5876 else
5877 ac_res=-l$ac_lib
5878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5879 fi
5880 if ac_fn_c_try_link "$LINENO"; then :
5881 ac_cv_search_dlopen=$ac_res
5882fi
5883rm -f core conftest.err conftest.$ac_objext \
5884 conftest$ac_exeext
4388f060 5885 if ${ac_cv_search_dlopen+:} false; then :
729e4ab9
A
5886 break
5887fi
5888done
4388f060 5889if ${ac_cv_search_dlopen+:} false; then :
729e4ab9 5890
73c04bcf 5891else
729e4ab9
A
5892 ac_cv_search_dlopen=no
5893fi
5894rm conftest.$ac_ext
5895LIBS=$ac_func_search_save_LIBS
5896fi
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
5898$as_echo "$ac_cv_search_dlopen" >&6; }
5899ac_res=$ac_cv_search_dlopen
5900if test "$ac_res" != no; then :
5901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
73c04bcf 5902
73c04bcf 5903fi
729e4ab9 5904
4388f060 5905 for ac_func in dlopen
729e4ab9
A
5906do :
5907 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
4388f060 5908if test "x$ac_cv_func_dlopen" = xyes; then :
729e4ab9
A
5909 cat >>confdefs.h <<_ACEOF
5910#define HAVE_DLOPEN 1
5911_ACEOF
5912
73c04bcf 5913fi
729e4ab9
A
5914done
5915
729e4ab9 5916
4388f060
A
5917 if test "x$ac_cv_func_dlopen" != xyes; then
5918 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0"
5919 fi
5920fi
729e4ab9
A
5921
5922# Check for miscellanous functions.
729e4ab9
A
5923# So, use for putil / tools only.
5924# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
729e4ab9
A
5925for ac_func in gettimeofday
5926do :
5927 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
4388f060 5928if test "x$ac_cv_func_gettimeofday" = xyes; then :
729e4ab9
A
5929 cat >>confdefs.h <<_ACEOF
5930#define HAVE_GETTIMEOFDAY 1
5931_ACEOF
5932
5933fi
5934done
5935
5936
4388f060 5937
729e4ab9
A
5938# Check whether to use the evil rpath or not
5939# Check whether --enable-rpath was given.
5940if test "${enable_rpath+set}" = set; then :
5941 enableval=$enable_rpath; case "${enableval}" in
5942 yes|"") ENABLE_RPATH=YES ;;
5943 no) ;;
5944 *) ;;
5945 esac
b75a7d8f 5946else
729e4ab9
A
5947 ENABLE_RPATH=NO
5948
b75a7d8f
A
5949fi
5950
729e4ab9
A
5951
5952
5953
b75a7d8f 5954
729e4ab9 5955ac_ext=cpp
b75a7d8f 5956ac_cpp='$CXXCPP $CPPFLAGS'
73c04bcf
A
5957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5960
729e4ab9
A
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++ compiler" >&5
5962$as_echo_n "checking if we have a C++ compiler... " >&6; }
5963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 5964/* end confdefs.h. */
73c04bcf
A
5965
5966int
5967main ()
5968{
729e4ab9 5969
73c04bcf
A
5970 ;
5971 return 0;
5972}
5973_ACEOF
729e4ab9
A
5974if ac_fn_cxx_try_compile "$LINENO"; then :
5975 cxx_okay=yes
b75a7d8f 5976else
729e4ab9 5977 cxx_okay=no
b75a7d8f 5978fi
729e4ab9
A
5979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980if test $cxx_okay = yes
b75a7d8f 5981then
4388f060
A
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Good" >&5
5983$as_echo "Good" >&6; }
729e4ab9
A
5984else
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987 as_fn_error $? "C++ compiler $CXX does not work or no compiler found" "$LINENO" 5
b75a7d8f
A
5988fi
5989
57a6839d 5990if [ "$GXX" = yes ]; then
f3c0d7a5 5991 # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++11,
57a6839d
A
5992 # and check that the compiler still works.
5993 if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
5994 OLD_CXXFLAGS="${CXXFLAGS}"
f3c0d7a5 5995 CXXFLAGS="$CXXFLAGS -std=c++11"
57a6839d
A
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++11 compiler" >&5
5997$as_echo_n "checking if we have a C++11 compiler... " >&6; }
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999/* end confdefs.h. */
6000
6001int
6002main ()
6003{
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009if ac_fn_cxx_try_compile "$LINENO"; then :
6010 cxx11_okay=yes
6011else
6012 cxx11_okay=no
6013fi
6014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx11_okay" >&5
6016$as_echo "$cxx11_okay" >&6; }
6017 if [ $cxx11_okay = yes ]; then
f3c0d7a5
A
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CXXFLAGS option -std=c++11" >&5
6019$as_echo "$as_me: Adding CXXFLAGS option -std=c++11" >&6;}
6020 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11"
57a6839d
A
6021 else
6022 CXXFLAGS="$OLD_CXXFLAGS"
6023 fi
f3c0d7a5
A
6024 case "${host}" in
6025 *-*-solaris*)
6026 CXXFLAGS="$OLD_CXXFLAGS"
6027 ;;
6028 esac
57a6839d
A
6029 fi
6030fi
6031
57a6839d
A
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include <atomic> works" >&5
6033$as_echo_n "checking if #include <atomic> works... " >&6; }
6034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6035/* end confdefs.h. */
6036#include <atomic>
6037int
6038main ()
6039{
6040
6041 ;
6042 return 0;
6043}
6044_ACEOF
6045if ac_fn_cxx_try_compile "$LINENO"; then :
6046 ac_cv_header_atomic=yes
6047else
6048 ac_cv_header_atomic=no
6049fi
6050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_atomic" >&5
6052$as_echo "$ac_cv_header_atomic" >&6; }
6053if test $ac_cv_header_atomic = yes
6054then
6055 U_HAVE_ATOMIC=1
6056else
6057 U_HAVE_ATOMIC=0
6058fi
6059# Make this available via CPPFLAGS
6060CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
6061
6062
729e4ab9
A
6063ac_ext=c
6064ac_cpp='$CPP $CPPFLAGS'
6065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6067ac_compiler_gnu=$ac_cv_c_compiler_gnu
6068
6069
51004dcb 6070# Always build ICU with multi-threading support.
729e4ab9
A
6071OLD_LIBS=${LIBS}
6072
2ca993e8
A
6073# For Compaq Tru64 (OSF1), we must look for pthread_attr_init
6074# and must do this before seaching for pthread_mutex_destroy, or
6075# we will pick up libpthreads.so not libpthread.so
6076# If this fails, then we must test for HPUX specials, before
6077# moving on to a more generic test
729e4ab9 6078
2ca993e8 6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_init in -lpthread" >&5
729e4ab9 6080$as_echo_n "checking for pthread_attr_init in -lpthread... " >&6; }
4388f060 6081if ${ac_cv_lib_pthread_pthread_attr_init+:} false; then :
729e4ab9 6082 $as_echo_n "(cached) " >&6
73c04bcf 6083else
729e4ab9
A
6084 ac_check_lib_save_LIBS=$LIBS
6085LIBS="-lpthread $LIBS"
6086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6087/* end confdefs.h. */
73c04bcf 6088
729e4ab9
A
6089/* Override any GCC internal prototype to avoid an error.
6090 Use char because int might match the return type of a GCC
6091 builtin and then its argument prototype would still apply. */
6092#ifdef __cplusplus
6093extern "C"
6094#endif
6095char pthread_attr_init ();
73c04bcf
A
6096int
6097main ()
6098{
729e4ab9 6099return pthread_attr_init ();
73c04bcf
A
6100 ;
6101 return 0;
6102}
6103_ACEOF
729e4ab9
A
6104if ac_fn_c_try_link "$LINENO"; then :
6105 ac_cv_lib_pthread_pthread_attr_init=yes
b75a7d8f 6106else
729e4ab9 6107 ac_cv_lib_pthread_pthread_attr_init=no
b75a7d8f 6108fi
729e4ab9
A
6109rm -f core conftest.err conftest.$ac_objext \
6110 conftest$ac_exeext conftest.$ac_ext
6111LIBS=$ac_check_lib_save_LIBS
b75a7d8f 6112fi
729e4ab9
A
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_attr_init" >&5
6114$as_echo "$ac_cv_lib_pthread_pthread_attr_init" >&6; }
4388f060 6115if test "x$ac_cv_lib_pthread_pthread_attr_init" = xyes; then :
729e4ab9
A
6116 cat >>confdefs.h <<_ACEOF
6117#define HAVE_LIBPTHREAD 1
6118_ACEOF
b75a7d8f 6119
729e4ab9 6120 LIBS="-lpthread $LIBS"
b75a7d8f 6121
729e4ab9 6122fi
b75a7d8f 6123
2ca993e8
A
6124if test $ac_cv_lib_pthread_pthread_attr_init = yes; then
6125 :
6126else
6127 # Locate the right library for POSIX threads. We look for the
6128 # symbols in the libraries first, because on Solaris libc provides
6129 # pthread_create but libpthread has the real code :(
6130 # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread
6131 # FreeBSD users may need libpthread if they do not have libc_r.
b75a7d8f 6132
73c04bcf 6133
729e4ab9
A
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5
6135$as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; }
4388f060 6136if ${ac_cv_search_pthread_mutex_destroy+:} false; then :
729e4ab9 6137 $as_echo_n "(cached) " >&6
73c04bcf 6138else
729e4ab9
A
6139 ac_func_search_save_LIBS="$LIBS"
6140ac_cv_search_pthread_mutex_destroy="no"
6141for i in pthread pthreads c_r ; do
6142LIBS="-l$i $ac_func_search_save_LIBS"
6143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6144/* end confdefs.h. */
b75a7d8f 6145
729e4ab9
A
6146/* Override any GCC internal prototype to avoid an error.
6147 Use char because int might match the return type of a GCC
6148 builtin and then its argument prototype would still apply. */
73c04bcf
A
6149#ifdef __cplusplus
6150extern "C"
73c04bcf 6151#endif
729e4ab9
A
6152char pthread_mutex_destroy ();
6153int
6154main ()
6155{
6156return pthread_mutex_destroy ();
6157 ;
6158 return 0;
6159}
6160_ACEOF
6161if ac_fn_c_try_link "$LINENO"; then :
6162 ac_cv_search_pthread_mutex_destroy="-l$i"
6163break
6164fi
6165rm -f core conftest.err conftest.$ac_objext \
6166 conftest$ac_exeext conftest.$ac_ext
6167done
6168if test "$ac_cv_search_pthread_mutex_destroy" = "no"; then
6169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6170/* end confdefs.h. */
6171
6172/* Override any GCC internal prototype to avoid an error.
6173 Use char because int might match the return type of a GCC
73c04bcf 6174 builtin and then its argument prototype would still apply. */
729e4ab9
A
6175#ifdef __cplusplus
6176extern "C"
73c04bcf 6177#endif
729e4ab9
A
6178char pthread_mutex_destroy ();
6179int
6180main ()
6181{
6182return pthread_mutex_destroy ();
6183 ;
6184 return 0;
6185}
6186_ACEOF
6187if ac_fn_c_try_link "$LINENO"; then :
6188 ac_cv_search_pthread_mutex_destroy="none required"
6189fi
6190rm -f core conftest.err conftest.$ac_objext \
6191 conftest$ac_exeext conftest.$ac_ext
6192fi
6193LIBS="$ac_func_search_save_LIBS"
6194fi
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_destroy" >&5
6196$as_echo "$ac_cv_search_pthread_mutex_destroy" >&6; }
6197if test "$ac_cv_search_pthread_mutex_destroy" != "no"; then
6198 test "$ac_cv_search_pthread_mutex_destroy" = "none required" || LIBS="$ac_cv_search_pthread_mutex_destroy $LIBS"
6199
6200else :
6201
6202fi
6203
2ca993e8
A
6204 if test "$ac_cv_search_pthread_mutex_destroy" != no; then
6205 :
6206 else
6207 # For HP 11
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
729e4ab9 6209$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
4388f060 6210if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
729e4ab9
A
6211 $as_echo_n "(cached) " >&6
6212else
6213 ac_check_lib_save_LIBS=$LIBS
6214LIBS="-lpthread $LIBS"
6215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6216/* end confdefs.h. */
6217
6218/* Override any GCC internal prototype to avoid an error.
6219 Use char because int might match the return type of a GCC
6220 builtin and then its argument prototype would still apply. */
73c04bcf 6221#ifdef __cplusplus
729e4ab9 6222extern "C"
b75a7d8f 6223#endif
729e4ab9 6224char pthread_mutex_init ();
73c04bcf
A
6225int
6226main ()
6227{
729e4ab9 6228return pthread_mutex_init ();
73c04bcf
A
6229 ;
6230 return 0;
6231}
6232_ACEOF
729e4ab9
A
6233if ac_fn_c_try_link "$LINENO"; then :
6234 ac_cv_lib_pthread_pthread_mutex_init=yes
73c04bcf 6235else
729e4ab9
A
6236 ac_cv_lib_pthread_pthread_mutex_init=no
6237fi
6238rm -f core conftest.err conftest.$ac_objext \
6239 conftest$ac_exeext conftest.$ac_ext
6240LIBS=$ac_check_lib_save_LIBS
6241fi
6242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6243$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
4388f060 6244if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
729e4ab9
A
6245 cat >>confdefs.h <<_ACEOF
6246#define HAVE_LIBPTHREAD 1
6247_ACEOF
6248
6249 LIBS="-lpthread $LIBS"
73c04bcf 6250
73c04bcf 6251fi
729e4ab9 6252
2ca993e8
A
6253 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
6254 :
729e4ab9 6255 fi
2ca993e8 6256 fi
729e4ab9 6257
2ca993e8 6258 ac_fn_c_check_func "$LINENO" "pthread_mutex_lock" "ac_cv_func_pthread_mutex_lock"
4388f060 6259if test "x$ac_cv_func_pthread_mutex_lock" = xyes; then :
729e4ab9 6260
73c04bcf 6261fi
b75a7d8f 6262
729e4ab9 6263
2ca993e8
A
6264 if test $ac_cv_func_pthread_mutex_lock = yes; then
6265 :
729e4ab9 6266 fi
2ca993e8
A
6267fi
6268# Check to see if we are using CygWin with MSVC
6269case "${host}" in
6270*-pc-cygwin*|*-pc-mingw*)
6271 # For gcc, the thread options are set by mh-mingw/mh-cygwin
6272 # For msvc, the thread options are set by runConfigureICU
6273 :
6274 ;;
6275*-*-hpux*)
6276 # Add -mt because it does several nice things on newer compilers.
6277 case "${icu_cv_host_frag}" in
6278 mh-hpux-acc)
6279 OLD_CXXFLAGS="${CXXFLAGS}"
6280 CXXFLAGS="${CXXFLAGS} -mt"
6281 if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then
6282 CXXFLAGS="${OLD_CXXFLAGS}"
6283 else
6284 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt"
6285 fi
729e4ab9 6286 ;;
2ca993e8
A
6287 esac
6288 ;;
6289*-*-solaris*)
6290 case "${icu_cv_host_frag}" in
6291 mh-solaris)
6292 LIBS="${LIBS} -mt"
729e4ab9
A
6293 ;;
6294 esac
2ca993e8
A
6295 ;;
6296esac
b75a7d8f 6297
729e4ab9
A
6298# Check whether --enable-weak-threads was given.
6299if test "${enable_weak_threads+set}" = set; then :
6300 enableval=$enable_weak_threads; case "${enableval}" in
6301 yes)
6302 LIB_THREAD="${LIBS%${OLD_LIBS}}"
6303 LIBS=${OLD_LIBS}
6304 ;;
6305 no) ;;
6306 *) as_fn_error $? "bad value ${enableval} for --enable-weak-threads" "$LINENO" 5 ;;
6307 esac
6308fi
73c04bcf 6309
b75a7d8f 6310
b75a7d8f 6311
729e4ab9 6312# Check for mmap()
b75a7d8f 6313
729e4ab9
A
6314# The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific.
6315# Do this check instead.
6316HAVE_MMAP=0
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mmap" >&5
6318$as_echo_n "checking for mmap... " >&6; }
4388f060 6319if ${ac_cv_func_mmap_ok+:} false; then :
729e4ab9
A
6320 $as_echo_n "(cached) " >&6
6321else
6322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6323/* end confdefs.h. */
6324#include <unistd.h>
6325#include <sys/mman.h>
6326#include <sys/stat.h>
6327#include <fcntl.h>
73c04bcf
A
6328int
6329main ()
6330{
729e4ab9 6331mmap((void *)0, 0, PROT_READ, 0, 0, 0);
73c04bcf
A
6332 ;
6333 return 0;
6334}
6335_ACEOF
729e4ab9
A
6336if ac_fn_c_try_link "$LINENO"; then :
6337 ac_cv_func_mmap_ok=yes
73c04bcf 6338else
729e4ab9 6339 ac_cv_func_mmap_ok=no
73c04bcf 6340fi
729e4ab9
A
6341rm -f core conftest.err conftest.$ac_objext \
6342 conftest$ac_exeext conftest.$ac_ext
73c04bcf 6343fi
b75a7d8f 6344
729e4ab9
A
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_ok" >&5
6346$as_echo "$ac_cv_func_mmap_ok" >&6; }
6347if test $ac_cv_func_mmap_ok = yes
b75a7d8f 6348then
729e4ab9 6349 HAVE_MMAP=1
4388f060
A
6350else
6351 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0"
729e4ab9 6352fi
73c04bcf 6353
73c04bcf 6354
729e4ab9
A
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for genccode assembly" >&5
6356$as_echo_n "checking for genccode assembly... " >&6; }
6357
6358# Check to see if genccode can generate simple assembly.
6359GENCCODE_ASSEMBLY=
6360case "${host}" in
4388f060 6361*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
729e4ab9
A
6362 if test "$GCC" = yes; then
6363 # We're using gcc, and the simple -a gcc command line works for genccode
6364 GENCCODE_ASSEMBLY="-a gcc"
6365 fi ;;
6366i*86-*-solaris*)
6367 if test "$GCC" = yes; then
6368 # When using gcc, look if we're also using GNU as.
6369 # When using GNU as, the simple -a gcc command line works for genccode.
6370 asv=`"${CC}" -print-prog-name=as 2>/dev/null`
6371 asv=`"${asv}" --version 2>/dev/null`
6372 case "X${asv}" in
6373 X*GNU*) GENCCODE_ASSEMBLY="-a gcc" ;;
6374 X*) GENCCODE_ASSEMBLY="-a sun-x86" ;;
6375 esac
6376 unset asv
6377 else
6378 GENCCODE_ASSEMBLY="-a sun-x86"
6379 fi ;;
6380sparc-*-solaris*)
6381 GENCCODE_ASSEMBLY="-a sun"
6382 ;;
6383ia64-*-hpux*)
2ca993e8
A
6384# There has been some issues with building ICU data on HPUX ia64 aCC
6385# when using the assemble code setting below. For now, build without
6386# assemble code for this platform. This will increase the build time.
6387# GENCCODE_ASSEMBLY="-a aCC-ia64"
729e4ab9
A
6388 ;;
6389esac
b75a7d8f 6390
b75a7d8f 6391
729e4ab9
A
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENCCODE_ASSEMBLY" >&5
6393$as_echo "$GENCCODE_ASSEMBLY" >&6; }
b75a7d8f 6394
729e4ab9
A
6395# Checks for header files
6396for ac_header in inttypes.h
6397do :
6398 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
4388f060 6399if test "x$ac_cv_header_inttypes_h" = xyes; then :
729e4ab9
A
6400 cat >>confdefs.h <<_ACEOF
6401#define HAVE_INTTYPES_H 1
73c04bcf 6402_ACEOF
73c04bcf 6403
73c04bcf 6404fi
729e4ab9
A
6405
6406done
6407
6408if test $ac_cv_header_inttypes_h = no; then
6409 U_HAVE_INTTYPES_H=0
4388f060 6410 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
729e4ab9
A
6411else
6412 U_HAVE_INTTYPES_H=1
6413fi
6414if test "$CC" = ccc; then
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"C compiler set to CCC ${CC}\" " >&5
6416$as_echo "\"C compiler set to CCC ${CC}\" " >&6; }
6417 case "${host}" in
6418 alpha*-*-*) U_HAVE_INTTYPES_H=0;
4388f060 6419 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
729e4ab9
A
6420 esac
6421fi
6422
6423
6424
6425for ac_header in dirent.h
6426do :
6427 ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default"
4388f060 6428if test "x$ac_cv_header_dirent_h" = xyes; then :
729e4ab9
A
6429 cat >>confdefs.h <<_ACEOF
6430#define HAVE_DIRENT_H 1
6431_ACEOF
6432
73c04bcf 6433fi
b75a7d8f 6434
729e4ab9
A
6435done
6436
6437if test $ac_cv_header_dirent_h = no; then
6438 U_HAVE_DIRENT_H=0
4388f060 6439 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0"
729e4ab9
A
6440else
6441 U_HAVE_DIRENT_H=1
b75a7d8f
A
6442fi
6443
374ca955
A
6444
6445
729e4ab9
A
6446# Check for endianness
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6448$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4388f060 6449if ${ac_cv_c_bigendian+:} false; then :
729e4ab9 6450 $as_echo_n "(cached) " >&6
b75a7d8f 6451else
729e4ab9
A
6452 ac_cv_c_bigendian=unknown
6453 # See if we're dealing with a universal compiler.
6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6455/* end confdefs.h. */
729e4ab9
A
6456#ifndef __APPLE_CC__
6457 not a universal capable compiler
6458 #endif
6459 typedef int dummy;
6460
6461_ACEOF
6462if ac_fn_c_try_compile "$LINENO"; then :
6463
6464 # Check for potential -arch flags. It is not universal unless
6465 # there are at least two -arch flags with different values.
6466 ac_arch=
6467 ac_prev=
6468 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6469 if test -n "$ac_prev"; then
6470 case $ac_word in
6471 i?86 | x86_64 | ppc | ppc64)
6472 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6473 ac_arch=$ac_word
6474 else
6475 ac_cv_c_bigendian=universal
6476 break
6477 fi
6478 ;;
6479 esac
6480 ac_prev=
6481 elif test "x$ac_word" = "x-arch"; then
6482 ac_prev=arch
6483 fi
6484 done
6485fi
6486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6487 if test $ac_cv_c_bigendian = unknown; then
6488 # See if sys/param.h defines the BYTE_ORDER macro.
6489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6490/* end confdefs.h. */
6491#include <sys/types.h>
6492 #include <sys/param.h>
b75a7d8f 6493
73c04bcf
A
6494int
6495main ()
6496{
729e4ab9
A
6497#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6498 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6499 && LITTLE_ENDIAN)
6500 bogus endian macros
6501 #endif
6502
73c04bcf
A
6503 ;
6504 return 0;
6505}
6506_ACEOF
729e4ab9
A
6507if ac_fn_c_try_compile "$LINENO"; then :
6508 # It does; now see whether it defined to BIG_ENDIAN or not.
6509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6510/* end confdefs.h. */
729e4ab9
A
6511#include <sys/types.h>
6512 #include <sys/param.h>
6513
73c04bcf
A
6514int
6515main ()
6516{
729e4ab9
A
6517#if BYTE_ORDER != BIG_ENDIAN
6518 not big endian
6519 #endif
6520
73c04bcf
A
6521 ;
6522 return 0;
6523}
6524_ACEOF
729e4ab9
A
6525if ac_fn_c_try_compile "$LINENO"; then :
6526 ac_cv_c_bigendian=yes
b75a7d8f 6527else
729e4ab9 6528 ac_cv_c_bigendian=no
b75a7d8f 6529fi
729e4ab9 6530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b75a7d8f 6531fi
729e4ab9
A
6532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6533 fi
6534 if test $ac_cv_c_bigendian = unknown; then
6535 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6537/* end confdefs.h. */
729e4ab9
A
6538#include <limits.h>
6539
73c04bcf
A
6540int
6541main ()
6542{
729e4ab9
A
6543#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6544 bogus endian macros
6545 #endif
6546
73c04bcf
A
6547 ;
6548 return 0;
6549}
6550_ACEOF
729e4ab9
A
6551if ac_fn_c_try_compile "$LINENO"; then :
6552 # It does; now see whether it defined to _BIG_ENDIAN or not.
6553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6554/* end confdefs.h. */
729e4ab9
A
6555#include <limits.h>
6556
73c04bcf
A
6557int
6558main ()
6559{
729e4ab9
A
6560#ifndef _BIG_ENDIAN
6561 not big endian
6562 #endif
6563
73c04bcf
A
6564 ;
6565 return 0;
6566}
6567_ACEOF
729e4ab9
A
6568if ac_fn_c_try_compile "$LINENO"; then :
6569 ac_cv_c_bigendian=yes
b75a7d8f 6570else
729e4ab9 6571 ac_cv_c_bigendian=no
b75a7d8f 6572fi
729e4ab9 6573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b75a7d8f 6574fi
729e4ab9
A
6575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6576 fi
6577 if test $ac_cv_c_bigendian = unknown; then
6578 # Compile a test program.
6579 if test "$cross_compiling" = yes; then :
6580 # Try to guess by grepping values from an object file.
6581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6582/* end confdefs.h. */
729e4ab9
A
6583short int ascii_mm[] =
6584 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6585 short int ascii_ii[] =
6586 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6587 int use_ascii (int i) {
6588 return ascii_mm[i] + ascii_ii[i];
6589 }
6590 short int ebcdic_ii[] =
6591 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6592 short int ebcdic_mm[] =
6593 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6594 int use_ebcdic (int i) {
6595 return ebcdic_mm[i] + ebcdic_ii[i];
6596 }
6597 extern int foo;
6598
73c04bcf
A
6599int
6600main ()
6601{
729e4ab9 6602return use_ascii (foo) == use_ebcdic (foo);
73c04bcf
A
6603 ;
6604 return 0;
6605}
6606_ACEOF
729e4ab9
A
6607if ac_fn_c_try_compile "$LINENO"; then :
6608 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6609 ac_cv_c_bigendian=yes
6610 fi
6611 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6612 if test "$ac_cv_c_bigendian" = unknown; then
6613 ac_cv_c_bigendian=no
6614 else
6615 # finding both strings is unlikely to happen, but who knows?
6616 ac_cv_c_bigendian=unknown
6617 fi
6618 fi
6619fi
6620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6621else
6622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf
A
6623/* end confdefs.h. */
6624$ac_includes_default
6625int
6626main ()
6627{
729e4ab9
A
6628
6629 /* Are we little or big endian? From Harbison&Steele. */
6630 union
6631 {
6632 long int l;
6633 char c[sizeof (long int)];
6634 } u;
6635 u.l = 1;
6636 return u.c[sizeof (long int) - 1] == 1;
6637
73c04bcf
A
6638 ;
6639 return 0;
6640}
6641_ACEOF
729e4ab9
A
6642if ac_fn_c_try_run "$LINENO"; then :
6643 ac_cv_c_bigendian=no
b75a7d8f 6644else
729e4ab9 6645 ac_cv_c_bigendian=yes
b75a7d8f 6646fi
729e4ab9
A
6647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6648 conftest.$ac_objext conftest.beam conftest.$ac_ext
73c04bcf 6649fi
b75a7d8f 6650
729e4ab9 6651 fi
b75a7d8f 6652fi
729e4ab9
A
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6654$as_echo "$ac_cv_c_bigendian" >&6; }
6655 case $ac_cv_c_bigendian in #(
6656 yes)
6657 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
6658;; #(
6659 no)
6660 ;; #(
6661 universal)
6662
6663$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6664
6665 ;; #(
6666 *)
6667 as_fn_error $? "unknown endianness
6668 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6669 esac
b75a7d8f 6670
729e4ab9
A
6671if test $ac_cv_c_bigendian = no; then
6672U_IS_BIG_ENDIAN=0
6673U_ENDIAN_CHAR="l"
b75a7d8f 6674else
729e4ab9
A
6675U_IS_BIG_ENDIAN=1
6676U_ENDIAN_CHAR="b"
73c04bcf 6677fi
73c04bcf 6678
b75a7d8f 6679
729e4ab9
A
6680# Do various POSIX related checks
6681U_HAVE_NL_LANGINFO_CODESET=0
6682U_NL_LANGINFO_CODESET=-1
6683ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
4388f060 6684if test "x$ac_cv_func_nl_langinfo" = xyes; then :
729e4ab9
A
6685 U_HAVE_NL_LANGINFO=1
6686else
6687 U_HAVE_NL_LANGINFO=0
b75a7d8f
A
6688fi
6689
729e4ab9
A
6690if test $U_HAVE_NL_LANGINFO -eq 1; then
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo's argument to obtain the codeset" >&5
6692$as_echo_n "checking for nl_langinfo's argument to obtain the codeset... " >&6; }
4388f060 6693if ${ac_cv_nl_langinfo_codeset+:} false; then :
729e4ab9 6694 $as_echo_n "(cached) " >&6
b75a7d8f 6695else
729e4ab9
A
6696 ac_cv_nl_langinfo_codeset="unknown"
6697 for a in CODESET _NL_CTYPE_CODESET_NAME; do
6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6699/* end confdefs.h. */
729e4ab9 6700#include <langinfo.h>
73c04bcf
A
6701int
6702main ()
6703{
729e4ab9 6704nl_langinfo($a);
73c04bcf
A
6705 ;
6706 return 0;
6707}
6708_ACEOF
729e4ab9
A
6709if ac_fn_c_try_link "$LINENO"; then :
6710 ac_cv_nl_langinfo_codeset="$a"; break
b75a7d8f 6711fi
729e4ab9
A
6712rm -f core conftest.err conftest.$ac_objext \
6713 conftest$ac_exeext conftest.$ac_ext
6714 done
6715fi
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nl_langinfo_codeset" >&5
6717$as_echo "$ac_cv_nl_langinfo_codeset" >&6; }
6718 if test x$ac_cv_nl_langinfo_codeset != xunknown
6719 then
6720 U_HAVE_NL_LANGINFO_CODESET=1
6721 U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
4388f060
A
6722 if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET"
6723 then
6724 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}"
6725 fi
6726 else
6727 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0"
729e4ab9 6728 fi
73c04bcf 6729fi
73c04bcf 6730
b75a7d8f 6731
b75a7d8f 6732
729e4ab9
A
6733# Namespace support checks
6734ac_ext=cpp
6735ac_cpp='$CXXCPP $CPPFLAGS'
6736ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6739
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for namespace support" >&5
6741$as_echo_n "checking for namespace support... " >&6; }
4388f060 6742if ${ac_cv_namespace_ok+:} false; then :
729e4ab9 6743 $as_echo_n "(cached) " >&6
b75a7d8f 6744else
729e4ab9 6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6746/* end confdefs.h. */
729e4ab9
A
6747namespace x_version {void f(){}}
6748 namespace x = x_version;
6749 using namespace x_version;
6750
73c04bcf
A
6751int
6752main ()
729e4ab9
A
6753{
6754f();
73c04bcf
A
6755 ;
6756 return 0;
6757}
6758_ACEOF
729e4ab9
A
6759if ac_fn_cxx_try_link "$LINENO"; then :
6760 ac_cv_namespace_ok=yes
b75a7d8f 6761else
729e4ab9 6762 ac_cv_namespace_ok=no
b75a7d8f 6763fi
729e4ab9
A
6764rm -f core conftest.err conftest.$ac_objext \
6765 conftest$ac_exeext conftest.$ac_ext
73c04bcf 6766fi
b75a7d8f 6767
729e4ab9
A
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_namespace_ok" >&5
6769$as_echo "$ac_cv_namespace_ok" >&6; }
729e4ab9
A
6770if test $ac_cv_namespace_ok = no
6771then
4388f060 6772 as_fn_error $? "Namespace support is required to build ICU." "$LINENO" 5
b75a7d8f
A
6773fi
6774
729e4ab9
A
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for properly overriding new and delete" >&5
6776$as_echo_n "checking for properly overriding new and delete... " >&6; }
6777U_OVERRIDE_CXX_ALLOCATION=0
6778U_HAVE_PLACEMENT_NEW=0
4388f060 6779if ${ac_cv_override_cxx_allocation_ok+:} false; then :
729e4ab9 6780 $as_echo_n "(cached) " >&6
b75a7d8f 6781else
729e4ab9 6782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6783/* end confdefs.h. */
729e4ab9
A
6784#include <stdlib.h>
6785 class UMemory {
6786 public:
6787 void *operator new(size_t size) {return malloc(size);}
6788 void *operator new[](size_t size) {return malloc(size);}
6789 void operator delete(void *p) {free(p);}
6790 void operator delete[](void *p) {free(p);}
6791 };
6792
73c04bcf
A
6793int
6794main ()
6795{
729e4ab9 6796
73c04bcf
A
6797 ;
6798 return 0;
6799}
6800_ACEOF
729e4ab9
A
6801if ac_fn_cxx_try_link "$LINENO"; then :
6802 ac_cv_override_cxx_allocation_ok=yes
b75a7d8f 6803else
729e4ab9 6804 ac_cv_override_cxx_allocation_ok=no
b75a7d8f 6805fi
729e4ab9
A
6806rm -f core conftest.err conftest.$ac_objext \
6807 conftest$ac_exeext conftest.$ac_ext
b75a7d8f
A
6808fi
6809
729e4ab9
A
6810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_override_cxx_allocation_ok" >&5
6811$as_echo "$ac_cv_override_cxx_allocation_ok" >&6; }
6812if test $ac_cv_override_cxx_allocation_ok = yes
6813then
6814 U_OVERRIDE_CXX_ALLOCATION=1
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for placement new and delete" >&5
6816$as_echo_n "checking for placement new and delete... " >&6; }
4388f060 6817 if ${ac_cv_override_placement_new_ok+:} false; then :
729e4ab9 6818 $as_echo_n "(cached) " >&6
b75a7d8f 6819else
729e4ab9 6820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6821/* end confdefs.h. */
729e4ab9
A
6822#include <stdlib.h>
6823 class UMemory {
6824 public:
6825 void *operator new(size_t size) {return malloc(size);}
6826 void *operator new[](size_t size) {return malloc(size);}
6827 void operator delete(void *p) {free(p);}
6828 void operator delete[](void *p) {free(p);}
6829 void * operator new(size_t, void *ptr) { return ptr; }
6830 void operator delete(void *, void *) {}
6831 };
6832
73c04bcf
A
6833int
6834main ()
6835{
729e4ab9 6836
73c04bcf
A
6837 ;
6838 return 0;
6839}
6840_ACEOF
729e4ab9
A
6841if ac_fn_cxx_try_link "$LINENO"; then :
6842 ac_cv_override_placement_new_ok=yes
b75a7d8f 6843else
729e4ab9 6844 ac_cv_override_placement_new_ok=no
b75a7d8f 6845fi
729e4ab9
A
6846rm -f core conftest.err conftest.$ac_objext \
6847 conftest$ac_exeext conftest.$ac_ext
73c04bcf 6848fi
b75a7d8f 6849
729e4ab9
A
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_override_placement_new_ok" >&5
6851$as_echo "$ac_cv_override_placement_new_ok" >&6; }
6852 if test $ac_cv_override_placement_new_ok = yes
6853 then
6854 U_HAVE_PLACEMENT_NEW=1
4388f060
A
6855 else
6856 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0"
729e4ab9 6857 fi
b75a7d8f 6858else
4388f060 6859 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0"
b75a7d8f 6860fi
4388f060 6861
b75a7d8f
A
6862
6863
729e4ab9
A
6864ac_ext=c
6865ac_cpp='$CPP $CPPFLAGS'
6866ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6867ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6868ac_compiler_gnu=$ac_cv_c_compiler_gnu
b75a7d8f 6869
729e4ab9 6870ac_fn_c_check_func "$LINENO" "popen" "ac_cv_func_popen"
4388f060 6871if test "x$ac_cv_func_popen" = xyes; then :
b75a7d8f 6872
b75a7d8f
A
6873fi
6874
729e4ab9
A
6875if test x$ac_cv_func_popen = xyes
6876then
6877 U_HAVE_POPEN=1
b75a7d8f 6878else
4388f060 6879 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0"
729e4ab9 6880 U_HAVE_POPEN=0
b75a7d8f
A
6881fi
6882
6883
729e4ab9 6884ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
4388f060 6885if test "x$ac_cv_func_tzset" = xyes; then :
73c04bcf 6886
73c04bcf 6887fi
73c04bcf 6888
729e4ab9
A
6889U_HAVE_TZSET=0
6890if test x$ac_cv_func_tzset = xyes
6891then
6892 U_TZSET=tzset
6893 U_HAVE_TZSET=1
73c04bcf 6894else
729e4ab9 6895 ac_fn_c_check_func "$LINENO" "_tzset" "ac_cv_func__tzset"
4388f060 6896if test "x$ac_cv_func__tzset" = xyes; then :
73c04bcf 6897
73c04bcf 6898fi
73c04bcf 6899
729e4ab9
A
6900 if test x$ac_cv_func__tzset = xyes
6901 then
6902 U_TZSET=_tzset
6903 U_HAVE_TZSET=1
4388f060
A
6904 else
6905 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
729e4ab9 6906 fi
b75a7d8f
A
6907fi
6908
73c04bcf 6909
b75a7d8f 6910
729e4ab9
A
6911U_HAVE_TZNAME=0
6912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6913$as_echo_n "checking for tzname... " >&6; }
4388f060 6914if ${ac_cv_var_tzname+:} false; then :
729e4ab9 6915 $as_echo_n "(cached) " >&6
73c04bcf 6916else
729e4ab9 6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6918/* end confdefs.h. */
f3c0d7a5
A
6919#ifndef _XOPEN_SOURCE
6920#define _XOPEN_SOURCE
729e4ab9
A
6921#endif
6922#include <stdlib.h>
6923#include <time.h>
6924#ifndef tzname /* For SGI. */
6925extern char *tzname[]; /* RS6000 and others reject char **tzname. */
73c04bcf 6926#endif
73c04bcf
A
6927int
6928main ()
6929{
729e4ab9 6930atoi(*tzname);
73c04bcf
A
6931 ;
6932 return 0;
6933}
6934_ACEOF
729e4ab9
A
6935if ac_fn_c_try_link "$LINENO"; then :
6936 ac_cv_var_tzname=yes
b75a7d8f 6937else
729e4ab9 6938 ac_cv_var_tzname=no
b75a7d8f 6939fi
729e4ab9
A
6940rm -f core conftest.err conftest.$ac_objext \
6941 conftest$ac_exeext conftest.$ac_ext
6942fi
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6944$as_echo "$ac_cv_var_tzname" >&6; }
6945if test $ac_cv_var_tzname = yes; then
6946 U_TZNAME=tzname
6947 U_HAVE_TZNAME=1
6948else
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _tzname" >&5
6950$as_echo_n "checking for _tzname... " >&6; }
4388f060 6951if ${ac_cv_var__tzname+:} false; then :
729e4ab9
A
6952 $as_echo_n "(cached) " >&6
6953else
6954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6955/* end confdefs.h. */
729e4ab9
A
6956#include <stdlib.h>
6957 #include <time.h>
6958 extern char *_tzname[];
73c04bcf
A
6959int
6960main ()
6961{
729e4ab9 6962atoi(*_tzname);
73c04bcf
A
6963 ;
6964 return 0;
6965}
6966_ACEOF
729e4ab9
A
6967if ac_fn_c_try_link "$LINENO"; then :
6968 ac_cv_var__tzname=yes
b75a7d8f 6969else
729e4ab9 6970 ac_cv_var__tzname=no
73c04bcf 6971fi
729e4ab9
A
6972rm -f core conftest.err conftest.$ac_objext \
6973 conftest$ac_exeext conftest.$ac_ext
b75a7d8f 6974fi
729e4ab9
A
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__tzname" >&5
6976$as_echo "$ac_cv_var__tzname" >&6; }
6977 if test $ac_cv_var__tzname = yes; then
6978 U_TZNAME=_tzname
6979 U_HAVE_TZNAME=1
4388f060
A
6980 else
6981 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
b75a7d8f
A
6982 fi
6983fi
6984
6985
6986
729e4ab9
A
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone" >&5
6988$as_echo_n "checking for timezone... " >&6; }
4388f060 6989if ${ac_cv_var_timezone+:} false; then :
729e4ab9 6990 $as_echo_n "(cached) " >&6
b75a7d8f 6991else
729e4ab9 6992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73c04bcf 6993/* end confdefs.h. */
f3c0d7a5
A
6994#ifndef _XOPEN_SOURCE
6995#define _XOPEN_SOURCE
b75a7d8f 6996#endif
729e4ab9 6997#include <time.h>
46f4442e
A
6998
6999int
7000main ()
b75a7d8f 7001{
729e4ab9 7002timezone = 1;
46f4442e
A
7003 ;
7004 return 0;
b75a7d8f 7005}
73c04bcf 7006_ACEOF
729e4ab9
A
7007if ac_fn_c_try_link "$LINENO"; then :
7008 ac_cv_var_timezone=yes
b75a7d8f 7009else
729e4ab9 7010 ac_cv_var_timezone=no
b75a7d8f 7011fi
729e4ab9
A
7012rm -f core conftest.err conftest.$ac_objext \
7013 conftest$ac_exeext conftest.$ac_ext
b75a7d8f 7014fi
729e4ab9
A
7015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_timezone" >&5
7016$as_echo "$ac_cv_var_timezone" >&6; }
7017U_HAVE_TIMEZONE=0
7018if test $ac_cv_var_timezone = yes; then
7019 U_TIMEZONE=timezone
7020 U_HAVE_TIMEZONE=1
46f4442e 7021else
729e4ab9
A
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __timezone" >&5
7023$as_echo_n "checking for __timezone... " >&6; }
4388f060 7024if ${ac_cv_var___timezone+:} false; then :
729e4ab9
A
7025 $as_echo_n "(cached) " >&6
7026else
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e 7028/* end confdefs.h. */
729e4ab9 7029#include <time.h>
46f4442e
A
7030int
7031main ()
7032{
729e4ab9 7033__timezone = 1;
46f4442e
A
7034 ;
7035 return 0;
7036}
7037_ACEOF
729e4ab9
A
7038if ac_fn_c_try_link "$LINENO"; then :
7039 ac_cv_var___timezone=yes
7040else
7041 ac_cv_var___timezone=no
7042fi
7043rm -f core conftest.err conftest.$ac_objext \
7044 conftest$ac_exeext conftest.$ac_ext
7045fi
7046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var___timezone" >&5
7047$as_echo "$ac_cv_var___timezone" >&6; }
7048 if test $ac_cv_var___timezone = yes; then
7049 U_TIMEZONE=__timezone
7050 U_HAVE_TIMEZONE=1
7051 else
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _timezone" >&5
7053$as_echo_n "checking for _timezone... " >&6; }
4388f060 7054if ${ac_cv_var__timezone+:} false; then :
729e4ab9
A
7055 $as_echo_n "(cached) " >&6
7056else
7057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e 7058/* end confdefs.h. */
729e4ab9 7059#include <time.h>
46f4442e
A
7060int
7061main ()
7062{
729e4ab9 7063_timezone = 1;
46f4442e
A
7064 ;
7065 return 0;
7066}
7067_ACEOF
729e4ab9
A
7068if ac_fn_c_try_link "$LINENO"; then :
7069 ac_cv_var__timezone=yes
46f4442e 7070else
729e4ab9
A
7071 ac_cv_var__timezone=no
7072fi
7073rm -f core conftest.err conftest.$ac_objext \
7074 conftest$ac_exeext conftest.$ac_ext
7075fi
7076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__timezone" >&5
7077$as_echo "$ac_cv_var__timezone" >&6; }
7078 if test $ac_cv_var__timezone = yes; then
7079 U_TIMEZONE=_timezone
7080 U_HAVE_TIMEZONE=1
4388f060
A
7081 else
7082 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
729e4ab9
A
7083 fi
7084 fi
7085fi
7086
7087
7088
f3c0d7a5
A
7089ac_fn_c_check_func "$LINENO" "strtod_l" "ac_cv_func_strtod_l"
7090if test "x$ac_cv_func_strtod_l" = xyes; then :
7091
7092fi
7093
7094if test x$ac_cv_func_strtod_l = xyes
7095then
7096 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1"
7097 U_HAVE_STRTOD_L=1
7098else
7099 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
7100 U_HAVE_STRTOD_L=0
7101fi
7102
7103
729e4ab9
A
7104# Checks for typedefs
7105ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
4388f060 7106if test "x$ac_cv_type_int8_t" = xyes; then :
729e4ab9
A
7107
7108else
7109
7110cat >>confdefs.h <<_ACEOF
7111#define int8_t signed char
7112_ACEOF
46f4442e 7113
46f4442e 7114fi
729e4ab9
A
7115
7116ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
4388f060 7117if test "x$ac_cv_type_uint8_t" = xyes; then :
729e4ab9 7118
46f4442e 7119else
46f4442e 7120
729e4ab9
A
7121cat >>confdefs.h <<_ACEOF
7122#define uint8_t unsigned char
46f4442e 7123_ACEOF
46f4442e 7124
729e4ab9 7125fi
46f4442e 7126
729e4ab9 7127ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
4388f060 7128if test "x$ac_cv_type_int16_t" = xyes; then :
46f4442e 7129
729e4ab9
A
7130else
7131
7132cat >>confdefs.h <<_ACEOF
7133#define int16_t signed short
46f4442e 7134_ACEOF
729e4ab9
A
7135
7136fi
7137
7138ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
4388f060 7139if test "x$ac_cv_type_uint16_t" = xyes; then :
729e4ab9
A
7140
7141else
7142
7143cat >>confdefs.h <<_ACEOF
7144#define uint16_t unsigned short
46f4442e 7145_ACEOF
46f4442e 7146
729e4ab9 7147fi
46f4442e 7148
729e4ab9 7149ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
4388f060 7150if test "x$ac_cv_type_int32_t" = xyes; then :
46f4442e 7151
729e4ab9
A
7152else
7153
7154cat >>confdefs.h <<_ACEOF
7155#define int32_t signed long
46f4442e 7156_ACEOF
729e4ab9
A
7157
7158fi
7159
7160ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
4388f060 7161if test "x$ac_cv_type_uint32_t" = xyes; then :
729e4ab9
A
7162
7163else
7164
7165cat >>confdefs.h <<_ACEOF
7166#define uint32_t unsigned long
7167_ACEOF
7168
7169fi
7170
7171ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
4388f060 7172if test "x$ac_cv_type_int64_t" = xyes; then :
729e4ab9
A
7173
7174else
7175
7176cat >>confdefs.h <<_ACEOF
7177#define int64_t signed long long
7178_ACEOF
7179
7180fi
7181
7182ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
4388f060 7183if test "x$ac_cv_type_uint64_t" = xyes; then :
729e4ab9
A
7184
7185else
7186
7187cat >>confdefs.h <<_ACEOF
7188#define uint64_t unsigned long long
7189_ACEOF
7190
7191fi
7192
7193
7194if test $ac_cv_type_int8_t = no; then
4388f060 7195CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0"
729e4ab9
A
7196fi
7197
729e4ab9 7198if test $ac_cv_type_uint8_t = no; then
4388f060 7199CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0"
729e4ab9
A
7200fi
7201
729e4ab9 7202if test $ac_cv_type_int16_t = no; then
4388f060 7203CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0"
729e4ab9
A
7204fi
7205
729e4ab9 7206if test $ac_cv_type_uint16_t = no; then
4388f060 7207CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0"
729e4ab9
A
7208fi
7209
729e4ab9 7210if test $ac_cv_type_int32_t = no; then
4388f060 7211CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0"
729e4ab9
A
7212fi
7213
729e4ab9 7214if test $ac_cv_type_uint32_t = no; then
4388f060 7215CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0"
729e4ab9
A
7216fi
7217
729e4ab9 7218if test $ac_cv_type_int64_t = no; then
4388f060 7219CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0"
729e4ab9
A
7220fi
7221
729e4ab9 7222if test $ac_cv_type_uint64_t = no; then
4388f060 7223CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0"
729e4ab9
A
7224fi
7225
729e4ab9
A
7226# Do various wchar_t related checks
7227ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
4388f060 7228if test "x$ac_cv_header_wchar_h" = xyes; then :
729e4ab9
A
7229
7230fi
7231
7232
7233if test "$ac_cv_header_wchar_h" = no
7234then
7235 U_HAVE_WCHAR_H=0
7236 U_HAVE_WCSCPY=0
4388f060 7237 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0"
46f4442e 7238else
46f4442e 7239
729e4ab9 7240$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
46f4442e 7241
729e4ab9
A
7242 U_HAVE_WCHAR_H=1
7243 # Some broken systems have wchar.h but not some of its functions...
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing wcscpy" >&5
7245$as_echo_n "checking for library containing wcscpy... " >&6; }
4388f060 7246if ${ac_cv_search_wcscpy+:} false; then :
729e4ab9
A
7247 $as_echo_n "(cached) " >&6
7248else
7249 ac_func_search_save_LIBS=$LIBS
7250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e
A
7251/* end confdefs.h. */
7252
729e4ab9
A
7253/* Override any GCC internal prototype to avoid an error.
7254 Use char because int might match the return type of a GCC
7255 builtin and then its argument prototype would still apply. */
7256#ifdef __cplusplus
7257extern "C"
46f4442e 7258#endif
729e4ab9 7259char wcscpy ();
46f4442e
A
7260int
7261main ()
7262{
729e4ab9 7263return wcscpy ();
46f4442e
A
7264 ;
7265 return 0;
7266}
7267_ACEOF
729e4ab9
A
7268for ac_lib in '' wcs w; do
7269 if test -z "$ac_lib"; then
7270 ac_res="none required"
7271 else
7272 ac_res=-l$ac_lib
7273 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7274 fi
7275 if ac_fn_c_try_link "$LINENO"; then :
7276 ac_cv_search_wcscpy=$ac_res
7277fi
7278rm -f core conftest.err conftest.$ac_objext \
7279 conftest$ac_exeext
4388f060 7280 if ${ac_cv_search_wcscpy+:} false; then :
729e4ab9 7281 break
46f4442e 7282fi
46f4442e 7283done
4388f060 7284if ${ac_cv_search_wcscpy+:} false; then :
729e4ab9 7285
46f4442e 7286else
729e4ab9
A
7287 ac_cv_search_wcscpy=no
7288fi
7289rm conftest.$ac_ext
7290LIBS=$ac_func_search_save_LIBS
7291fi
7292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_wcscpy" >&5
7293$as_echo "$ac_cv_search_wcscpy" >&6; }
7294ac_res=$ac_cv_search_wcscpy
7295if test "$ac_res" != no; then :
7296 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7297
7298fi
7299
7300 if test "$ac_cv_search_wcscpy" != no; then
7301 U_HAVE_WCSCPY=1
7302 else
7303 U_HAVE_WCSCPY=0
4388f060 7304 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0"
729e4ab9
A
7305 fi
7306fi
7307
7308
46f4442e 7309
729e4ab9
A
7310# The cast to long int works around a bug in the HP C Compiler
7311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7313# This bug is HP SR number 8606223364.
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
7315$as_echo_n "checking size of wchar_t... " >&6; }
4388f060 7316if ${ac_cv_sizeof_wchar_t+:} false; then :
729e4ab9
A
7317 $as_echo_n "(cached) " >&6
7318else
7319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "
46f4442e
A
7320#if STDC_HEADERS
7321#include <stddef.h>
7322#endif
7323#include <stdlib.h>
7324#if HAVE_WCHAR_H
7325#include <string.h>
7326#include <wchar.h>
7327#endif
729e4ab9 7328"; then :
46f4442e 7329
46f4442e 7330else
729e4ab9
A
7331 if test "$ac_cv_type_wchar_t" = yes; then
7332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7334as_fn_error 77 "cannot compute sizeof (wchar_t)
7335See \`config.log' for more details" "$LINENO" 5; }
7336 else
7337 ac_cv_sizeof_wchar_t=0
7338 fi
46f4442e 7339fi
729e4ab9 7340
46f4442e 7341fi
729e4ab9
A
7342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
7343$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
7344
7345
7346
46f4442e
A
7347cat >>confdefs.h <<_ACEOF
7348#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7349_ACEOF
7350
7351
7352U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
7353# We do this check to verify that everything is okay.
7354if test $U_SIZEOF_WCHAR_T = 0; then
7355 if test $U_HAVE_WCHAR_H=1; then
729e4ab9 7356 as_fn_error $? "There is wchar.h but the size of wchar_t is 0" "$LINENO" 5
46f4442e
A
7357 fi
7358fi
7359
729e4ab9
A
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UTF-16 string literal support" >&5
7361$as_echo_n "checking for UTF-16 string literal support... " >&6; }
46f4442e
A
7362U_CHECK_UTF16_STRING=1
7363CHECK_UTF16_STRING_RESULT="unknown"
729e4ab9 7364
46f4442e
A
7365case "${host}" in
7366*-*-aix*|powerpc64-*-linux*)
51004dcb 7367 if test "$GCC" = no; then
46f4442e
A
7368 OLD_CFLAGS="${CFLAGS}"
7369 OLD_CXXFLAGS="${CXXFLAGS}"
7370 CFLAGS="${CFLAGS} -qutf"
7371 CXXFLAGS="${CXXFLAGS} -qutf"
729e4ab9 7372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e
A
7373/* end confdefs.h. */
7374const unsigned short hello[] = u"hello";
7375int
7376main ()
7377{
7378
7379 ;
7380 return 0;
7381}
7382_ACEOF
729e4ab9 7383if ac_fn_c_try_compile "$LINENO"; then :
46f4442e
A
7384 U_CHECK_UTF16_STRING=1
7385else
729e4ab9 7386 U_CHECK_UTF16_STRING=0
46f4442e 7387fi
729e4ab9 7388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46f4442e
A
7389 if test "$U_CHECK_UTF16_STRING" = 0; then
7390 CFLAGS="${OLD_CFLAGS}"
7391 CXXFLAGS="${OLD_CXXFLAGS}"
7392 else
57a6839d 7393 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -qutf"
46f4442e
A
7394 CHECK_UTF16_STRING_RESULT="-qutf"
7395 fi
7396 fi
7397 ;;
7398*-*-solaris*)
51004dcb 7399 if test "$GCC" = no; then
46f4442e
A
7400 OLD_CFLAGS="${CFLAGS}"
7401 OLD_CXXFLAGS="${CXXFLAGS}"
7402 CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
7403 CXXFLAGS="${CXXFLAGS} -xustr=ascii_utf16_ushort"
729e4ab9 7404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46f4442e
A
7405/* end confdefs.h. */
7406const unsigned short hello[] = U"hello";
7407int
7408main ()
7409{
7410
7411 ;
7412 return 0;
7413}
7414_ACEOF
729e4ab9 7415if ac_fn_c_try_compile "$LINENO"; then :
46f4442e
A
7416 U_CHECK_UTF16_STRING=1
7417else
729e4ab9 7418 U_CHECK_UTF16_STRING=0
46f4442e 7419fi
729e4ab9 7420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46f4442e
A
7421 if test "$U_CHECK_UTF16_STRING" = 0; then
7422 CFLAGS="${OLD_CFLAGS}"
7423 CXXFLAGS="${OLD_CXXFLAGS}"
7424 else
7425 CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort"
57a6839d
A
7426 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -xustr=ascii_utf16_ushort"
7427 UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -xustr=ascii_utf16_ushort"
46f4442e
A
7428 # Since we can't detect the availability of this UTF-16 syntax at compile time,
7429 # we depend on configure telling us that we can use it.
7430 # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
7431 # we only use this macro within ICU.
7432 # If an ICU user uses icu-config, this feature will be enabled.
4388f060 7433 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
46f4442e
A
7434 U_CHECK_UTF16_STRING=0
7435 fi
7436 fi
7437 ;;
7438*-*-hpux*)
51004dcb 7439 if test "$GCC" = no; then
729e4ab9
A
7440 # The option will be detected at compile time without additional compiler options.
7441 CHECK_UTF16_STRING_RESULT="available"
46f4442e
A
7442 fi
7443 ;;
7444*-*-cygwin)
729e4ab9
A
7445 # wchar_t can be used
7446 CHECK_UTF16_STRING_RESULT="available"
46f4442e
A
7447 ;;
7448*)
7449 ;;
7450esac
729e4ab9
A
7451
7452# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
51004dcb
A
7453if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
7454 if test "$GCC" = yes; then
729e4ab9 7455 OLD_CFLAGS="${CFLAGS}"
51004dcb 7456 CFLAGS="${CFLAGS} -std=gnu99"
729e4ab9
A
7457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7458/* end confdefs.h. */
7459
51004dcb 7460static const char16_t test[] = u"This is a UTF16 literal string.";
729e4ab9
A
7461
7462int
7463main ()
7464{
7465
7466 ;
7467 return 0;
7468}
7469_ACEOF
7470if ac_fn_c_try_compile "$LINENO"; then :
51004dcb 7471 CC_UTF16_STRING=1
729e4ab9 7472else
51004dcb 7473 CC_UTF16_STRING=0
729e4ab9
A
7474fi
7475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51004dcb 7476 if test "$CC_UTF16_STRING" = 1; then
57a6839d 7477 UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99"
51004dcb 7478 CHECK_UTF16_STRING_RESULT="C only";
729e4ab9
A
7479 else
7480 CFLAGS="${OLD_CFLAGS}"
729e4ab9
A
7481 fi
7482 fi
51004dcb 7483 if test "$GXX" = yes; then
51004dcb 7484 # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
51004dcb
A
7485 ac_ext=cpp
7486ac_cpp='$CXXCPP $CPPFLAGS'
7487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
729e4ab9 7490
51004dcb
A
7491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7492/* end confdefs.h. */
729e4ab9 7493
51004dcb
A
7494static const char16_t test[] = u"This is a UTF16 literal string.";
7495
7496int
7497main ()
7498{
7499
7500 ;
7501 return 0;
7502}
7503_ACEOF
7504if ac_fn_cxx_try_compile "$LINENO"; then :
7505 CXX_UTF16_STRING=1
7506else
7507 CXX_UTF16_STRING=0
7508fi
7509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7510 ac_ext=c
7511ac_cpp='$CPP $CPPFLAGS'
7512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7514ac_compiler_gnu=$ac_cv_c_compiler_gnu
7515
7516 if test "$CXX_UTF16_STRING" = 1; then
7517 if test "$CC_UTF16_STRING" = 1; then
7518 CHECK_UTF16_STRING_RESULT="available";
7519 else
7520 CHECK_UTF16_STRING_RESULT="C++ only";
7521 fi
51004dcb
A
7522 fi
7523 fi
7524fi
729e4ab9
A
7525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_UTF16_STRING_RESULT" >&5
7526$as_echo "$CHECK_UTF16_STRING_RESULT" >&6; }
46f4442e 7527
729e4ab9
A
7528# Enable/disable extras
7529# Check whether --enable-extras was given.
7530if test "${enable_extras+set}" = set; then :
7531 enableval=$enable_extras; case "${enableval}" in
46f4442e
A
7532 yes) extras=true ;;
7533 no) extras=false ;;
729e4ab9 7534 *) as_fn_error $? "bad value ${enableval} for --enable-extras" "$LINENO" 5 ;;
46f4442e
A
7535 esac
7536else
7537 extras=true
729e4ab9
A
7538fi
7539
46f4442e 7540
2ca993e8 7541
46f4442e
A
7542if test "$extras" = true; then
7543 EXTRAS_TRUE=
2ca993e8 7544 U_HAVE_EXTRAS=1
46f4442e
A
7545else
7546 EXTRAS_TRUE='#'
2ca993e8 7547 U_HAVE_EXTRAS=0
46f4442e 7548fi
729e4ab9
A
7549# Check whether --enable-icuio was given.
7550if test "${enable_icuio+set}" = set; then :
7551 enableval=$enable_icuio; case "${enableval}" in
46f4442e
A
7552 yes) icuio=true ;;
7553 no) icuio=false ;;
729e4ab9 7554 *) as_fn_error $? "bad value ${enableval} for --enable-icuio" "$LINENO" 5 ;;
46f4442e
A
7555 esac
7556else
374ca955 7557 icuio=true
729e4ab9
A
7558fi
7559
b75a7d8f 7560
2ca993e8 7561
374ca955
A
7562if test "$icuio" = true; then
7563 ICUIO_TRUE=
2ca993e8 7564 U_HAVE_ICUIO=1
b75a7d8f 7565else
374ca955 7566 ICUIO_TRUE='#'
2ca993e8 7567 U_HAVE_ICUIO=0
b75a7d8f
A
7568fi
7569
b331163b
A
7570# Enable/disable layoutex
7571# Check whether --enable-layoutex was given.
7572if test "${enable_layoutex+set}" = set; then :
7573 enableval=$enable_layoutex; case "${enableval}" in
f3c0d7a5 7574 yes) layoutex=$have_icu_le_hb ;;
b331163b
A
7575 no) layoutex=false ;;
7576 *) as_fn_error $? "bad value ${enableval} for --enable-layoutex" "$LINENO" 5 ;;
7577 esac
7578else
f3c0d7a5 7579 layoutex=$have_icu_le_hb
b331163b
A
7580fi
7581
7582
2ca993e8 7583
b331163b
A
7584if test "$layoutex" = true; then
7585 LAYOUTEX_TRUE=
2ca993e8 7586 U_HAVE_LAYOUTEX=1
b331163b
A
7587else
7588 LAYOUTEX_TRUE='#'
2ca993e8 7589 U_HAVE_LAYOUTEX=0
b331163b
A
7590fi
7591
f3c0d7a5
A
7592# Enable/disable layout
7593# Check whether --enable-layout was given.
7594if test "${enable_layout+set}" = set; then :
7595 enableval=$enable_layout; case "${enableval}" in
7596 yes) as_fn_error $? "The ICU Layout Engine has been removed." "$LINENO" 5 ;;
7597 no) ;;
7598 *) ;;
7599 esac
7600fi
7601
7602
57a6839d
A
7603# Enable/disable tools
7604# Check whether --enable-tools was given.
7605if test "${enable_tools+set}" = set; then :
7606 enableval=$enable_tools; case "${enableval}" in
7607 yes) tools=true ;;
7608 no) tools=false ;;
7609 *) as_fn_error $? "bad value ${enableval} for --enable-tools" "$LINENO" 5 ;;
7610 esac
7611else
7612 tools=true
7613fi
7614
7615
2ca993e8 7616
57a6839d
A
7617if test "$tools" = true; then
7618 TOOLS_TRUE=
2ca993e8 7619 U_HAVE_TOOLS=1
57a6839d
A
7620else
7621 TOOLS_TRUE='#'
2ca993e8 7622 U_HAVE_TOOLS=0
57a6839d
A
7623fi
7624
73c04bcf 7625
729e4ab9
A
7626# Check whether --with-data-packaging was given.
7627if test "${with_data_packaging+set}" = set; then :
7628 withval=$with_data_packaging; case "${withval}" in
b75a7d8f
A
7629 files|archive|library) datapackaging=$withval ;;
7630 auto) datapackaging=$withval ;;
7631 common) datapackaging=archive ;;
7632 dll) datapackaging=library ;;
374ca955 7633 static) datapackaging=static ;;
729e4ab9 7634 *) as_fn_error $? "bad value ${withval} for --with-data-packaging" "$LINENO" 5 ;;
b75a7d8f
A
7635 esac
7636else
7637 datapackaging=
729e4ab9
A
7638fi
7639
b75a7d8f 7640
729e4ab9
A
7641# Note: 'thesysconfdir' is an evaluated version, for Man pages, so also for thedatadir, thelibdir, etc..
7642# thesysconfdir=`eval echo $sysconfdir`
b75a7d8f 7643thedatadir=`eval echo $datadir`
729e4ab9 7644# Always put raw data files in share/icu/{version}, etc. Never use lib/icu/{version} for data files.. Actual shared libraries will go in {libdir}.
374ca955
A
7645pkgicudatadir=$datadir
7646thepkgicudatadir=$thedatadir
b75a7d8f
A
7647
7648
7649
7650
b75a7d8f 7651if test x"$datapackaging" = x -o x"$datapackaging" = xauto; then
729e4ab9 7652 # default to library
b75a7d8f 7653 datapackaging=library
729e4ab9
A
7654 if test "$ENABLE_STATIC" = "YES"; then
7655 if test "$ENABLE_SHARED" != "YES"; then
7656 datapackaging=static
7657 fi
7658 fi
b75a7d8f
A
7659fi
7660
729e4ab9
A
7661datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
7662
7663datapackaging_msg="(No explaination for mode $datapackaging.)"
7664
7665datapackaging_msg_path="ICU will look in $datapackaging_dir which is the installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override."
7666datapackaging_msg_set="ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override."
7667datapackaging_howfound="(unknown)"
7668
b75a7d8f
A
7669case "$datapackaging" in
7670 files)
729e4ab9
A
7671 DATA_PACKAGING_MODE=files
7672 datapackaging_msg="ICU data will be stored in individual files."
7673 datapackaging_howfound="$datapackaging_msg_path"
7674 ;;
b75a7d8f 7675 archive)
729e4ab9
A
7676 DATA_PACKAGING_MODE=common
7677 datapackaging_msg="ICU data will be stored in a single .dat file."
7678 datapackaging_howfound="$datapackaging_msg_path"
7679 ;;
b75a7d8f 7680 library)
729e4ab9
A
7681 DATA_PACKAGING_MODE=dll
7682 datapackaging_msg="ICU data will be linked with ICU."
7683 if test "$ENABLE_STATIC" = "YES"; then
7684 datapackaging_msg="$datapackaging_msg A static data library will be built. "
7685 fi
7686 if test "$ENABLE_SHARED" = "YES"; then
7687 datapackaging_msg="$datapackaging_msg A shared data library will be built. "
7688 fi
7689 datapackaging_howfound="$datapackaging_msg_set"
7690 ;;
7691 static)
7692 DATA_PACKAGING_MODE=static
7693 datapackaging_msg="ICU data will be stored in a static library."
7694 datapackaging_howfound="$datapackaging_msg_set"
7695 ;;
b75a7d8f
A
7696esac
7697
7698
729e4ab9
A
7699# Sets a library suffix
7700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a library suffix to use" >&5
7701$as_echo_n "checking for a library suffix to use... " >&6; }
b75a7d8f 7702
729e4ab9
A
7703# Check whether --with-library-suffix was given.
7704if test "${with_library_suffix+set}" = set; then :
7705 withval=$with_library_suffix; ICULIBSUFFIX="${withval}"
b75a7d8f
A
7706else
7707 ICULIBSUFFIX=
729e4ab9
A
7708fi
7709
b75a7d8f
A
7710msg=$ICULIBSUFFIX
7711if test "$msg" = ""; then
7712 msg=none
7713fi
729e4ab9
A
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
7715$as_echo "$msg" >&6; }
b75a7d8f
A
7716
7717if test "$ICULIBSUFFIX" != ""
7718then
7719 U_HAVE_LIB_SUFFIX=1
729e4ab9 7720 ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/^A-Za-z0-9_/_/g'`
4388f060 7721 UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
b75a7d8f
A
7722else
7723 U_HAVE_LIB_SUFFIX=0
7724fi
7725
7726
7727
729e4ab9
A
7728# Enable/disable tests
7729# Check whether --enable-tests was given.
7730if test "${enable_tests+set}" = set; then :
7731 enableval=$enable_tests; case "${enableval}" in
b75a7d8f
A
7732 yes) tests=true ;;
7733 no) tests=false ;;
729e4ab9 7734 *) as_fn_error $? "bad value ${enableval} for --enable-tests" "$LINENO" 5 ;;
b75a7d8f
A
7735 esac
7736else
7737 tests=true
729e4ab9
A
7738fi
7739
b75a7d8f 7740
2ca993e8 7741
b75a7d8f
A
7742if test "$tests" = true; then
7743 TESTS_TRUE=
2ca993e8 7744 U_HAVE_TESTS=1
b75a7d8f
A
7745else
7746 TESTS_TRUE='#'
2ca993e8 7747 U_HAVE_TESTS=0
b75a7d8f
A
7748fi
7749
729e4ab9
A
7750# Enable/disable samples
7751# Check whether --enable-samples was given.
7752if test "${enable_samples+set}" = set; then :
7753 enableval=$enable_samples; case "${enableval}" in
b75a7d8f
A
7754 yes) samples=true ;;
7755 no) samples=false ;;
729e4ab9 7756 *) as_fn_error $? "bad value ${enableval} for --enable-samples" "$LINENO" 5 ;;
b75a7d8f
A
7757 esac
7758else
7759 samples=true
729e4ab9
A
7760fi
7761
b75a7d8f 7762
2ca993e8 7763
b75a7d8f
A
7764if test "$samples" = true; then
7765 SAMPLES_TRUE=
2ca993e8 7766 U_HAVE_SAMPLES=1
b75a7d8f
A
7767else
7768 SAMPLES_TRUE='#'
2ca993e8 7769 U_HAVE_SAMPLES=0
b75a7d8f
A
7770fi
7771
7772ICUDATA_CHAR=$U_ENDIAN_CHAR
7773
729e4ab9
A
7774# Platform-specific Makefile setup
7775# set ICUDATA_CHAR to 'e' for any EBCDIC (which should be big endian) platform.
b75a7d8f
A
7776case "${host}" in
7777 *-*-solaris*) platform=U_SOLARIS ;;
729e4ab9 7778 *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) platform=U_LINUX ;;
73c04bcf 7779 *-*-*bsd*|*-*-dragonfly*) platform=U_BSD ;;
374ca955
A
7780 *-*-aix*) platform=U_AIX ;;
7781 *-*-hpux*) platform=U_HPUX ;;
b75a7d8f 7782 *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;;
4388f060
A
7783 *-*-cygwin*) platform=U_CYGWIN ;;
7784 *-*-mingw*) platform=U_MINGW ;;
b75a7d8f 7785 *-*ibm-openedition*|*-*-os390*) platform=OS390
73c04bcf
A
7786 if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
7787 ICUDATA_CHAR="e"
7788 fi ;;
b75a7d8f 7789 *-*-os400*) platform=OS400
73c04bcf
A
7790 if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
7791 ICUDATA_CHAR="e"
7792 fi ;;
b75a7d8f
A
7793 *-*-nto*) platform=U_QNX ;;
7794 *-dec-osf*) platform=U_OSF ;;
374ca955
A
7795 *-*-beos) platform=U_BEOS ;;
7796 *-*-irix*) platform=U_IRIX ;;
7797 *-ncr-*) platform=U_MPRAS ;;
b75a7d8f
A
7798 *) platform=U_UNKNOWN_PLATFORM ;;
7799esac
7800
7801
7802platform_make_fragment_name="$icu_cv_host_frag"
7803platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name"
7804
7805
7806
b75a7d8f
A
7807if test "${FORCE_LIBS}" != ""; then
7808 echo " *** Overriding automatically chosen LIBS=$LIBS, using instead FORCE_LIBS=${FORCE_LIBS}" 1>&6
7809 LIBS=${FORCE_LIBS}
7810fi
7811
729e4ab9
A
7812# Now that we're done using CPPFLAGS etc. for tests, we can change it
7813# for build.
b75a7d8f 7814
57a6839d
A
7815if test "${CC}" == "clang"; then
7816 CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
7817else
7818 CLANGCFLAGS=""
7819fi
7820
7821if test "${CXX}" == "clang++"; then
7822 CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
7823else
7824 CLANGCXXFLAGS=""
7825fi
7826
51004dcb 7827CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
57a6839d
A
7828CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS"
7829CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS"
b75a7d8f 7830
4388f060
A
7831
7832
7833
7834# append all config cppflags
7835CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS $UCONFIG_CPPFLAGS"
7836
7837echo "CPPFLAGS=$CPPFLAGS"
7838echo "CFLAGS=$CFLAGS"
7839echo "CXXFLAGS=$CXXFLAGS"
7840
7841
729e4ab9 7842# output the Makefiles
f3c0d7a5 7843ac_config_files="$ac_config_files icudefs.mk Makefile data/pkgdataMakefile config/Makefile.inc config/icu.pc config/pkgdataMakefile data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/uconv/pkgdataMakefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/gendict/Makefile tools/gentest/Makefile tools/gennorm2/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icuinfo/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile tools/gencfu/Makefile tools/escapesrc/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdataMakefile test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/collperf/Makefile test/perf/collperf2/Makefile test/perf/dicttrieperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/DateFmtPerf/Makefile test/perf/howExpensiveIs/Makefile test/perf/strsrchperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile test/perf/utrie2perf/Makefile test/perf/leperf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile"
729e4ab9 7844
73c04bcf 7845cat >confcache <<\_ACEOF
b75a7d8f
A
7846# This file is a shell script that caches the results of configure
7847# tests run on this system so they can be shared between configure
73c04bcf
A
7848# scripts and configure runs, see configure's option --config-cache.
7849# It is not useful on other systems. If it contains results you don't
7850# want to keep, you may remove or edit it.
b75a7d8f 7851#
73c04bcf
A
7852# config.status only pays attention to the cache file if you give it
7853# the --recheck option to rerun configure.
b75a7d8f 7854#
73c04bcf
A
7855# `ac_cv_env_foo' variables (set or unset) will be overridden when
7856# loading this file, other *unset* `ac_cv_foo' will be assigned the
7857# following values.
7858
7859_ACEOF
7860
b75a7d8f
A
7861# The following way of writing the cache mishandles newlines in values,
7862# but we know of no workaround that is simple, portable, and efficient.
729e4ab9 7863# So, we kill variables containing newlines.
b75a7d8f
A
7864# Ultrix sh set writes to stderr and can't be redirected directly,
7865# and sets the high bit in the cache file unless we assign to the vars.
729e4ab9
A
7866(
7867 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
7868 eval ac_val=\$$ac_var
7869 case $ac_val in #(
7870 *${as_nl}*)
7871 case $ac_var in #(
7872 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
7873$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
7874 esac
7875 case $ac_var in #(
7876 _ | IFS | as_nl) ;; #(
7877 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
7878 *) { eval $ac_var=; unset $ac_var;} ;;
7879 esac ;;
7880 esac
7881 done
7882
73c04bcf 7883 (set) 2>&1 |
729e4ab9
A
7884 case $as_nl`(ac_space=' '; set) 2>&1` in #(
7885 *${as_nl}ac_space=\ *)
7886 # `set' does not quote correctly, so add quotes: double-quote
7887 # substitution turns \\\\ into \\, and sed turns \\ into \.
73c04bcf
A
7888 sed -n \
7889 "s/'/'\\\\''/g;
7890 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
729e4ab9 7891 ;; #(
73c04bcf
A
7892 *)
7893 # `set' quotes correctly as required by POSIX, so do not add quotes.
729e4ab9 7894 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
73c04bcf 7895 ;;
729e4ab9
A
7896 esac |
7897 sort
7898) |
73c04bcf 7899 sed '
729e4ab9 7900 /^ac_cv_env_/b end
73c04bcf 7901 t clear
729e4ab9 7902 :clear
73c04bcf
A
7903 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7904 t end
729e4ab9
A
7905 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7906 :end' >>confcache
7907if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
7908 if test -w "$cache_file"; then
4388f060 7909 if test "x$cache_file" != "x/dev/null"; then
729e4ab9
A
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
7911$as_echo "$as_me: updating cache $cache_file" >&6;}
4388f060
A
7912 if test ! -f "$cache_file" || test -h "$cache_file"; then
7913 cat confcache >"$cache_file"
7914 else
7915 case $cache_file in #(
7916 */* | ?:*)
7917 mv -f confcache "$cache_file"$$ &&
7918 mv -f "$cache_file"$$ "$cache_file" ;; #(
7919 *)
7920 mv -f confcache "$cache_file" ;;
7921 esac
7922 fi
7923 fi
b75a7d8f 7924 else
729e4ab9
A
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
7926$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
b75a7d8f
A
7927 fi
7928fi
7929rm -f confcache
7930
b75a7d8f
A
7931test "x$prefix" = xNONE && prefix=$ac_default_prefix
7932# Let make expand exec_prefix.
7933test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7934
4388f060
A
7935# Transform confdefs.h into DEFS.
7936# Protect against shell expansion while executing Makefile rules.
7937# Protect against Makefile macro expansion.
7938#
7939# If the first sed substitution is executed (which looks for macros that
7940# take arguments), then branch to the quote section. Otherwise,
7941# look for a macro that doesn't take arguments.
7942ac_script='
7943:mline
7944/\\$/{
7945 N
7946 s,\\\n,,
7947 b mline
7948}
7949t clear
7950:clear
7951s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
7952t quote
7953s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
7954t quote
7955b any
7956:quote
7957s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
7958s/\[/\\&/g
7959s/\]/\\&/g
7960s/\$/$$/g
7961H
7962:any
7963${
7964 g
7965 s/^\n//
7966 s/\n/ /g
7967 p
7968}
7969'
7970DEFS=`sed -n "$ac_script" confdefs.h`
7971
b75a7d8f 7972
73c04bcf
A
7973ac_libobjs=
7974ac_ltlibobjs=
729e4ab9 7975U=
73c04bcf
A
7976for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7977 # 1. Remove the extension, and $U if already installed.
729e4ab9
A
7978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
7979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
7980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
7981 # will be set to the directory where LIBOBJS objects are built.
7982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
7983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
73c04bcf
A
7984done
7985LIBOBJS=$ac_libobjs
b75a7d8f 7986
73c04bcf
A
7987LTLIBOBJS=$ac_ltlibobjs
7988
7989
7990
729e4ab9 7991
4388f060 7992: "${CONFIG_STATUS=./config.status}"
729e4ab9 7993ac_write_fail=0
73c04bcf
A
7994ac_clean_files_save=$ac_clean_files
7995ac_clean_files="$ac_clean_files $CONFIG_STATUS"
729e4ab9
A
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
7997$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
7998as_write_fail=0
7999cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
73c04bcf
A
8000#! $SHELL
8001# Generated by $as_me.
b75a7d8f 8002# Run this file to recreate the current configuration.
b75a7d8f 8003# Compiler output produced by configure, useful for debugging
73c04bcf 8004# configure, is in config.log if it exists.
b75a7d8f 8005
73c04bcf
A
8006debug=false
8007ac_cs_recheck=false
8008ac_cs_silent=false
73c04bcf 8009
729e4ab9
A
8010SHELL=\${CONFIG_SHELL-$SHELL}
8011export SHELL
8012_ASEOF
8013cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8014## -------------------- ##
8015## M4sh Initialization. ##
8016## -------------------- ##
8017
8018# Be more Bourne compatible
8019DUALCASE=1; export DUALCASE # for MKS sh
8020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
73c04bcf
A
8021 emulate sh
8022 NULLCMD=:
729e4ab9 8023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
73c04bcf
A
8024 # is contrary to our usage. Disable this feature.
8025 alias -g '${1+"$@"}'='"$@"'
729e4ab9 8026 setopt NO_GLOB_SUBST
73c04bcf 8027else
729e4ab9
A
8028 case `(set -o) 2>/dev/null` in #(
8029 *posix*) :
8030 set -o posix ;; #(
8031 *) :
8032 ;;
8033esac
73c04bcf
A
8034fi
8035
8036
729e4ab9
A
8037as_nl='
8038'
8039export as_nl
8040# Printing a long string crashes Solaris 7 /usr/bin/printf.
8041as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8042as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
8043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8044# Prefer a ksh shell builtin over an external printf program on Solaris,
8045# but without wasting forks for bash or zsh.
8046if test -z "$BASH_VERSION$ZSH_VERSION" \
8047 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
8048 as_echo='print -r --'
8049 as_echo_n='print -rn --'
8050elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
8051 as_echo='printf %s\n'
8052 as_echo_n='printf %s'
8053else
8054 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
8055 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
8056 as_echo_n='/usr/ucb/echo -n'
73c04bcf 8057 else
729e4ab9
A
8058 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
8059 as_echo_n_body='eval
8060 arg=$1;
8061 case $arg in #(
8062 *"$as_nl"*)
8063 expr "X$arg" : "X\\(.*\\)$as_nl";
8064 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
8065 esac;
8066 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
8067 '
8068 export as_echo_n_body
8069 as_echo_n='sh -c $as_echo_n_body as_echo'
73c04bcf 8070 fi
729e4ab9
A
8071 export as_echo_body
8072 as_echo='sh -c $as_echo_body as_echo'
73c04bcf
A
8073fi
8074
73c04bcf
A
8075# The user is always right.
8076if test "${PATH_SEPARATOR+set}" != set; then
729e4ab9
A
8077 PATH_SEPARATOR=:
8078 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8079 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8080 PATH_SEPARATOR=';'
8081 }
73c04bcf
A
8082fi
8083
8084
729e4ab9
A
8085# IFS
8086# We need space, tab and new line, in precisely that order. Quoting is
8087# there to prevent editors from complaining about space-tab.
8088# (If _AS_PATH_WALK were called with IFS unset, it would disable word
8089# splitting by setting IFS to empty value.)
8090IFS=" "" $as_nl"
8091
8092# Find who we are. Look in the path if we contain no directory separator.
4388f060 8093as_myself=
729e4ab9
A
8094case $0 in #((
8095 *[\\/]* ) as_myself=$0 ;;
8096 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
73c04bcf
A
8097for as_dir in $PATH
8098do
8099 IFS=$as_save_IFS
8100 test -z "$as_dir" && as_dir=.
729e4ab9
A
8101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8102 done
8103IFS=$as_save_IFS
8104
8105 ;;
8106esac
8107# We did not find ourselves, most probably we were run as `sh COMMAND'
8108# in which case we are not to be found in the path.
8109if test "x$as_myself" = x; then
8110 as_myself=$0
8111fi
8112if test ! -f "$as_myself"; then
8113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8114 exit 1
8115fi
8116
8117# Unset variables that we do not need and which cause bugs (e.g. in
8118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
8119# suppresses any "Segmentation fault" message there. '((' could
8120# trigger a bug in pdksh 5.2.14.
8121for as_var in BASH_ENV ENV MAIL MAILPATH
8122do eval test x\${$as_var+set} = xset \
8123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
73c04bcf 8124done
729e4ab9
A
8125PS1='$ '
8126PS2='> '
8127PS4='+ '
73c04bcf 8128
729e4ab9
A
8129# NLS nuisances.
8130LC_ALL=C
8131export LC_ALL
8132LANGUAGE=C
8133export LANGUAGE
8134
8135# CDPATH.
8136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
8137
8138
8139# as_fn_error STATUS ERROR [LINENO LOG_FD]
8140# ----------------------------------------
8141# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8142# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
8143# script with STATUS, using 1 if that was 0.
8144as_fn_error ()
8145{
8146 as_status=$1; test $as_status -eq 0 && as_status=1
8147 if test "$4"; then
8148 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8149 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
b75a7d8f 8150 fi
729e4ab9
A
8151 $as_echo "$as_me: error: $2" >&2
8152 as_fn_exit $as_status
8153} # as_fn_error
b75a7d8f 8154
73c04bcf 8155
729e4ab9
A
8156# as_fn_set_status STATUS
8157# -----------------------
8158# Set $? to STATUS, without forking.
8159as_fn_set_status ()
8160{
8161 return $1
8162} # as_fn_set_status
73c04bcf 8163
729e4ab9
A
8164# as_fn_exit STATUS
8165# -----------------
8166# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8167as_fn_exit ()
8168{
8169 set +e
8170 as_fn_set_status $1
8171 exit $1
8172} # as_fn_exit
8173
8174# as_fn_unset VAR
8175# ---------------
8176# Portably unset VAR.
8177as_fn_unset ()
8178{
8179 { eval $1=; unset $1;}
8180}
8181as_unset=as_fn_unset
8182# as_fn_append VAR VALUE
8183# ----------------------
8184# Append the text in VALUE to the end of the definition contained in VAR. Take
8185# advantage of any shell optimizations that allow amortized linear growth over
8186# repeated appends, instead of the typical quadratic growth present in naive
8187# implementations.
8188if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8189 eval 'as_fn_append ()
8190 {
8191 eval $1+=\$2
8192 }'
8193else
8194 as_fn_append ()
8195 {
8196 eval $1=\$$1\$2
8197 }
8198fi # as_fn_append
8199
8200# as_fn_arith ARG...
8201# ------------------
8202# Perform arithmetic evaluation on the ARGs, and store the result in the
8203# global $as_val. Take advantage of shells that can avoid forks. The arguments
8204# must be portable across $(()) and expr.
8205if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8206 eval 'as_fn_arith ()
8207 {
8208 as_val=$(( $* ))
8209 }'
8210else
8211 as_fn_arith ()
8212 {
8213 as_val=`expr "$@" || test $? -eq 1`
8214 }
8215fi # as_fn_arith
b75a7d8f 8216
73c04bcf 8217
729e4ab9
A
8218if expr a : '\(a\)' >/dev/null 2>&1 &&
8219 test "X`expr 00001 : '.*\(...\)'`" = X001; then
73c04bcf
A
8220 as_expr=expr
8221else
8222 as_expr=false
8223fi
8224
729e4ab9
A
8225if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
8226 as_basename=basename
8227else
8228 as_basename=false
8229fi
8230
8231if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8232 as_dirname=dirname
8233else
8234 as_dirname=false
8235fi
8236
8237as_me=`$as_basename -- "$0" ||
8238$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8239 X"$0" : 'X\(//\)$' \| \
8240 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
8241$as_echo X/"$0" |
8242 sed '/^.*\/\([^/][^/]*\)\/*$/{
8243 s//\1/
8244 q
8245 }
8246 /^X\/\(\/\/\)$/{
8247 s//\1/
8248 q
8249 }
8250 /^X\/\(\/\).*/{
8251 s//\1/
8252 q
8253 }
8254 s/.*/./; q'`
8255
8256# Avoid depending upon Character Ranges.
8257as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8258as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8259as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8260as_cr_digits='0123456789'
8261as_cr_alnum=$as_cr_Letters$as_cr_digits
8262
8263ECHO_C= ECHO_N= ECHO_T=
8264case `echo -n x` in #(((((
8265-n*)
8266 case `echo 'xy\c'` in
8267 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
8268 xy) ECHO_C='\c';;
8269 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
8270 ECHO_T=' ';;
8271 esac;;
8272*)
8273 ECHO_N='-n';;
8274esac
8275
73c04bcf 8276rm -f conf$$ conf$$.exe conf$$.file
729e4ab9
A
8277if test -d conf$$.dir; then
8278 rm -f conf$$.dir/conf$$.file
8279else
8280 rm -f conf$$.dir
8281 mkdir conf$$.dir 2>/dev/null
8282fi
8283if (echo >conf$$.file) 2>/dev/null; then
8284 if ln -s conf$$.file conf$$ 2>/dev/null; then
73c04bcf 8285 as_ln_s='ln -s'
729e4ab9
A
8286 # ... but there are two gotchas:
8287 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8288 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
b331163b 8289 # In both cases, we have to default to `cp -pR'.
729e4ab9 8290 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
b331163b 8291 as_ln_s='cp -pR'
729e4ab9
A
8292 elif ln conf$$.file conf$$ 2>/dev/null; then
8293 as_ln_s=ln
8294 else
b331163b 8295 as_ln_s='cp -pR'
b75a7d8f 8296 fi
73c04bcf 8297else
b331163b 8298 as_ln_s='cp -pR'
73c04bcf 8299fi
729e4ab9
A
8300rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
8301rmdir conf$$.dir 2>/dev/null
8302
8303
8304# as_fn_mkdir_p
8305# -------------
8306# Create "$as_dir" as a directory, including parents if necessary.
8307as_fn_mkdir_p ()
8308{
8309
8310 case $as_dir in #(
8311 -*) as_dir=./$as_dir;;
8312 esac
8313 test -d "$as_dir" || eval $as_mkdir_p || {
8314 as_dirs=
8315 while :; do
8316 case $as_dir in #(
8317 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
8318 *) as_qdir=$as_dir;;
8319 esac
8320 as_dirs="'$as_qdir' $as_dirs"
8321 as_dir=`$as_dirname -- "$as_dir" ||
8322$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8323 X"$as_dir" : 'X\(//\)[^/]' \| \
8324 X"$as_dir" : 'X\(//\)$' \| \
8325 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
8326$as_echo X"$as_dir" |
8327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8328 s//\1/
8329 q
8330 }
8331 /^X\(\/\/\)[^/].*/{
8332 s//\1/
8333 q
8334 }
8335 /^X\(\/\/\)$/{
8336 s//\1/
8337 q
8338 }
8339 /^X\(\/\).*/{
8340 s//\1/
8341 q
8342 }
8343 s/.*/./; q'`
8344 test -d "$as_dir" && break
8345 done
8346 test -z "$as_dirs" || eval "mkdir $as_dirs"
8347 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
b75a7d8f 8348
729e4ab9
A
8349
8350} # as_fn_mkdir_p
73c04bcf 8351if mkdir -p . 2>/dev/null; then
729e4ab9 8352 as_mkdir_p='mkdir -p "$as_dir"'
73c04bcf
A
8353else
8354 test -d ./-p && rmdir ./-p
8355 as_mkdir_p=false
8356fi
8357
b331163b
A
8358
8359# as_fn_executable_p FILE
8360# -----------------------
8361# Test if FILE is an executable regular file.
8362as_fn_executable_p ()
8363{
8364 test -f "$1" && test -x "$1"
8365} # as_fn_executable_p
8366as_test_x='test -x'
8367as_executable_p=as_fn_executable_p
73c04bcf
A
8368
8369# Sed expression to map a string onto a valid CPP name.
8370as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8371
8372# Sed expression to map a string onto a valid variable name.
8373as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8374
8375
73c04bcf 8376exec 6>&1
729e4ab9
A
8377## ----------------------------------- ##
8378## Main body of $CONFIG_STATUS script. ##
8379## ----------------------------------- ##
8380_ASEOF
8381test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
8382
8383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8384# Save the log message, to keep $0 and so on meaningful, and to
73c04bcf 8385# report actual input values of CONFIG_FILES etc. instead of their
729e4ab9
A
8386# values after options handling.
8387ac_log="
f3c0d7a5 8388This file was extended by ICU $as_me 59.1, which was
b331163b 8389generated by GNU Autoconf 2.69. Invocation command line was
73c04bcf
A
8390
8391 CONFIG_FILES = $CONFIG_FILES
8392 CONFIG_HEADERS = $CONFIG_HEADERS
8393 CONFIG_LINKS = $CONFIG_LINKS
8394 CONFIG_COMMANDS = $CONFIG_COMMANDS
8395 $ $0 $@
8396
729e4ab9
A
8397on `(hostname || uname -n) 2>/dev/null | sed 1q`
8398"
8399
73c04bcf
A
8400_ACEOF
8401
729e4ab9
A
8402case $ac_config_files in *"
8403"*) set x $ac_config_files; shift; ac_config_files=$*;;
8404esac
73c04bcf 8405
73c04bcf 8406
73c04bcf 8407
729e4ab9
A
8408cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8409# Files that config.status was made for.
8410config_files="$ac_config_files"
73c04bcf 8411
729e4ab9 8412_ACEOF
73c04bcf 8413
729e4ab9 8414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
73c04bcf 8415ac_cs_usage="\
729e4ab9
A
8416\`$as_me' instantiates files and other configuration actions
8417from templates according to the current configuration. Unless the files
8418and actions are specified as TAGs, all are instantiated by default.
73c04bcf 8419
729e4ab9 8420Usage: $0 [OPTION]... [TAG]...
73c04bcf
A
8421
8422 -h, --help print this help, then exit
729e4ab9
A
8423 -V, --version print version number and configuration settings, then exit
8424 --config print configuration, then exit
8425 -q, --quiet, --silent
8426 do not print progress messages
73c04bcf
A
8427 -d, --debug don't remove temporary files
8428 --recheck update $as_me by reconfiguring in the same conditions
729e4ab9
A
8429 --file=FILE[:TEMPLATE]
8430 instantiate the configuration file FILE
73c04bcf
A
8431
8432Configuration files:
8433$config_files
8434
b331163b
A
8435Report bugs to <http://icu-project.org/bugs>.
8436ICU home page: <http://icu-project.org>."
73c04bcf 8437
729e4ab9
A
8438_ACEOF
8439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8440ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
73c04bcf 8441ac_cs_version="\\
f3c0d7a5 8442ICU config.status 59.1
b331163b 8443configured by $0, generated by GNU Autoconf 2.69,
729e4ab9 8444 with options \\"\$ac_cs_config\\"
73c04bcf 8445
b331163b 8446Copyright (C) 2012 Free Software Foundation, Inc.
73c04bcf
A
8447This config.status script is free software; the Free Software Foundation
8448gives unlimited permission to copy, distribute and modify it."
729e4ab9
A
8449
8450ac_pwd='$ac_pwd'
8451srcdir='$srcdir'
8452INSTALL='$INSTALL'
8453test -n "\$AWK" || AWK=awk
73c04bcf
A
8454_ACEOF
8455
729e4ab9
A
8456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8457# The default lists apply if the user does not specify any file.
73c04bcf
A
8458ac_need_defaults=:
8459while test $# != 0
8460do
8461 case $1 in
729e4ab9
A
8462 --*=?*)
8463 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8464 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
73c04bcf
A
8465 ac_shift=:
8466 ;;
729e4ab9
A
8467 --*=)
8468 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8469 ac_optarg=
8470 ac_shift=:
8471 ;;
8472 *)
73c04bcf
A
8473 ac_option=$1
8474 ac_optarg=$2
8475 ac_shift=shift
8476 ;;
73c04bcf
A
8477 esac
8478
8479 case $ac_option in
8480 # Handling of the options.
73c04bcf
A
8481 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8482 ac_cs_recheck=: ;;
729e4ab9
A
8483 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
8484 $as_echo "$ac_cs_version"; exit ;;
8485 --config | --confi | --conf | --con | --co | --c )
8486 $as_echo "$ac_cs_config"; exit ;;
8487 --debug | --debu | --deb | --de | --d | -d )
73c04bcf
A
8488 debug=: ;;
8489 --file | --fil | --fi | --f )
8490 $ac_shift
729e4ab9
A
8491 case $ac_optarg in
8492 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8493 '') as_fn_error $? "missing file argument" ;;
8494 esac
8495 as_fn_append CONFIG_FILES " '$ac_optarg'"
73c04bcf 8496 ac_need_defaults=false;;
4388f060 8497 --he | --h | --help | --hel | -h )
729e4ab9 8498 $as_echo "$ac_cs_usage"; exit ;;
73c04bcf
A
8499 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8500 | -silent | --silent | --silen | --sile | --sil | --si | --s)
8501 ac_cs_silent=: ;;
8502
8503 # This is an error.
729e4ab9
A
8504 -*) as_fn_error $? "unrecognized option: \`$1'
8505Try \`$0 --help' for more information." ;;
73c04bcf 8506
729e4ab9
A
8507 *) as_fn_append ac_config_targets " $1"
8508 ac_need_defaults=false ;;
73c04bcf
A
8509
8510 esac
8511 shift
8512done
8513
8514ac_configure_extra_args=
8515
8516if $ac_cs_silent; then
8517 exec 6>/dev/null
8518 ac_configure_extra_args="$ac_configure_extra_args --silent"
8519fi
8520
8521_ACEOF
729e4ab9 8522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
73c04bcf 8523if \$ac_cs_recheck; then
b331163b 8524 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
729e4ab9
A
8525 shift
8526 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
8527 CONFIG_SHELL='$SHELL'
8528 export CONFIG_SHELL
8529 exec "\$@"
73c04bcf
A
8530fi
8531
8532_ACEOF
729e4ab9
A
8533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8534exec 5>>config.log
8535{
8536 echo
8537 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8538## Running $as_me. ##
8539_ASBOX
8540 $as_echo "$ac_log"
8541} >&5
73c04bcf 8542
729e4ab9
A
8543_ACEOF
8544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8545_ACEOF
73c04bcf 8546
729e4ab9 8547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
73c04bcf 8548
729e4ab9 8549# Handling of arguments.
73c04bcf
A
8550for ac_config_target in $ac_config_targets
8551do
729e4ab9 8552 case $ac_config_target in
729e4ab9
A
8553 "icudefs.mk") CONFIG_FILES="$CONFIG_FILES icudefs.mk" ;;
8554 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8555 "data/pkgdataMakefile") CONFIG_FILES="$CONFIG_FILES data/pkgdataMakefile" ;;
8556 "config/Makefile.inc") CONFIG_FILES="$CONFIG_FILES config/Makefile.inc" ;;
8557 "config/icu.pc") CONFIG_FILES="$CONFIG_FILES config/icu.pc" ;;
8558 "config/pkgdataMakefile") CONFIG_FILES="$CONFIG_FILES config/pkgdataMakefile" ;;
8559 "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
8560 "stubdata/Makefile") CONFIG_FILES="$CONFIG_FILES stubdata/Makefile" ;;
8561 "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
8562 "i18n/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/Makefile" ;;
729e4ab9
A
8563 "layoutex/Makefile") CONFIG_FILES="$CONFIG_FILES layoutex/Makefile" ;;
8564 "io/Makefile") CONFIG_FILES="$CONFIG_FILES io/Makefile" ;;
8565 "extra/Makefile") CONFIG_FILES="$CONFIG_FILES extra/Makefile" ;;
8566 "extra/uconv/Makefile") CONFIG_FILES="$CONFIG_FILES extra/uconv/Makefile" ;;
8567 "extra/uconv/pkgdataMakefile") CONFIG_FILES="$CONFIG_FILES extra/uconv/pkgdataMakefile" ;;
8568 "extra/scrptrun/Makefile") CONFIG_FILES="$CONFIG_FILES extra/scrptrun/Makefile" ;;
8569 "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
8570 "tools/ctestfw/Makefile") CONFIG_FILES="$CONFIG_FILES tools/ctestfw/Makefile" ;;
8571 "tools/toolutil/Makefile") CONFIG_FILES="$CONFIG_FILES tools/toolutil/Makefile" ;;
8572 "tools/makeconv/Makefile") CONFIG_FILES="$CONFIG_FILES tools/makeconv/Makefile" ;;
8573 "tools/genrb/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genrb/Makefile" ;;
8574 "tools/genccode/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genccode/Makefile" ;;
8575 "tools/gencmn/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gencmn/Makefile" ;;
8576 "tools/gencnval/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gencnval/Makefile" ;;
51004dcb 8577 "tools/gendict/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gendict/Makefile" ;;
729e4ab9
A
8578 "tools/gentest/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gentest/Makefile" ;;
8579 "tools/gennorm2/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gennorm2/Makefile" ;;
8580 "tools/genbrk/Makefile") CONFIG_FILES="$CONFIG_FILES tools/genbrk/Makefile" ;;
8581 "tools/gensprep/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gensprep/Makefile" ;;
8582 "tools/icuinfo/Makefile") CONFIG_FILES="$CONFIG_FILES tools/icuinfo/Makefile" ;;
8583 "tools/icupkg/Makefile") CONFIG_FILES="$CONFIG_FILES tools/icupkg/Makefile" ;;
8584 "tools/icuswap/Makefile") CONFIG_FILES="$CONFIG_FILES tools/icuswap/Makefile" ;;
8585 "tools/pkgdata/Makefile") CONFIG_FILES="$CONFIG_FILES tools/pkgdata/Makefile" ;;
8586 "tools/tzcode/Makefile") CONFIG_FILES="$CONFIG_FILES tools/tzcode/Makefile" ;;
8587 "tools/gencfu/Makefile") CONFIG_FILES="$CONFIG_FILES tools/gencfu/Makefile" ;;
f3c0d7a5 8588 "tools/escapesrc/Makefile") CONFIG_FILES="$CONFIG_FILES tools/escapesrc/Makefile" ;;
729e4ab9
A
8589 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
8590 "test/compat/Makefile") CONFIG_FILES="$CONFIG_FILES test/compat/Makefile" ;;
8591 "test/testdata/Makefile") CONFIG_FILES="$CONFIG_FILES test/testdata/Makefile" ;;
8592 "test/testdata/pkgdataMakefile") CONFIG_FILES="$CONFIG_FILES test/testdata/pkgdataMakefile" ;;
8593 "test/hdrtst/Makefile") CONFIG_FILES="$CONFIG_FILES test/hdrtst/Makefile" ;;
8594 "test/intltest/Makefile") CONFIG_FILES="$CONFIG_FILES test/intltest/Makefile" ;;
8595 "test/cintltst/Makefile") CONFIG_FILES="$CONFIG_FILES test/cintltst/Makefile" ;;
8596 "test/iotest/Makefile") CONFIG_FILES="$CONFIG_FILES test/iotest/Makefile" ;;
8597 "test/letest/Makefile") CONFIG_FILES="$CONFIG_FILES test/letest/Makefile" ;;
8598 "test/perf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/Makefile" ;;
8599 "test/perf/collationperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collationperf/Makefile" ;;
51004dcb 8600 "test/perf/collperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collperf/Makefile" ;;
57a6839d 8601 "test/perf/collperf2/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/collperf2/Makefile" ;;
4388f060 8602 "test/perf/dicttrieperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/dicttrieperf/Makefile" ;;
729e4ab9
A
8603 "test/perf/ubrkperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/ubrkperf/Makefile" ;;
8604 "test/perf/charperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/charperf/Makefile" ;;
8605 "test/perf/convperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/convperf/Makefile" ;;
8606 "test/perf/normperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/normperf/Makefile" ;;
8607 "test/perf/DateFmtPerf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/DateFmtPerf/Makefile" ;;
4388f060 8608 "test/perf/howExpensiveIs/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/howExpensiveIs/Makefile" ;;
729e4ab9
A
8609 "test/perf/strsrchperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/strsrchperf/Makefile" ;;
8610 "test/perf/unisetperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/unisetperf/Makefile" ;;
8611 "test/perf/usetperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/usetperf/Makefile" ;;
8612 "test/perf/ustrperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/ustrperf/Makefile" ;;
8613 "test/perf/utfperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utfperf/Makefile" ;;
8614 "test/perf/utrie2perf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utrie2perf/Makefile" ;;
57a6839d 8615 "test/perf/leperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/leperf/Makefile" ;;
729e4ab9
A
8616 "samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
8617 "samples/date/Makefile") CONFIG_FILES="$CONFIG_FILES samples/date/Makefile" ;;
8618 "samples/cal/Makefile") CONFIG_FILES="$CONFIG_FILES samples/cal/Makefile" ;;
8619 "samples/layout/Makefile") CONFIG_FILES="$CONFIG_FILES samples/layout/Makefile" ;;
729e4ab9
A
8620
8621 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
b75a7d8f 8622 esac
73c04bcf
A
8623done
8624
729e4ab9 8625
73c04bcf
A
8626# If the user did not use the arguments to specify the items to instantiate,
8627# then the envvar interface is used. Set only those that are not.
8628# We use the long form for the default assignment because of an extremely
8629# bizarre bug on SunOS 4.1.3.
8630if $ac_need_defaults; then
8631 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
73c04bcf
A
8632fi
8633
8634# Have a temporary directory for convenience. Make it in the build tree
729e4ab9 8635# simply because there is no reason against having it here, and in addition,
73c04bcf 8636# creating and moving files from /tmp can sometimes cause problems.
729e4ab9
A
8637# Hook for its removal unless debugging.
8638# Note that there is a small window in which the directory will not be cleaned:
8639# after its creation but before its name has been assigned to `$tmp'.
73c04bcf
A
8640$debug ||
8641{
4388f060 8642 tmp= ac_tmp=
729e4ab9 8643 trap 'exit_status=$?
4388f060
A
8644 : "${ac_tmp:=$tmp}"
8645 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
729e4ab9
A
8646' 0
8647 trap 'as_fn_exit 1' 1 2 13 15
73c04bcf 8648}
73c04bcf
A
8649# Create a (secure) tmp directory for tmp files.
8650
8651{
729e4ab9 8652 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
4388f060 8653 test -d "$tmp"
73c04bcf
A
8654} ||
8655{
729e4ab9
A
8656 tmp=./conf$$-$RANDOM
8657 (umask 077 && mkdir "$tmp")
8658} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
4388f060 8659ac_tmp=$tmp
729e4ab9
A
8660
8661# Set up the scripts for CONFIG_FILES section.
8662# No need to generate them if there are no CONFIG_FILES.
8663# This happens for instance with `./config.status config.h'.
8664if test -n "$CONFIG_FILES"; then
8665
8666
8667ac_cr=`echo X | tr X '\015'`
8668# On cygwin, bash can eat \r inside `` if the user requested igncr.
8669# But we know of no other shell where ac_cr would be empty at this
8670# point, so we can use a bashism as a fallback.
8671if test "x$ac_cr" = x; then
8672 eval ac_cr=\$\'\\r\'
8673fi
8674ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
8675if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8676 ac_cs_awk_cr='\\r'
8677else
8678 ac_cs_awk_cr=$ac_cr
8679fi
8680
4388f060 8681echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
729e4ab9
A
8682_ACEOF
8683
8684
8685{
8686 echo "cat >conf$$subs.awk <<_ACEOF" &&
8687 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
8688 echo "_ACEOF"
8689} >conf$$subs.sh ||
8690 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8691ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
8692ac_delim='%!_!# '
8693for ac_last_try in false false false false false :; do
8694 . ./conf$$subs.sh ||
8695 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8696
8697 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
8698 if test $ac_delim_n = $ac_delim_num; then
8699 break
8700 elif $ac_last_try; then
8701 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8702 else
8703 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8704 fi
8705done
8706rm -f conf$$subs.sh
8707
8708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
4388f060 8709cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
729e4ab9
A
8710_ACEOF
8711sed -n '
8712h
8713s/^/S["/; s/!.*/"]=/
8714p
8715g
8716s/^[^!]*!//
8717:repl
8718t repl
8719s/'"$ac_delim"'$//
8720t delim
8721:nl
8722h
8723s/\(.\{148\}\)..*/\1/
8724t more1
8725s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
8726p
8727n
8728b repl
8729:more1
8730s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8731p
8732g
8733s/.\{148\}//
8734t nl
8735:delim
8736h
8737s/\(.\{148\}\)..*/\1/
8738t more2
8739s/["\\]/\\&/g; s/^/"/; s/$/"/
8740p
8741b
8742:more2
8743s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8744p
8745g
8746s/.\{148\}//
8747t delim
8748' <conf$$subs.awk | sed '
8749/^[^""]/{
8750 N
8751 s/\n//
8752}
8753' >>$CONFIG_STATUS || ac_write_fail=1
8754rm -f conf$$subs.awk
8755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8756_ACAWK
4388f060 8757cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
729e4ab9
A
8758 for (key in S) S_is_set[key] = 1
8759 FS = "\a"
8760
8761}
73c04bcf 8762{
729e4ab9
A
8763 line = $ 0
8764 nfields = split(line, field, "@")
8765 substed = 0
8766 len = length(field[1])
8767 for (i = 2; i < nfields; i++) {
8768 key = field[i]
8769 keylen = length(key)
8770 if (S_is_set[key]) {
8771 value = S[key]
8772 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
8773 len += length(value) + length(field[++i])
8774 substed = 1
8775 } else
8776 len += 1 + keylen
8777 }
8778
8779 print line
73c04bcf
A
8780}
8781
729e4ab9
A
8782_ACAWK
8783_ACEOF
8784cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8785if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
8786 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
8787else
8788 cat
4388f060 8789fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
729e4ab9 8790 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
73c04bcf
A
8791_ACEOF
8792
729e4ab9
A
8793# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
8794# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
8795# trailing colons and then remove the whole line if VPATH becomes empty
8796# (actually we leave an empty line to preserve line numbers).
8797if test "x$srcdir" = x.; then
8798 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
8799h
8800s///
8801s/^/:/
8802s/[ ]*$/:/
8803s/:\$(srcdir):/:/g
8804s/:\${srcdir}:/:/g
8805s/:@srcdir@:/:/g
8806s/^:*//
8807s/:*$//
8808x
8809s/\(=[ ]*\).*/\1/
8810G
8811s/\n//
8812s/^[^=]*=[ ]*$//
8813}'
8814fi
b75a7d8f 8815
729e4ab9
A
8816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8817fi # test -n "$CONFIG_FILES"
73c04bcf 8818
729e4ab9 8819
4388f060 8820eval set X " :F $CONFIG_FILES "
729e4ab9
A
8821shift
8822for ac_tag
8823do
8824 case $ac_tag in
8825 :[FHLC]) ac_mode=$ac_tag; continue;;
8826 esac
8827 case $ac_mode$ac_tag in
8828 :[FHL]*:*);;
8829 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
8830 :[FH]-) ac_tag=-:-;;
8831 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
8832 esac
8833 ac_save_IFS=$IFS
8834 IFS=:
8835 set x $ac_tag
8836 IFS=$ac_save_IFS
8837 shift
8838 ac_file=$1
8839 shift
8840
8841 case $ac_mode in
8842 :L) ac_source=$1;;
8843 :[FH])
8844 ac_file_inputs=
8845 for ac_f
8846 do
8847 case $ac_f in
4388f060 8848 -) ac_f="$ac_tmp/stdin";;
729e4ab9
A
8849 *) # Look for the file first in the build tree, then in the source tree
8850 # (if the path is not absolute). The absolute path cannot be DOS-style,
8851 # because $ac_f cannot contain `:'.
8852 test -f "$ac_f" ||
8853 case $ac_f in
8854 [\\/$]*) false;;
8855 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
8856 esac ||
8857 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
8858 esac
8859 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
8860 as_fn_append ac_file_inputs " '$ac_f'"
8861 done
8862
8863 # Let's still pretend it is `configure' which instantiates (i.e., don't
8864 # use $as_me), people would be surprised to read:
8865 # /* config.h. Generated by config.status. */
8866 configure_input='Generated from '`
8867 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
8868 `' by configure.'
8869 if test x"$ac_file" != x-; then
8870 configure_input="$ac_file. $configure_input"
8871 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
8872$as_echo "$as_me: creating $ac_file" >&6;}
8873 fi
8874 # Neutralize special characters interpreted by sed in replacement strings.
8875 case $configure_input in #(
8876 *\&* | *\|* | *\\* )
8877 ac_sed_conf_input=`$as_echo "$configure_input" |
8878 sed 's/[\\\\&|]/\\\\&/g'`;; #(
8879 *) ac_sed_conf_input=$configure_input;;
8880 esac
8881
8882 case $ac_tag in
4388f060 8883 *:-:* | *:-) cat >"$ac_tmp/stdin" \
729e4ab9
A
8884 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
8885 esac
8886 ;;
b75a7d8f
A
8887 esac
8888
729e4ab9 8889 ac_dir=`$as_dirname -- "$ac_file" ||
73c04bcf
A
8890$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8891 X"$ac_file" : 'X\(//\)[^/]' \| \
8892 X"$ac_file" : 'X\(//\)$' \| \
729e4ab9
A
8893 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
8894$as_echo X"$ac_file" |
8895 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8896 s//\1/
8897 q
8898 }
8899 /^X\(\/\/\)[^/].*/{
8900 s//\1/
8901 q
8902 }
8903 /^X\(\/\/\)$/{
8904 s//\1/
8905 q
8906 }
8907 /^X\(\/\).*/{
8908 s//\1/
8909 q
8910 }
8911 s/.*/./; q'`
8912 as_dir="$ac_dir"; as_fn_mkdir_p
73c04bcf
A
8913 ac_builddir=.
8914
729e4ab9
A
8915case "$ac_dir" in
8916.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
8917*)
8918 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
8919 # A ".." for each directory in $ac_dir_suffix.
8920 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
8921 case $ac_top_builddir_sub in
8922 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
8923 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
8924 esac ;;
8925esac
8926ac_abs_top_builddir=$ac_pwd
8927ac_abs_builddir=$ac_pwd$ac_dir_suffix
8928# for backward compatibility:
8929ac_top_builddir=$ac_top_build_prefix
73c04bcf
A
8930
8931case $srcdir in
729e4ab9 8932 .) # We are building in place.
73c04bcf 8933 ac_srcdir=.
729e4ab9
A
8934 ac_top_srcdir=$ac_top_builddir_sub
8935 ac_abs_top_srcdir=$ac_pwd ;;
8936 [\\/]* | ?:[\\/]* ) # Absolute name.
73c04bcf 8937 ac_srcdir=$srcdir$ac_dir_suffix;
729e4ab9
A
8938 ac_top_srcdir=$srcdir
8939 ac_abs_top_srcdir=$srcdir ;;
8940 *) # Relative name.
8941 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
8942 ac_top_srcdir=$ac_top_build_prefix$srcdir
8943 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
73c04bcf 8944esac
729e4ab9 8945ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
73c04bcf 8946
73c04bcf 8947
729e4ab9
A
8948 case $ac_mode in
8949 :F)
8950 #
8951 # CONFIG_FILE
8952 #
73c04bcf
A
8953
8954 case $INSTALL in
8955 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
729e4ab9 8956 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
b75a7d8f 8957 esac
729e4ab9 8958_ACEOF
b75a7d8f 8959
729e4ab9
A
8960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8961# If the template does not know about datarootdir, expand it.
8962# FIXME: This hack should be removed a few years after 2.60.
8963ac_datarootdir_hack=; ac_datarootdir_seen=
8964ac_sed_dataroot='
8965/datarootdir/ {
8966 p
8967 q
8968}
8969/@datadir@/p
8970/@docdir@/p
8971/@infodir@/p
8972/@localedir@/p
8973/@mandir@/p'
8974case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
8975*datarootdir*) ac_datarootdir_seen=yes;;
8976*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
8977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
8978$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8979_ACEOF
8980cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8981 ac_datarootdir_hack='
8982 s&@datadir@&$datadir&g
8983 s&@docdir@&$docdir&g
8984 s&@infodir@&$infodir&g
8985 s&@localedir@&$localedir&g
8986 s&@mandir@&$mandir&g
8987 s&\\\${datarootdir}&$datarootdir&g' ;;
8988esac
73c04bcf 8989_ACEOF
729e4ab9
A
8990
8991# Neutralize VPATH when `$srcdir' = `.'.
8992# Shell code in configure.ac might set extrasub.
8993# FIXME: do we really want to maintain this feature?
8994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8995ac_sed_extra="$ac_vpsub
73c04bcf
A
8996$extrasub
8997_ACEOF
729e4ab9 8998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
73c04bcf
A
8999:t
9000/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
729e4ab9
A
9001s|@configure_input@|$ac_sed_conf_input|;t t
9002s&@top_builddir@&$ac_top_builddir_sub&;t t
9003s&@top_build_prefix@&$ac_top_build_prefix&;t t
9004s&@srcdir@&$ac_srcdir&;t t
9005s&@abs_srcdir@&$ac_abs_srcdir&;t t
9006s&@top_srcdir@&$ac_top_srcdir&;t t
9007s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9008s&@builddir@&$ac_builddir&;t t
9009s&@abs_builddir@&$ac_abs_builddir&;t t
9010s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9011s&@INSTALL@&$ac_INSTALL&;t t
9012$ac_datarootdir_hack
9013"
4388f060
A
9014eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9015 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
729e4ab9
A
9016
9017test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
4388f060
A
9018 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9019 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
9020 "$ac_tmp/out"`; test -z "$ac_out"; } &&
729e4ab9
A
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9022which seems to be undefined. Please make sure it is defined" >&5
9023$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9024which seems to be undefined. Please make sure it is defined" >&2;}
9025
4388f060 9026 rm -f "$ac_tmp/stdin"
729e4ab9 9027 case $ac_file in
4388f060
A
9028 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9029 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
729e4ab9
A
9030 esac \
9031 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9032 ;;
4388f060 9033
73c04bcf 9034
b75a7d8f 9035
b75a7d8f
A
9036 esac
9037
729e4ab9 9038done # for ac_tag
b75a7d8f 9039
b75a7d8f 9040
729e4ab9 9041as_fn_exit 0
73c04bcf 9042_ACEOF
73c04bcf
A
9043ac_clean_files=$ac_clean_files_save
9044
729e4ab9
A
9045test $ac_write_fail = 0 ||
9046 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9047
73c04bcf
A
9048
9049# configure is writing to config.log, and then calls config.status.
9050# config.status does its own redirection, appending to config.log.
9051# Unfortunately, on DOS this fails, as config.log is still kept open
9052# by configure, so config.status won't be able to write to it; its
9053# output is simply discarded. So we exec the FD to /dev/null,
9054# effectively closing config.log, so it can be properly (re)opened and
9055# appended to by config.status. When coming back to configure, we
9056# need to make the FD available again.
9057if test "$no_create" != yes; then
9058 ac_cs_success=:
9059 ac_config_status_args=
9060 test "$silent" = yes &&
9061 ac_config_status_args="$ac_config_status_args --quiet"
9062 exec 5>/dev/null
9063 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9064 exec 5>>config.log
9065 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9066 # would make configure fail if this is the last instruction.
729e4ab9 9067 $ac_cs_success || as_fn_exit 1
73c04bcf 9068fi
729e4ab9
A
9069if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9071$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9072fi
9073
b75a7d8f 9074
729e4ab9
A
9075echo
9076echo "ICU for C/C++ $VERSION is ready to be built."
9077echo "=== Important Notes: ==="
b75a7d8f 9078
729e4ab9
A
9079echo "Data Packaging: $datapackaging"
9080echo " This means: $datapackaging_msg"
9081echo " To locate data: $datapackaging_howfound"
9082
73c04bcf 9083if test -n "`$U_MAKE -v 2>&1 | grep '^GNU Make'`"; then
729e4ab9 9084echo "Building ICU: Use a GNU make such as $U_MAKE to build ICU."
73c04bcf 9085else
729e4ab9 9086echo "** WARNING: $U_MAKE may not be GNU make."
73c04bcf 9087echo "This may cause ICU to fail to build. Please make sure that GNU make"
729e4ab9
A
9088echo "is in your PATH so that the configure script can detect its location."
9089fi
4388f060
A
9090if test "x$AR" = "xfalse"; then
9091 echo "*** WARNING: Archiver ar not found. Set AR= or fix PATH. Some builds (such as static) may fail."
9092fi
729e4ab9
A
9093
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the version of \"$U_MAKE\"" >&5
9095$as_echo_n "checking the version of \"$U_MAKE\"... " >&6; }
9096if "$U_MAKE" -f "$srcdir/config/gmakever.mk" PLATFORM="$platform"; then
9097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9098$as_echo "ok" >&6; }
9099else
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: too old or test failed - try upgrading GNU Make" >&5
9101$as_echo "too old or test failed - try upgrading GNU Make" >&6; }
73c04bcf
A
9102fi
9103
57a6839d 9104
4388f060
A
9105if test -n "$UCONFIG_CPPFLAGS"; then
9106 HDRFILE="uconfig.h.prepend"
9107 echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:"
9108 echo
9109 echo " ${UCONFIG_CPPFLAGS}"
9110 echo
9111 echo 'The recommended way to do this is to prepend the following lines to source/common/unicode/uconfig.h or #include them near the top of that file.'
9112 echo "Creating the file ${HDRFILE}"
9113 echo
9114 echo '--------------- ' "${HDRFILE}"
9115 echo > "${HDRFILE}"
9116 echo '/* ICU customizations: put these lines at the top of uconfig.h */' >> "${HDRFILE}"
9117 echo >> "${HDRFILE}"
9118 for flag in ${UCONFIG_CPPFLAGS};
9119 do
9120 echo " /* $flag */" >> "${HDRFILE}"
9121 case "${flag}" in
9122 -D*=*)
9123 \echo "${flag}" | sed -n 's%-D\([^=]*\)=%#define \1 %p' >> "${HDRFILE}"
9124 \echo >> "${HDRFILE}"
9125 ;;
9126 -D*)
9127 \echo "${flag}" | sed -n 's%-D\([^=]*\)%#define \1 %p' >> "${HDRFILE}"
9128 \echo >> "${HDRFILE}"
9129 ;;
9130 *)
9131 \echo "/* Not sure how to handle this argument: ${flag} */" >> "${HDRFILE}"
9132 \echo >> "${HDRFILE}"
9133 ;;
9134 esac
9135 done
9136 cat "${HDRFILE}"
9137 \echo "/* End of ${HDRFILE} ------------ */" >> "${HDRFILE}"
9138 echo >> "${HDRFILE}"
9139 echo '--------------- end ' "${HDRFILE}"
9140fi
9141
57a6839d
A
9142
9143if test -n "$UCONFIG_CFLAGS"; then
9144 echo "C apps may want to build with CFLAGS = ${UCONFIG_CFLAGS}"
9145fi
9146
9147if test -n "$UCONFIG_CXXFLAGS"; then
9148 echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}"
9149fi
9150
9151if test "$tools" = false;
9152then
9153 echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests."
9154 echo "## Expect build failures in the 'data', 'test', and other directories."
9155fi
9156
73c04bcf 9157$as_unset _CXX_CXXSUFFIX