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