Index: Documents/Makefile.in
===================================================================
--- Documents.orig/Makefile.in
+++ Documents/Makefile.in
@@ -15,7 +15,7 @@
 
 #MKP: adding davlib
 SUBDIRS	= @SUBDIRS@ tools thotlib batch annotlib @DAVDIR@ amaya
-EXTRA_SUBDIRS= redland $(LIBWWW) $(WX_BUILDDIR) $(GL_BUILDDIR)
+EXTRA_SUBDIRS= raptor $(LIBWWW) $(WX_BUILDDIR) $(GL_BUILDDIR)
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
@@ -24,7 +24,7 @@
 
 srcdir	= $(THOTDIR)
 
-default : tools gl @BUILDWXWIDGETS@ @BUILDREDLAND@ thotlib batch amaya_prog print_prog
+default : tools gl @BUILDWXWIDGETS@ @BUILDRAPTOR@ thotlib batch amaya_prog print_prog
 
 amaya : tools thotlib amaya_prog print_prog
 
@@ -253,11 +253,11 @@
 		@($(ECHO) "libwww is installed")
 
 #
-# Rules to build the redland RDF library
+# Rules to build the raptor RDF library
 #
-redland: force
-	$(MAKE) -C redland
-	@($(ECHO) "redland is installed")
+raptor: force
+	$(MAKE) -C raptor
+	@($(ECHO) "raptor is installed")
 
 #
 # Rules to rebuild the libjpeg package
Index: Documents/configure.in
===================================================================
--- Documents.orig/configure.in
+++ Documents/configure.in
@@ -1004,113 +1004,78 @@
 	[with_annot="yes"])
 
 
-#annot need Redland
+#annot need Raptor
 if test "$with_annot" = "yes" ; then
-	with_redland="yes"
+	with_raptor="yes"
 else
-	with_redland="no"
+	with_raptor="no"
 fi
 
-AC_ARG_ENABLE([system-redland],
-	AC_HELP_STRING([--enable-system-redland],[try the redland RDF system library]),
+AC_ARG_ENABLE([system-raptor],
+	AC_HELP_STRING([--enable-system-raptor],[try the raptor RDF system library]),
 	[case "${enableval}" in
-	  yes) with_system_redland="yes";;
-	  no)  with_system_redland="no" ;;
-	  *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-redland) ;;
+	  yes) with_system_raptor="yes";;
+	  no)  with_system_raptor="no" ;;
+	  *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-raptor) ;;
 	esac],
-	[with_system_redland="no"])
+	[with_system_raptor="no"])
 
-#If Redland is needed and we are asked
+#If Raptor is needed and we are asked
 #to use the system library, check if is present
-if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
-    # check to see if we have a redland library
-    AC_PATH_PROG([REDLAND_CONFIG],[redland-config])
-
-    if test "$REDLAND_CONFIG" = "" ; then
-	AC_MSG_WARN(Not using system-provided redland library)
-	with_system_redland="no"
-    else
-
-	AC_MSG_CHECKING(system redland version)
-	redland_min_version=0.9.16
-	REDLAND_VERSION=`$REDLAND_CONFIG --version`
-	redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
-	redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
-	if test $redland_version_dec -lt $redland_min_version_dec; then
-		AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
-		with_system_redland="no"
-	else
-		AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
-		AC_MSG_CHECKING(checking for redland headers)
-		dnl  We should use awk here and remove the -I from the following line
-		dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
-		REDLAND_HEADERS=""
-		if test -e "/usr/include/redland.h" ; then
-			REDLAND_HEADERS="/usr/include";
-		elif test -e "/usr/local/include/redland.h" ; then
-			REDLAND_HEADERS="/usr/local/include";
-		fi
-		if test $REDLAND_HEADERS != ""; then
-			AC_MSG_RESULT(yes - have development version)
-		else
-			AC_MSG_RESULT(no - no development version)
-			with_system_redland="no"
-		fi
-	fi
+if test "$with_raptor" = "yes" -a "$with_system_raptor" = "yes" ; then
+    # check to see if we have a raptor library
+    AC_PATH_PROG([RAPTOR_CONFIG],[raptor-config])
+
+    if test "$RAPTOR_CONFIG" = "" ; then
+	AC_MSG_WARN(Not using system-provided Raptor library)
+	with_system_raptor="no"
     fi
 fi
 
 #if we use the builtin library,
 #check it is present
-if test "$with_redland" = "yes" -a "$with_system_redland" != "yes" \
-	-a ! -d "$srcdir/../redland" ; then
-	AC_MSG_WARN(Redland source dir not found !!)
-	AC_MSG_WARN(Disabling redland build !)
-	with_redland="no"
+if test "$with_raptor" = "yes" -a "$with_system_raptor" != "yes" \
+	-a ! -d "$srcdir/../redland/raptor" ; then
+	AC_MSG_WARN(Raptor source dir not found !!)
+	AC_MSG_WARN(Disabling raptor build !)
+	with_raptor="no"
 fi
 
-#At this point, we know everything about Redland,
+#At this point, we know everything about Raptor,
 #so either set the variables we will need later,
 #or disable Annotations
-if test "$with_redland" = "yes" ; then
-	AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DAM_REDLAND"
-	if test "$with_system_redland" != "yes" ; then
-		AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor "
-		AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
-		AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
-		BUILDREDLAND="redland"
+if test "$with_raptor" = "yes" ; then
+	if test "$with_system_raptor" != "yes" ; then
+		AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/raptor "
+		AMAYA_RAPTOR_LIBS="../redland/raptor/.libs/libraptor.a"
+		AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/raptor"
+		BUILDRAPTOR="raptor"
 		CURRENTPATH="`pwd`"
-		mkdir $BUILDREDLAND
-		cd $BUILDREDLAND &&
+		mkdir $BUILDRAPTOR
+		cd $BUILDRAPTOR &&
 			CC="$CC" CXX="$CXX" \
 			CPPFLAGS="-I$CURRENTPATH/../../libwww/modules/expat/lib" \
 			LDFLAGS="-L$CURRENTPATH/libwww/modules/expat -L$CURRENTPATH/libwww/modules/expat/.libs" \
-			../../../redland/configure \
+			../../../redland/raptor/configure \
 			--build=$build_alias --host=$host_alias --target=$target_alias \
 			--disable-shared \
-			--without-bdb \
-	 		--enable-parsers=raptor \
-	 		--with-raptor=internal \
 			--with-xml-parser=expat \
-			--with-www=none \
-			--without-libwww \
-			--without-openssl-digests \
-			--without-mysql
-			$ECHO "redland is configured"
+			--with-www=none
+			$ECHO "Raptor is configured"
 			$ECHO "Patching the raptor_config.h file to avoid including glib2-0"
-			$CP raptor/raptor_config.h raptor/raptor_config.h.orig
+			$CP raptor_config.h raptor_config.h.orig
 			$SED "s/\(\#define HAVE_G_UTF8_NORMALIZE 1\)/\/* \1 *\//" \
-				raptor/raptor_config.h.orig > raptor/raptor_config.h
-			$RM raptor/raptor_config.h.orig
+				raptor_config.h.orig > raptor_config.h
+			$RM raptor_config.h.orig
 			$ECHO "Raptor is patched"
 		cd ..
 	else
-		redland_includes=`$REDLAND_CONFIG --cflags`
-	  redland_libs=`$REDLAND_CONFIG --libs`
+		raptor_includes=`$RAPTOR_CONFIG --cflags`
+		raptor_libs=`$RAPTOR_CONFIG --libs`
  		AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
-		AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
-		AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
-		AMAYA_RAPTOR_INCLUDES="$redland_includes"
+		AMAYA_ANNOT_INCLUDES="$raptor_includes -I\$(THOTDIR)/thotlib/include"
+		AMAYA_ANNOT_EXTRA_LIBS="$raptor_libs"
+		AMAYA_RAPTOR_INCLUDES="$raptor_includes"
        fi
 else
 	with_annot="no"
@@ -1118,7 +1083,15 @@
 
 ANNOTLIB_COMPILE_BM=['#']
 
-AC_SUBST(BUILDREDLAND)
+AC_SUBST(BUILDRAPTOR)
+
+AC_SUBST(AMAYA_ANNOT_OPTIONS)
+AC_SUBST(AMAYA_ANNOT_INCLUDES)
+AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
+
+AC_SUBST(ANNOTLIB_COMPILE_BM)
+AC_SUBST(AMAYA_RAPTOR_LIBS)
+AC_SUBST(AMAYA_RAPTOR_INCLUDES)
 
 ###################End of Annotations Support####################
 
@@ -1323,9 +1296,6 @@
 AC_SUBST(GTK_OPTIONS)
 AC_SUBST(THOT_OPTIONS)
 AC_SUBST(AMAYA_OPTIONS)
-AC_SUBST(AMAYA_ANNOT_OPTIONS)
-AC_SUBST(AMAYA_ANNOT_INCLUDES)
-AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
 AC_SUBST(IMGLIBS)
 AC_SUBST(EXTRA_INCLUDES)
 
