# -*-autoconf-*-
-AC_COPYRIGHT([ Copyright (c) 1999-2015, International Business Machines Corporation and others. All Rights Reserved. ])
+AC_COPYRIGHT([ Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html ])
+# AC_COPYRIGHT([ Copyright (c) 1999-2015, International Business Machines Corporation and others. All Rights Reserved. ])
# configure.in for ICU
# Stephen F. Booth, heavily modified by Yves and others
AC_PROG_RANLIB
+# need sed
+AC_PROG_SED
+
# look for 'ar' the proper way
AC_CHECK_TOOL(AR, ar, false)
fi
if [[ "$GXX" = yes ]]; then
- # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
+ # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++11,
# and check that the compiler still works.
if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
OLD_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="$CXXFLAGS --std=c++0x"
+ CXXFLAGS="$CXXFLAGS -std=c++11"
AC_MSG_CHECKING([[if we have a C++11 compiler]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
AC_MSG_RESULT($cxx11_okay)
if [[ $cxx11_okay = yes ]]; then
- AC_MSG_NOTICE([Adding CXXFLAGS option --std=c++0x])
- UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x"
+ AC_MSG_NOTICE([Adding CXXFLAGS option -std=c++11])
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11"
else
CXXFLAGS="$OLD_CXXFLAGS"
fi
+ case "${host}" in
+ *-*-solaris*)
+ CXXFLAGS="$OLD_CXXFLAGS"
+ ;;
+ esac
fi
fi
-AC_MSG_CHECKING([[if #include <string> works]])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
-AC_MSG_RESULT($ac_cv_header_stdstring)
-if test $ac_cv_header_stdstring = yes
-then
- U_HAVE_STD_STRING=1
-else
- U_HAVE_STD_STRING=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
-fi
-AC_SUBST(U_HAVE_STD_STRING)
-
-
AC_MSG_CHECKING([[if #include <atomic> works]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <atomic>]], [[]])], [ac_cv_header_atomic=yes], [ac_cv_header_atomic=no])
AC_MSG_RESULT($ac_cv_header_atomic)
U_HAVE_TZNAME=0
AC_CACHE_CHECK(for tzname,ac_cv_var_tzname,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef __USE_POSIX
-#define __USE_POSIX
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE
#endif
#include <stdlib.h>
#include <time.h>
AC_SUBST(U_TZNAME)
AC_CACHE_CHECK(for timezone,ac_cv_var_timezone,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifndef __USE_POSIX
-#define __USE_POSIX
-#endif
-#ifndef __USE_XOPEN
-#define __USE_XOPEN
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE
#endif
#include <time.h>
], [[timezone = 1;]])],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no])])
AC_SUBST(U_HAVE_TIMEZONE)
AC_SUBST(U_TIMEZONE)
+AC_CHECK_FUNC(strtod_l)
+if test x$ac_cv_func_strtod_l = xyes
+then
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1"
+ U_HAVE_STRTOD_L=1
+else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
+ U_HAVE_STRTOD_L=0
+fi
+AC_SUBST(U_HAVE_STRTOD_L)
+
# Checks for typedefs
AC_CHECK_TYPE(int8_t,signed char)
AC_CHECK_TYPE(uint8_t,unsigned char)
icuio=true)
ICU_CONDITIONAL(ICUIO, test "$icuio" = true)
-# Enable/disable layout
-AC_ARG_ENABLE(layout,
- [ --enable-layout build ICU's DEPRECATED layout library [default=yes]],
- [case "${enableval}" in
- yes) layout=true ;;
- no) layout=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;;
- esac],
- layout=true)
-ICU_CONDITIONAL(LAYOUT, test "$layout" = true)
-
# Enable/disable layoutex
AC_ARG_ENABLE(layoutex,
- [ --enable-layoutex build ICU's Paragraph Layout library [default=same-as-layout].
- If not building with the ICU Layout library, then icu-le-hb must be installed via pkg-config.
- See http://harfbuzz.org],
+ [ --enable-layoutex build ICU's Paragraph Layout library [default=yes].
+ icu-le-hb must be installed via pkg-config. See http://harfbuzz.org],
[case "${enableval}" in
- yes) layoutex=true ;;
+ yes) layoutex=$have_icu_le_hb ;;
no) layoutex=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-layoutex) ;;
esac],
- layoutex=$layout)
+ layoutex=$have_icu_le_hb)
ICU_CONDITIONAL(LAYOUTEX, test "$layoutex" = true)
+# Enable/disable layout
+AC_ARG_ENABLE(layout,
+ [],
+ [case "${enableval}" in
+ yes) AC_MSG_ERROR(The ICU Layout Engine has been removed.) ;;
+ no) ;;
+ *) ;;
+ esac],
+ )
+
# Enable/disable tools
AC_ARG_ENABLE(tools,
[ --enable-tools build ICU's tools [default=yes]],
stubdata/Makefile \
common/Makefile \
i18n/Makefile \
- layout/Makefile \
layoutex/Makefile \
io/Makefile \
extra/Makefile \
tools/pkgdata/Makefile \
tools/tzcode/Makefile \
tools/gencfu/Makefile \
+ tools/escapesrc/Makefile \
test/Makefile \
test/compat/Makefile \
test/testdata/Makefile \