mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
dd autoconf stuff for ICU
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30850 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2fd885d9b9
commit
d5677b2475
7 changed files with 6112 additions and 5195 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2010-06-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSLocale.m
|
||||
* Headers/Additions/GNUstepBase/config.h.in
|
||||
* config/icu.m4
|
||||
* configure.ac
|
||||
* configure
|
||||
* config.mak.in
|
||||
Autoconf support for ICU
|
||||
|
||||
2010-06-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/Foundation.h: add NSLocale
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/* Headers/Additions/GNUstepBase/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define if SO_REUSEADDR is broken on this system */
|
||||
#undef BROKEN_SO_REUSEADDR
|
||||
|
||||
|
@ -594,6 +597,15 @@
|
|||
/* Define if libobjc has the _objc_unexpected_exception callback */
|
||||
#undef HAVE_UNEXPECTED
|
||||
|
||||
/* Define to 1 if you have the <unicode/ucurr.h> header file. */
|
||||
#undef HAVE_UNICODE_UCURR_H
|
||||
|
||||
/* Define to 1 if you have the <unicode/ulocdata.h> header file. */
|
||||
#undef HAVE_UNICODE_ULOCDATA_H
|
||||
|
||||
/* Define to 1 if you have the <unicode/uloc.h> header file. */
|
||||
#undef HAVE_UNICODE_ULOC_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
|
@ -690,26 +702,44 @@
|
|||
/* Define if using the libffi library for invocations */
|
||||
#undef USE_LIBFFI
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Define if vasprintf returns the length printed */
|
||||
#undef VASPRINTF_RETURNS_LENGTH
|
||||
|
||||
/* Define if vsprintf returns the length printed */
|
||||
#undef VSPRINTF_RETURNS_LENGTH
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
/* 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 1 if on MINIX. */
|
||||
|
@ -722,17 +752,6 @@
|
|||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Enable extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
|
|
|
@ -71,7 +71,7 @@ NSString * const NSPersianCalendar = @"NSPersianCalendar";
|
|||
NSString * const NSIndianCalendar = @"NSIndianCalendar";
|
||||
NSString * const NSISO8601Calendar = @"NSISO8601Calendar";
|
||||
|
||||
#if HAVE_ICU
|
||||
#if HAVE_UNICODE_ULOC_H
|
||||
|
||||
#include <unicode/uloc.h>
|
||||
#include <unicode/ulocdata.h>
|
||||
|
|
|
@ -21,6 +21,7 @@ OBJC2RUNTIME=@OBJC2RUNTIME@
|
|||
OBJCSYNC=@OBJCSYNC@
|
||||
WARN_FLAGS=@WARN_FLAGS@
|
||||
|
||||
HAVE_ICU=@HAVE_ICU@
|
||||
HAVE_INET_PTON=@HAVE_INET_PTON@
|
||||
HAVE_INET_NTOP=@HAVE_INET_NTOP@
|
||||
HAVE_OBJC_SYNC_ENTER=@HAVE_OBJC_SYNC_ENTER@
|
||||
|
|
37
config/icu.m4
Normal file
37
config/icu.m4
Normal file
|
@ -0,0 +1,37 @@
|
|||
AC_DEFUN([AC_CHECK_ICU], [
|
||||
ok=no
|
||||
|
||||
if test -z "$ICU_CONFIG"; then
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no)
|
||||
fi
|
||||
|
||||
if test "$ICU_CONFIG" = "no" ; then
|
||||
echo "Could not find the icu-config script."
|
||||
echo "Please ensure that it is in your path."
|
||||
echo "See http://site.icu-project.org/ for help."
|
||||
else
|
||||
ICU_VERSION=`$ICU_CONFIG --version`
|
||||
AC_MSG_CHECKING(for ICU >= $1)
|
||||
found=`expr $ICU_VERSION \>= $1`
|
||||
if test "$found" = "1" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ok=yes
|
||||
|
||||
AC_MSG_CHECKING(ICU_LIBS)
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags-libsonly`
|
||||
AC_MSG_RESULT($ICU_LIBS)
|
||||
else
|
||||
ICU_LIBS=""
|
||||
## Either perform custom action or print error message
|
||||
ifelse([$3], ,echo "can't find ICU >= $1 (got $ICU_VERSION)",)
|
||||
fi
|
||||
|
||||
AC_SUBST(ICU_LIBS)
|
||||
fi
|
||||
|
||||
if test $ok = yes; then
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
ifelse([$3], , AC_MSG_ERROR([Library requirements (ICU) not met.]), [$3])
|
||||
fi
|
||||
])
|
19
configure.ac
19
configure.ac
|
@ -30,6 +30,7 @@ builtin(include, config/pathxml.m4)dnl
|
|||
builtin(include, config/pathtls.m4)dnl
|
||||
builtin(include, config/codeset.m4)dnl
|
||||
builtin(include, config/addlibrarypath.m4)dnl
|
||||
builtin(include, config/icu.m4)dnl
|
||||
|
||||
AC_INIT
|
||||
AC_PREREQ([2.60])
|
||||
|
@ -2600,6 +2601,24 @@ if test $enable_zeroconf = yes; then
|
|||
fi
|
||||
AC_SUBST(HAVE_MDNS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for International Components for Unicode
|
||||
#--------------------------------------------------------------------
|
||||
HAVE_ICU=0
|
||||
AC_ARG_ENABLE(icu,
|
||||
[ --disable-icu Disable International Components for Unicode],,
|
||||
enable_icu=yes)
|
||||
|
||||
if test $enable_icu = yes; then
|
||||
AC_CHECK_ICU(4.0, have_icu=yes, have_icu=no)
|
||||
if test "$have_icu" = "yes"; then
|
||||
AC_CHECK_HEADERS(unicode/uloc.h unicode/ulocdata.h unicode/ucurr.h)
|
||||
LIBS="$LIBS $ICU_LIBS"
|
||||
HAVE_ICU=1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_ICU)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check GMP for NSDecimal
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue