3 AC_INIT([gtkhtml], [3.31.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=GtkHtml])
4 AM_INIT_AUTOMAKE([gnu 1.9])
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], [2.20.0])
13 m4_define([gail_minimum_version], [1.1.0])
14 m4_define([enchant_minimum_version], [1.1.7])
15 m4_define([gnome_icon_theme_minimum_version], [2.22.0])
17 GTKHTML_API_VERSION=3.14
18 AC_DEFINE_UNQUOTED(GTKHTML_API_VERSION, "${GTKHTML_API_VERSION}", [GtkHTML API Version])
19 AC_SUBST(GTKHTML_API_VERSION)
21 EDITOR_API_VERSION=3.14
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])])
44 IT_PROG_INTLTOOL([0.36.3])
47 dnl **********************************
48 dnl Compiler Warning Flags
49 dnl **********************************
50 AS_COMPILER_FLAGS(WARNING_FLAGS,
51 "-DG_DISABLE_DEPRECATED
52 -DPANGO_DISABLE_DEPRECATED
53 -DGDK_DISABLE_DEPRECATED
54 -DGDK_PIXBUF_DISABLE_DEPRECATED
55 -DGTK_DISABLE_DEPRECATED
56 -DGNOME_DISABLE_DEPRECATED
57 -DG_DISABLE_SINGLE_INCLUDES
58 -DGTK_DISABLE_SINGLE_INCLUDES
60 -Wno-missing-field-initializers
63 -Wdeclaration-after-statement
64 -Werror-implicit-function-declaration
65 -Wformat-nonliteral -Wformat-security -Winit-self
66 -Wmissing-declarations -Wmissing-include-dirs
67 -Wmissing-noreturn -Wnested-externs -Wpointer-arith
68 -Wredundant-decls -Wundef -Wwrite-strings")
69 AC_SUBST(WARNING_FLAGS)
71 dnl Other useful compiler warnings for test builds only.
72 dnl These may produce warnings we have no control over,
73 dnl or false positives we don't always want to see.
75 dnl -Wmissing-format-attribute
77 dnl -Wstrict-aliasing=2
79 dnl GCC 4.4 got more aggressive in its aliasing optimizations, changing
80 dnl behavior that -- according to the C99 standard -- is supposed to be
81 dnl undefined. We may still have aliasing abuses lying around that rely
82 dnl on GCC's previous "undefined" behavior, so disable strict-aliasing
83 dnl optimization until we can find and fix all the abuses.
84 dnl XXX This really belongs in AM_CFLAGS.
85 CFLAGS="$CFLAGS $WARNING_FLAGS -fno-strict-aliasing"
87 dnl *********************
88 dnl Necessary programs
89 dnl *********************
97 AC_CHECK_FUNCS([memchr memmove memset regcomp setlocale strchr strcspn strrchr strstr strtol strtoull])
98 AC_CHECK_HEADERS([fcntl.h libintl.h])
100 dnl *****************
102 dnl *****************
104 LT_INIT(disable-static win32-dll)
106 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
111 AC_MSG_CHECKING([for Win32])
121 AC_MSG_RESULT([$os_win32])
122 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
129 dnl **********************************
131 dnl **********************************
132 GAIL_MODULES="gail >= gail_minimum_version"
133 PKG_CHECK_MODULES(GAIL, $GAIL_MODULES)
134 AC_SUBST(GAIL_CFLAGS)
136 AC_SUBST(GAIL_MODULES)
138 dnl **********************************
140 dnl **********************************
141 GTHREAD_MODULES="gthread-2.0"
142 PKG_CHECK_MODULES(GTHREAD, $GTHREAD_MODULES)
143 AC_SUBST(GTHREAD_CFLAGS)
144 AC_SUBST(GTHREAD_LIBS)
146 dnl **********************************
148 dnl **********************************
149 GTKHTML_MODULES="gtk+-2.0 >= gtk_minimum_version enchant >= enchant_minimum_version iso-codes"
150 PKG_CHECK_MODULES(GTKHTML, $GTKHTML_MODULES)
151 AC_SUBST(GTKHTML_CFLAGS)
152 AC_SUBST(GTKHTML_LIBS)
153 AC_SUBST(GTKHTML_MODULES)
155 dnl **********************************
156 dnl Glade catalog files
157 dnl **********************************
158 AC_ARG_WITH(glade-catalog,
159 AC_HELP_STRING([--with-glade-catalog],
160 [install the catalog files for Glade 3]
161 [(for maintainers only) @<:@default=no@:>@]),
162 [glade_catalog="$withval"], [glade_catalog="no"])
163 if test "x$glade_catalog" = "xyes"; then
164 PKG_CHECK_MODULES(GLADEUI, gladeui-1.0)
166 AM_CONDITIONAL(GLADE_CATALOG, test x$glade_catalog = xyes)
168 dnl These are still needed for 'dist' targets.
169 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
172 dnl **********************************
173 dnl soup for testgtkhtml
174 dnl **********************************
177 PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.26.0,
181 [ PKG_CHECK_MODULES(SOUP, libsoup-2.4,
185 AC_SUBST(HAVE_NEWSOUP)
186 AM_CONDITIONAL(HAVE_SOUP, test x$have_soup != xno)
187 AM_CONDITIONAL(HAVE_NEWSOUP, test x$HAVE_NEWSOUP != xno)
189 dnl **************************************************
191 dnl **************************************************
192 PKG_CHECK_MODULES(GIT, gnome-icon-theme >= gnome_icon_theme_minimum_version)
194 dnl **************************************************
196 dnl **************************************************
197 AC_MSG_CHECKING([for iso-codes package])
199 if $PKG_CONFIG --exists iso-codes; then
200 if $PKG_CONFIG iso-codes --atleast-version=0.49; then
202 AC_MSG_RESULT([$have_iso_codes])
204 AC_MSG_WARN([iso-codes detected, but version 0.49 or later is required due to licensing])
207 AC_MSG_RESULT([$have_iso_codes])
210 if test "x$have_iso_codes" = "xyes"; then
211 AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
212 if $PKG_CONFIG --variable=domains iso-codes | grep 639 >/dev/null 2>&1 && \
213 $PKG_CONFIG --variable=domains iso-codes | grep 3166 >/dev/null 2>&1 ; then
219 AC_MSG_RESULT([$result])
222 if test "x$have_iso_codes" = "xyes"; then
223 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],
224 ["`$PKG_CONFIG --variable=prefix iso-codes`"],
226 AC_DEFINE([HAVE_ISO_CODES], [1],
227 [Define if you have the iso-codes package])
230 dnl **************************************************
232 dnl **************************************************
233 AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,[REGEX_LIBS=-lregex],[AC_MSG_ERROR([No regex library found])])])
236 dnl ******************************
238 dnl ******************************
239 AC_ARG_ENABLE([shlib-factory],
240 AS_HELP_STRING([--enable-shlib-factory],
241 [build editor factory as shared library @<:@default=yes@:>@]),
242 [enable_shlib_factory="$enableval"],
243 [enable_shlib_factory="yes"])
245 if test "x$enable_shlib_factory" = "xyes"; then
246 GNOME_GTKHTML_EDITOR_SHLIB=1
247 GNOME_GTKHTML_EDITOR_TYPE="shlib"
248 AC_DEFINE(GNOME_GTKHTML_EDITOR_SHLIB,, [Editor shlib])
250 GNOME_GTKHTML_EDITOR_TYPE="exe"
253 AC_SUBST(GNOME_GTKHTML_EDITOR_TYPE)
254 AM_CONDITIONAL(EDITOR_SHLIB, test x$enable_shlib_factory = xyes)
256 dnl **********************************
257 dnl Library version information.
258 dnl **********************************
260 dnl Increment the following if the interface has additions, changes,
264 dnl Increment any time the source changes; set to 0 if you
265 dnl increment CURRENT.
268 dnl Increment if any interfaces have been added; set to 0
269 dnl if any interfaces have been removed. removal has
270 dnl precedence over adding, so set to 0 if both happened.
273 AC_SUBST(GTKHTML_CURRENT)
274 AC_SUBST(GTKHTML_REVISION)
275 AC_SUBST(GTKHTML_AGE)
287 components/editor/Makefile
288 components/editor/gtkhtml-editor.pc
290 gtkhtml/libgtkhtml.pc
298 Cookies support in soup : ${HAVE_NEWSOUP}
299 Editor component type : ${GNOME_GTKHTML_EDITOR_TYPE}