Spring cleanup ...: - configure.in Makefile.am config.h.in
Spring cleanup ...:
- configure.in Makefile.am config.h.in xmlversion.h.in: detect if
we need string functions
- trio.[ch] strio.[ch]: embedded the Trio-0.23 string functions
to be able to use them where needed. Applied some changes
to reduce name linking pollution and compile in only what's
needed.
- HTMLtree.c debugXML.c entities.c error.c nanoftp.c valid.c
xlink.c xmlversion.h.in xpath.c: got rid of the #ifdef
for the string manipulation functions
- xmlmemory.[ch]: removed DEBUG_MEMORY_FREED and added it automatically
to the free() function of xmlmemory.c
- entities.c HTMLtree.c parserInternals.c tree.c uri.c valid.c
xinclude.c xmlIO.c xpath.c xpointer.c: removed the MEM_CLEANUP
usage.
Daniel
diff --git a/configure.in b/configure.in
index 553a145..bac5847 100644
--- a/configure.in
+++ b/configure.in
@@ -100,11 +100,15 @@
dnl Checks for library functions.
AC_FUNC_STRFTIME
-AC_CHECK_FUNCS(strdup strndup strerror snprintf vsnprintf)
+AC_CHECK_FUNCS(strdup strndup strerror)
AC_CHECK_FUNCS(finite isnand fp_class class fpclass)
AC_CHECK_FUNCS(strftime localtime)
AC_CHECK_FUNCS(stat _stat)
+dnl Checking the standard string functions availability
+AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscanf,,
+ NEED_TRIO=1)
+
dnl Checks for inet libraries:
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
@@ -240,6 +244,19 @@
CFLAGS="-Wall -g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline "
dnl -Wcast-qual -ansi
fi
+
+dnl
+dnl Check for trio string functions
+dnl
+
+if test "${NEED_TRIO}" = "1" ; then
+ echo Adding trio library for string functions
+ WITH_TRIO=1
+else
+ WITH_TRIO=0
+fi
+AC_SUBST(WITH_TRIO)
+
dnl
dnl Aloow to disable various pieces
dnl