You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2006/10/09 14:34:13 UTC
svn commit: r454355 - /xerces/c/trunk/configure.ac
Author: amassari
Date: Mon Oct 9 05:34:13 2006
New Revision: 454355
URL: http://svn.apache.org/viewvc?view=rev&rev=454355
Log:
- Moved required autoconf version to 2.60
- Changed folder for compatibility routines from xerces/compat to lib
- Added /GX to the compiler switches of MSVC when used on Cygwin
- If the platform uses the Windows SDK, detect if it requires XMLCh to be defined as wchar_t
Modified:
xerces/c/trunk/configure.ac
Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?view=diff&rev=454355&r1=454354&r2=454355
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Mon Oct 9 05:34:13 2006
@@ -22,10 +22,10 @@
# $Id$
#
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
AC_INIT([xercesc],[3.0])
AC_CONFIG_SRCDIR([src/Makefile.am])
-AC_CONFIG_LIBOBJ_DIR([xercesc/compat])
+AC_CONFIG_LIBOBJ_DIR([lib])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h src/xercesc/util/Xerces_autoconf_config.hpp])
@@ -160,6 +160,18 @@
]
)
+case $CXX in
+'cl.exe' | 'cl')
+ CXXFLAGS="`echo $CXXFLAGS | $SED 's%-g%/Od%'` /nologo /GX"
+ ;;
+esac
+
+case $CC in
+'cl.exe' | 'cl')
+ CFLAGS="`echo $CFLAGS | $SED 's%-g%/Od%'` /nologo /GX"
+ ;;
+esac
+
case $host in
*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows* )
platform_export="__declspec(dllexport)"
@@ -186,7 +198,23 @@
AS_IF([test $ac_cv_cxx_have_lstring],
AC_DEFINE([XERCES_LSTRSUPPORT], 1, [Define if there is support for L"widestring"]))
-AC_DEFINE_UNQUOTED([XERCES_XMLCH_T], [$xerces_cv_type_u16bit_int], [Define to the 16 bit type used to represent Xerces UTF-16 characters])
+# check if the Windows API is defined as using wchar_t or unsigned short; if it's wchar_t, we need to map XMLCh to be wchar_t
+# (this is safe because on Windows wchar_t is used to store UTF-16 codepoints, while it is not true on Unix)
+AC_MSG_CHECKING([whether the Windows SDK is available and using wchar_t as wide string])
+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <windows.h>
+ wchar_t file[] = L"dummy.file";]],
+ [[DeleteFileW(file);]])],
+ [
+ xerces_cv_type_xmlch=wchar_t
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ xerces_cv_type_xmlch=$xerces_cv_type_u16bit_int
+ AC_MSG_RESULT([no])
+ ]
+ )
+
+AC_DEFINE_UNQUOTED([XERCES_XMLCH_T], [$xerces_cv_type_xmlch], [Define to the 16 bit type used to represent Xerces UTF-16 characters])
AS_IF([test x$ac_cv_type_size_t = xyes],
AC_DEFINE([XERCES_SIZE_T], [size_t], [Define as the appropriate size_t type]),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org