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 2008/01/09 09:49:15 UTC
svn commit: r610307 - /xerces/c/trunk/configure.ac
Author: amassari
Date: Wed Jan 9 00:49:14 2008
New Revision: 610307
URL: http://svn.apache.org/viewvc?rev=610307&view=rev
Log:
The default way to check for mbrlen, wcsrtombs and mbsrtowcs reported a false positive on HP-UX with gcc
Modified:
xerces/c/trunk/configure.ac
Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?rev=610307&r1=610306&r2=610307&view=diff
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Wed Jan 9 00:49:14 2008
@@ -60,6 +60,10 @@
esac
fi
+#skip detection of Fortran
+m4_undefine([AC_PROG_F77])
+m4_defun([AC_PROG_F77],[])
+
AC_PROG_LN_S
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
@@ -119,11 +123,51 @@
memmove memset nl_langinfo setlocale localeconv \
strcasecmp strncasecmp stricmp strnicmp strchr strdup \
strrchr strstr strtol strtoul \
- towupper towlower \
- mblen mbrlen wcsrtombs mbsrtowcs \
+ towupper towlower mblen \
wcsupr wcslwr wcsnicmp wcsicmp \
])
-
+
+# The check for mbrlen, wcsrtombs and mbsrtowcs gives a false
+# positive on HP-UX, so we use a different snippet to set the
+# corresponding macro
+AC_MSG_CHECKING([for mbrlen])
+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>]],
+ [[mbstate_t st; mbrlen( "t", 5, &st );]])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_MBRLEN], 1, [Define to 1 if you have the `mbrlen' function.])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_MBRLEN], 0, [Define to 1 if you have the `mbrlen' function.])
+ ]
+ )
+AC_MSG_CHECKING([for wcsrtombs])
+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>]],
+ [[mbstate_t st; char buffer[2]; wchar_t src[2]; wcsrtombs(buffer, &src, 2, &st);]])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 1, [Define to 1 if you have the `wcsrtombs' function.])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_WCSRTOMBS], 0, [Define to 1 if you have the `wcsrtombs' function.])
+ ]
+ )
+AC_MSG_CHECKING([for mbsrtowcs])
+AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <wchar.h>]],
+ [[mbstate_t st; wchar_t buffer[2]; char src[2]; mbsrtowcs(buffer, &src, 2, &st);]])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 1, [Define to 1 if you have the `mbsrtowcs' function.])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_MBSRTOWCS], 0, [Define to 1 if you have the `mbsrtowcs' function.])
+ ]
+ )
+
+
AC_SUBST([SHREXT], [$shrext_cmds])
#
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org