configure.ac 7.46 KB
Newer Older
1
AC_PREREQ([2.63])
Shaun McCance's avatar
Shaun McCance committed
2
AC_INIT([Yelp],[3.14.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=yelp],[yelp])
Christian Persch's avatar
Christian Persch committed
3

Shaun McCance's avatar
Shaun McCance committed
4
AC_CONFIG_SRCDIR([src/yelp.c])
5
AC_CONFIG_HEADERS([config.h])
Saleem Abdulrasool's avatar
Saleem Abdulrasool committed
6
AC_CONFIG_MACRO_DIR([m4])
Shaun McCance's avatar
Shaun McCance committed
7

Shaun McCance's avatar
Shaun McCance committed
8
AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip tar-ustar])
9
AM_MAINTAINER_MODE([enable])
Mikael Hallendal's avatar
Mikael Hallendal committed
10

11 12
AM_SILENT_RULES([yes])

David King's avatar
David King committed
13 14
AX_CHECK_ENABLE_DEBUG([info], [YELP_DEBUG])

15
# Check for programs
Mikael Hallendal's avatar
Mikael Hallendal committed
16
AC_PROG_CC
17 18 19 20 21 22 23 24 25
AC_PROG_CC_C_O
AC_PROG_LN_S

# Initialize libtool
LT_PREREQ([2.2.6])
LT_INIT

AC_PATH_PROGS(SED, gsed sed)

Alexander Larsson's avatar
Alexander Larsson committed
26
AM_PATH_GLIB_2_0
27
GLIB_GSETTINGS
28

29 30 31
# Library dependecies
PKG_CHECK_MODULES(YELP,
[
32
	gio-2.0 >= 2.38.0
33
	gio-unix-2.0
34
	gtk+-unix-print-3.0
Shaun McCance's avatar
Shaun McCance committed
35
	gtk+-3.0 >= 3.13.3
36 37 38
	libxml-2.0 >= 2.6.5
	libxslt >= 1.1.4
	libexslt >= 0.8.1
39
	sqlite3
40
	webkitgtk-3.0 >= 1.3.10
Shaun McCance's avatar
Shaun McCance committed
41
	yelp-xsl >= 3.12.0
42 43 44
])
AC_SUBST([YELP_CFLAGS])
AC_SUBST([YELP_LIBS])
45 46


Christian Persch's avatar
Christian Persch committed
47 48
GNOME_COMPILE_WARNINGS([maximum])

49 50
MORE_WARN_FLAGS=

51 52
dnl NOTE : it appears that some systems do not like it when you use line
dnl        continuation charactes to split CFLAGS into readable chunks
53
if test "x$GCC" = "xyes"; then
Christian Persch's avatar
Christian Persch committed
54
   AM_CFLAGS="$AM_CFLAGS -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare"
55
fi
Mikael Hallendal's avatar
Mikael Hallendal committed
56

57
# i18n stuff
58
AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
59 60
IT_PROG_INTLTOOL([0.41.0])

61 62 63
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AC_SUBST(ALL_LINGUAS)

Richard Hult's avatar
Richard Hult committed
64 65
GETTEXT_PACKAGE=yelp
AC_SUBST(GETTEXT_PACKAGE)
66 67
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
                   [The gettext translation domain])
Richard Hult's avatar
Richard Hult committed
68

69 70 71 72 73
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
if test x"$ITSTOOL" = x; then
  AC_MSG_ERROR([itstool is required to build the translation XML files])
fi
74 75
ITSTOOL_VERSION=`itstool --version | cut -d' ' -f2 | awk -F. '{print $ 1 * 10000 + $ 2 * 100 + $ 3; }'`
if test "$ITSTOOL_VERSION" -lt 10200; then
Matthias Clasen's avatar
Matthias Clasen committed
76
  AC_MSG_ERROR([itstool >= 1.2.0 is required to build the translation XML files])
77
fi
Richard Hult's avatar
Richard Hult committed
78

79
LIBLZMA_REQUIRED=4.9
80 81 82 83 84 85
AC_ARG_ENABLE(lzma,
	AS_HELP_STRING([--enable-lzma],[Enable lzma decoder support [[default=yes]]]),
	[enable_lzma=$enableval],
	[enable_lzma="auto"])
if test x"$enable_lzma" = "xauto"; then
	PKG_CHECK_MODULES(YELP_LZMA,
86
			  liblzma >= $LIBLZMA_REQUIRED,
87 88 89
			  enable_lzma=yes,
			  enable_lzma=no)
elif test x"$enable_lzma" = "xyes"; then
90
	PKG_CHECK_MODULES(YELP_LZMA, liblzma >= $LIBLZMA_REQUIRED)
91 92 93 94 95 96 97 98
fi
if test x"$enable_lzma" = "xyes"; then
	YELP_CFLAGS="$YELP_LZMA_CFLAGS $YELP_CFLAGS";
	YELP_LIBS="$YELP_LZMA_LIBS $YELP_LIBS";
	AC_DEFINE(ENABLE_LZMA, 1, [Enable lzma decoder support])
fi
AM_CONDITIONAL([ENABLE_LZMA],[test x"$enable_lzma" != "xno"])

Shaun McCance's avatar
Shaun McCance committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
AC_ARG_ENABLE(bz2,
	AS_HELP_STRING([--enable-bz2],[Enable bz2 decoder support [[default=yes]]]),
	[enable_bz2=$enableval],
	[enable_bz2="auto"])
if test x"$enable_bz2" = "xauto"; then
	AC_CHECK_LIB(bz2,
		     BZ2_bzread,
		     enable_bz2=yes,
		     enable_bz2=no)
elif test x"$enable_bz2" = "xyes"; then
	AC_CHECK_LIB(bz2, BZ2_bzread)
fi
if test x"$enable_bz2" = "xyes"; then
	YELP_LIBS="-lbz2 $YELP_LIBS";
	AC_DEFINE(ENABLE_BZ2, 1, [Enable bz2 decoder support])
fi
AM_CONDITIONAL([ENABLE_BZ2],[test x"$enable_bz2" != "xno"])

117 118 119
AC_SUBST([YELP_CFLAGS])
AC_SUBST([YELP_LIBS])

120 121 122 123 124 125 126 127 128
DATADIR=`(
	case $prefix in
		NONE) prefix=$ac_default_prefix ;;
		*) ;;
	esac
	eval echo $(eval echo $datadir)/yelp
)`
AC_SUBST([DATADIR])

129

130
XSL_PATH="`$PKG_CONFIG --variable=xsltdir yelp-xsl`"
131

132 133
XSL_DB2XHTML="`$PKG_CONFIG --variable=db2xhtml yelp-xsl`"
AC_SUBST(XSL_DB2XHTML)
134

135 136
XSL_MAL2XHTML="`$PKG_CONFIG --variable=mal2xhtml yelp-xsl`"
AC_SUBST(XSL_MAL2XHTML)
Shaun McCance's avatar
Shaun McCance committed
137

138 139 140 141 142 143
XSL_COLOR="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/color.xsl"
AC_SUBST(XSL_COLOR)
XSL_ICONS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/icons.xsl"
AC_SUBST(XSL_ICONS)
XSL_HTML="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/common/html.xsl"
AC_SUBST(XSL_HTML)
Shaun McCance's avatar
Shaun McCance committed
144 145
XSL_JSDIR="`$PKG_CONFIG --variable=jsdir yelp-xsl`"
AC_SUBST(XSL_JSDIR)
146

147 148
XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
AC_SUBST(XSL_GETTEXT)
Shaun McCance's avatar
Shaun McCance committed
149

150 151
YELP_ICON_PATH="`$PKG_CONFIG --variable=icondir yelp-xsl`"
AC_SUBST(YELP_ICON_PATH)
Don Scorgie's avatar
Don Scorgie committed
152 153 154 155

GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
AC_SUBST(GLIB_GENMARSHAL)

156

157 158 159
# Set flags
AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS"
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
160 161


Christian Persch's avatar
Christian Persch committed
162 163
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
164
AC_SUBST([AM_LDFLAGS])
Christian Persch's avatar
Christian Persch committed
165

166
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
167 168
GTK_DOC_CHECK([1.13],[--flavour no-tmpl])

169
AC_CONFIG_FILES([
Mikael Hallendal's avatar
Mikael Hallendal committed
170
Makefile
171 172 173
docs/Makefile
docs/libyelp/Makefile
docs/libyelp/version.xml
Shaun McCance's avatar
Shaun McCance committed
174
libyelp/Makefile
Mikael Hallendal's avatar
Mikael Hallendal committed
175
src/Makefile
176
data/Makefile
177
data/domains/Makefile
178
data/dtd/Makefile
179
data/dtd/catalog
180
data/icons/Makefile
Shaun McCance's avatar
Shaun McCance committed
181 182 183
data/icons/hicolor/Makefile
data/icons/hicolor/16x16/Makefile
data/icons/hicolor/16x16/status/Makefile
184
data/icons/hicolor/scalable/Makefile
185
data/icons/hicolor/scalable/status/Makefile
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
data/mathjax/Makefile
data/mathjax/config/Makefile
data/mathjax/extensions/HTML-CSS/Makefile
data/mathjax/extensions/Makefile
data/mathjax/fonts/HTML-CSS/TeX/woff/Makefile
data/mathjax/jax/Makefile
data/mathjax/jax/element/Makefile
data/mathjax/jax/element/mml/Makefile
data/mathjax/jax/element/mml/optable/Makefile
data/mathjax/jax/input/Makefile
data/mathjax/jax/input/MathML/Makefile
data/mathjax/jax/input/MathML/entities/Makefile
data/mathjax/jax/output/HTML-CSS/Makefile
data/mathjax/jax/output/HTML-CSS/autoload/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Makefile
data/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Makefile
data/mathjax/jax/output/Makefile
data/mathjax/jax/output/NativeMML/Makefile
data/mathjax/unpacked/Makefile
Shaun McCance's avatar
Shaun McCance committed
228 229 230 231 232 233
data/xslt/Makefile
data/xslt/db2html.xsl
data/xslt/info2html.xsl
data/xslt/mal2html.xsl
data/xslt/man2html.xsl
data/xslt/yelp-common.xsl
Richard Hult's avatar
Richard Hult committed
234
po/Makefile.in
235
tests/Makefile
236 237
yelp.desktop.in
])
238 239

AC_OUTPUT
240 241 242 243 244 245 246 247 248

dnl ==========================================================================
echo "
yelp-$VERSION:

	prefix:                   ${prefix}
	source code location:	  ${srcdir}
	compiler:		  ${CC}

249
	Documentation:            ${enable_gtk_doc}
250
	Debug enabled:            ${enable_debug}
Shaun McCance's avatar
Shaun McCance committed
251
	Enable BZ2:               ${enable_bz2}
252
	Enable LZMA:              ${enable_lzma}
253

254
"