version 1.240, 2008/07/09 11:11:38
|
version 1.241, 2008/10/21 15:33:33
|
Line 473 CEXTRACT_FLAGS="+O"
|
Line 473 CEXTRACT_FLAGS="+O"
|
|
|
# Check if debug is enable |
# Check if debug is enable |
AC_ARG_WITH(debug, [ --with-debug compiles Amaya with debuging options (-g) ]) |
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 |
if test "${CC}" = "gcc" ; then |
CFLAGS="${CFLAGS} -Wall" |
|
case "${host}" in |
case "${host}" in |
*-*-irix5* | *-*irix6* ) |
*-*-irix5* | *-*irix6* ) |
CFLAGS="${CFLAGS} -fsigned-char" |
CFLAGS="${CFLAGS} -fsigned-char" |
Line 496 if test "$ac_cv_c_const" = "no" ; then
|
Line 486 if test "$ac_cv_c_const" = "no" ; then
|
CFLAGS="${CFLAGS} -DCONST= " |
CFLAGS="${CFLAGS} -DCONST= " |
fi |
fi |
|
|
|
CFLAGS="${CFLAGS} -Wall" |
# force C mode (-x c) |
CXXFLAGS="${CXXFLAGS} -Wall" |
CFLAGS="${CFLAGS} -x c" |
|
|
|
# C++ options (-x c++) |
|
CXX_OPTIONS="-D__cplusplus" |
|
CXXFLAGS="${CXXFLAGS} -Wall -x c++ ${CXX_OPTIONS}" |
|
|
|
# setup LDFLAGS |
# setup LDFLAGS |
# on macosx, specific flags must be set to avoid conflicts with allready installed libwww |
# on macosx, specific flags must be set to avoid conflicts with allready installed libwww |
Line 704 AC_ARG_ENABLE([svg],
|
Line 689 AC_ARG_ENABLE([svg],
|
esac], |
esac], |
[with_svg="yes"]) |
[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 (default)]), |
|
[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_dav" = "yes" ; then |
|
WITHDAV="--with-dav" |
|
else |
|
WITHDAV="--without-dav" |
|
fi |
|
|
|
if test "$enable_system_libwww" != "yes" ; then |
|
# 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 |
|
|
|
if test "$with_dav" = "yes" ; then |
|
DAV_OPTIONS=-DDAV |
|
DAVDIR="davlib" |
|
LIBWWW_LDFLAGS="$LIBWWW_LDFLAGS -lwwwdav" |
|
else |
|
with_dav="no" |
|
DAV_OPTIONS="" |
|
DAVDIR="" |
|
fi |
|
|
|
AC_SUBST(BUILDLIBWWW) |
|
|
|
AC_SUBST(LIBWWW_CFLAGS) |
|
AC_SUBST(LIBWWW_LDFLAGS) |
|
|
|
AC_SUBST(DAVDIR) |
|
AC_SUBST(LIBDAV) |
|
AC_SUBST(WWWDAV) |
|
|
|
############# end of LibWWW and WebDAV Support ################################ |
|
|
##########################Annotations Support#################### |
##########################Annotations Support#################### |
dnl |
dnl |
dnl annotations are enabled by default |
dnl annotations are enabled by default |
Line 854 else
|
Line 941 else
|
GENERIC_XML_OPTIONS="" |
GENERIC_XML_OPTIONS="" |
fi |
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 "$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 ! -f $srcdir/amaya/MathML.S ; then |
if test "$with_math" = "yes" ; then |
if test "$with_math" = "yes" ; then |
AC_MSG_WARN(MathML sources not found !!) |
AC_MSG_WARN(MathML sources not found !!) |
Line 902 if test "$build_amaya" = "yes" ; then
|
Line 961 if test "$build_amaya" = "yes" ; then
|
fi |
fi |
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 |
fi |
|
|
dnl |
dnl |
Line 1016 AC_SUBST(AMAYA_OPTIONS)
|
Line 1062 AC_SUBST(AMAYA_OPTIONS)
|
AC_SUBST(IMGLIBS) |
AC_SUBST(IMGLIBS) |
AC_SUBST(EXTRA_INCLUDES) |
AC_SUBST(EXTRA_INCLUDES) |
|
|
AC_SUBST(DAVDIR) |
|
AC_SUBST(LIBDAV) |
|
AC_SUBST(WITHDAV) |
|
AC_SUBST(WWWDAV) |
|
|
|
AC_SUBST(MAKE_LIBWWW_RDF_PARSER) |
AC_SUBST(MAKE_LIBWWW_RDF_PARSER) |
AC_SUBST(LIBWWW_RDF_PARSER) |
AC_SUBST(LIBWWW_RDF_PARSER) |
#AC_SUBST(ANNOTLIB_COMPILE_BM) |
#AC_SUBST(ANNOTLIB_COMPILE_BM) |