Now checks for Xerces
authorJulian Missig <julianm@src.gnome.org>
Tue, 12 Jun 2001 21:58:16 +0000 (21:58 +0000)
committerJulian Missig <julianm@src.gnome.org>
Tue, 12 Jun 2001 21:58:16 +0000 (21:58 +0000)
svn path=/trunk/; revision=1787

macros/xerces.m4

index a78db25..e502c8e 100644 (file)
@@ -22,9 +22,12 @@ AC_DEFUN([AC_CHECK_XERCES],[
          fi
        ])
 
+       AC_MSG_CHECKING(for xerces)
        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")
+                       if test "x$prefix" != "xNONE"; then
+                               XERCESCROOT="$prefix"
+                       fi
                fi
                XERCES_INCLUDE_DIR=$XERCESCROOT/include
        fi
@@ -36,6 +39,12 @@ AC_DEFUN([AC_CHECK_XERCES],[
        XERCES_VER=`ls $XERCES_LIB_DIR/libxerces*.so | 
                    perl macros/xerces-version.pl`
 
+       if test "x$XERCES_VER" = "x0_0"; then
+               AC_MSG_ERROR("You must have Xerces installed and set XERCESCROOT or use --with-xerces")
+       else
+               AC_MSG_RESULT(found)
+       fi
+
        XERCES_LIBNAME=xerces-c
        XERCES_LIBRARY_NAMES=-l${XERCES_LIBNAME}${XERCES_VER}
        XERCES_LIBRARY_SEARCH_PATHS=-L${XERCES_LIB_DIR}