2 AC_COPYRIGHT([ Copyright (c) 1999-2013, International Business Machines Corporation and others. All Rights Reserved. ])
4 # Stephen F. Booth, heavily modified by Yves and others
6 # Check for autoconf version
9 # Process this file with autoconf to produce a configure script
14 # m4_esyscmd_s([sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"),
15 # [http://icu-project.org/bugs],
16 # [International Components for Unicode],
17 # [http://icu-project.org])
19 AC_CONFIG_SRCDIR([common/unicode/utypes.h])
24 # Use custom echo test for newline option
25 # Current autoconf (2.65) gives incorrect echo newline option
27 # This may be removed later - mow (June 17, 2010)
28 ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T=
29 case `/bin/sh -c "echo -n x"` in
31 case `/bin/sh -c "echo 'x\c'"` in
32 *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character.
42 AC_MSG_CHECKING(for ICU version numbers)
44 # Get the ICU version from uversion.h or other headers
46 [sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
49 [sed -n 's/^[ ]*#[ ]*define[ ]*U_UNICODE_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
51 VERSION=`geticuversion $srcdir/common/unicode/uvernum.h`
52 if test x"$VERSION" = x; then
53 as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5
57 #if test "$VERSION" != "$PACKAGE_VERSION"; then
58 # AC_MSG_ERROR([configure was generated for $PACKAGE_VERSION but uvernum.h has $VERSION - please rerun autoconf])
61 UNICODE_VERSION=`getuversion $srcdir/common/unicode/uchar.h`
62 if test x"$UNICODE_VERSION" = x; then
63 AC_MSG_ERROR([Cannot determine Unicode version number from uchar.h header file])
65 # Compute a reasonable library version from the release version. This is
66 # very bad, but that's wanted... We want to make sure that the LIB_VERSION
67 # has at least a dot in it, so we'll add a .0 if needed.
68 #[LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'`]
70 LIB_VERSION_MAJOR=`echo $LIB_VERSION | sed 's/\..*//'`
73 AC_SUBST(LIB_VERSION_MAJOR)
74 AC_MSG_RESULT([release $VERSION, library $LIB_VERSION, unicode version $UNICODE_VERSION])
76 AC_SUBST(UNICODE_VERSION)
78 # Determine the host system
83 # This variable is needed on z/OS because the C++ compiler only recognizes .C
89 # CONFIG_CPPFLAGS: These are defines that are set for ICU Build time only.
90 # They are only needed for building ICU itself. Example: platform stuff
92 # UCONFIG_CPPFLAGS: These are defines which are set for ICU build time,
93 # and also a notice is output that they need to be set
94 # for end-users of ICU also. uconfig.h.prepend is generated
95 # with, for example, "#define U_DISABLE_RENAMING 1"
96 # Example: ICU configuration stuff
98 # UCONFIG_CFLAGS: contains a copy of anything that needs to be set by end users
102 # Check whether to build debug libraries
103 AC_MSG_CHECKING([whether to build debug libraries])
107 [ --enable-debug build debug libraries and enable the U_DEBUG define [default=no]],
108 [ case "${enableval}" in
109 yes|"") enabled=yes; ENABLE_DEBUG=1; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEBUG=1" ;;
113 AC_MSG_RESULT($enabled)
114 AC_SUBST(ENABLE_DEBUG)
116 # Check whether to build release libraries
117 AC_MSG_CHECKING([whether to build release libraries])
120 AC_ARG_ENABLE(release,
121 [ --enable-release build release libraries [default=yes]],
122 [ case "${enableval}" in
123 no) enabled=no; ENABLE_RELEASE=0 ;;
127 AC_MSG_RESULT($enabled)
128 AC_SUBST(ENABLE_RELEASE)
130 # Don't use the default C/CXXFLags
134 # Checks for compilers
135 AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc])
136 # Make sure that we try clang++ first, which provides C++11 support.
137 # The g++ compiler is less likely to support C++11.
138 AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
140 # Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
141 # The release mode use is the default one for autoconf
142 if test "$GCC" = yes; then
143 if test "$CFLAGS" = ""; then
144 if test "$ENABLE_DEBUG" = 1; then
147 if test "$ENABLE_RELEASE" = 1; then
151 if test "$CXXFLAGS" = ""; then
152 if test "$ENABLE_DEBUG" = 1; then
155 if test "$ENABLE_RELEASE" = 1; then
156 CXXFLAGS="$CXXFLAGS -O2"
165 AC_SUBST(cross_compiling)
167 dnl use the pld hack to get ac_fn_cxx_try_link defined globally and not local
169 AC_LINK_IFELSE([AC_LANG_PROGRAM()])
172 # make sure install is relative to srcdir - if a script
173 if test "$srcdir" = "."; then
174 # If srcdir isn't just ., then (srcdir) is already prepended.
175 if test "${ac_install_sh}" = "${INSTALL}"; then
176 INSTALL="\\\$(top_srcdir)/${ac_install_sh}"
180 #AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
181 #AC_CHECK_PROG(STRIP, strip, strip, true)
183 # Check for the platform make
184 AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
188 AC_ARG_WITH(cross-build,
189 [ --with-cross-build=dir specify an absolute path to the build directory of an ICU built for the current platform [default=no cross dir]],
190 [cross_buildroot="${withval}"],
191 [cross_buildroot=""])
193 if test "X$cross_buildroot" = "X"; then
194 if test "$cross_compiling" = "yes"; then
195 AC_MSG_ERROR([Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root])
199 if test -f "${cross_buildroot}/config/icucross.mk"; then
200 AC_MSG_RESULT([Using cross buildroot: $cross_buildroot])
202 if test -d "${cross_buildroot}"; then
203 AC_MSG_ERROR([${cross_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_buildroot} first.])
205 AC_MSG_ERROR([No such directory ${cross_buildroot} supplied as the argument to --with-cross-build. Use an absolute path.])
209 AC_SUBST(cross_buildroot)
211 # Check for doxygen to generate documentation
212 AC_PATH_PROG(DOXYGEN,doxygen,,$PATH:/usr/local/bin:/usr/bin)
214 # Check that the linker is usable
217 # Determine the executable suffix
218 # We don't use AC_EXEEXT because some compilers output separate debugging
219 # files, which confuses the AC_EXEEXT macro.
220 AC_MSG_CHECKING(checking for executable suffix)
222 *-*-cygwin*|*-*-mingw*) EXEEXT=.exe ;;
226 AC_MSG_RESULT($EXEEXT)
229 # Determine how strict we want to be when compiling
230 AC_CHECK_STRICT_COMPILE
232 # Check if we can build and use 64-bit libraries
235 AC_SUBST(COMPILE_LINK_ENVVAR)
237 # Determine the Makefile fragment
240 # Checks for libraries and other host specific stuff
241 # On HP/UX, don't link to -lm from a shared lib because it isn't
242 # PIC (at least on 10.2)
244 *-*-hpux*) AC_CHECK_LIB(m, floor, LIB_M="-lm") ;;
246 *) AC_CHECK_LIB(m, floor)
251 # Check whether to build shared libraries
252 AC_MSG_CHECKING([whether to build shared libraries])
254 AC_ARG_ENABLE(shared,
255 [ --enable-shared build shared libraries [default=yes]],
256 [ case "${enableval}" in
257 yes|"") enabled=yes; ENABLE_SHARED=YES ;;
261 [enabled=yes; ENABLE_SHARED=YES]
263 AC_MSG_RESULT($enabled)
264 AC_SUBST(ENABLE_SHARED)
266 # Check whether to build static libraries
267 AC_MSG_CHECKING([whether to build static libraries])
269 AC_ARG_ENABLE(static,
270 [ --enable-static build static libraries [default=no]],
271 [ case "${enableval}" in
272 yes|"") enabled=yes; ENABLE_STATIC=YES ;;
277 AC_MSG_RESULT($enabled)
278 AC_SUBST(ENABLE_STATIC)
280 # When building release static library, there might be some optimization flags we can use
281 if test "$ENABLE_STATIC" = "YES"; then
282 if test "$ENABLE_SHARED" != "YES"; then
283 if test "$ENABLE_RELEASE" = 1; then
284 AC_MSG_CHECKING([whether we can use static library optimization option])
285 CHECK_STATIC_OPT_FLAG=no
287 OLD_CPPFLAGS="${CPPFLAGS}"
288 OLD_LDFLAGS="${LDFLAGS}"
291 *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
292 if test "$GCC" = yes; then
293 CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
294 LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
301 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [CHECK_STATIC_OPT_FLAG=yes], [CHECK_STATIC_OPT_FLAG=no])
302 AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG)
303 if test "$CHECK_STATIC_OPT_FLAG" = no; then
304 CPPFLAGS="${OLD_CPPFLAGS}"
305 LDFLAGS="${OLD_LDFLAGS}"
312 # Check whether to enable auto cleanup of libraries
313 AC_MSG_CHECKING([whether to enable auto cleanup of libraries])
315 UCLN_NO_AUTO_CLEANUP=1
316 AC_ARG_ENABLE(auto-cleanup,
317 [ --enable-auto-cleanup enable auto cleanup of libraries [default=no]],
318 [ case "${enableval}" in
320 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0";
321 UCLN_NO_AUTO_CLEANUP=0
326 AC_MSG_RESULT($enabled)
327 AC_SUBST(UCLN_NO_AUTO_CLEANUP)
329 # MSVC floating-point option
331 if test $enabled = yes
333 if test $icu_cv_host_frag = mh-cygwin-msvc
335 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
336 #if defined _MSC_VER && _MSC_VER >= 1400
338 Microsoft Visual C++ < 2005
340 ]], [[]])],[MSVC_RELEASE_FLAG="/fp:precise"],[MSVC_RELEASE_FLAG="/Op"])
342 CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}"
343 CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}"
347 # Check whether to enabled draft APIs
348 AC_MSG_CHECKING([whether to enable draft APIs])
350 U_DEFAULT_SHOW_DRAFT=1
352 [ --enable-draft enable draft APIs (and internal APIs) [default=yes]],
353 [ case "${enableval}" in
354 no) enabled=no; U_DEFAULT_SHOW_DRAFT=0;
355 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0"
360 AC_MSG_RESULT($enabled)
361 # Make sure that we can use draft API in ICU.
362 if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
363 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
365 AC_SUBST(U_DEFAULT_SHOW_DRAFT)
369 # look for 'ar' the proper way
370 AC_CHECK_TOOL(AR, ar, false)
372 AC_MSG_CHECKING([whether to enable renaming of symbols])
375 AC_ARG_ENABLE(renaming,
376 [ --enable-renaming add a version suffix to symbols [default=yes]],
377 [ case "${enableval}" in
378 yes|"") enabled=yes ;;
379 no) enabled=no; U_DISABLE_RENAMING=1;
380 UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1"
385 AC_MSG_RESULT($enabled)
386 AC_SUBST(U_DISABLE_RENAMING)
388 AC_MSG_CHECKING([whether to enable function and data tracing])
391 AC_ARG_ENABLE(tracing,
392 [ --enable-tracing enable function and data tracing [default=no]],
393 [ case "${enableval}" in
395 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1";
396 U_ENABLE_TRACING=1 ;;
397 no) enabled=no; U_ENABLE_TRACING=0 ;;
401 AC_MSG_RESULT($enabled)
402 AC_SUBST(U_ENABLE_TRACING)
404 # check if elf.h is present.
405 AC_CHECK_HEADERS([elf.h])
406 if test "x$ac_cv_header_elf_h" = "xyes"; then
407 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
412 AC_MSG_CHECKING([whether to enable dynamic loading of plugins])
413 AC_ARG_ENABLE(dyload,
414 [ --disable-dyload disable dynamic loading [default=no]],
415 [ case "${enableval}" in
423 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0";
428 AC_MSG_RESULT($enable)
429 AC_SUBST(U_ENABLE_DYLOAD)
431 if test "$enable" = "yes"; then
432 AC_CHECK_HEADERS([dlfcn.h])
433 #AC_MSG_RESULT($enabled)
434 AC_SEARCH_LIBS([dlopen], [dl])
435 AC_CHECK_FUNCS([dlopen])
437 if test "x$ac_cv_func_dlopen" != xyes; then
438 CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0"
442 # Check for miscellanous functions.
443 # So, use for putil / tools only.
444 # Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
445 AC_CHECK_FUNCS([gettimeofday])
448 # Check whether to use the evil rpath or not
450 [ --enable-rpath use rpath when linking [default is only if necessary]],
451 [ case "${enableval}" in
452 yes|"") ENABLE_RPATH=YES ;;
458 AC_SUBST(ENABLE_RPATH)
463 AC_MSG_CHECKING([[if we have a C++ compiler]])
464 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no])
465 if test $cxx_okay = yes
467 AC_MSG_RESULT([[Good]])
469 AC_MSG_RESULT([[no]])
470 AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]])
473 if [[ "$GXX" = yes ]]; then
474 # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
475 # and check that the compiler still works.
476 if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
477 OLD_CXXFLAGS="${CXXFLAGS}"
478 CXXFLAGS="$CXXFLAGS --std=c++0x"
479 AC_MSG_CHECKING([[if we have a C++11 compiler]])
480 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
481 AC_MSG_RESULT($cxx11_okay)
482 if [[ $cxx11_okay = yes ]]; then
483 AC_MSG_NOTICE([Adding CXXFLAGS option --std=c++0x])
484 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x"
486 CXXFLAGS="$OLD_CXXFLAGS"
491 AC_MSG_CHECKING([[if #include <string> works]])
492 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
493 AC_MSG_RESULT($ac_cv_header_stdstring)
494 if test $ac_cv_header_stdstring = yes
499 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
501 AC_SUBST(U_HAVE_STD_STRING)
504 AC_MSG_CHECKING([[if #include <atomic> works]])
505 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <atomic>]], [[]])], [ac_cv_header_atomic=yes], [ac_cv_header_atomic=no])
506 AC_MSG_RESULT($ac_cv_header_atomic)
507 if test $ac_cv_header_atomic = yes
513 # Make this available via CPPFLAGS
514 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
515 AC_SUBST(U_HAVE_ATOMIC)
519 # Always build ICU with multi-threading support.
524 if test $threads = true; then
525 # For Compaq Tru64 (OSF1), we must look for pthread_attr_init
526 # and must do this before seaching for pthread_mutex_destroy, or
527 # we will pick up libpthreads.so not libpthread.so
528 # If this fails, then we must test for HPUX specials, before
529 # moving on to a more generic test
531 AC_CHECK_LIB(pthread, pthread_attr_init)
532 if test $ac_cv_lib_pthread_pthread_attr_init = yes; then
535 # Locate the right library for POSIX threads. We look for the
536 # symbols in the libraries first, because on Solaris libc provides
537 # pthread_create but libpthread has the real code :(
538 # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread
539 # FreeBSD users may need libpthread if they do not have libc_r.
541 AC_SEARCH_LIBS_FIRST(pthread_mutex_destroy, pthread pthreads c_r )
543 if test "$ac_cv_search_pthread_mutex_destroy" != no; then
547 AC_CHECK_LIB(pthread, pthread_mutex_init)
548 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
553 AC_CHECK_FUNC(pthread_mutex_lock)
555 if test $ac_cv_func_pthread_mutex_lock = yes; then
559 # Check to see if we are using CygWin with MSVC
561 *-pc-cygwin*|*-pc-mingw*)
562 # For gcc, the thread options are set by mh-mingw/mh-cygwin
563 # For msvc, the thread options are set by runConfigureICU
567 # Add -mt because it does several nice things on newer compilers.
568 case "${icu_cv_host_frag}" in
570 OLD_CXXFLAGS="${CXXFLAGS}"
571 CXXFLAGS="${CXXFLAGS} -mt"
572 if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then
573 CXXFLAGS="${OLD_CXXFLAGS}"
575 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt"
581 case "${icu_cv_host_frag}" in
590 AC_ARG_ENABLE(weak-threads,
591 [ --enable-weak-threads weakly reference the threading library [default=no]],
592 [case "${enableval}" in
594 LIB_THREAD="${LIBS%${OLD_LIBS}}"
598 *) AC_MSG_ERROR(bad value ${enableval} for --enable-weak-threads) ;;
604 # The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific.
605 # Do this check instead.
607 AC_MSG_CHECKING([for mmap])
608 AC_CACHE_VAL(ac_cv_func_mmap_ok,
609 [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>
610 #include <sys/mman.h>
611 #include <sys/stat.h>
612 #include <fcntl.h>], [mmap((void *)0, 0, PROT_READ, 0, 0, 0);])],[ac_cv_func_mmap_ok=yes],[ac_cv_func_mmap_ok=no])] )
613 AC_MSG_RESULT($ac_cv_func_mmap_ok)
614 if test $ac_cv_func_mmap_ok = yes
618 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0"
622 AC_MSG_CHECKING([for genccode assembly])
624 # Check to see if genccode can generate simple assembly.
627 *-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
628 if test "$GCC" = yes; then
629 # We're using gcc, and the simple -a gcc command line works for genccode
630 GENCCODE_ASSEMBLY="-a gcc"
633 if test "$GCC" = yes; then
634 # When using gcc, look if we're also using GNU as.
635 # When using GNU as, the simple -a gcc command line works for genccode.
636 asv=`"${CC}" -print-prog-name=as 2>/dev/null`
637 asv=`"${asv}" --version 2>/dev/null`
639 X*GNU*) GENCCODE_ASSEMBLY="-a gcc" ;;
640 X*) GENCCODE_ASSEMBLY="-a sun-x86" ;;
644 GENCCODE_ASSEMBLY="-a sun-x86"
647 GENCCODE_ASSEMBLY="-a sun"
650 GENCCODE_ASSEMBLY="-a aCC-ia64"
653 AC_SUBST(GENCCODE_ASSEMBLY)
655 AC_MSG_RESULT($GENCCODE_ASSEMBLY)
657 # Checks for header files
658 AC_CHECK_HEADERS(inttypes.h)
659 if test $ac_cv_header_inttypes_h = no; then
661 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
665 if test "$CC" = ccc; then
666 AC_MSG_RESULT("C compiler set to CCC ${CC}" )
668 alpha*-*-*) U_HAVE_INTTYPES_H=0;
669 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
673 AC_SUBST(U_HAVE_INTTYPES_H)
675 AC_CHECK_HEADERS(dirent.h)
676 if test $ac_cv_header_dirent_h = no; then
678 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0"
683 AC_SUBST(U_HAVE_DIRENT_H)
685 # Check for endianness
687 if test $ac_cv_c_bigendian = no; then
694 AC_SUBST(U_IS_BIG_ENDIAN)
696 # Do various POSIX related checks
697 U_HAVE_NL_LANGINFO_CODESET=0
698 U_NL_LANGINFO_CODESET=-1
699 AC_CHECK_FUNC(nl_langinfo,[U_HAVE_NL_LANGINFO=1],[U_HAVE_NL_LANGINFO=0])
700 dnl AC_SUBST(U_HAVE_NL_LANGINFO)
701 if test $U_HAVE_NL_LANGINFO -eq 1; then
702 AC_CACHE_CHECK([for nl_langinfo's argument to obtain the codeset],
703 ac_cv_nl_langinfo_codeset,
704 [ac_cv_nl_langinfo_codeset="unknown"
705 for a in CODESET _NL_CTYPE_CODESET_NAME; do
706 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo($a);]])],[ac_cv_nl_langinfo_codeset="$a"; break],[])]
708 if test x$ac_cv_nl_langinfo_codeset != xunknown
710 U_HAVE_NL_LANGINFO_CODESET=1
711 U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
712 if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET"
714 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}"
717 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0"
720 AC_SUBST(U_HAVE_NL_LANGINFO_CODESET)
721 AC_SUBST(U_NL_LANGINFO_CODESET)
723 # Namespace support checks
725 AC_MSG_CHECKING([for namespace support])
726 AC_CACHE_VAL(ac_cv_namespace_ok,
727 [AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace x_version {void f(){}}
728 namespace x = x_version;
729 using namespace x_version;
730 ], [f();])],[ac_cv_namespace_ok=yes],[ac_cv_namespace_ok=no])] )
731 AC_MSG_RESULT($ac_cv_namespace_ok)
732 if test $ac_cv_namespace_ok = no
734 AC_MSG_ERROR(Namespace support is required to build ICU.)
737 AC_MSG_CHECKING([for properly overriding new and delete])
738 U_OVERRIDE_CXX_ALLOCATION=0
739 U_HAVE_PLACEMENT_NEW=0
740 AC_CACHE_VAL(ac_cv_override_cxx_allocation_ok,
741 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
744 void *operator new(size_t size) {return malloc(size);}
745 void *operator new[](size_t size) {return malloc(size);}
746 void operator delete(void *p) {free(p);}
747 void operator delete[](void *p) {free(p);}
749 ]], [])],[ac_cv_override_cxx_allocation_ok=yes],[ac_cv_override_cxx_allocation_ok=no])] )
750 AC_MSG_RESULT($ac_cv_override_cxx_allocation_ok)
751 if test $ac_cv_override_cxx_allocation_ok = yes
753 U_OVERRIDE_CXX_ALLOCATION=1
754 AC_MSG_CHECKING([for placement new and delete])
755 AC_CACHE_VAL(ac_cv_override_placement_new_ok,
756 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
759 void *operator new(size_t size) {return malloc(size);}
760 void *operator new[](size_t size) {return malloc(size);}
761 void operator delete(void *p) {free(p);}
762 void operator delete[](void *p) {free(p);}
763 void * operator new(size_t, void *ptr) { return ptr; }
764 void operator delete(void *, void *) {}
766 ]], [])],[ac_cv_override_placement_new_ok=yes],[ac_cv_override_placement_new_ok=no])] )
767 AC_MSG_RESULT($ac_cv_override_placement_new_ok)
768 if test $ac_cv_override_placement_new_ok = yes
770 U_HAVE_PLACEMENT_NEW=1
772 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0"
775 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0"
777 AC_SUBST(U_OVERRIDE_CXX_ALLOCATION)
778 AC_SUBST(U_HAVE_PLACEMENT_NEW)
782 if test x$ac_cv_func_popen = xyes
786 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0"
789 AC_SUBST(U_HAVE_POPEN)
793 if test x$ac_cv_func_tzset = xyes
798 AC_CHECK_FUNC(_tzset)
799 if test x$ac_cv_func__tzset = xyes
804 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
807 AC_SUBST(U_HAVE_TZSET)
811 AC_CACHE_CHECK(for tzname,ac_cv_var_tzname,
812 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef __USE_POSIX
817 #ifndef tzname /* For SGI. */
818 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
819 #endif]], [atoi(*tzname);])],[ac_cv_var_tzname=yes],[ac_cv_var_tzname=no])])
820 if test $ac_cv_var_tzname = yes; then
824 AC_CACHE_CHECK(for _tzname,ac_cv_var__tzname,
825 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
827 extern char *_tzname[];]], [atoi(*_tzname);])],[ac_cv_var__tzname=yes],[ac_cv_var__tzname=no])])
828 if test $ac_cv_var__tzname = yes; then
832 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
835 AC_SUBST(U_HAVE_TZNAME)
838 AC_CACHE_CHECK(for timezone,ac_cv_var_timezone,
839 [AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifndef __USE_POSIX
846 ], [[timezone = 1;]])],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no])])
848 if test $ac_cv_var_timezone = yes; then
852 AC_CACHE_CHECK(for __timezone,ac_cv_var___timezone,
853 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[__timezone = 1;]])],[ac_cv_var___timezone=yes],[ac_cv_var___timezone=no])])
854 if test $ac_cv_var___timezone = yes; then
855 U_TIMEZONE=__timezone
858 AC_CACHE_CHECK(for _timezone,ac_cv_var__timezone,
859 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[_timezone = 1;]])],[ac_cv_var__timezone=yes],[ac_cv_var__timezone=no])])
860 if test $ac_cv_var__timezone = yes; then
864 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
868 AC_SUBST(U_HAVE_TIMEZONE)
871 # Checks for typedefs
872 AC_CHECK_TYPE(int8_t,signed char)
873 AC_CHECK_TYPE(uint8_t,unsigned char)
874 AC_CHECK_TYPE(int16_t,signed short)
875 AC_CHECK_TYPE(uint16_t,unsigned short)
876 AC_CHECK_TYPE(int32_t,signed long)
877 AC_CHECK_TYPE(uint32_t,unsigned long)
878 AC_CHECK_TYPE(int64_t,signed long long)
879 AC_CHECK_TYPE(uint64_t,unsigned long long)
881 if test $ac_cv_type_int8_t = no; then
882 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0"
885 if test $ac_cv_type_uint8_t = no; then
886 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0"
889 if test $ac_cv_type_int16_t = no; then
890 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0"
893 if test $ac_cv_type_uint16_t = no; then
894 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0"
897 if test $ac_cv_type_int32_t = no; then
898 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0"
901 if test $ac_cv_type_uint32_t = no; then
902 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0"
905 if test $ac_cv_type_int64_t = no; then
906 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0"
909 if test $ac_cv_type_uint64_t = no; then
910 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0"
913 # Do various wchar_t related checks
914 AC_CHECK_HEADER(wchar.h)
915 if test "$ac_cv_header_wchar_h" = no
919 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0"
921 AC_DEFINE([HAVE_WCHAR_H], [1], [wchar.h was found.])
923 # Some broken systems have wchar.h but not some of its functions...
924 AC_SEARCH_LIBS(wcscpy, wcs w)
925 if test "$ac_cv_search_wcscpy" != no; then
929 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0"
932 AC_SUBST(U_HAVE_WCHAR_H)
933 AC_SUBST(U_HAVE_WCSCPY)
935 AC_CHECK_SIZEOF([wchar_t], 0, [
944 U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
945 # We do this check to verify that everything is okay.
946 if test $U_SIZEOF_WCHAR_T = 0; then
947 if test $U_HAVE_WCHAR_H=1; then
948 AC_MSG_ERROR(There is wchar.h but the size of wchar_t is 0)
952 AC_MSG_CHECKING([for UTF-16 string literal support])
953 U_CHECK_UTF16_STRING=1
954 CHECK_UTF16_STRING_RESULT="unknown"
957 *-*-aix*|powerpc64-*-linux*)
958 if test "$GCC" = no; then
959 OLD_CFLAGS="${CFLAGS}"
960 OLD_CXXFLAGS="${CXXFLAGS}"
961 CFLAGS="${CFLAGS} -qutf"
962 CXXFLAGS="${CXXFLAGS} -qutf"
963 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = u"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
964 if test "$U_CHECK_UTF16_STRING" = 0; then
965 CFLAGS="${OLD_CFLAGS}"
966 CXXFLAGS="${OLD_CXXFLAGS}"
968 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -qutf"
969 CHECK_UTF16_STRING_RESULT="-qutf"
974 if test "$GCC" = no; then
975 OLD_CFLAGS="${CFLAGS}"
976 OLD_CXXFLAGS="${CXXFLAGS}"
977 CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
978 CXXFLAGS="${CXXFLAGS} -xustr=ascii_utf16_ushort"
979 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = U"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
980 if test "$U_CHECK_UTF16_STRING" = 0; then
981 CFLAGS="${OLD_CFLAGS}"
982 CXXFLAGS="${OLD_CXXFLAGS}"
984 CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort"
985 UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -xustr=ascii_utf16_ushort"
986 UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -xustr=ascii_utf16_ushort"
987 # Since we can't detect the availability of this UTF-16 syntax at compile time,
988 # we depend on configure telling us that we can use it.
989 # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
990 # we only use this macro within ICU.
991 # If an ICU user uses icu-config, this feature will be enabled.
992 CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
993 U_CHECK_UTF16_STRING=0
998 if test "$GCC" = no; then
999 # The option will be detected at compile time without additional compiler options.
1000 CHECK_UTF16_STRING_RESULT="available"
1004 # wchar_t can be used
1005 CHECK_UTF16_STRING_RESULT="available"
1011 # GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
1012 if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
1013 if test "$GCC" = yes; then
1014 OLD_CFLAGS="${CFLAGS}"
1015 CFLAGS="${CFLAGS} -std=gnu99"
1016 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1017 static const char16_t test[] = u"This is a UTF16 literal string.";
1018 ]], [[]])],[CC_UTF16_STRING=1],[CC_UTF16_STRING=0])
1019 if test "$CC_UTF16_STRING" = 1; then
1020 UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99"
1021 CHECK_UTF16_STRING_RESULT="C only";
1023 CFLAGS="${OLD_CFLAGS}"
1026 if test "$GXX" = yes; then
1027 # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
1029 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1030 static const char16_t test[] = u"This is a UTF16 literal string.";
1031 ]], [[]])],[CXX_UTF16_STRING=1],[CXX_UTF16_STRING=0])
1033 if test "$CXX_UTF16_STRING" = 1; then
1034 if test "$CC_UTF16_STRING" = 1; then
1035 CHECK_UTF16_STRING_RESULT="available";
1037 CHECK_UTF16_STRING_RESULT="C++ only";
1042 AC_MSG_RESULT($CHECK_UTF16_STRING_RESULT)
1044 # Enable/disable extras
1045 AC_ARG_ENABLE(extras,
1046 [ --enable-extras build ICU extras [default=yes]],
1047 [case "${enableval}" in
1050 *) AC_MSG_ERROR(bad value ${enableval} for --enable-extras) ;;
1053 ICU_CONDITIONAL(EXTRAS, test "$extras" = true)
1054 AC_ARG_ENABLE(icuio,
1055 [ --enable-icuio build ICU's icuio library [default=yes]],
1056 [case "${enableval}" in
1059 *) AC_MSG_ERROR(bad value ${enableval} for --enable-icuio) ;;
1062 ICU_CONDITIONAL(ICUIO, test "$icuio" = true)
1064 # Enable/disable layout
1065 AC_ARG_ENABLE(layout,
1066 [ --enable-layout build ICU's layout library [default=yes]],
1067 [case "${enableval}" in
1070 *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;;
1073 ICU_CONDITIONAL(LAYOUT, test "$layout" = true)
1075 # Enable/disable tools
1076 AC_ARG_ENABLE(tools,
1077 [ --enable-tools build ICU's tools [default=yes]],
1078 [case "${enableval}" in
1081 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
1084 ICU_CONDITIONAL(TOOLS, test "$tools" = true)
1086 AC_ARG_WITH(data-packaging,
1087 [ --with-data-packaging=type specify how to package ICU data (files, archive, library, static, auto) [default=auto]],
1088 [case "${withval}" in
1089 files|archive|library) datapackaging=$withval ;;
1090 auto) datapackaging=$withval ;;
1091 common) datapackaging=archive ;;
1092 dll) datapackaging=library ;;
1093 static) datapackaging=static ;;
1094 *) AC_MSG_ERROR(bad value ${withval} for --with-data-packaging) ;;
1098 # Note: 'thesysconfdir' is an evaluated version, for Man pages, so also for thedatadir, thelibdir, etc..
1099 # thesysconfdir=`eval echo $sysconfdir`
1100 dnl# AC_SUBST(thesysconfdir)
1101 dnl# thelibdir=`test "x$exec_prefix" = xNONE && exec_prefix="$prefix"; eval echo $libdir`
1102 dnl# AC_SUBST(thelibdir)
1103 thedatadir=`eval echo $datadir`
1104 dnl# AC_SUBST(thedatadir)
1105 # 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}.
1106 pkgicudatadir=$datadir
1107 thepkgicudatadir=$thedatadir
1108 AC_SUBST(pkgicudatadir)
1109 AC_SUBST(thepkgicudatadir)
1111 dnl# Shouldn't need the AC_SUBST
1113 if test x"$datapackaging" = x -o x"$datapackaging" = xauto; then
1114 # default to library
1115 datapackaging=library
1116 if test "$ENABLE_STATIC" = "YES"; then
1117 if test "$ENABLE_SHARED" != "YES"; then
1118 datapackaging=static
1123 datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
1125 datapackaging_msg="(No explaination for mode $datapackaging.)"
1127 datapackaging_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."
1128 datapackaging_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."
1129 datapackaging_howfound="(unknown)"
1131 case "$datapackaging" in
1133 DATA_PACKAGING_MODE=files
1134 datapackaging_msg="ICU data will be stored in individual files."
1135 datapackaging_howfound="$datapackaging_msg_path"
1138 DATA_PACKAGING_MODE=common
1139 datapackaging_msg="ICU data will be stored in a single .dat file."
1140 datapackaging_howfound="$datapackaging_msg_path"
1143 DATA_PACKAGING_MODE=dll
1144 datapackaging_msg="ICU data will be linked with ICU."
1145 if test "$ENABLE_STATIC" = "YES"; then
1146 datapackaging_msg="$datapackaging_msg A static data library will be built. "
1148 if test "$ENABLE_SHARED" = "YES"; then
1149 datapackaging_msg="$datapackaging_msg A shared data library will be built. "
1151 datapackaging_howfound="$datapackaging_msg_set"
1154 DATA_PACKAGING_MODE=static
1155 datapackaging_msg="ICU data will be stored in a static library."
1156 datapackaging_howfound="$datapackaging_msg_set"
1159 AC_SUBST(DATA_PACKAGING_MODE)
1161 # Sets a library suffix
1162 AC_MSG_CHECKING([for a library suffix to use])
1163 AC_ARG_WITH(library-suffix,
1164 [ --with-library-suffix=suffix tag a suffix to the library names [default=]],
1165 [ICULIBSUFFIX="${withval}"],
1168 if test "$msg" = ""; then
1172 AC_SUBST(ICULIBSUFFIX)
1173 if test "$ICULIBSUFFIX" != ""
1176 ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
1177 UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
1181 AC_SUBST(U_HAVE_LIB_SUFFIX)
1182 AC_SUBST(ICULIBSUFFIXCNAME)
1184 # Enable/disable tests
1185 AC_ARG_ENABLE(tests,
1186 [ --enable-tests build ICU tests [default=yes]],
1187 [case "${enableval}" in
1190 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
1193 ICU_CONDITIONAL(TESTS, test "$tests" = true)
1195 # Enable/disable samples
1196 AC_ARG_ENABLE(samples,
1197 [ --enable-samples build ICU samples [default=yes]
1199 Additionally, the variable FORCE_LIBS may be set before calling configure.
1200 If set, it will REPLACE any automatic list of libraries.],
1201 [case "${enableval}" in
1202 yes) samples=true ;;
1203 no) samples=false ;;
1204 *) AC_MSG_ERROR(bad value ${enableval} for --enable-samples) ;;
1207 ICU_CONDITIONAL(SAMPLES, test "$samples" = true)
1209 ICUDATA_CHAR=$U_ENDIAN_CHAR
1211 # Platform-specific Makefile setup
1212 # set ICUDATA_CHAR to 'e' for any EBCDIC (which should be big endian) platform.
1214 *-*-solaris*) platform=U_SOLARIS ;;
1215 *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) platform=U_LINUX ;;
1216 *-*-*bsd*|*-*-dragonfly*) platform=U_BSD ;;
1217 *-*-aix*) platform=U_AIX ;;
1218 *-*-hpux*) platform=U_HPUX ;;
1219 *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;;
1220 *-*-cygwin*) platform=U_CYGWIN ;;
1221 *-*-mingw*) platform=U_MINGW ;;
1222 *-*ibm-openedition*|*-*-os390*) platform=OS390
1223 if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
1226 *-*-os400*) platform=OS400
1227 if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
1230 *-*-nto*) platform=U_QNX ;;
1231 *-dec-osf*) platform=U_OSF ;;
1232 *-*-beos) platform=U_BEOS ;;
1233 *-*-irix*) platform=U_IRIX ;;
1234 *-ncr-*) platform=U_MPRAS ;;
1235 *) platform=U_UNKNOWN_PLATFORM ;;
1237 AC_SUBST(ICUDATA_CHAR)
1239 platform_make_fragment_name="$icu_cv_host_frag"
1240 platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name"
1241 AC_SUBST(platform_make_fragment_name)
1242 AC_SUBST(platform_make_fragment)
1244 if test "${FORCE_LIBS}" != ""; then
1245 echo " *** Overriding automatically chosen [LIBS=$LIBS], using instead [FORCE_LIBS=${FORCE_LIBS}]" 1>&6
1249 # Now that we're done using CPPFLAGS etc. for tests, we can change it
1252 if test "${CC}" == "clang"; then
1253 CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
1258 if test "${CXX}" == "clang++"; then
1259 CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
1264 CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
1265 CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS"
1266 CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS"
1269 AC_SUBST(LIBCXXFLAGS)
1271 # append all config cppflags
1272 CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS $UCONFIG_CPPFLAGS"
1274 echo "CPPFLAGS=$CPPFLAGS"
1275 echo "CFLAGS=$CFLAGS"
1276 echo "CXXFLAGS=$CXXFLAGS"
1279 # output the Makefiles
1280 AC_CONFIG_FILES([icudefs.mk \
1282 data/pkgdataMakefile \
1283 config/Makefile.inc \
1285 config/pkgdataMakefile \
1294 extra/uconv/Makefile \
1295 extra/uconv/pkgdataMakefile \
1296 extra/scrptrun/Makefile \
1298 tools/ctestfw/Makefile \
1299 tools/toolutil/Makefile \
1300 tools/makeconv/Makefile \
1301 tools/genrb/Makefile \
1302 tools/genccode/Makefile \
1303 tools/gencmn/Makefile \
1304 tools/gencnval/Makefile \
1305 tools/gendict/Makefile \
1306 tools/gentest/Makefile \
1307 tools/gennorm2/Makefile \
1308 tools/genbrk/Makefile \
1309 tools/gensprep/Makefile \
1310 tools/icuinfo/Makefile \
1311 tools/icupkg/Makefile \
1312 tools/icuswap/Makefile \
1313 tools/pkgdata/Makefile \
1314 tools/tzcode/Makefile \
1315 tools/gencfu/Makefile \
1317 test/compat/Makefile \
1318 test/testdata/Makefile \
1319 test/testdata/pkgdataMakefile \
1320 test/hdrtst/Makefile \
1321 test/intltest/Makefile \
1322 test/cintltst/Makefile \
1323 test/iotest/Makefile \
1324 test/letest/Makefile \
1325 test/perf/Makefile \
1326 test/perf/collationperf/Makefile \
1327 test/perf/collperf/Makefile \
1328 test/perf/collperf2/Makefile \
1329 test/perf/dicttrieperf/Makefile \
1330 test/perf/ubrkperf/Makefile \
1331 test/perf/charperf/Makefile \
1332 test/perf/convperf/Makefile \
1333 test/perf/normperf/Makefile \
1334 test/perf/DateFmtPerf/Makefile \
1335 test/perf/howExpensiveIs/Makefile \
1336 test/perf/strsrchperf/Makefile \
1337 test/perf/unisetperf/Makefile \
1338 test/perf/usetperf/Makefile \
1339 test/perf/ustrperf/Makefile \
1340 test/perf/utfperf/Makefile \
1341 test/perf/utrie2perf/Makefile \
1342 test/perf/leperf/Makefile \
1343 samples/Makefile samples/date/Makefile \
1344 samples/cal/Makefile samples/layout/Makefile])
1348 echo "ICU for C/C++ $VERSION is ready to be built."
1349 echo "=== Important Notes: ==="
1351 echo "Data Packaging: $datapackaging"
1352 echo " This means: $datapackaging_msg"
1353 echo " To locate data: $datapackaging_howfound"
1355 if test -n "`$U_MAKE -v 2>&1 | grep '^GNU Make'`"; then
1356 echo "Building ICU: Use a GNU make such as $U_MAKE to build ICU."
1358 echo "** WARNING: $U_MAKE may not be GNU make."
1359 echo "This may cause ICU to fail to build. Please make sure that GNU make"
1360 echo "is in your PATH so that the configure script can detect its location."
1362 if test "x$AR" = "xfalse"; then
1363 echo "*** WARNING: Archiver ar not found. Set AR= or fix PATH. Some builds (such as static) may fail."
1366 AC_MSG_CHECKING([the version of "$U_MAKE"])
1367 if "$U_MAKE" -f "$srcdir/config/gmakever.mk" PLATFORM="$platform"; then
1370 AC_MSG_RESULT([too old or test failed - try upgrading GNU Make])
1373 AC_SUBST(UCONFIG_CPPFLAGS)
1374 if test -n "$UCONFIG_CPPFLAGS"; then
1375 HDRFILE="uconfig.h.prepend"
1376 echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:"
1378 echo " ${UCONFIG_CPPFLAGS}"
1380 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.'
1381 echo "Creating the file ${HDRFILE}"
1383 echo '--------------- ' "${HDRFILE}"
1385 echo '/* ICU customizations: put these lines at the top of uconfig.h */' >> "${HDRFILE}"
1386 echo >> "${HDRFILE}"
1387 for flag in ${UCONFIG_CPPFLAGS};
1389 echo " /* $flag */" >> "${HDRFILE}"
1392 [ \echo "${flag}" | sed -n 's%-D\([^=]*\)=%#define \1 %p' >> "${HDRFILE}" ]
1393 \echo >> "${HDRFILE}"
1396 [ \echo "${flag}" | sed -n 's%-D\([^=]*\)%#define \1 %p' >> "${HDRFILE}" ]
1397 \echo >> "${HDRFILE}"
1400 \echo "/* Not sure how to handle this argument: ${flag} */" >> "${HDRFILE}"
1401 \echo >> "${HDRFILE}"
1406 \echo "/* End of ${HDRFILE} ------------ */" >> "${HDRFILE}"
1407 echo >> "${HDRFILE}"
1408 echo '--------------- end ' "${HDRFILE}"
1411 AC_SUBST(UCONFIG_CFLAGS)
1412 if test -n "$UCONFIG_CFLAGS"; then
1413 echo "C apps may want to build with CFLAGS = ${UCONFIG_CFLAGS}"
1415 AC_SUBST(UCONFIG_CXXFLAGS)
1416 if test -n "$UCONFIG_CXXFLAGS"; then
1417 echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}"
1420 if test "$tools" = false;
1422 echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests."
1423 echo "## Expect build failures in the 'data', 'test', and other directories."
1426 $as_unset _CXX_CXXSUFFIX