eog/configure.in
2000-05-01 17:52:33 +00:00

165 lines
3.5 KiB
Plaintext

dnl Configure script for the Eye of Gnome image viewer
AC_INIT(src/image-view.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(eog, 0.3)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
GNOME_INIT
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
GNOME_COMPILE_WARNINGS
ALL_LINGUAS="ca cs da de el es et fi fr ga gl hu it ja ko lt nl no pl ro ru sv tr uk"
AM_GNU_GETTEXT
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AM_PATH_GDK_PIXBUF(0.7.0, ,AC_MSG_ERROR([Need gdk-pixbuf-0.7.0 or later!]))
dnl ******************************
dnl Check for Bonobo
dnl ******************************
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
)
gnumeric_executable=gnumeric
AC_SUBST(gnumeric_executable)
if $try_bonobo; then
AC_MSG_CHECKING(for Bonobo > 0.9)
if gnome-config --libs bonobo > /dev/null 2>&1; then
vers=`gnome-config --modversion bonobo`
case $vers
in
bonobo-0.[[0123456789]]) bonobo_ok=false ;;
*) bonobo_ok=true ;;
esac
else
bonobo_ok=false
fi
if $bonobo_ok; then
AC_MSG_RESULT(found)
AC_DEFINE(ENABLE_BONOBO)
have_bonobo=true
bonobo=bonobo
bonobo_msg=yes
gnumeric_executable=gnumeric-bonobo
else
AC_MSG_RESULT(not found)
fi
fi
AM_CONDITIONAL(BONOBO, $have_bonobo)
dnl ******************************
dnl GnomePrint checking
dnl ******************************
gprint=
gprint_msg=no
have_gprint=false
AC_MSG_CHECKING(for GnomePrint libraries >= 0.18)
if gnome-config --libs print > /dev/null 2>&1; then
vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" | \
awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
if test "$vers" -ge 18; then
AC_MSG_RESULT(found)
AC_DEFINE(ENABLE_GPRINT)
have_gprint=true
gprint=print
gprint_msg=yes
else
AC_MSG_RESULT(not found)
fi
else
AC_MSG_RESULT(not installed)
fi
AM_CONDITIONAL(GPRINT, $have_gprint)
EXTRA_BONOBO_CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf gnomecanvaspixbuf $bonobo $gprint`
EXTRA_BONOBO_LIBS=`gnome-config --libs gnomeui gdk_pixbuf gnomecanvaspixbuf $bonobo $gprint`
AC_SUBST(EXTRA_BONOBO_CFLAGS)
AC_SUBST(EXTRA_BONOBO_LIBS)
EXTRA_GNOME_CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf gnomecanvaspixbuf`
EXTRA_GNOME_LIBS=`gnome-config --libs gnomeui gdk_pixbuf gnomecanvaspixbuf`
AC_SUBST(EXTRA_GNOME_CFLAGS)
AC_SUBST(EXTRA_GNOME_LIBS)
dnl Whether to use OAF
AC_MSG_CHECKING(if Bonobo uses OAF)
if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then
enable_oaf="yes"
else
enable_oaf="no"
fi
AC_MSG_RESULT("$enable_oaf")
if test "x$enable_oaf" = "xyes"; then
AC_PATH_PROG(OAF_CONFIG,oaf-config,no)
if test x$OAF_CONFIG = xno; then
AC_MSG_ERROR("You enabled OAF support but oaf-config was not found")
else
OAF_LIBS=`$OAF_CONFIG --libs`
OAF_CFLAGS=`$OAF_CONFIG --cflags`
GNORBA_LIBNAME=
fi
else
OAF_LIBS=
OAF_CFLAGS=
GNORBA_LIBNAME=gnorba
fi
AC_SUBST(OAF_LIBS)
AC_SUBST(OAF_CFLAGS)
AM_CONDITIONAL(USING_OAF, test "x$enable_oaf" = "xyes")
if test "x$enable_oaf" = "xyes"; then
AC_DEFINE(USING_OAF)
fi
AC_OUTPUT([
Makefile
intl/Makefile
macros/Makefile
po/Makefile.in
src/Makefile
src/cursors/Makefile
src/stock/Makefile
bonobo/Makefile
])
echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
Bonobo Support: ${bonobo_msg}
Printing Support: ${gprint_msg}
"