[yelp-application] Use GSettings::changed to emit bookmarks-changed
[yelp.git] / configure.ac
blob365bcf6ce5db3950aa0195929a77faa7a7d195dd
1 AC_PREREQ([2.63])
2 AC_INIT([Yelp],[2.31.7],[http://bugzilla.gnome.org/enter_bug.cgi?product=yelp],[yelp])
4 AC_CONFIG_SRCDIR([src/yelp.c])
5 AC_CONFIG_HEADERS([config.h])
6 AC_CONFIG_MACRO_DIR([m4])
8 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip])
9 AM_MAINTAINER_MODE([enable])
11 AM_SILENT_RULES([yes])
13 # Check for programs
14 AC_PROG_CC
15 AC_PROG_CC_C_O
16 AC_PROG_LN_S
18 # Initialize libtool
19 LT_PREREQ([2.2.6])
20 LT_INIT
22 AC_PATH_PROGS(SED, gsed sed)
24 AM_PATH_GLIB_2_0
25 GLIB_GSETTINGS
27 # Library dependecies
28 PKG_CHECK_MODULES(YELP,
30         gio-2.0 >= 2.25.11
31         gio-unix-2.0
32         gtk+-unix-print-3.0
33         gtk+-3.0 >= 2.90.5
34         libxml-2.0 >= 2.6.5
35         libxslt >= 1.1.4
36         libexslt >= 0.8.1
37         webkitgtk-3.0 >= 1.3.2
38         yelp-xsl >= 2.31.3
40 AC_SUBST([YELP_CFLAGS])
41 AC_SUBST([YELP_LIBS])
44 GNOME_DEBUG_CHECK
45 GNOME_COMPILE_WARNINGS([maximum])
46 GNOME_MAINTAINER_MODE_DEFINES
48 MORE_WARN_FLAGS=
50 if test "x$enable_debug" = "xyes"; then
51         AC_DEFINE([YELP_DEBUG],[1],[Enable Yelp debugging])
52         AM_CFLAGS="$AM_CFLAGS -pedantic -ansi"
55 dnl NOTE : it appears that some systems do not like it when you use line
56 dnl        continuation charactes to split CFLAGS into readable chunks
57 if test "x$GCC" = "xyes"; then
58    AM_CFLAGS="$AM_CFLAGS -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare"
61 # i18n stuff
62 IT_PROG_INTLTOOL([0.41.0])
64 GETTEXT_PACKAGE=yelp
65 AC_SUBST(GETTEXT_PACKAGE)
66 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
67                    [The gettext translation domain])
69 AM_GLIB_GNU_GETTEXT
70 AM_GLIB_DEFINE_LOCALEDIR([GNOMELOCALEDIR])
72 LIBLZMA_REQUIRED=4.9
73 AC_ARG_ENABLE(lzma,
74         AS_HELP_STRING([--enable-lzma],[Enable lzma decoder support [[default=yes]]]),
75         [enable_lzma=$enableval],
76         [enable_lzma="auto"])
77 if test x"$enable_lzma" = "xauto"; then
78         PKG_CHECK_MODULES(YELP_LZMA,
79                           liblzma >= $LIBLZMA_REQUIRED,
80                           enable_lzma=yes,
81                           enable_lzma=no)
82 elif test x"$enable_lzma" = "xyes"; then
83         PKG_CHECK_MODULES(YELP_LZMA, liblzma >= $LIBLZMA_REQUIRED)
85 if test x"$enable_lzma" = "xyes"; then
86         YELP_CFLAGS="$YELP_LZMA_CFLAGS $YELP_CFLAGS";
87         YELP_LIBS="$YELP_LZMA_LIBS $YELP_LIBS";
88         AC_DEFINE(ENABLE_LZMA, 1, [Enable lzma decoder support])
90 AM_CONDITIONAL([ENABLE_LZMA],[test x"$enable_lzma" != "xno"])
92 AC_ARG_ENABLE(bz2,
93         AS_HELP_STRING([--enable-bz2],[Enable bz2 decoder support [[default=yes]]]),
94         [enable_bz2=$enableval],
95         [enable_bz2="auto"])
96 if test x"$enable_bz2" = "xauto"; then
97         AC_CHECK_LIB(bz2,
98                      BZ2_bzread,
99                      enable_bz2=yes,
100                      enable_bz2=no)
101 elif test x"$enable_bz2" = "xyes"; then
102         AC_CHECK_LIB(bz2, BZ2_bzread)
104 if test x"$enable_bz2" = "xyes"; then
105         YELP_LIBS="-lbz2 $YELP_LIBS";
106         AC_DEFINE(ENABLE_BZ2, 1, [Enable bz2 decoder support])
108 AM_CONDITIONAL([ENABLE_BZ2],[test x"$enable_bz2" != "xno"])
110 AC_SUBST([YELP_CFLAGS])
111 AC_SUBST([YELP_LIBS])
113 DATADIR=`(
114         case $prefix in
115                 NONE) prefix=$ac_default_prefix ;;
116                 *) ;;
117         esac
118         eval echo $(eval echo $datadir)/yelp
120 AC_SUBST([DATADIR])
123 XSL_PATH="`$PKG_CONFIG --variable=xsltdir yelp-xsl`"
124 XSL_DB_TITLE="$XSLT_PATH""/docbook/common/db-title.xsl"
125 AC_SUBST(XSL_DB_TITLE)
127 XSL_DB2XHTML="`$PKG_CONFIG --variable=db2xhtml yelp-xsl`"
128 AC_SUBST(XSL_DB2XHTML)
130 XSL_MAL2XHTML="`$PKG_CONFIG --variable=mal2xhtml yelp-xsl`"
131 AC_SUBST(XSL_MAL2XHTML)
133 XSL_COLOR="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/color.xsl"
134 AC_SUBST(XSL_COLOR)
135 XSL_ICONS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/icons.xsl"
136 AC_SUBST(XSL_ICONS)
137 XSL_HTML="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/html.xsl"
138 AC_SUBST(XSL_HTML)
140 XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
141 AC_SUBST(XSL_GETTEXT)
143 YELP_ICON_PATH="`$PKG_CONFIG --variable=icondir yelp-xsl`"
144 AC_SUBST(YELP_ICON_PATH)
146 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
147 AC_SUBST(GLIB_GENMARSHAL)
150 # If Pango included the shared library dependencies from X11 in
151 # the pkg-config output, then we use that (to avoid duplicates).
152 # but if they were omitted to avoid binary compatibility problems
153 # then we need to repeat the checks.
155 if $PKG_CONFIG --exists pangoxft ; then
156   PANGO_PACKAGES="pangox pangoxft"
157 else
158   PANGO_PACKAGES="pangox"
161 x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
162 case x_libs in
163   *-lX11*) pango_omitted_x_deps=no ;;
164   *)       pango_omitted_x_deps=yes ;;
165 esac
167 if test $pango_omitted_x_deps = yes ; then
168   AC_PATH_XTRA
170   if test x$no_x = xyes ; then
171     AC_MSG_ERROR([X development libraries not found])
172   else
173     X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
174   fi
177 AC_SUBST(X_LIBS)
180 # Set flags
181 AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS"
182 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
185 AC_SUBST([AM_CPPFLAGS])
186 AC_SUBST([AM_CFLAGS])
187 AC_SUBST([AM_LDFLAGS])
189 GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
191 AC_CONFIG_FILES([
192 Makefile
193 docs/Makefile
194 docs/libyelp/Makefile
195 docs/libyelp/version.xml
196 libyelp/Makefile
197 src/Makefile
198 stylesheets/Makefile
199 stylesheets/db2html.xsl
200 stylesheets/db-title.xsl
201 stylesheets/info2html.xsl
202 stylesheets/mal2html.xsl
203 stylesheets/man2html.xsl
204 stylesheets/toc2html.xsl
205 stylesheets/yelp-common.xsl
206 data/Makefile
207 data/icons/Makefile
208 data/icons/hicolor/Makefile
209 data/icons/hicolor/16x16/Makefile
210 data/icons/hicolor/16x16/status/Makefile
211 po/Makefile.in
212 tests/Makefile
213 yelp.desktop.in
216 AC_OUTPUT
218 dnl ==========================================================================
219 echo "
220 yelp-$VERSION:
222         prefix:                   ${prefix}
223         source code location:     ${srcdir}
224         compiler:                 ${CC}
226         Documentation:            ${enable_gtk_doc}
227         Debug enabled:            ${enable_debug}
228         Search backend:           ${search_backend}
229         Enable BZ2:               ${enable_bz2}
230         Enable LZMA:              ${enable_lzma}