mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-21107 Update configure files from configure.ac using autoreconf.
This commit is contained in:
parent
45d351ca4e
commit
ef78f2a863
1 changed files with 35 additions and 12 deletions
47
icu4c/source/configure
vendored
47
icu4c/source/configure
vendored
|
@ -3987,6 +3987,41 @@ if test "$GCC" = yes; then
|
|||
CXXFLAGS="$CXXFLAGS -O2"
|
||||
fi
|
||||
fi
|
||||
# if CFLAGS does not have a "-std=" setting, set it now to -std=c11,
|
||||
# and check that the compiler still works.
|
||||
if ! echo "$CFLAGS" | grep '\-std=' >/dev/null 2>&1; then
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="$CFLAGS -std=c11"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C11 compiler" >&5
|
||||
$as_echo_n "checking if we have a C11 compiler... " >&6; }
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
c11_okay=yes
|
||||
else
|
||||
c11_okay=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $c11_okay" >&5
|
||||
$as_echo "$c11_okay" >&6; }
|
||||
if [ $c11_okay = yes ]; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Adding CFLAGS option -std=c11" >&5
|
||||
$as_echo "$as_me: Adding CFLAGS option -std=c11" >&6;}
|
||||
UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=c11"
|
||||
else
|
||||
CFLAGS="$OLD_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
|
@ -4479,17 +4514,6 @@ $as_echo "$ac_use_strict_options" >&6; }
|
|||
then
|
||||
if test "$GCC" = yes
|
||||
then
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
# Don't use -std=c11 on Solaris because of timezone check fails
|
||||
;;
|
||||
*)
|
||||
# Do not use -ansi. It limits us to C90, and it breaks some platforms.
|
||||
# We use -std=c11 to disable the gnu99 defaults and its associated warnings
|
||||
CFLAGS="$CFLAGS -std=c11"
|
||||
;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
|
||||
else
|
||||
case "${host}" in
|
||||
|
@ -4521,7 +4545,6 @@ $as_echo "$ac_use_strict_options" >&6; }
|
|||
|
||||
# Check if we can build and use 64-bit libraries
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
|
||||
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
|
||||
if ${ac_cv_path_GREP+:} false; then :
|
||||
|
|
Loading…
Add table
Reference in a new issue