dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(gxmlviewer, "1.3.3") AM_CONFIG_HEADER(config.h) dnl Pick up the Gnome macros. AM_ACLOCAL_INCLUDE(macros) GNOME_INIT AC_ISC_POSIX AC_PROG_CC AC_PROG_CXX AM_PROG_CC_STDC AC_HEADER_STDC GNOME_COMPILE_WARNINGS GNOME_X_CHECKS dnl Add the languages which your application supports here. ALL_LINGUAS="" AM_GNU_GETTEXT dnl ****************************** dnl libxml checking dnl ****************************** AC_MSG_CHECKING(for libxml >= 2.3.1) if xml2-config --libs > /dev/null 2>&1; then vers=`xml2-config --version | sed -e "s/xml-//" -e 's/cvs$//' -e 's/pre$//' | \ awk 'BEGIN { FS = "."; } { print $3;}'` if test "$vers" -ge 1; then AC_MSG_RESULT([found ("$vers")]) XML_CFLAGS="`xml2-config --cflags`" XML_LIBS="`xml2-config --libs`" AC_SUBST(XML_CFLAGS) AC_SUBST(XML_LIBS) else AC_MSG_RESULT([found ("$vers")]) AC_MSG_ERROR(You need at least libxml 2.3.1 for this version of the GNOME XML Viewer) fi else AC_MSG_RESULT(libxml >= 2.3.1 not found, will try gnome config search) AC_MSG_CHECKING(for libxml using gnome-config) if gnome-config --libs xml > /dev/null 2>&1; then vers=`gnome-config --modversion xml` AC_MSG_RESULT([found ("$vers")]) XML_CFLAGS="`gnome-config --cflags xml`" XML_LIBS="`gnome-config --libs xml`" AC_SUBST(XML_CFLAGS) AC_SUBST(XML_LIBS) else AC_MSG_ERROR(Did not find libxml installed) fi fi dnl Bonobo checks. try_bonobo=true bonobo= bonobo_msg=no have_bonobo=false AC_ARG_WITH(bonobo, [--{with,without}-bonobo Compile with Bonobo support or without it], if test x$withval = xno; then try_bonobo=false fi if test x$withval = xyes; then try_bonobo=true fi ) if $try_bonobo; then AC_MSG_CHECKING(for Bonobo >= 1.0.4) if gnome-config --libs bonobox > /dev/null 2>&1; then vers=`gnome-config --modversion bonobo | sed -e "s/bonobo-//" | \ awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'` if test "$vers" -ge 4; then bonobo_ok=true else bonobo_ok=false fi else bonobo_ok=false fi if $bonobo_ok; then AC_MSG_RESULT([found ("$vers")]) AC_DEFINE(ENABLE_BONOBO) have_bonobo=true if gnome-config --libs bonobox > /dev/null 2>&1; then bonobo=bonobox else bonobo=bonobo fi bonobo_msg=yes else AC_MSG_ERROR([not found, you need bonobo to compile the xmlview control]) fi fi AM_CONDITIONAL(BONOBO, $have_bonobo) dnl Check if Bonobo is OAFized AC_MSG_CHECKING(if Bonobo uses OAF) if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then using_oaf="yes" AC_DEFINE(USING_OAF) else using_oaf="no" fi AC_MSG_RESULT("$using_oaf") AM_CONDITIONAL(USING_OAF, test "x$using_oaf" = "xyes") BONOBO_LIBS="`gnome-config --libs $bonobo`" BONOBO_CFLAGS="`gnome-config --cflags $bonobo`" AC_SUBST(BONOBO_LIBS) AC_SUBST(BONOBO_CFLAGS) dnl Set PACKAGE_LOCALE_DIR in config.h. if test "x${prefix}" = "xNONE"; then AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale") else AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale") fi dnl Subst PACKAGE_PIXMAPS_DIR. PACKAGE_PIXMAPS_DIR="`gnome-config --datadir`/pixmaps/${PACKAGE}" AC_SUBST(PACKAGE_PIXMAPS_DIR) AC_OUTPUT([ Makefile gxmlviewer.spec macros/Makefile src/Makefile src/GNOME_XMLView.oaf src/extras/Makefile src/nsplugin/Makefile src/nsplugin/common/Makefile intl/Makefile po/Makefile.in ])