Debian patches review
"Regis Boudin" <[email protected]> Mon, 20 Aug 2007 13:22:16 +0100 (BST)
| Newsgroups | gmane.comp.web.amaya.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, So you know what's going on with the Debian packages, here is a quick review of the patches I currently apply to the Amaya source code, which are attached. * cflags_cleanup.diff : removes the forcing of CFLAGS, so they can be set when calling configure. * rdf_conf_in_conf.diff : moves the call to redland configure from Makefile.in to configure.in. * raptor.diff : only use libraptor instead of librdf, as no symbol from the redland library is actually used. * enable_system_libwww.diff : add a "--enable-system-libww" flag, and moves the call to the libwww configure to configure.in. I know you don't plan to merge the first one, it is only here for reference. As you reverted the second one, I guess you had issues with it. I would appreciate any feedback so I can modify it to be in a good enough shape to be included. Could you please try to build (like you would do for a release) for MacOSX/Fedora, so we can try to have it merged cleanly ? When rdf_conf_in_conf is successfully applied, adding raptor.diff should be fairly trivial. The result is quite interesting, as, since the removal of the bookmarks feature, redland is not used at all anymore. the libwww patch is quite intrusive, so I won't try to push it. Still, if anyone wants to try it, any feedback will be welcome. As usual, any question is welcome, I will be more than happy to help. Thanks, Regis
cflags_cleanup.diff
(text/x-c, 1.1 KB)
Index: amaya-9.55~dfsg.0/configure.in
===================================================================
--- amaya-9.55~dfsg.0.orig/configure.in 2007-05-20 13:40:43.000000000 +0100
+++ amaya-9.55~dfsg.0/configure.in 2007-05-20 13:51:33.000000000 +0100
@@ -666,18 +666,8 @@
# Check if debug is enable
AC_ARG_WITH(debug, [ --with-debug compiles Amaya with debuging options (-g) ])
-if test "$with_debug" = "yes" ; then
- with_debug="yes"
- CFLAGS="-g"
- CXXFLAGS="-g"
-else
- with_debug="no"
- CFLAGS="-O2"
- CXXFLAGS="-O2"
-fi
if test "${CC}" = "gcc" ; then
- CFLAGS="${CFLAGS} -Wall"
case "${host}" in
*-*-irix5* | *-*irix6* )
CFLAGS="${CFLAGS} -fsigned-char"
@@ -689,13 +679,8 @@
CFLAGS="${CFLAGS} -DCONST= "
fi
-
-# force C mode (-x c)
-CFLAGS="${CFLAGS} -x c"
-
-# C++ options (-x c++)
-CXX_OPTIONS="-D__cplusplus"
-CXXFLAGS="${CXXFLAGS} -Wall -x c++ ${CXX_OPTIONS}"
+CFLAGS="${CFLAGS} -Wall"
+CXXFLAGS="${CXXFLAGS} -Wall"
# setup LDFLAGS
# on macosx, specific flags must be set to avoid conflicts with allready installed libwww
rdf_conf_in_conf.diff
(text/x-c, 5.7 KB)
Index: Documents/Makefile.in
===================================================================
--- Documents.orig/Makefile.in
+++ Documents/Makefile.in
@@ -12,11 +12,10 @@
include Options
LIBWWW = libwww
-REDLAND = redland
#MKP: adding davlib
SUBDIRS = @SUBDIRS@ tools thotlib batch annotlib @DAVDIR@ amaya
-EXTRA_SUBDIRS= $(LIBWWW) $(REDLAND) $(WX_BUILDDIR) $(GL_BUILDDIR)
+EXTRA_SUBDIRS= redland $(LIBWWW) $(WX_BUILDDIR) $(GL_BUILDDIR)
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -25,7 +24,7 @@
srcdir = $(THOTDIR)
-default : tools gl @BUILDWXWIDGETS@ thotlib batch amaya_prog print_prog
+default : tools gl @BUILDWXWIDGETS@ @BUILDREDLAND@ thotlib batch amaya_prog print_prog
amaya : tools thotlib amaya_prog print_prog
@@ -256,53 +255,8 @@
#
# Rules to build the redland RDF library
#
-
-# Previous rule used to link and compile expat inside redland... to be removed
-# after checking all is ok in all the platforms
-# we're using the expat from inside libwww
-# @(if test ! -e "$(THOTDIR)/../$(REDLAND)/expat" ; then \
-# libwwwdir="$(THOTDIR)/../$(LIBWWW)" ; \
-# echo $$libwwwdir ; \
-# $(LN_S) "$$libwwwdir/modules/expat" "$(THOTDIR)/../$(REDLAND)/expat" ; \
-# fi)
-
-# Because redland 0.9.14 forces the check on a glib-2.0 function, we remove the
-# results of the configure to force its non use.
-
-redland_config: @MAKEREDLAND@ force
- @(if test ! -e "$(THOTDIR)/../$(REDLAND)" ; then \
- $(ECHO) "Error redland dir not found at $(THOTDIR)/$(REDLAND)" ; \
- fi)
- @(if test ! -d "$(REDLAND)" ; then \
- $(MKDIR) $(REDLAND) ; \
- fi)
- @(localdir=`pwd` ; redlanddir="$$localdir/../../$(REDLAND)" ; \
- cd $(REDLAND) ; unset LANG; \
- if test ! -f Makefile -o ! -f redland-src-config ; then \
- CPPFLAGS="-I$$localdir/../../$(LIBWWW)/modules/expat/lib" \
- LDFLAGS="-L$$localdir/libwww/modules/expat -L$$localdir/libwww/modules/expat/.libs" \
- $$redlanddir/configure \
- --build=@build_alias@ --host=@host_alias@ --target=@target_alias@ \
- --disable-shared \
- --disable-nfc-check \
- --without-bdb \
- --with-raptor=internal \
- --with-xml-parser=expat \
- --with-www=none \
- --without-libwww \
- --without-openssl-digests \
- --without-mysql ;\
- $(ECHO) "redland is configured" ; \
- fi)
-
-
-# the -DLIBRDF_INTERNAL=1 is needed if we're going to pass our own CFLAGS.
-redland_make: @MAKEREDLAND@ force
- @(cd $(REDLAND) ; \
- $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) -DLIBRDF_INTERNAL=1"; \
- )
-
-redland: @MAKEREDLAND@ redland_config redland_make
+redland: force
+ $(MAKE) -C redland
@($(ECHO) "redland is installed")
#
Index: Documents/configure.in
===================================================================
--- Documents.orig/configure.in
+++ Documents/configure.in
@@ -1066,7 +1066,6 @@
-a ! -d "$srcdir/../redland" ; then
AC_MSG_WARN(Redland source dir not found !!)
AC_MSG_WARN(Disabling redland build !)
- MAKEREDLAND=['#']
with_redland="no"
fi
@@ -1076,13 +1075,36 @@
if test "$with_redland" = "yes" ; then
AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DAM_REDLAND"
if test "$with_system_redland" != "yes" ; then
- AMAYA_RAPTOR_SRC="amaya_comp_redland"
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"
+ CURRENTPATH="`pwd`"
+ mkdir $BUILDREDLAND
+ cd $BUILDREDLAND &&
+ 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 \
+ --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"
+ $ECHO "Patching the raptor_config.h file to avoid including glib2-0"
+ $CP raptor/raptor_config.h raptor/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
+ $ECHO "Raptor is patched"
+ cd ..
else
- MAKEREDLAND=['#']
- AMAYA_RAPTOR_SRC=
redland_includes=`$REDLAND_CONFIG --cflags`
redland_libs=`$REDLAND_CONFIG --libs`
AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
@@ -1096,6 +1118,8 @@
ANNOTLIB_COMPILE_BM=['#']
+AC_SUBST(BUILDREDLAND)
+
###################End of Annotations Support####################
@@ -1312,9 +1336,7 @@
AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
AC_SUBST(LIBWWW_RDF_PARSER)
-AC_SUBST(MAKEREDLAND)
#AC_SUBST(ANNOTLIB_COMPILE_BM)
-AC_SUBST(AMAYA_RAPTOR_SRC)
AC_SUBST(AMAYA_RAPTOR_LIBS)
AC_SUBST(AMAYA_RAPTOR_INCLUDES)
Index: Documents/amaya/Makefile.in
===================================================================
--- Documents.orig/amaya/Makefile.in
+++ Documents/amaya/Makefile.in
@@ -92,8 +92,8 @@
../redland/librdf/.libs/librdf.a \
../redland/raptor/.libs/libraptor.a \
-amaya_comp_redland: @MAKEREDLAND@ force
- @(cd .. ; $(MAKE) redland CC="$(CC)" CFLAGS="-O2")
+redland:
+ $(MAKE) -C ../redland
.depends depend : ../tools/mkdep/mkdep
../tools/mkdep/mkdep -relative -vpath $(VPATH) $(INCLUDES) $(VPATH)/*.c > .depends
@@ -145,7 +145,7 @@
$(AMAYA_ANNOT_OBJ) $(AMAYA_DAV_OBJ) $(AMAYA_TEMPLATES_OBJ)
AMAYA_SRC= \
- $(AMAYA_LIBWWW_SRC) @AMAYA_RAPTOR_SRC@ \
+ $(AMAYA_LIBWWW_SRC) \
$(AMAYA_MATH_SRC) $(AMAYA_SVG_SRC) \
$(AMAYA_ANNOT_SRC) $(AMAYA_DAV_SRC) $(AMAYA_TEMPLATES_SRC)
raptor.diff
(text/x-c, 7.6 KB)
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)
enable_system_libwww.diff
(text/x-c, 15.2 KB)
Index: Documents/configure.in
===================================================================
--- Documents.orig/configure.in
+++ Documents/configure.in
@@ -990,6 +990,113 @@
esac],
[with_svg="yes"])
+#################### LibWWW and WebDAV Support ################################
+
+AC_ARG_ENABLE([system-libwww],
+ AC_HELP_STRING([--enable-system-libwww],[try the libWWW system library]),
+ [case "${enableval}" in
+ yes) with_system_libwww="yes" ;;
+ no) with_system_libwww="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-system-libwww]) ;;
+ esac],
+ [with_system_libwww="no"])
+
+if test "$with_system_libwww" = "yes" ; then
+ # check to see if we have a libWWW library
+ AC_PATH_PROG([LIBWWW_CONFIG],[libwww-config])
+
+ if test "$LIBWWW_CONFIG" = "" ; then
+ AC_MSG_WARN(Not using system-provided libWWW, falling back to the builtin version.)
+ with_system_libwww="no"
+ fi
+fi
+
+dnl
+dnl WebDAV support enabled by default
+dnl
+AC_ARG_WITH([dav],
+ AC_HELP_STRING([--with-dav],[enable WebDAV support (experimental)]),
+ [case "${withval}" in
+ yes) with_dav="yes" ;;
+ no) with_dav="no" ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-dav) ;;
+ esac],
+ [with_dav="yes"])
+
+# If DAV is enabled, check if the source code is present
+if test ! -f $srcdir/davlib/Makefile.in ; then
+ if test "$with_dav" = "yes" ; then
+ AC_MSG_WARN(WebDAV makefile not found, disabling WebDAV build)
+ with_dav="no"
+ fi
+fi
+
+if test "$with_system_libwww" != "yes" ; then
+ if test ! -f $srcdir/../libwww/Makefile.in ; then
+ AC_MSG_ERROR([libWWW sources not found, stopping the build process])
+ fi
+fi
+
+if test "$enable_system_libwww" != "yes" ; then
+ if test "$with_dav" = "yes" ; then
+ WITH_DAV="--with-dav"
+ else
+ WITH_DAV="--without-dav"
+ fi
+ # configure libwww
+ CURRENT_PATH="`pwd`"
+ mkdir libwww
+ cd libwww && \
+ $CURRENT_PATH/../../libwww/configure \
+ --build=$build_alias --host=$host_alias --target=$target_alias \
+ --disable-shared \
+ $WITHDAV \
+ --with-zlib && \
+ echo "libwww is configured" ; \
+ echo "patching wwwconf.h because appkit.h do not compile on macos, and it seems that appkit.h is not used in amaya" ; \
+ cp wwwconf.h wwwconf.h.orig ; \
+ sed -e "s/\(\#define HAVE_APPKIT_APPKIT_H 1\)/\/* \1 *\//" \
+ wwwconf.h.orig > wwwconf.h ; \
+ echo "wwwconf.h patched !" ; \
+ cd ..
+ chmod +x libwww/libwww-config
+ BUILDLIBWWW="libWWW"
+ LIBWWW_CONFIG="libwww/libwww-config"
+ LIBWWW_LDFLAGS="-L$CURRENT_PATH/libwww/Library/src/.libs -L$CURRENT_PATH/libwww/modules/md5/.libs -L$CURRENT_PATH/libwww/modules/expat/.libs `$LIBWWW_CONFIG --libs`"
+ LIBWWW_CFLAGS="-I$CURRENT_PATH/../../libwww/Library/src -I$CURRENT_PATH/libwww"
+else
+ LIBWWW_CFLAGS="`$LIBWWW_CONFIG --cflags`"
+ LIBWWW_LDFLAGS="`$LIBWWW_CONFIG --libs`"
+
+ if test "$with_dav" = "yes" ; then
+ AC_CHECK_LIB([wwwdav],
+ [toto],
+ [LIBWWW_LDFLAGS="$LIBWWW_LDFLAGS -lwwwdav"],
+ [AC_MSG_WARN([libwwwdav is not available, disabling WebDAV]); with_dav="no"])
+ fi
+fi
+
+LIBWWW_CXXFLAGS="$LIBWWW_CFLAGS"
+
+AC_SUBST(BUILDLIBWWW)
+AC_SUBST(LIBWWW_CFLAGS)
+AC_SUBST(LIBWWW_CXXFLAGS)
+AC_SUBST(LIBWWW_LDFLAGS)
+
+if test "$with_dav" = "yes" ; then
+ AMAYA_DAV_INCLUDES="-I$CURRENT_PATH/../davlib/h -I$CURRENT_PATH/../davlib/tree/h -I$CURRENT_PATH/../davlib/f"
+ AMAYA_DAV_LIBS="../davlib/davlib.a"
+ AMAYA_DAV_OPTIONS="-DDAV"
+ BUILDWEBDAV="WebDAV"
+fi
+
+AC_SUBST(AMAYA_DAV_OPTIONS)
+AC_SUBST(AMAYA_DAV_INCLUDES)
+AC_SUBST(AMAYA_DAV_LIBS)
+AC_SUBST(BUILDWEBDAV)
+
+############# end of LibWWW and WebDAV Support ################################
+
##########################Annotations Support####################
dnl
dnl annotations are enabled by default
@@ -1139,36 +1246,7 @@
GENERIC_XML_OPTIONS=""
fi
-dnl
-dnl WebDAV support enabled by default
-dnl
-AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (default) ])
-if test "$with_dav" = "" ; then
- with_dav="yes"
-fi
-if test "$with_dav" = "yes" ; then
- DAV_OPTIONS=-DDAV
- DAVDIR="davlib"
- LIBDAV="libwwwdav"
- WITHDAV="--with-dav"
- WWWDAV="-lwwwdav"
-else
- with_dav="no"
- DAV_OPTIONS=""
- DAVDIR=""
- LIBDAV=""
- WITHDAV=""
- WWWDAV=""
-fi
-
-
if test "$build_amaya" = "yes" ; then
- if test ! -f $srcdir/../libwww/Makefile.in ; then
- AC_MSG_WARN(libwww sources not found !!)
- AC_MSG_WARN(Disabling Amaya build !)
- build_amaya="no"
- fi
-
if test ! -f $srcdir/amaya/MathML.S ; then
if test "$with_math" = "yes" ; then
AC_MSG_WARN(MathML sources not found !!)
@@ -1187,18 +1265,6 @@
fi
fi
- if test ! -f $srcdir/davlib/Makefile.in ; then
- if test "$with_dav" = "yes" ; then
- AC_MSG_WARN(WebDAV makefile not found !!)
- AC_MSG_WARN(Disabling WebDAV build !)
- with_dav="no"
- DAVDIR=""
- LIBDAV=""
- WITHDAV=""
- WWWDAV=""
- fi
- fi
-
fi
@@ -1299,11 +1365,6 @@
AC_SUBST(IMGLIBS)
AC_SUBST(EXTRA_INCLUDES)
-AC_SUBST(DAVDIR)
-AC_SUBST(LIBDAV)
-AC_SUBST(WITHDAV)
-AC_SUBST(WWWDAV)
-
AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
AC_SUBST(LIBWWW_RDF_PARSER)
#AC_SUBST(ANNOTLIB_COMPILE_BM)
@@ -1316,9 +1377,6 @@
dnl Include the option Makefile.xxx fragment according to the configure options
dnl
-www_frag=$srcdir/amaya/Makefile.libwww
-AC_SUBST_FILE(www_frag)
-
if test "$with_math" = "no" ; then
math_frag=/dev/null
else
@@ -1340,13 +1398,6 @@
fi
AC_SUBST_FILE(annot_frag)
-if test "$with_dav" = "yes" ; then
- dav_frag=$srcdir/davlib/Makefile.dav
-else
- dav_frag=/dev/null
-fi
-AC_SUBST_FILE(dav_frag)
-
if test "$with_templates" = "yes" ; then
templates_frag=$srcdir/amaya/Makefile.templates
else
@@ -1372,8 +1423,11 @@
if test "$build_amaya" = "yes" ; then
make_output="$make_output amaya/Makefile"
- EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
- $srcdir/amaya/Makefile.libwww"
+ EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in"
+
+ if test "enable_system_libwww" != "yes" ; then
+ EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $srcdir/amaya/Makefile.libwww"
+ fi
if test "$with_annot" = "yes" ; then
make_output="$make_output annotlib/Makefile"
Index: Documents/Makefile.in
===================================================================
--- Documents.orig/Makefile.in
+++ Documents/Makefile.in
@@ -59,7 +59,7 @@
@(if test -d "$(GL_BUILDDIR)" ; then cd "$(GL_BUILDDIR)" ; \
$(MAKE) linux-static ; fi)
-print_prog: rebuild force bin/str
+print_prog: rebuild force bin/str @BUILDLIBWWW@
@(if test -d thotlib ; then cd thotlib ; \
$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" print ; fi)
@@ -129,130 +129,17 @@
#
# Rules to rebuild the libWWW package
#
-
-# MKP: adding libwwwdav
-AMAYA_LIBWWW_STANDARD_LIBS = \
- libwwwapp \
- libwwwhttp \
- libwwwhtml \
- libwwwmime \
- libwwwcache \
- libwwwstream \
- libwwwfile \
- libwwwdir \
- libwwwtrans \
- libwwwcore \
- libwwwutils \
- libwwwftp \
- @MAKE_LIBWWW_RDF_PARSER@ \
- libwwwzip \
- @LIBDAV@
-
-libwww_config :
- @(if [ ! -d $(THOTDIR)/../$(LIBWWW) ] ; then \
- $(ECHO) "Error libwww dir not found at $(THOTDIR)/../$(LIBWWW)" ; \
- fi)
- @(if [ ! -d $(LIBWWW) ] ; then \
- $(MKDIR) $(LIBWWW) ; \
- fi)
-#MKP: adding --with-dav
- @(localdir=`pwd` ; libwwwdir="$$localdir/../../$(LIBWWW)" ; \
- cd $(LIBWWW) ; unset LANG; \
- if [ ! -f Makefile -o ! -f wwwconf.h ] ; then \
- $$libwwwdir/configure \
- --build=@build_alias@ --host=@host_alias@ --target=@target_alias@ \
- --disable-shared \
- @WITHDAV@ \
- --with-zlib; \
- $(ECHO) "libwww is configured" ; \
- $(ECHO) "patching wwwconf.h because appkit.h do not compile on macos, and it seems that appkit.h is not used in amaya" ; \
- $(CP) wwwconf.h wwwconf.h.orig ; \
- $(SED) "s/\(\#define HAVE_APPKIT_APPKIT_H 1\)/\/* \1 *\//" \
- wwwconf.h.orig > wwwconf.h ; \
- $(ECHO) "wwwconf.h patched !" ; \
- fi)
-
-libwww_make_module_md5 \
-libmd5 : force
- @(localdir=`pwd`; \
- cd $(LIBWWW)/modules/md5 ; \
- $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS)" \
- CPPFLAGS="$(CPPFLAGS) $(THOTINCLUDES) $(EXTRA_INCLUDES)" \
- libmd5.la)
-
-libwww_install_module_md5 : force
- @(if [ -e libmd5.a -a ! -L libmd5.a ] ; then \
- $(RM) libmd5.a ; \
- fi ; \
- if [ ! -L libmd5.a ] ; then \
- $(LN_S) $(LIBWWW)/modules/md5/.libs/libmd5.a ./libmd5.a ; \
- fi)
-
-libwww_make_module_expat \
-libexpat : force
- @(localdir=`pwd`; \
- cd $(LIBWWW)/modules/expat/ ; \
- $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS) -DXML_AMAYA" \
- CPPFLAGS="$(CPPFLAGS)" \
- )
-
-libwww_install_module_expat : force
- @(if [ -e libexpat.a -a ! -L libexpat.a ] ; then \
- $(RM) libexpat.a ; \
- fi ; \
- if [ ! -L libexpat.a ] ; then \
- $(LN_S) $(LIBWWW)/modules/expat/.libs/libexpat.a ./libexpat.a ; \
- fi)
-
-#libwww_make_module_idn \
-#libidn : force
-# @(localdir=`pwd`; \
-# cd $(LIBWWW)/modules/idn/ ; \
-# $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS) -DLIBWWW_USEIDN" \
-# CPPFLAGS="$(CPPFLAGS)" \
-# )
-
-#libwww_install_module_idn : force
-# @(if [ -e libidn.a -a ! -L libidn.a ] ; then \
-# $(RM) libidn.a ; \
-# fi ; \
-# if [ ! -L libidn.a ] ; then \
-# $(LN_S) $(LIBWWW)/modules/idn/.libs/libidn.a ./libidn.a ; \
-# fi)
-
-libwww_make_standard_libs \
-$(AMAYA_LIBWWW_STANDARD_LIBS) : force
- @(localdir=`pwd`; \
- all_libs="" ; \
- for lib in $(AMAYA_LIBWWW_STANDARD_LIBS) ; do \
- all_libs="$$all_libs $$lib.la" ; \
- done ; \
- cd $(LIBWWW)/Library/src ; \
- $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS) $(EXPAT_OPTIONS)" \
- CPPFLAGS="$(CPPFLAGS) $(THOTINCLUDES) $(EXTRA_INCLUDES)" \
- $$all_libs)
-
-libwww_install_standard : force
- @(for lib in $(AMAYA_LIBWWW_STANDARD_LIBS) ; do \
- if [ -e $$lib.a -a ! -L $$lib.a ] ; then \
- $(RM) $$lib.a ; \
- fi ; \
- if [ ! -L $$lib.a ] ; then \
- $(LN_S) $(LIBWWW)/Library/src/.libs/$$lib.a ./$$lib.a ; \
- fi ; \
- done)
-
-#libwww_make_module_libs : libwww_make_module_md5 libwww_make_module_expat libwww_make_module_idn
-libwww_make_module_libs : libwww_make_module_md5 libwww_make_module_expat
-libwww_make : libwww_make_module_libs libwww_make_standard_libs
-#libwww_install_modules : libwww_install_module_md5 libwww_install_module_expat libwww_install_module_idn
-libwww_install_modules : libwww_install_module_md5 libwww_install_module_expat
-libwww_install : libwww_install_modules libwww_install_standard
-
-libwww : libwww_config libwww_make
+libwww: force
+ $(MAKE) -C libwww
@($(ECHO) "libwww is installed")
#
+# Rules to rebuild the WebDAV module
+#
+WebDAV: @BUILDLIBWWW@ force
+ $(MAKE) -C davlib
+
+#
# Rules to build the raptor RDF library
#
raptor: force
Index: Documents/Options.in
===================================================================
--- Documents.orig/Options.in
+++ Documents/Options.in
@@ -79,7 +79,5 @@
GL_INCLUDES=@GL_INCLUDES@
GL_LIBRARIES=@GL_LIBRARIES@
-LIBWWW=libwww
-
Index: Documents/amaya/Makefile.in
===================================================================
--- Documents.orig/amaya/Makefile.in
+++ Documents/amaya/Makefile.in
@@ -6,10 +6,16 @@
@VPATHOPT@= @srcdir@
THOTDIR = @top_srcdir@
-WWWDAV = @WWWDAV@
LIBWWW_RDF_PARSER = @LIBWWW_RDF_PARSER@
LIBZ = @LIBZ@
+AMAYA_LIBWWW_LIBS = @LIBWWW_LDFLAGS@
+AMAYA_LIBWWW_INCLUDES = @LIBWWW_CFLAGS@
+
+AMAYA_DAV_LIBS = @AMAYA_DAV_LIBS@
+AMAYA_DAV_OPTIONS = @AMAYA_DAV_OPTIONS@
+AMAYA_DAV_INCLUDES = @AMAYA_DAV_INCLUDES@
+
OBJDIRS = wxdialog
include ../Options
@@ -86,10 +92,6 @@
../tools/mkdep/mkdep :
@(cd ../tools/mkdep ; $(MAKE) CC="$(CC)" CFLAGS="-O -x c")
-#../libraptor/.libs/libraptor.a \
-#amaya_comp_libraptor: @MAKERAPTOR@ force
-# @(cd .. ; $(MAKE) libraptor CC="$(CC)" CFLAGS="-O2 -x c")
-
../redland/librdf/.libs/librdf.a \
../redland/raptor/.libs/libraptor.a \
redland:
@@ -104,8 +106,13 @@
# #
#########################################################################
-#include the fragment "amaya/Makefile.libwww" for libwww if configured in
-@www_frag@
+AMAYA_LIBWWW_OBJ= \
+ AHTBridge.o \
+ AHTFWrite.o \
+ answer.o \
+ query.o \
+ AHTMemConv.o \
+ AHTInit.o
#include the fragment "amaya/Makefile.svg" for svg if configured in
@svg_frag@
@@ -116,9 +123,6 @@
#include the fragment "annotlib/Makefile.annot" for annotations if configured in
@annot_frag@
-#include the fragment "davlib/Makefile.dav" for webdav if configured in
-@dav_frag@
-
#include the fragment "amaya/Makefile.templates" for templates if configured in
@templates_frag@
Index: Documents/annotlib/Makefile.in
===================================================================
--- Documents.orig/annotlib/Makefile.in
+++ Documents/annotlib/Makefile.in
@@ -14,9 +14,7 @@
INCLUDES= -DHAVE_CONFIG_H -DANNOTATIONS \
-I.. -I../amaya -I@srcdir@/f -I@top_srcdir@/amaya \
- -I@top_srcdir@/amaya/f -I../libwww \
- -I@top_srcdir@/../libwww/Library/src \
- -I@top_srcdir@/../libwww/modules/expat/lib \
+ -I@top_srcdir@/amaya/f @LIBWWW_CFLAGS@ \
@AMAYA_RAPTOR_INCLUDES@ @THOTINCLUDES@ $(GUI_INCLUDES)
Index: Documents/davlib/Makefile.in
===================================================================
--- Documents.orig/davlib/Makefile.in
+++ Documents/davlib/Makefile.in
@@ -13,46 +13,21 @@
INCLUDES =-DHAVE_CONFIG_H -I.. \
-I../amaya -I@srcdir@/f -I@top_srcdir@/amaya \
- -I@top_srcdir@/amaya/f -I../libwww \
+ -I@top_srcdir@/amaya/f \
-I@top_srcdir@/thotlib/include \
- -I@top_srcdir@/../libwww/Library/src \
- -I@top_srcdir@/../libwww/modules/expat/lib \
+ @LIBWWW_CFLAGS@ \
-I$(DAVLIB)/tree/h -I$(DAVLIB)/h \
$(GUI_INCLUDES)
OPTIONS = @AMAYA_OPTIONS@ $(AMAYA_DAV_OPTIONS)
-LIBWWW_LIBS= \
- -L../$(LIBWWW)/Library/src/.libs \
- -lwwwapp \
- -lwwwhttp \
- -lwwwxml \
- -lwwwhtml \
- -lwwwmime \
- -lwwwcache \
- -lwwwstream \
- -lwwwfile \
- -lwwwdir \
- -lwwwtrans \
- -lwwwcore \
- -lwwwutils \
- -lwwwzip \
- -lwwwftp \
- -lwwwdav \
- -L../$(LIBWWW)/modules/md5/.libs \
- -lmd5 \
- -L../$(LIBWWW)/modules/expat/.libs \
- -lexpat \
- -ldl -L/usr/lib
-
-
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
############################################
-all : tree awparser.o AHTLockBase.o HTHome dav_obj davlib.a
+all : tree awparser.o AHTLockBase.o dav_obj davlib.a
dav_obj : $(AMAYA_DAV_OBJ)
@@ -108,8 +83,7 @@
awnode.o \
awstring.o \
awpair.o \
- list.o \
- ../$(LIBWWW)/Library/src/HTHome.o
+ list.o
#
# dependencies
Index: Documents/amaya/Makefile.math
===================================================================
--- Documents.orig/amaya/Makefile.math
+++ Documents/amaya/Makefile.math
@@ -23,7 +23,7 @@
MATH_SCHEMAS= $(AMAYA)/MathML.S $(AMAYA)/MathMLP.P $(AMAYA)/MathMLT.T
-math_schema= compMATH compMATHP compMATHT
+math_schema= compMATH compMATHP compMATHT MathML.h
#
# Structure schema compilation.
Index: Documents/amaya/Makefile.svg
===================================================================
--- Documents.orig/amaya/Makefile.svg
+++ Documents/amaya/Makefile.svg
@@ -31,7 +31,7 @@
$(AMAYA)/Timeline.S $(AMAYA)/TimelineP.P $(AMAYA)/TimelineT.T
svg_schema= compSVG compSVGP compSVGT \
- compTimeline compTimelineP compTimelineT
+ compTimeline compTimelineP compTimelineT SVG.h
#