Version 3.13.92
[yelp.git] / configure.ac
blob215a54552247e09d801d9d012af6cdb516369cc3
1 AC_PREREQ([2.63])
2 AC_INIT([Yelp],[3.13.92],[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 tar-ustar])
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.38.0
31         gio-unix-2.0
32         gtk+-unix-print-3.0
33         gtk+-3.0 >= 3.13.3
34         libxml-2.0 >= 2.6.5
35         libxslt >= 1.1.4
36         libexslt >= 0.8.1
37         sqlite3
38         webkitgtk-3.0 >= 1.3.10
39         yelp-xsl >= 3.12.0
41 AC_SUBST([YELP_CFLAGS])
42 AC_SUBST([YELP_LIBS])
45 GNOME_DEBUG_CHECK
46 GNOME_COMPILE_WARNINGS([maximum])
47 GNOME_MAINTAINER_MODE_DEFINES
49 MORE_WARN_FLAGS=
51 if test "x$enable_debug" = "xyes"; then
52         AC_DEFINE([YELP_DEBUG],[1],[Enable Yelp debugging])
53         AM_CFLAGS="$AM_CFLAGS -pedantic -ansi"
56 dnl NOTE : it appears that some systems do not like it when you use line
57 dnl        continuation charactes to split CFLAGS into readable chunks
58 if test "x$GCC" = "xyes"; then
59    AM_CFLAGS="$AM_CFLAGS -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare"
62 # i18n stuff
63 IT_PROG_INTLTOOL([0.41.0])
65 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
66 AC_SUBST(ALL_LINGUAS)
68 GETTEXT_PACKAGE=yelp
69 AC_SUBST(GETTEXT_PACKAGE)
70 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
71                    [The gettext translation domain])
73 AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
74 AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
75 if test x"$ITSTOOL" = x; then
76   AC_MSG_ERROR([itstool is required to build the translation XML files])
78 ITSTOOL_VERSION=`itstool --version | cut -d' ' -f2 | awk -F. '{print $ 1 * 10000 + $ 2 * 100 + $ 3; }'`
79 if test "$ITSTOOL_VERSION" -lt 10200; then
80   AC_MSG_ERROR([itstool >= 1.2.0 is required to build the translation XML files])
83 LIBLZMA_REQUIRED=4.9
84 AC_ARG_ENABLE(lzma,
85         AS_HELP_STRING([--enable-lzma],[Enable lzma decoder support [[default=yes]]]),
86         [enable_lzma=$enableval],
87         [enable_lzma="auto"])
88 if test x"$enable_lzma" = "xauto"; then
89         PKG_CHECK_MODULES(YELP_LZMA,
90                           liblzma >= $LIBLZMA_REQUIRED,
91                           enable_lzma=yes,
92                           enable_lzma=no)
93 elif test x"$enable_lzma" = "xyes"; then
94         PKG_CHECK_MODULES(YELP_LZMA, liblzma >= $LIBLZMA_REQUIRED)
96 if test x"$enable_lzma" = "xyes"; then
97         YELP_CFLAGS="$YELP_LZMA_CFLAGS $YELP_CFLAGS";
98         YELP_LIBS="$YELP_LZMA_LIBS $YELP_LIBS";
99         AC_DEFINE(ENABLE_LZMA, 1, [Enable lzma decoder support])
101 AM_CONDITIONAL([ENABLE_LZMA],[test x"$enable_lzma" != "xno"])
103 AC_ARG_ENABLE(bz2,
104         AS_HELP_STRING([--enable-bz2],[Enable bz2 decoder support [[default=yes]]]),
105         [enable_bz2=$enableval],
106         [enable_bz2="auto"])
107 if test x"$enable_bz2" = "xauto"; then
108         AC_CHECK_LIB(bz2,
109                      BZ2_bzread,
110                      enable_bz2=yes,
111                      enable_bz2=no)
112 elif test x"$enable_bz2" = "xyes"; then
113         AC_CHECK_LIB(bz2, BZ2_bzread)
115 if test x"$enable_bz2" = "xyes"; then
116         YELP_LIBS="-lbz2 $YELP_LIBS";
117         AC_DEFINE(ENABLE_BZ2, 1, [Enable bz2 decoder support])
119 AM_CONDITIONAL([ENABLE_BZ2],[test x"$enable_bz2" != "xno"])
121 AC_SUBST([YELP_CFLAGS])
122 AC_SUBST([YELP_LIBS])
124 DATADIR=`(
125         case $prefix in
126                 NONE) prefix=$ac_default_prefix ;;
127                 *) ;;
128         esac
129         eval echo $(eval echo $datadir)/yelp
131 AC_SUBST([DATADIR])
134 XSL_PATH="`$PKG_CONFIG --variable=xsltdir yelp-xsl`"
136 XSL_DB2XHTML="`$PKG_CONFIG --variable=db2xhtml yelp-xsl`"
137 AC_SUBST(XSL_DB2XHTML)
139 XSL_MAL2XHTML="`$PKG_CONFIG --variable=mal2xhtml yelp-xsl`"
140 AC_SUBST(XSL_MAL2XHTML)
142 XSL_COLOR="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/color.xsl"
143 AC_SUBST(XSL_COLOR)
144 XSL_ICONS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/icons.xsl"
145 AC_SUBST(XSL_ICONS)
146 XSL_HTML="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/html.xsl"
147 AC_SUBST(XSL_HTML)
148 XSL_JSDIR="`$PKG_CONFIG --variable=jsdir yelp-xsl`"
149 AC_SUBST(XSL_JSDIR)
151 XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
152 AC_SUBST(XSL_GETTEXT)
154 YELP_ICON_PATH="`$PKG_CONFIG --variable=icondir yelp-xsl`"
155 AC_SUBST(YELP_ICON_PATH)
157 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
158 AC_SUBST(GLIB_GENMARSHAL)
161 # Set flags
162 AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS"
163 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
166 AC_SUBST([AM_CPPFLAGS])
167 AC_SUBST([AM_CFLAGS])
168 AC_SUBST([AM_LDFLAGS])
170 GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
172 AC_CONFIG_FILES([
173 Makefile
174 docs/Makefile
175 docs/libyelp/Makefile
176 docs/libyelp/version.xml
177 libyelp/Makefile
178 src/Makefile
179 data/Makefile
180 data/domains/Makefile
181 data/dtd/Makefile
182 data/dtd/catalog
183 data/icons/Makefile
184 data/icons/hicolor/Makefile
185 data/icons/hicolor/16x16/Makefile
186 data/icons/hicolor/16x16/status/Makefile
187 data/icons/hicolor/scalable/Makefile
188 data/icons/hicolor/scalable/actions/Makefile
189 data/icons/hicolor/scalable/status/Makefile
190 data/mathjax/Makefile
191 data/mathjax/config/Makefile
192 data/mathjax/extensions/HTML-CSS/Makefile
193 data/mathjax/extensions/Makefile
194 data/mathjax/fonts/HTML-CSS/TeX/woff/Makefile
195 data/mathjax/jax/Makefile
196 data/mathjax/jax/element/Makefile
197 data/mathjax/jax/element/mml/Makefile
198 data/mathjax/jax/element/mml/optable/Makefile
199 data/mathjax/jax/input/Makefile
200 data/mathjax/jax/input/MathML/Makefile
201 data/mathjax/jax/input/MathML/entities/Makefile
202 data/mathjax/jax/output/HTML-CSS/Makefile
203 data/mathjax/jax/output/HTML-CSS/autoload/Makefile
204 data/mathjax/jax/output/HTML-CSS/fonts/Makefile
205 data/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Makefile
206 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Makefile
207 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Makefile
208 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Makefile
209 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Makefile
210 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Makefile
211 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Makefile
212 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Makefile
213 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Makefile
214 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Makefile
215 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Makefile
216 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Makefile
217 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Makefile
218 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Makefile
219 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Makefile
220 data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Makefile
221 data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Makefile
222 data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Makefile
223 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Makefile
224 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Makefile
225 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Makefile
226 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Makefile
227 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Makefile
228 data/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Makefile
229 data/mathjax/jax/output/Makefile
230 data/mathjax/jax/output/NativeMML/Makefile
231 data/mathjax/unpacked/Makefile
232 data/xslt/Makefile
233 data/xslt/db2html.xsl
234 data/xslt/info2html.xsl
235 data/xslt/mal2html.xsl
236 data/xslt/man2html.xsl
237 data/xslt/yelp-common.xsl
238 po/Makefile.in
239 tests/Makefile
240 yelp.desktop.in
243 AC_OUTPUT
245 dnl ==========================================================================
246 echo "
247 yelp-$VERSION:
249         prefix:                   ${prefix}
250         source code location:     ${srcdir}
251         compiler:                 ${CC}
253         Documentation:            ${enable_gtk_doc}
254         Debug enabled:            ${enable_debug}
255         Enable BZ2:               ${enable_bz2}
256         Enable LZMA:              ${enable_lzma}