summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hughes Chatham <chatham@src.gnome.org>2001-06-07 13:54:51 +0000
committerAndrew Hughes Chatham <chatham@src.gnome.org>2001-06-07 13:54:51 +0000
commit4ad30368a67b78ac8dfc732a0ef6a1baf718f5c6 (patch)
tree83656c2dfdeea8fd45b079447a1f9ca4f84b3f11
parent0d1dc2b46ded02314f0d2f574af67e8e3e86e9f7 (diff)
downloadgnome-common-4ad30368a67b78ac8dfc732a0ef6a1baf718f5c6.tar.gz
Added .cvsignore files and changed the configure script so that it will
detect the presence of uuid/uuid.h and also detect the right version of xerces. Removed as many references to XERCESCROOT as possible (all of them, I believe). svn path=/trunk/; revision=1783
-rw-r--r--macros/xerces-version.pl13
-rw-r--r--macros/xerces.m456
2 files changed, 69 insertions, 0 deletions
diff --git a/macros/xerces-version.pl b/macros/xerces-version.pl
new file mode 100644
index 0000000..5c21b4e
--- /dev/null
+++ b/macros/xerces-version.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+$maj = 0;
+$min = 0;
+while (<>) {
+ if (/xerces-c(\d+)_(\d+)\.so$/) {
+ if ($1 > $maj || (\\$1 == $maj && \$2 > $min)) {
+ $maj = $1;
+ $min = $2;
+ }
+ }
+}
+print $maj,"_",$min
diff --git a/macros/xerces.m4 b/macros/xerces.m4
new file mode 100644
index 0000000..a78db25
--- /dev/null
+++ b/macros/xerces.m4
@@ -0,0 +1,56 @@
+dnl Curses detection: Munged from curses.m4 which was munged from
+dnl Midnight Commander's configure.in
+dnl
+dnl What it does:
+dnl =============
+dnl
+dnl - Determine which version of xerces is installed on the system
+dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that
+dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in
+dnl Makefile.in's
+
+AC_DEFUN([AC_CHECK_XERCES],[
+ has_xerces=false
+
+ CFLAGS=${CFLAGS--O}
+
+ AC_ARG_WITH(xerces,
+ [ --with-xerces=dir Specify the Xerces directory],[
+ if test x$withval != x; then
+ XERCES_INCLUDE_DIR="$withval/include"
+ XERCES_LIB_DIR=$withval/lib
+ fi
+ ])
+
+ if test x$XERCES_INCLUDE_DIR = x; then
+ if test x$XERCESCROOT = x; then
+ AC_MSG_ERROR("You must set XERCESCROOT or use --with-xerces")
+ fi
+ XERCES_INCLUDE_DIR=$XERCESCROOT/include
+ fi
+
+ if test x$XERCES_LIB_DIR = x; then
+ XERCES_LIB_DIR=$XERCESCROOT/lib
+ fi
+
+ XERCES_VER=`ls $XERCES_LIB_DIR/libxerces*.so |
+ perl macros/xerces-version.pl`
+
+ XERCES_LIBNAME=xerces-c
+ XERCES_LIBRARY_NAMES=-l${XERCES_LIBNAME}${XERCES_VER}
+ XERCES_LIBRARY_SEARCH_PATHS=-L${XERCES_LIB_DIR}
+ XERCES_INCLUDE=-I${XERCES_INCLUDE_DIR}
+
+ AC_SUBST(XERCES_LIBRARY_NAMES)
+ AC_SUBST(XERCES_LIBNAME)
+ AC_SUBST(XERCES_INCLUDE)
+ AC_SUBST(XERCES_INCLUDE_DIR)
+ AC_SUBST(XERCES_VER)
+ AC_SUBST(XERCES_LIBRARY_SEARCH_PATHS)
+
+ if test -f "${XERCES_INCLUDE_DIR}/util/XMLUniDefs.hpp"; then
+ AC_DEFINE(HAVE_XMLUNIDEFS)
+ fi
+])
+
+