3 AC_INIT([gtkhtml], [4.11.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml])
4 AM_INIT_AUTOMAKE([gnu 1.9 dist-xz no-dist-gzip -Wno-portability])
5 AC_CONFIG_MACRO_DIR([m4])
6 AC_CONFIG_HEADERS(config.h)
7 AC_CONFIG_SRCDIR(README)
11 dnl Required Package Versions
12 m4_define([gtk_minimum_version], [3.2.0])
13 m4_define([enchant_minimum_version], [1.1.7])
14 m4_define([cairo_minimum_version], [1.10.0])
16 GTKHTML_API_VERSION=4.0
17 EDITOR_API_VERSION=4.0
19 AC_DEFINE_UNQUOTED(GTKHTML_API_VERSION, "${GTKHTML_API_VERSION}", [GtkHTML API Version])
20 AC_SUBST(GTKHTML_API_VERSION)
22 AC_DEFINE_UNQUOTED(EDITOR_API_VERSION, "${EDITOR_API_VERSION}", [Editor API Version])
23 AC_SUBST(EDITOR_API_VERSION)
25 GTKHTML_RELEASE_STRING=${PACKAGE}-${GTKHTML_API_VERSION}
26 AC_DEFINE_UNQUOTED(GTKHTML_RELEASE_STRING, "${GTKHTML_RELEASE_STRING}", [GtkHTML Release String])
27 AC_SUBST(GTKHTML_RELEASE_STRING)
29 GETTEXT_PACKAGE=${GTKHTML_RELEASE_STRING}
30 AC_SUBST(GETTEXT_PACKAGE)
31 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
33 I18N_LIB_CFLAGS="-DGNOME_EXPLICIT_TRANSLATION_DOMAIN=\\\"${GTKHTML_RELEASE_STRING}\\\""
34 AC_SUBST(I18N_LIB_CFLAGS)
36 dnl Automake 1.11 - Silent Build Rules
37 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
39 AM_MAINTAINER_MODE([enable])
44 IT_PROG_INTLTOOL([0.36.3])
47 dnl **********************************
48 dnl Compiler Warning Flags
49 dnl **********************************
50 AS_COMPILER_FLAGS(WARNING_FLAGS,
52 -Wno-missing-field-initializers
55 -Wno-deprecated-declarations
56 -Wdeclaration-after-statement
57 -Werror-implicit-function-declaration
58 -Wformat-nonliteral -Wformat-security -Winit-self
59 -Wmissing-declarations -Wmissing-include-dirs
60 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
61 -Wredundant-decls -Wundef -Wwrite-strings")
62 AC_SUBST(WARNING_FLAGS)
64 dnl Other useful compiler warnings for test builds only.
65 dnl These may produce warnings we have no control over,
66 dnl or false positives we don't always want to see.
68 dnl -Wmissing-format-attribute
70 dnl -Wstrict-aliasing=2
72 dnl XXX This really belongs in AM_CPPFLAGS.
73 CFLAGS="$CFLAGS $WARNING_FLAGS"
75 dnl *********************
76 dnl Necessary programs
77 dnl *********************
85 AC_CHECK_FUNCS([memchr memmove memset regcomp setlocale strchr strcspn strrchr strstr strtol strtoull])
86 AC_CHECK_HEADERS([fcntl.h libintl.h])
88 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
89 dnl behavior that -- according to the C99 standard -- is supposed to be
90 dnl undefined. We may still have aliasing abuses lying around that rely
91 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
92 dnl optimization until we can find and fix all the abuses.
93 dnl (AC_PROG_CC must run first to set the GCC variable.)
94 dnl XXX This really belongs in AM_CFLAGS.
95 if test "x${GCC}" = "xyes"; then
96 CFLAGS="$CFLAGS -fno-strict-aliasing"
101 dnl *****************
103 LT_INIT(disable-static win32-dll)
105 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
110 AC_MSG_CHECKING([for Win32])
120 AC_MSG_RESULT([$os_win32])
121 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
131 dnl **********************************
133 dnl **********************************
134 GAIL_MODULES="gail-3.0 >= gtk_minimum_version"
135 PKG_CHECK_MODULES(GAIL, $GAIL_MODULES)
136 AC_SUBST(GAIL_CFLAGS)
138 AC_SUBST(GAIL_MODULES)
140 dnl **********************************
142 dnl **********************************
143 GTKHTML_MODULES="gtk+-3.0 >= gtk_minimum_version enchant >= enchant_minimum_version gsettings-desktop-schemas iso-codes cairo >= cairo_minimum_version"
144 PKG_CHECK_MODULES(GTKHTML, $GTKHTML_MODULES)
145 AC_SUBST(GTKHTML_CFLAGS)
146 AC_SUBST(GTKHTML_LIBS)
147 AC_SUBST(GTKHTML_MODULES)
149 dnl **********************************
150 dnl Glade catalog files
151 dnl **********************************
152 AC_ARG_WITH(glade-catalog,
153 AC_HELP_STRING([--with-glade-catalog],
154 [install the catalog files for Glade 3]
155 [(for maintainers only) @<:@default=no@:>@]),
156 [glade_catalog="$withval"], [glade_catalog="no"])
157 if test "x$glade_catalog" = "xyes"; then
158 PKG_CHECK_MODULES(GLADEUI, gladeui-2.0)
160 AM_CONDITIONAL(GLADE_CATALOG, test x$glade_catalog = xyes)
162 dnl These are still needed for 'dist' targets.
163 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
166 dnl **********************************
167 dnl soup for testgtkhtml
168 dnl **********************************
171 PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26.0,
175 [ PKG_CHECK_MODULES(SOUP, libsoup-2.4,
179 AC_SUBST(HAVE_NEWSOUP)
180 AM_CONDITIONAL(HAVE_SOUP, test x$have_soup != xno)
181 AM_CONDITIONAL(HAVE_NEWSOUP, test x$HAVE_NEWSOUP != xno)
183 dnl **************************************************
185 dnl **************************************************
186 AC_MSG_CHECKING([for iso-codes package])
188 if $PKG_CONFIG --exists iso-codes; then
189 if $PKG_CONFIG iso-codes --atleast-version=0.49; then
191 AC_MSG_RESULT([$have_iso_codes])
193 AC_MSG_WARN([iso-codes detected, but version 0.49 or later is required due to licensing])
196 AC_MSG_RESULT([$have_iso_codes])
199 if test "x$have_iso_codes" = "xyes"; then
200 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
201 if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null 2>&1 && \
202 $PKG_CONFIG --variable=domains iso-codes | grep 3166 >/dev/null 2>&1 ; then
208 AC_MSG_RESULT([$result])
211 if test "x$have_iso_codes" = "xyes"; then
212 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],
213 ["`$PKG_CONFIG --variable=prefix iso-codes`"],
215 AC_DEFINE([HAVE_ISO_CODES], [1],
216 [Define if you have the iso-codes package])
219 dnl **************************************************
220 dnl XF86 multimedia keys support
221 dnl **************************************************
222 AC_CHECK_HEADER([X11/XF86keysym.h],
223 [AC_DEFINE([HAVE_XFREE], 1, [Have <X11/XF86keysym.h>])],,
225 #include <X11/XF86keysym.h>
229 dnl **************************************************
231 dnl **************************************************
232 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,[REGEX_LIBS=-lregex],[AC_MSG_ERROR([No regex library found])])])
235 dnl ******************************
237 dnl ******************************
238 AC_ARG_ENABLE([shlib-factory],
239 AS_HELP_STRING([--enable-shlib-factory],
240 [build editor factory as shared library @<:@default=yes@:>@]),
241 [enable_shlib_factory="$enableval"],
242 [enable_shlib_factory="yes"])
244 if test "x$enable_shlib_factory" = "xyes"; then
245 GNOME_GTKHTML_EDITOR_SHLIB=1
246 GNOME_GTKHTML_EDITOR_TYPE="shlib"
247 AC_DEFINE(GNOME_GTKHTML_EDITOR_SHLIB,, [Editor shlib])
249 GNOME_GTKHTML_EDITOR_TYPE="exe"
252 AC_SUBST(GNOME_GTKHTML_EDITOR_TYPE)
253 AM_CONDITIONAL(EDITOR_SHLIB, test x$enable_shlib_factory = xyes)
255 dnl **********************************
256 dnl Library version information.
257 dnl **********************************
259 dnl Increment the following if the interface has additions, changes,
263 dnl Increment any time the source changes; set to 0 if you
264 dnl increment CURRENT.
267 dnl Increment if any interfaces have been added; set to 0
268 dnl if any interfaces have been removed. removal has
269 dnl precedence over adding, so set to 0 if both happened.
272 AC_SUBST(GTKHTML_CURRENT)
273 AC_SUBST(GTKHTML_REVISION)
274 AC_SUBST(GTKHTML_AGE)
285 components/editor/Makefile
286 components/editor/gtkhtml-editor.pc
288 gtkhtml/libgtkhtml.pc
296 Cookies support in soup : ${HAVE_NEWSOUP}
297 Editor component type : ${GNOME_GTKHTML_EDITOR_TYPE}