1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT(gpaint-2, 0.3.3, http://savannah.gnu.org/bugs/?group=gpaint)
4AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
5AM_MAINTAINER_MODE
6dnl AM_CONFIG_HEADER(config.h)
7
8AC_ISC_POSIX
9AC_PROG_CC
10AM_PROG_LIBTOOL
11AM_PROG_CC_STDC
12AC_HEADER_STDC
13#------------------------------------------------------------------------------
14# The gnomeui library is required but the gnomeprint and gnomeprintui libraries
15# are optional. First we verify the gnomeui library is present. Then we check
16# for the presence of the gnomeprint libraries and set a flag to indicate the
17# print libraries are present. Finally, we run pkg-config to get the compile and
18# link flags for the combined set of libraries to eliminate duplications in
19# the CFLAGS.
20PKG_CHECK_MODULES(GUI, [gtk+-2.0 >= 2.8.0 pango >= 1.12.4 libglade-2.0 >= 2.5.1])
21PKG_CHECK_MODULES(PRINT, libgnomeprint-2.2 libgnomeprintui-2.2,gpaint_have_gnome_print=1, echo "gnomeprint libraries are not available.")
22
23PKG_CHECK_MODULES(GTKPRINT, gtk+-2.0 >= 2.10.0, gpaint_have_gtk_print=1,
24    echo "GtkPrint not available, not using for printing functions.")
25
26AC_SUBST(GUI_CFLAGS)
27AC_SUBST(GUI_LIBS)
28
29
30if test "x$gpaint_have_gtk_print" = "x1"; then
31    AC_DEFINE(HAVE_GTK_PRINT, "1")
32    echo "printing support using gtk+"
33elif test "x$gpaint_have_gnome_print" = "x1"; then
34    AC_DEFINE(HAVE_GNOME_PRINT,"1")
35    gpaint_gnome_libs="libgnomeprint-2.2 libgnomeprintui-2.2"
36
37    echo "configuring with libraries: " $gpaint_gnome_libs
38fi
39
40AC_SUBST(PRINT_CFLAGS)
41AC_SUBST(PRINT_LIBS)
42
43
44GETTEXT_PACKAGE=gpaint-2
45AC_SUBST(GETTEXT_PACKAGE)
46AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE")
47
48dnl Add the languages which your application supports here.
49ALL_LINGUAS="am ca cs de es fr ga ja nl pt pt_BR sv uk"
50AM_GLIB_GNU_GETTEXT
51
52
53AC_OUTPUT([
54Makefile
55src/Makefile
56po/Makefile.in
57])
58
59
60echo "
61Configuration:
62
63	Source code location:	  ${srcdir}
64	Compiler:		  ${CC}
65	Extra Compiler Warnings:  ${EXTRA_WARNING_CFLAGS}
66
67"
68