From 52c09b16bb46c10d077702547bdc832fe95827d5 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Mon, 24 Sep 2001 23:59:49 +0000 Subject: [PATCH] ICU-1075 UNIX builds, add U_INLINE setting from configure script. Also remove configure option for static reference to data dll. (Always there, no option.) X-SVN-Rev: 5908 --- icu4c/source/common/unicode/platform.h.in | 5 ++- icu4c/source/configure.in | 37 ++++++++++++----------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/icu4c/source/common/unicode/platform.h.in b/icu4c/source/common/unicode/platform.h.in index 0a72b62602d..d4d35d0f14c 100644 --- a/icu4c/source/common/unicode/platform.h.in +++ b/icu4c/source/common/unicode/platform.h.in @@ -183,7 +183,10 @@ typedef unsigned short uint16_t; /* Code alignment and C function inlining */ /*===========================================================================*/ -#define U_INLINE +#ifndef U_INLINE +#define U_INLINE @U_INLINE@ +#endif + #define U_ALIGN_CODE(n) /*===========================================================================*/ diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index b61c3c93db6..af0d0ab618e 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -4,7 +4,7 @@ dnl Copyright (c) 1999-2000, International Business Machines Corporation and dnl others. All Rights Reserved. dnl Stephen F. Booth, heavily modified by Yves and others -dnl $Id: configure.in,v 1.118 2001/09/21 03:41:20 yves-oss Exp $ +dnl $Id: configure.in,v 1.119 2001/09/24 23:59:49 aheninger-oss Exp $ dnl Process this file with autoconf to produce a configure script AC_INIT(common/unicode/utypes.h) @@ -170,22 +170,6 @@ AC_SUBST(ENABLE_STATIC) AC_PROG_RANLIB -dnl Check whether to make static reference to the data dll -AC_MSG_CHECKING([whether to statically reference common data library]) -AC_ARG_ENABLE(refdata, - [ --enable-refdata compile in a reference to the common data library [default=yes]], - [ case "#{enableval}" in - yes|"") enabled=yes; ENABLE_REFDATA=YES ;; - no) enabled=no ;; - *) enabled=yes; ENBABLE_REFDATA=YES ;; - esac], - [enabled=yes; ENABLE_REFDATA=YES] -) -AC_MSG_RESULT($enabled) -AC_SUBST(ENABLE_REFDATA) - - - dnl Check whether to use the evil rpath or not AC_ARG_ENABLE(rpath, @@ -199,6 +183,25 @@ AC_ARG_ENABLE(rpath, ) AC_SUBST(ENABLE_RPATH) + +dnl set up U_INLINE. +dnl Copy the definition of AC_C_INLINE, with slight mods. +dnl +AC_MSG_CHECKING([for definition of U_INLINE]) +AC_CACHE_CHECK([for inline], ac_cv_c_inline, +[ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + AC_TRY_COMPILE(, [} $ac_kw 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_MSG_RESULT($U_INLINE); +AC_SUBST(U_INLINE) + threads=true dnl Enable/disable threads