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/04/13 10:55:19 UTC

svn commit: r393768 - /xerces/c/trunk/m4/xerces_msgloader_selection.m4

Author: amassari
Date: Thu Apr 13 01:55:11 2006
New Revision: 393768

URL: http://svn.apache.org/viewcvs?rev=393768&view=rev
Log:
Enable 'configure' to select ICU and Iconv message loaders

Modified:
    xerces/c/trunk/m4/xerces_msgloader_selection.m4

Modified: xerces/c/trunk/m4/xerces_msgloader_selection.m4
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/m4/xerces_msgloader_selection.m4?rev=393768&r1=393767&r2=393768&view=diff
==============================================================================
--- xerces/c/trunk/m4/xerces_msgloader_selection.m4 (original)
+++ xerces/c/trunk/m4/xerces_msgloader_selection.m4 Thu Apr 13 01:55:11 2006
@@ -37,6 +37,42 @@
 		[AC_MSG_RESULT(no)]
 	)
 	
+	# Check for ICU
+	AC_REQUIRE([XERCES_ICU_PREFIX])
+	AC_MSG_CHECKING([whether we support the ICU MsgLoader])
+	list_add=
+	AS_IF([test x"$xerces_cv_icu_prefix" != x], [
+		AC_ARG_ENABLE([msgloader-icu],
+			AS_HELP_STRING([--enable-msgloader-icu],
+				[Enable ICU-based MsgLoader support]),
+			[AS_IF([test x"$enableval" = xyes],
+				[list_add=ICU])],
+			[list_add=icu])
+	])
+	AS_IF([test x"$list_add" != x],
+		[ml_list="$ml_list -$list_add-"; AC_MSG_RESULT(yes)],
+		[AC_MSG_RESULT(no)]
+	)
+
+	# Check for iconv support
+	no_iconv=false
+	AC_CHECK_HEADERS([nl_types.h], [], [no_iconv=true])
+	AC_CHECK_FUNCS([catopen catclose catgets], [], [no_iconv=true])
+	AC_MSG_CHECKING([whether we can support the iconv MsgLoader])
+	list_add=
+	AS_IF([! $no_iconv], [
+		AC_ARG_ENABLE([msgloader-iconv],
+			AS_HELP_STRING([--enable-msgloader-iconv],
+				[Enable Iconv-based MsgLoader support]),
+			[AS_IF([test x"$enableval" = xyes],
+				[list_add=ICONV])],
+			[list_add=iconv])
+	])
+	AS_IF([test x"$list_add" != x],
+		[ml_list="$ml_list -$list_add-"; AC_MSG_RESULT(yes)],
+		[AC_MSG_RESULT(no)]
+	)
+
 	# TODO: Add test for additional msgloaders
 	
 	
@@ -56,11 +92,25 @@
 		
 		# Check for each msgloader, in implicit rank order
 		case $ml_list in
+		*-icu-*)
+			AC_DEFINE([XERCES_USE_MSGLOADER_ICU], 1, [Define to use the ICU-based MsgLoader])
+			msgloader=icu
+			LIBS="${LIBS} -L${xerces_cv_icu_prefix}/lib -licuuc -licudata"
+			break
+			;;
+			
 		*-inmemory-*)
 			AC_DEFINE([XERCES_USE_MSGLOADER_INMEMORY], 1, [Define to use the InMemory MsgLoader])
 			msgloader=inmemory
 			break
 			;;
+
+		*-iconv-*)
+			AC_DEFINE([XERCES_USE_MSGLOADER_ICONV], 1, [Define to use the iconv-based MsgLoader])
+			msgloader=iconv
+			break
+			;;
+
 		*)
 			AS_IF([test $i -eq 2], [
 				AC_MSG_RESULT([none])
@@ -76,6 +126,8 @@
 	
 	# Define the auto-make conditionals which determine what actually gets compiled
 	# Note that these macros can't be executed conditionally, which is why they're here, not above.
+	AM_CONDITIONAL([XERCES_USE_MSGLOADER_ICU], 	[test x"$msgloader" = xicu])
+	AM_CONDITIONAL([XERCES_USE_MSGLOADER_ICONV], 	[test x"$msgloader" = xiconv])
 	AM_CONDITIONAL([XERCES_USE_MSGLOADER_INMEMORY],	[test x"$msgloader" = xinmemory])
 	
 	]



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org