ICU-8732 merge from branch
X-SVN-Rev: 30750
This commit is contained in:
parent
c18cfa3a7e
commit
4db19f5629
@ -1,115 +0,0 @@
|
||||
/* common/icucfg.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* wchar.h was found. */
|
||||
#undef HAVE_WCHAR_H
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#undef SIZEOF_WCHAR_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to `signed short' if <sys/types.h> does not define. */
|
||||
#undef int16_t
|
||||
|
||||
/* Define to `signed long' if <sys/types.h> does not define. */
|
||||
#undef int32_t
|
||||
|
||||
/* Define to `signed long long' if <sys/types.h> does not define. */
|
||||
#undef int64_t
|
||||
|
||||
/* Define to `signed char' if <sys/types.h> does not define. */
|
||||
#undef int8_t
|
||||
|
||||
/* Define to `unsigned short' if <sys/types.h> does not define. */
|
||||
#undef uint16_t
|
||||
|
||||
/* Define to `unsigned long' if <sys/types.h> does not define. */
|
||||
#undef uint32_t
|
||||
|
||||
/* Define to `unsigned long long' if <sys/types.h> does not define. */
|
||||
#undef uint64_t
|
||||
|
||||
/* Define to `unsigned char' if <sys/types.h> does not define. */
|
||||
#undef uint8_t
|
@ -131,21 +131,25 @@
|
||||
* Simple things (presence of functions, etc) should just go in configure.in and be added to
|
||||
* icucfg.h via autoheader.
|
||||
*/
|
||||
#if defined(U_HAVE_ICUCFG)
|
||||
# include "icucfg.h"
|
||||
#elif U_PLATFORM_IMPLEMENTS_POSIX
|
||||
#if U_PLATFORM_IMPLEMENTS_POSIX
|
||||
# if U_PLATFORM == U_PF_OS400
|
||||
# undef HAVE_DLFCN_H 1
|
||||
# undef HAVE_DLOPEN 1
|
||||
# define HAVE_DLFCN_H 0
|
||||
# define HAVE_DLOPEN 0
|
||||
# else
|
||||
# ifndef HAVE_DLFCN_H
|
||||
# define HAVE_DLFCN_H 1
|
||||
# endif
|
||||
# ifndef HAVE_DLOPEN
|
||||
# define HAVE_DLOPEN 1
|
||||
# endif
|
||||
# define HAVE_GETTIMEOFDAY 1
|
||||
# endif
|
||||
# ifndef HAVE_GETTIMEOFDAY
|
||||
# define HAVE_GETTIMEOFDAY 1
|
||||
# endif
|
||||
#else
|
||||
# undef HAVE_DLFCN_H
|
||||
# undef HAVE_DLOPEN
|
||||
# undef HAVE_GETTIMEOFDAY
|
||||
# define HAVE_DLFCN_H 0
|
||||
# define HAVE_DLOPEN 0
|
||||
# define HAVE_GETTIMEOFDAY 0
|
||||
#endif
|
||||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
|
||||
@ -317,7 +321,7 @@ uprv_getRawUTCtime()
|
||||
return (UDate)((winTime.int64 - EPOCH_BIAS) / HECTONANOSECOND_PER_MILLISECOND);
|
||||
#else
|
||||
|
||||
#if defined(HAVE_GETTIMEOFDAY)
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
struct timeval posixTime;
|
||||
gettimeofday(&posixTime, NULL);
|
||||
return (UDate)(((int64_t)posixTime.tv_sec * U_MILLIS_PER_SECOND) + (posixTime.tv_usec/1000));
|
||||
@ -2083,11 +2087,9 @@ u_getVersion(UVersionInfo versionArray) {
|
||||
|
||||
#if U_ENABLE_DYLOAD
|
||||
|
||||
#if defined(U_CHECK_DYLOAD)
|
||||
#if HAVE_DLOPEN && !U_PLATFORM_HAS_WIN32_API
|
||||
|
||||
#if defined(HAVE_DLOPEN) && !U_PLATFORM_HAS_WIN32_API
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#if HAVE_DLFCN_H
|
||||
|
||||
#ifdef __MVS__
|
||||
#ifndef __SUSV3
|
||||
@ -2240,9 +2242,6 @@ uprv_dlsym_func(void *lib, const char* sym, UErrorCode *status) {
|
||||
return (UVoidFunction*)NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* U_ENABLE_DYLOAD */
|
||||
|
||||
/*
|
||||
|
@ -683,17 +683,4 @@
|
||||
|
||||
/* @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Custom icu entry point renaming */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if U_HAVE_LIB_SUFFIX
|
||||
# ifndef U_ICU_ENTRY_POINT_RENAME
|
||||
/* Renaming pattern: u_strcpy_41_suffix */
|
||||
# define U_ICU_ENTRY_POINT_RENAME(x) x ## _ ## U_ICU_VERSION_MAJOR_NUM ## U_LIB_SUFFIX_C_NAME
|
||||
# define U_DEF_ICUDATA_ENTRY_POINT(major) icudt ## U_LIB_SUFFIX_C_NAME ## major ##_dat
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -192,10 +192,8 @@
|
||||
*/
|
||||
#ifdef U_HAVE_LIB_SUFFIX
|
||||
/* Use the predefined value. */
|
||||
#elif defined(U_LIB_SUFFIX_C_NAME) || defined(U_LIB_SUFFIX_C_NAME_STRING)
|
||||
#elif defined(U_LIB_SUFFIX_C_NAME)
|
||||
# define U_HAVE_LIB_SUFFIX 1
|
||||
#else
|
||||
# define U_HAVE_LIB_SUFFIX 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -211,17 +209,6 @@
|
||||
# define U_LIB_SUFFIX_C_NAME_STRING ""
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def U_LIB_SUFFIX_C_NAME
|
||||
* Defines the library suffix with C syntax.
|
||||
* @internal
|
||||
*/
|
||||
#ifdef U_LIB_SUFFIX_C_NAME
|
||||
/* Use the predefined value. */
|
||||
#else
|
||||
# define U_LIB_SUFFIX_C_NAME
|
||||
#endif
|
||||
|
||||
/* common/i18n library switches --------------------------------------------- */
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,10 @@
|
||||
the platform a chance to define it first.
|
||||
Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined.
|
||||
*/
|
||||
#ifndef U_ICU_ENTRY_POINT_RENAME
|
||||
#include "unicode/uconfig.h"
|
||||
#endif
|
||||
|
||||
#ifndef U_ICU_ENTRY_POINT_RENAME
|
||||
#include "unicode/umachine.h"
|
||||
#endif
|
||||
|
@ -151,21 +151,26 @@
|
||||
* \#define U_ICU_ENTRY_POINT icudt19_dat
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM)
|
||||
#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM,U_LIB_SUFFIX_C_NAME)
|
||||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
/**
|
||||
* Do not use.
|
||||
* Do not use. Note that it's OK for the 2nd argument to be undefined (literal).
|
||||
* @internal
|
||||
*/
|
||||
#define U_DEF2_ICUDATA_ENTRY_POINT(major) U_DEF_ICUDATA_ENTRY_POINT(major)
|
||||
#define U_DEF2_ICUDATA_ENTRY_POINT(major,suff) U_DEF_ICUDATA_ENTRY_POINT(major,suff)
|
||||
|
||||
/**
|
||||
* Do not use.
|
||||
* @internal
|
||||
*/
|
||||
#ifndef U_DEF_ICUDATA_ENTRY_POINT
|
||||
/* affected by symbol renaming. See platform.h */
|
||||
#define U_DEF_ICUDATA_ENTRY_POINT(major) icudt##major##_dat
|
||||
#ifndef U_LIB_SUFFIX_C_NAME
|
||||
#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##major##_dat
|
||||
#else
|
||||
#define U_DEF_ICUDATA_ENTRY_POINT(major, suff) icudt##suff ## major##_dat
|
||||
#endif
|
||||
#endif
|
||||
#endif /* U_HIDE_INTERNAL_API */
|
||||
|
||||
|
@ -80,10 +80,19 @@
|
||||
* This value will change in the subsequent releases of ICU.
|
||||
* If a custom suffix (such as matching library suffixes) is desired, this can be modified.
|
||||
* Note that if present, platform.h may contain an earlier definition of this macro.
|
||||
* \def U_ICU_ENTRY_POINT_RENAME
|
||||
* @stable ICU 4.2
|
||||
*/
|
||||
#ifndef U_ICU_ENTRY_POINT_RENAME
|
||||
#define U_ICU_ENTRY_POINT_RENAME(x) x ## _49
|
||||
#ifdef U_HAVE_LIB_SUFFIX
|
||||
#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z) x ## y ## z
|
||||
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y,z) U_DEF_ICU_ENTRY_POINT_RENAME(x,y,z)
|
||||
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX,U_LIB_SUFFIX_C_NAME)
|
||||
#else
|
||||
#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
|
||||
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
|
||||
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** The current ICU library version as a dotted-decimal string. The patchlevel
|
||||
|
965
icu4c/source/configure
vendored
965
icu4c/source/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ AC_COPYRIGHT([ Copyright (c) 1999-2011, International Business Machines Corporat
|
||||
# Stephen F. Booth, heavily modified by Yves and others
|
||||
|
||||
# Check for autoconf version
|
||||
AC_PREREQ(2.67)
|
||||
AC_PREREQ(2.68)
|
||||
|
||||
# Process this file with autoconf to produce a configure script
|
||||
AC_INIT([ICU])
|
||||
@ -18,7 +18,6 @@ AC_INIT([ICU])
|
||||
|
||||
AC_CONFIG_SRCDIR([common/unicode/utypes.h])
|
||||
|
||||
AC_CONFIG_HEADERS(common/icucfg.h)
|
||||
PACKAGE="icu"
|
||||
AC_SUBST(PACKAGE)
|
||||
|
||||
@ -282,7 +281,7 @@ if test "$ENABLE_STATIC" = "YES"; then
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_LINK_IFELSE(AC_LANG_PROGRAM, CHECK_STATIC_OPT_FLAG=yes, CHECK_STATIC_OPT_FLAG=no, )
|
||||
AC_LINK_IFELSE(AC_LANG_SOURCE, CHECK_STATIC_OPT_FLAG=yes, CHECK_STATIC_OPT_FLAG=no, )
|
||||
AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG)
|
||||
if test "$CHECK_STATIC_OPT_FLAG" = no; then
|
||||
CPPFLAGS="${OLD_CPPFLAGS}"
|
||||
@ -292,6 +291,9 @@ if test "$ENABLE_STATIC" = "YES"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Accumulate #defines
|
||||
CONFIG_CPPFLAGS=""
|
||||
|
||||
# Check whether to enable auto cleanup of libraries
|
||||
AC_MSG_CHECKING([whether to enable auto cleanup of libraries])
|
||||
enabled=no
|
||||
@ -299,7 +301,10 @@ UCLN_NO_AUTO_CLEANUP=1
|
||||
AC_ARG_ENABLE(auto-cleanup,
|
||||
[ --enable-auto-cleanup enable auto cleanup of libraries [default=no]],
|
||||
[ case "${enableval}" in
|
||||
yes) enabled=yes; UCLN_NO_AUTO_CLEANUP=0 ;;
|
||||
yes) enabled=yes;
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0";
|
||||
UCLN_NO_AUTO_CLEANUP=0
|
||||
;;
|
||||
*) ;;
|
||||
esac],
|
||||
)
|
||||
@ -331,82 +336,27 @@ U_DEFAULT_SHOW_DRAFT=1
|
||||
AC_ARG_ENABLE(draft,
|
||||
[ --enable-draft enable draft APIs (and internal APIs) [default=yes]],
|
||||
[ case "${enableval}" in
|
||||
no) enabled=no; U_DEFAULT_SHOW_DRAFT=0 ;;
|
||||
no) enabled=no; U_DEFAULT_SHOW_DRAFT=0;
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0"
|
||||
;;
|
||||
*) ;;
|
||||
esac],
|
||||
)
|
||||
AC_MSG_RESULT($enabled)
|
||||
# Make sure that we can use draft API in ICU.
|
||||
if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
|
||||
CPPFLAGS="$CPPFLAGS -DU_SHOW_DRAFT_API"
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
|
||||
fi
|
||||
AC_SUBST(U_DEFAULT_SHOW_DRAFT)
|
||||
|
||||
# Check if we can hide variables from
|
||||
AC_MSG_CHECKING([for library API export])
|
||||
SHAREDLIBEXPORT=no
|
||||
U_USE_GCC_VISIBILITY_ATTRIBUTE=0
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
if test "$ac_cv_c_compiler_gnu" = yes; then
|
||||
case "${host}" in
|
||||
*-pc-cygwin*|*-pc-mingw*|*-*-aix*)
|
||||
# Cygwin and AIX GCC does not have the visibility attribute
|
||||
;;
|
||||
*)
|
||||
LIBCFLAGS="-fvisibility=hidden"
|
||||
LIBCXXFLAGS="-fvisibility=hidden"
|
||||
CFLAGS="${CFLAGS} ${LIBCFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((visibility ("default"))) void f(void);
|
||||
#include <stdlib.h>]], [[exit(0);]])],[SHAREDLIBEXPORT=yes],[SHAREDLIBEXPORT=no])
|
||||
if test "$SHAREDLIBEXPORT" = no; then
|
||||
LIBCFLAGS=
|
||||
LIBCXXFLAGS=
|
||||
else
|
||||
U_USE_GCC_VISIBILITY_ATTRIBUTE=1
|
||||
fi
|
||||
esac
|
||||
else
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
LIBCFLAGS="-xldscope=hidden"
|
||||
LIBCXXFLAGS="-xldscope=hidden"
|
||||
CFLAGS="${CFLAGS} ${LIBCFLAGS}"
|
||||
CXXFLAGS="${CXXFLAGS} ${LIBCXXFLAGS}"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[__global void f(void);
|
||||
#include <stdlib.h>]], [[exit(0);]])],[SHAREDLIBEXPORT=yes],[SHAREDLIBEXPORT=no])
|
||||
if test "$SHAREDLIBEXPORT" = no; then
|
||||
LIBCFLAGS=
|
||||
LIBCXXFLAGS=
|
||||
fi
|
||||
;;
|
||||
*-*-hpux*)
|
||||
# ICU isn't set up to follow the HP syntax yet.
|
||||
;;
|
||||
*)
|
||||
esac
|
||||
fi
|
||||
# Restore to their original state because the Intel compiler chokes
|
||||
# on this option when checking for the wchar_t size, but the
|
||||
# option otherwise works.
|
||||
CFLAGS="${OLD_CFLAGS}"
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
AC_MSG_RESULT($SHAREDLIBEXPORT)
|
||||
AC_SUBST(U_USE_GCC_VISIBILITY_ATTRIBUTE)
|
||||
AC_SUBST(LIBCFLAGS)
|
||||
AC_SUBST(LIBCXXFLAGS)
|
||||
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# look for 'ar' the proper way
|
||||
#AC_PATH_PROG(AR,ar,[echo archiver ar not found re-run configure ; false],$PATH:/bin:/usr/bin:/usr/ccs/bin)
|
||||
AC_CHECK_TOOL(AR, ar)
|
||||
if test "x$AR" = "x"; then
|
||||
AC_MSG_ERROR(Archiver ar not found. Set AR= or fix PATH)
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to enable renaming of symbols])
|
||||
enabled=yes
|
||||
U_DISABLE_RENAMING=0
|
||||
@ -414,7 +364,9 @@ AC_ARG_ENABLE(renaming,
|
||||
[ --enable-renaming add a version suffix to symbols [default=yes]],
|
||||
[ case "${enableval}" in
|
||||
yes|"") enabled=yes ;;
|
||||
no) enabled=no; U_DISABLE_RENAMING=1 ;;
|
||||
no) enabled=no; U_DISABLE_RENAMING=1;
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1"
|
||||
;;
|
||||
*) ;;
|
||||
esac],
|
||||
)
|
||||
@ -427,7 +379,9 @@ U_ENABLE_TRACING=0
|
||||
AC_ARG_ENABLE(tracing,
|
||||
[ --enable-tracing enable function and data tracing [default=no]],
|
||||
[ case "${enableval}" in
|
||||
yes|"") enabled=yes; U_ENABLE_TRACING=1 ;;
|
||||
yes|"") enabled=yes;
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1";
|
||||
U_ENABLE_TRACING=1 ;;
|
||||
no) enabled=no; U_ENABLE_TRACING=0 ;;
|
||||
*) ;;
|
||||
esac],
|
||||
@ -437,40 +391,43 @@ AC_SUBST(U_ENABLE_TRACING)
|
||||
|
||||
|
||||
U_ENABLE_DYLOAD=1
|
||||
enable=yes
|
||||
AC_MSG_CHECKING([whether to enable dynamic loading of plugins])
|
||||
enabled=check
|
||||
AC_ARG_ENABLE(dyload,
|
||||
[ --disable-dyload disable dynamic loading [default=no]],
|
||||
[ case "${enableval}" in
|
||||
yes|"")
|
||||
U_ENABLE_DYLOAD=1
|
||||
enabled=check ;;
|
||||
enable=yes
|
||||
;;
|
||||
no)
|
||||
U_ENABLE_DYLOAD=0;
|
||||
enabled=disabled ;;
|
||||
enable=no;
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0";
|
||||
;;
|
||||
*) ;;
|
||||
esac],
|
||||
)
|
||||
AC_MSG_RESULT($enable)
|
||||
AC_SUBST(U_ENABLE_DYLOAD)
|
||||
|
||||
# goes into icucfg.h
|
||||
AC_CHECK_HEADERS([dlfcn.h])
|
||||
U_CHECK_DYLOAD=0
|
||||
#AC_MSG_RESULT($enabled)
|
||||
if test "$enabled" = "check"; then
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
AC_CHECK_FUNCS([dlopen])
|
||||
U_CHECK_DYLOAD=1
|
||||
if test "$enable" = "yes"; then
|
||||
AC_CHECK_HEADERS([dlfcn.h])
|
||||
#AC_MSG_RESULT($enabled)
|
||||
AC_SEARCH_LIBS([dlopen], [dl])
|
||||
AC_CHECK_FUNCS([dlopen])
|
||||
|
||||
if test "x$ac_cv_func_dlopen" != xyes; then
|
||||
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_CHECK_DYLOAD)
|
||||
|
||||
# Check for miscellanous functions.
|
||||
# These only go into common/icucfg.h and are NOT exported with ICU builds.
|
||||
# So, use for putil / tools only.
|
||||
# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
|
||||
# rerun 'autoheader' to regenerate icucfg.h.in
|
||||
AC_CHECK_FUNCS([gettimeofday])
|
||||
|
||||
|
||||
# Check whether to use the evil rpath or not
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --enable-rpath use rpath when linking [default is only if necessary]],
|
||||
@ -484,43 +441,17 @@ AC_ARG_ENABLE(rpath,
|
||||
AC_SUBST(ENABLE_RPATH)
|
||||
|
||||
|
||||
# set up U_INLINE.
|
||||
# Copy the definition of AC_C_INLINE, with slight mods.
|
||||
#
|
||||
AC_CACHE_CHECK([for definition of U_INLINE for C], ac_cv_c_inline,
|
||||
[ac_cv_c_inline=no
|
||||
for ac_kw in inline __inline__ __inline; do
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;} $ac_kw int foo() {]])],[ac_cv_c_inline=$ac_kw; break],[])
|
||||
done
|
||||
])
|
||||
case "$ac_cv_c_inline" in
|
||||
yes) U_INLINE= "inline" ;;
|
||||
no ) U_INLINE= ;;
|
||||
*) U_INLINE=$ac_cv_c_inline ;;
|
||||
esac
|
||||
AC_SUBST(U_INLINE)
|
||||
|
||||
# set up U_HAVE_STD_STRING.
|
||||
# Copy the definition of AC_C_INLINE, with slight mods.
|
||||
#
|
||||
U_HAVE_STD_STRING=0
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_MSG_CHECKING([[if we have a C++ compiler]])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no])
|
||||
if test $cxx_okay = yes
|
||||
then
|
||||
AC_MSG_RESULT([[congratulations]])
|
||||
else
|
||||
AC_MSG_RESULT([[no]])
|
||||
AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]])
|
||||
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_LANG_POP([C++])
|
||||
@ -634,6 +565,8 @@ AC_MSG_RESULT($ac_cv_func_mmap_ok)
|
||||
if test $ac_cv_func_mmap_ok = yes
|
||||
then
|
||||
HAVE_MMAP=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_MMAP)
|
||||
|
||||
@ -676,6 +609,7 @@ AC_MSG_RESULT($GENCCODE_ASSEMBLY)
|
||||
AC_CHECK_HEADERS(inttypes.h)
|
||||
if test $ac_cv_header_inttypes_h = no; then
|
||||
U_HAVE_INTTYPES_H=0
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
|
||||
else
|
||||
U_HAVE_INTTYPES_H=1
|
||||
fi
|
||||
@ -683,6 +617,7 @@ if test "$CC" = ccc; then
|
||||
AC_MSG_RESULT("C compiler set to CCC ${CC}" )
|
||||
case "${host}" in
|
||||
alpha*-*-*) U_HAVE_INTTYPES_H=0;
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -690,79 +625,14 @@ AC_SUBST(U_HAVE_INTTYPES_H)
|
||||
|
||||
AC_CHECK_HEADERS(dirent.h)
|
||||
if test $ac_cv_header_dirent_h = no; then
|
||||
U_HAVE_DIRENT_H=0
|
||||
U_HAVE_DIRENT_H=0
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0"
|
||||
else
|
||||
U_HAVE_DIRENT_H=1
|
||||
fi
|
||||
|
||||
AC_SUBST(U_HAVE_DIRENT_H)
|
||||
|
||||
|
||||
AC_ARG_WITH(iostream,
|
||||
[ --with-iostream=version specify the version of iostream to use (none, old, std, auto) [default=auto]],
|
||||
[case "${withval}" in
|
||||
none) streams=none ;;
|
||||
old) streams=198506 ;;
|
||||
std) streams=199711 ;;
|
||||
auto) streams= ;;
|
||||
*) AC_MSG_ERROR(bad value ${withval} for --with-iostream) ;;
|
||||
esac],
|
||||
[streams=])
|
||||
|
||||
U_IOSTREAM_SOURCE=0
|
||||
if test x$streams != xnone
|
||||
then
|
||||
AC_LANG_PUSH(C++)
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
case "${icu_cv_host_frag}" in
|
||||
mh-hpux-acc)
|
||||
CXXFLAGS="${CXXFLAGS} -AA"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_CHECKING([for iostream usability])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <iostream>]], [[]])],[ac_cv_header_iostream=yes],[ac_cv_header_iostream=no])
|
||||
if test $icu_cv_host_frag = mh-cygwin-msvc
|
||||
then
|
||||
# <iostream> is always there on Windows.
|
||||
# We do this to prevent the C++ preprocessor from being used because
|
||||
# autoconf can't deal with the Windows C++ preprocessor
|
||||
ac_cv_header_iostream=yes
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_header_iostream)
|
||||
if test $ac_cv_header_iostream = yes
|
||||
then
|
||||
U_IOSTREAM_SOURCE=199711
|
||||
else
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
AC_MSG_CHECKING([whether ostream in iostream.h is really defined])
|
||||
AC_CACHE_VAL(ac_cv_iostream_ok,
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream.h>]], [[ostream &testout = cout; testout << "test" << endl;]])],[ac_cv_iostream_ok=yes],[ac_cv_iostream_ok=no]))
|
||||
AC_MSG_RESULT($ac_cv_iostream_ok)
|
||||
if test $ac_cv_iostream_ok = yes
|
||||
then
|
||||
U_IOSTREAM_SOURCE=198506
|
||||
fi
|
||||
fi
|
||||
if test x$streams != x
|
||||
then
|
||||
if test $U_IOSTREAM_SOURCE -ge $streams
|
||||
then
|
||||
U_IOSTREAM_SOURCE=$streams
|
||||
case "${icu_cv_host_frag}" in
|
||||
mh-hpux-acc)
|
||||
if test $U_IOSTREAM_SOURCE -lt 199711; then
|
||||
CXXFLAGS=${OLD_CXXFLAGS}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_ERROR(${withval} iostream is not available)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_IOSTREAM_SOURCE)
|
||||
AC_LANG_POP
|
||||
|
||||
# Check for endianness
|
||||
AC_C_BIGENDIAN()
|
||||
if test $ac_cv_c_bigendian = no; then
|
||||
@ -790,6 +660,12 @@ if test $U_HAVE_NL_LANGINFO -eq 1; then
|
||||
then
|
||||
U_HAVE_NL_LANGINFO_CODESET=1
|
||||
U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
|
||||
if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET"
|
||||
then
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}"
|
||||
fi
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_HAVE_NL_LANGINFO_CODESET)
|
||||
@ -807,6 +683,7 @@ AC_MSG_RESULT($ac_cv_namespace_ok)
|
||||
U_HAVE_NAMESPACE=1
|
||||
if test $ac_cv_namespace_ok = no
|
||||
then
|
||||
AC_MSG_ERROR(Namespace support is required to build ICU.)
|
||||
U_HAVE_NAMESPACE=0
|
||||
fi
|
||||
AC_SUBST(U_HAVE_NAMESPACE)
|
||||
@ -845,36 +722,22 @@ then
|
||||
if test $ac_cv_override_placement_new_ok = yes
|
||||
then
|
||||
U_HAVE_PLACEMENT_NEW=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0"
|
||||
fi
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0"
|
||||
fi
|
||||
AC_SUBST(U_OVERRIDE_CXX_ALLOCATION)
|
||||
AC_SUBST(U_HAVE_PLACEMENT_NEW)
|
||||
|
||||
# gcc atomic built-in functions check
|
||||
# AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],,
|
||||
AC_LANG(C)
|
||||
AC_MSG_CHECKING([for gcc atomic functions])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
void *p;
|
||||
int i;
|
||||
]],
|
||||
[[
|
||||
__sync_fetch_and_add(&i, 1);
|
||||
__sync_fetch_and_sub(&i, 1);
|
||||
__sync_val_compare_and_swap(&p, 0, 0);
|
||||
]]
|
||||
)],
|
||||
[U_HAVE_GCC_ATOMICS=1; AC_MSG_RESULT([yes])],
|
||||
[U_HAVE_GCC_ATOMICS=0; AC_MSG_RESULT([no])])
|
||||
AC_SUBST(U_HAVE_GCC_ATOMICS)
|
||||
|
||||
AC_LANG(C)
|
||||
AC_CHECK_FUNC(popen)
|
||||
if test x$ac_cv_func_popen = xyes
|
||||
then
|
||||
U_HAVE_POPEN=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0"
|
||||
U_HAVE_POPEN=0
|
||||
fi
|
||||
AC_SUBST(U_HAVE_POPEN)
|
||||
@ -891,6 +754,8 @@ else
|
||||
then
|
||||
U_TZSET=_tzset
|
||||
U_HAVE_TZSET=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_HAVE_TZSET)
|
||||
@ -917,6 +782,8 @@ else
|
||||
if test $ac_cv_var__tzname = yes; then
|
||||
U_TZNAME=_tzname
|
||||
U_HAVE_TZNAME=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_HAVE_TZNAME)
|
||||
@ -947,6 +814,8 @@ else
|
||||
if test $ac_cv_var__timezone = yes; then
|
||||
U_TIMEZONE=_timezone
|
||||
U_HAVE_TIMEZONE=1
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -964,60 +833,36 @@ AC_CHECK_TYPE(int64_t,signed long long)
|
||||
AC_CHECK_TYPE(uint64_t,unsigned long long)
|
||||
|
||||
if test $ac_cv_type_int8_t = no; then
|
||||
HAVE_INT8_T=0
|
||||
else
|
||||
HAVE_INT8_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_INT8_T)
|
||||
|
||||
if test $ac_cv_type_uint8_t = no; then
|
||||
HAVE_UINT8_T=0
|
||||
else
|
||||
HAVE_UINT8_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_UINT8_T)
|
||||
|
||||
if test $ac_cv_type_int16_t = no; then
|
||||
HAVE_INT16_T=0
|
||||
else
|
||||
HAVE_INT16_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_INT16_T)
|
||||
|
||||
if test $ac_cv_type_uint16_t = no; then
|
||||
HAVE_UINT16_T=0
|
||||
else
|
||||
HAVE_UINT16_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_UINT16_T)
|
||||
|
||||
if test $ac_cv_type_int32_t = no; then
|
||||
HAVE_INT32_T=0
|
||||
else
|
||||
HAVE_INT32_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_INT32_T)
|
||||
|
||||
if test $ac_cv_type_uint32_t = no; then
|
||||
HAVE_UINT32_T=0
|
||||
else
|
||||
HAVE_UINT32_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_UINT32_T)
|
||||
|
||||
if test $ac_cv_type_int64_t = no; then
|
||||
HAVE_INT64_T=0
|
||||
else
|
||||
HAVE_INT64_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_INT64_T)
|
||||
|
||||
if test $ac_cv_type_uint64_t = no; then
|
||||
HAVE_UINT64_T=0
|
||||
else
|
||||
HAVE_UINT64_T=1
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0"
|
||||
fi
|
||||
AC_SUBST(HAVE_UINT64_T)
|
||||
|
||||
# Do various wchar_t related checks
|
||||
AC_CHECK_HEADER(wchar.h)
|
||||
@ -1025,6 +870,7 @@ if test "$ac_cv_header_wchar_h" = no
|
||||
then
|
||||
U_HAVE_WCHAR_H=0
|
||||
U_HAVE_WCSCPY=0
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0"
|
||||
else
|
||||
AC_DEFINE([HAVE_WCHAR_H], [1], [wchar.h was found.])
|
||||
U_HAVE_WCHAR_H=1
|
||||
@ -1034,6 +880,7 @@ else
|
||||
U_HAVE_WCSCPY=1
|
||||
else
|
||||
U_HAVE_WCSCPY=0
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_HAVE_WCHAR_H)
|
||||
@ -1055,7 +902,6 @@ if test $U_SIZEOF_WCHAR_T = 0; then
|
||||
AC_MSG_ERROR(There is wchar.h but the size of wchar_t is 0)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(U_SIZEOF_WCHAR_T)
|
||||
|
||||
AC_MSG_CHECKING([for UTF-16 string literal support])
|
||||
U_CHECK_UTF16_STRING=1
|
||||
@ -1095,7 +941,7 @@ case "${host}" in
|
||||
# Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
|
||||
# we only use this macro within ICU.
|
||||
# If an ICU user uses icu-config, this feature will be enabled.
|
||||
CPPFLAGS="${CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
|
||||
U_CHECK_UTF16_STRING=0
|
||||
fi
|
||||
fi
|
||||
@ -1269,6 +1115,7 @@ if test "$ICULIBSUFFIX" != ""
|
||||
then
|
||||
U_HAVE_LIB_SUFFIX=1
|
||||
ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
|
||||
else
|
||||
U_HAVE_LIB_SUFFIX=0
|
||||
fi
|
||||
@ -1335,18 +1182,11 @@ platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name"
|
||||
AC_SUBST(platform_make_fragment_name)
|
||||
AC_SUBST(platform_make_fragment)
|
||||
|
||||
U_USING_CYGWIN_MSVC=0
|
||||
if test "${icu_cv_host_frag}" = "mh-cygwin-msvc"; then
|
||||
U_USING_CYGWIN_MSVC=1
|
||||
fi
|
||||
AC_SUBST(U_USING_CYGWIN_MSVC)
|
||||
|
||||
if test "${FORCE_LIBS}" != ""; then
|
||||
echo " *** Overriding automatically chosen [LIBS=$LIBS], using instead [FORCE_LIBS=${FORCE_LIBS}]" 1>&6
|
||||
LIBS=${FORCE_LIBS}
|
||||
fi
|
||||
|
||||
|
||||
# Now that we're done using CPPFLAGS etc. for tests, we can change it
|
||||
# for build.
|
||||
|
||||
@ -1355,8 +1195,21 @@ then
|
||||
CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
|
||||
CFLAGS="$CFLAGS \$(THREADSCFLAGS)"
|
||||
CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)"
|
||||
else
|
||||
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DICU_USE_THREADS=0"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCFLAGS)
|
||||
AC_SUBST(LIBCXXFLAGS)
|
||||
|
||||
# append all config cppflags
|
||||
CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS"
|
||||
|
||||
echo "CPPFLAGS=$CPPFLAGS"
|
||||
echo "CFLAGS=$CFLAGS"
|
||||
echo "CXXFLAGS=$CXXFLAGS"
|
||||
|
||||
|
||||
# output the Makefiles
|
||||
AC_CONFIG_FILES([icudefs.mk \
|
||||
Makefile \
|
||||
|
Loading…
Reference in New Issue
Block a user