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

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

9
AM_INIT_AUTOMAKE([1.11.2 dist-xz no-dist-gzip subdir-objects tar-ustar])
10
AM_MAINTAINER_MODE([enable])
Mikael Hallendal's avatar
Mikael Hallendal committed
11

12 13
AM_SILENT_RULES([yes])

David King's avatar
David King committed
14
AX_IS_RELEASE([git-directory])
15
AX_CHECK_ENABLE_DEBUG([info], [YELP_DEBUG], [$ax_is_release])
David King's avatar
David King committed
16

17
AX_COMPILER_FLAGS([], [], [$ax_is_release])
18
# Check for programs
Mikael Hallendal's avatar
Mikael Hallendal committed
19
AC_PROG_CC
20 21 22
AC_PROG_CC_C_O
AC_PROG_LN_S
GLIB_GSETTINGS
23

24
# Library dependecies
25
LT_LIB_M
26 27
PKG_CHECK_MODULES(YELP,
[
28
	gio-2.0 >= 2.38.0
29
	gio-unix-2.0
30
	gtk+-unix-print-3.0
Shaun McCance's avatar
Shaun McCance committed
31
	gtk+-3.0 >= 3.13.3
32 33 34
	libxml-2.0 >= 2.6.5
	libxslt >= 1.1.4
	libexslt >= 0.8.1
35
	sqlite3
Michael Catanzaro's avatar
Michael Catanzaro committed
36
	webkit2gtk-4.0 >= 2.15.1
Shaun McCance's avatar
Shaun McCance committed
37
	yelp-xsl >= 3.12.0
38 39 40
])
AC_SUBST([YELP_CFLAGS])
AC_SUBST([YELP_LIBS])
41 42


David King's avatar
David King committed
43 44 45
# Initialize libtool
LT_PREREQ([2.2.6])
LT_INIT
Mikael Hallendal's avatar
Mikael Hallendal committed
46

47 48 49 50
PKG_CHECK_MODULES([YELP_EXTENSION], [webkit2gtk-web-extension-4.0 >= 2.7.2])
AC_SUBST(YELP_EXTENSION_CFLAGS)
AC_SUBST(YELP_EXTENSION_LIBS)

51
# i18n stuff
52
AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
53 54
IT_PROG_INTLTOOL([0.41.0])

55 56 57
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AC_SUBST(ALL_LINGUAS)

Richard Hult's avatar
Richard Hult committed
58 59
GETTEXT_PACKAGE=yelp
AC_SUBST(GETTEXT_PACKAGE)
60 61
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
                   [The gettext translation domain])
Richard Hult's avatar
Richard Hult committed
62

63 64 65 66 67
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
68 69
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
70
  AC_MSG_ERROR([itstool >= 1.2.0 is required to build the translation XML files])
71
fi
Richard Hult's avatar
Richard Hult committed
72

73
LIBLZMA_REQUIRED=4.9
74 75 76 77 78 79
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,
80
			  liblzma >= $LIBLZMA_REQUIRED,
81 82 83
			  enable_lzma=yes,
			  enable_lzma=no)
elif test x"$enable_lzma" = "xyes"; then
84
	PKG_CHECK_MODULES(YELP_LZMA, liblzma >= $LIBLZMA_REQUIRED)
85 86 87 88 89 90 91 92
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
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
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"])

111 112 113
AC_SUBST([YELP_CFLAGS])
AC_SUBST([YELP_LIBS])

114 115 116 117 118 119 120 121 122
DATADIR=`(
	case $prefix in
		NONE) prefix=$ac_default_prefix ;;
		*) ;;
	esac
	eval echo $(eval echo $datadir)/yelp
)`
AC_SUBST([DATADIR])

123

124
XSL_PATH="`$PKG_CONFIG --variable=xsltdir yelp-xsl`"
125

126 127
XSL_DB2XHTML="`$PKG_CONFIG --variable=db2xhtml yelp-xsl`"
AC_SUBST(XSL_DB2XHTML)
128

129 130
XSL_MAL2XHTML="`$PKG_CONFIG --variable=mal2xhtml yelp-xsl`"
AC_SUBST(XSL_MAL2XHTML)
Shaun McCance's avatar
Shaun McCance committed
131

132 133 134 135 136 137
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
138 139
XSL_JSDIR="`$PKG_CONFIG --variable=jsdir yelp-xsl`"
AC_SUBST(XSL_JSDIR)
140

141 142
XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
AC_SUBST(XSL_GETTEXT)
Shaun McCance's avatar
Shaun McCance committed
143

144 145
YELP_ICON_PATH="`$PKG_CONFIG --variable=icondir yelp-xsl`"
AC_SUBST(YELP_ICON_PATH)
Don Scorgie's avatar
Don Scorgie committed
146 147 148 149

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

150

151
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
152 153
GTK_DOC_CHECK([1.13],[--flavour no-tmpl])

154
AC_CONFIG_FILES([
Mikael Hallendal's avatar
Mikael Hallendal committed
155
Makefile
156 157
docs/libyelp/Makefile
docs/libyelp/version.xml
158
data/dtd/catalog
Shaun McCance's avatar
Shaun McCance committed
159 160 161 162 163
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
164
po/Makefile.in
165 166
yelp.desktop.in
])
167 168

AC_OUTPUT
169 170 171 172 173 174 175 176 177

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

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

178
	Documentation:            ${enable_gtk_doc}
179
	Debug enabled:            ${enable_debug}
Shaun McCance's avatar
Shaun McCance committed
180
	Enable BZ2:               ${enable_bz2}
181
	Enable LZMA:              ${enable_lzma}
182

183
"