root/trunk/configure.ac

Revision 307, 2.6 kB (checked in by jordi, 3 months ago)

Based on patches sent by Rafał Mużyło and zhou sf, I've added code to be able to build ePDFView with poppler 0.8.0 due a change in the API: poppler_page_get_selection_region() returns the a Glist wherein 0.6.* it returns a GdkRegion?.

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