root/tags/release-0.1.5/configure.ac

Revision 213, 2.2 kB (checked in by jordi, 3 years ago)

configure script now sets a Makefile condition about printing support. A new empty print dialog has been added.

Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([ePDFView], [0.1.5], [jordi@emma-soft.com])
3AC_PREREQ([2.13])
4AC_CONFIG_HEADER([config.h])
5AC_COPYRIGHT([Copyright (C) 2006 Emma's Software.])
6AM_INIT_AUTOMAKE
7AM_MAINTAINER_MODE
8
9dnl Parameters.
10AC_ARG_ENABLE([debug], [  --enable-debug          turn on debugging [[default=no]]])
11if test "x$enable_debug" != "xyes"; then
12    DEBUGFLAGS="-DNDEBUG -DG_DISABLE_ASSERT"
13else
14    DEBUGFLAGS="-DDEBUG"
15fi
16CFLAGS="$CFLAGS -Wall $DEBUGFLAGS"
17CXXFLAGS="$CXXFLAGS -Wall -Wno-long-long $DEBUGFLAGS"
18
19dnl Check for programs.
20AC_PROG_CC
21AC_PROG_CXX
22AC_CHECK_PROG(DOXYGEN, doxygen, yes,)
23AM_CONDITIONAL(build_reference, test "x$DOXYGEN" = "xyes")
24
25dnl Check for internationalization.
26AM_GNU_GETTEXT
27
28dnl Check for libraries
29POPPLER_REQUIRED=0.5.0
30GLIB_REQUIRED=2.6.0
31GTK2_REQUIRED=2.6.0
32
33PKG_CHECK_MODULES([GLIB], [gthread-2.0 >= $GLIB_REQUIRED])
34AC_SUBST([GLIB_CFLAGS])
35AC_SUBST([GLIB_LIBS])
36PKG_CHECK_MODULES([GTK2], [gtk+-2.0 >= $GTK2_REQUIRED])
37AC_SUBST([GTK2_CFLAGS])
38AC_SUBST([GTK2_LIBS])
39PKG_CHECK_MODULES([POPPLER], [poppler-glib >= $POPPLER_REQUIRED gdk-2.0 >= $GTK2_REQUIRED pango])
40AC_SUBST([POPPLER_CFLAGS])
41AC_SUBST([POPPLER_LIBS])
42dnl Check if we have poppler version 0.5.2 or higher.
43PKG_CHECK_EXISTS([poppler-glib >= 0.5.2], [have_popppler_052=yes])
44if test "x$have_poppler_052" = "xyes"; then
45    AC_DEFINE([HAVE_POPPLER_0_5_2], [1], [Define to 1 if you have Poppler version 0.5.2 or higher.])
46fi
47
48EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes])
49AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes")
50if test "x$have_cups" = "xyes"; then
51    AC_SUBST([CUPS_CFLAGS])
52    AC_SUBST([CUPS_LIBS])
53    AC_DEFINE([HAVE_CUPS], [1], [Define to 1 if you have the CUPS API library.])
54fi
55
56dnl CPPUnit library
57AM_PATH_CPPUNIT([1.10.2], CPPUNIT="yes")
58AM_CONDITIONAL(build_tests, test "x$CPPUNIT" = "xyes" -a "x$enable_debug" = "xyes")
59
60dnl Check for header files.
61dnl Check for types.
62dnl Check for compiler characteristics.
63dnl Check for library functions.
64dnl Check for system services.
65dnl Output files
66AC_CONFIG_FILES([   \
67Makefile    \
68data/Makefile   \
69m4/Makefile \
70intl/Makefile   \
71po/Makefile.in  \
72src/Makefile    \
73src/gtk/Makefile    \
74tests/Makefile  \
75doc/Makefile    \
76doc/Doxyfile])
77AC_OUTPUT
Note: See TracBrowser for help on using the browser.