1
AC_INIT([libgweather],[2.30.3])
4
AM_CONFIG_HEADER(config.h)
5
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
6
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7
AC_CONFIG_MACRO_DIR([m4])
9
# Before making a release, the LT_VERSION string should be modified.
10
# The string is of the form C:R:A.
11
# - If interfaces have been changed or added, but binary compatibility has
12
# been preserved, change to C+1:0:A+1
13
# - If binary compatibility has been broken (eg removed or changed interfaces)
15
# - If the interface is the same as the previous version, change to C:R+1:A
21
AC_MSG_CHECKING([for Win32])
24
gweather_native_win32="yes"
27
gweather_native_win32="no"
30
AC_MSG_RESULT([$gweather_native_win32])
31
AM_CONDITIONAL(OS_WIN32, [test "$gweather_native_win32" = "yes"])
35
LIBSOUP_REQUIRED=2.4.0
36
LIBSOUP_GNOME_REQUIRED=2.25.1
41
GNOME_MAINTAINER_MODE_DEFINES
43
IT_PROG_INTLTOOL([0.40.3])
44
PKG_PROG_PKG_CONFIG([0.19])
51
AC_PATH_PROG(GCONFTOOL, gconftool-2)
53
AC_ARG_ENABLE(all-translations-in-one-xml,
54
[AC_HELP_STRING([--enable-all-translations-in-one-xml],
55
[Put all translations in a big Locations.xml file (slow to parse)])],
58
AM_CONDITIONAL(USE_ONE_BIG_XML, test "x$enable_big_xml" = "xyes")
60
AC_ARG_ENABLE(locations-compression,
61
[AC_HELP_STRING([--enable-locations-compression],
62
[Compress Locations.xml files])],
63
[enable_locations_compression=yes],
64
[enable_locations_compression=no])
65
if test "x$enable_locations_compression" = "xyes"; then
70
AC_SUBST(COMPRESS_EXT)
72
GNOME_COMPILE_WARNINGS
74
dnl ***************************************************************************
75
dnl *** --enable-more-warnings turns on more compiler warnings ***
76
dnl ***************************************************************************
77
AC_ARG_ENABLE(more-warnings,
78
[ --enable-more-warnings Maximum compiler warnings],
79
set_more_warnings="$enableval",[
82
AC_MSG_CHECKING(for more warnings, including -Werror)
83
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
87
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
88
-Wnested-externs -Wpointer-arith \
89
-Wcast-align -Wsign-compare \
93
for option in -Wno-strict-aliasing -Wno-sign-compare; do
95
CFLAGS="$CFLAGS $option"
96
AC_MSG_CHECKING([whether gcc understands $option])
97
AC_TRY_COMPILE([], [],
100
if test $has_option = no; then
101
CFLAGS="$SAVE_CFLAGS"
103
AC_MSG_RESULT($has_option)
112
if test "x$enable_maintainer_mode" = "xyes"; then
113
CFLAGS="$CFLAGS $DISABLE_DEPRECATED"
116
dnl -- Check for GTK+ 2.0 (required) ------------------------------------------
117
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
118
GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_SINGLE_INCLUDES"
122
dnl -- Check for libxml (required) ------------------------------------------
123
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
124
AC_SUBST(LIBXML_CFLAGS)
125
AC_SUBST(LIBXML_LIBS)
127
dnl -- check for libsoup (required) -----------------------------------------
128
PKG_CHECK_MODULES(LIBSOUP_GNOME,
129
[libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED],
130
[LIBSOUP_CFLAGS="$LIBSOUP_GNOME_CFLAGS"
131
LIBSOUP_LIBS="$LIBSOUP_GNOME_LIBS"
132
AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Have libsoup-gnome])],
133
[PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= $LIBSOUP_REQUIRED])])
134
AC_SUBST(LIBSOUP_CFLAGS)
135
AC_SUBST(LIBSOUP_LIBS)
137
dnl -- check for gconf (required) -----------------------------------------
138
PKG_CHECK_MODULES(GCONF,
139
[gconf-2.0 >= $GCONF_REQUIRED])
140
AC_SUBST(GCONF_CFLAGS)
145
dnl -- check for glib; redundant at this point, but sets $GLIB_MKENUMS
146
AM_PATH_GLIB_2_0($GLIB_REQUIRED)
147
CFLAGS="$CFLAGS -DG_DISABLE_SINGLE_INCLUDES"
151
GETTEXT_PACKAGE=libgweather
152
AC_SUBST(GETTEXT_PACKAGE)
153
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
157
dnl ***************************************************************************
159
dnl ***************************************************************************
160
AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
161
[REGEX_LIBS=-lregex],
162
[AC_MSG_ERROR([No regex library found])])])
166
dnl ***************************************************************************
167
dnl *** Check for presence of tm.tm_gmtoff on the system ***
168
dnl ***************************************************************************
169
AC_CHECK_MEMBER([struct tm.tm_gmtoff],[struct_tm_tm_gmtoff=true],[struct_tm_tm_gmtoff=false],[#include <time.h>])
170
case $struct_tm_tm_gmtoff in
172
AC_DEFINE_UNQUOTED(HAVE_TM_TM_GMOFF, 1, Have the tm.tm_gmtoff member.)
175
AC_CHECK_DECL(timezone,AC_DEFINE(HAVE_TIMEZONE,1,Have timezone),,
182
dnl ***************************************************************************
183
dnl *** _NL_MEASUREMENT_MEASUREMENT is an enum and not a define ***
184
dnl ***************************************************************************
185
AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
186
AC_TRY_LINK([#include <langinfo.h>], [
188
c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
189
], gtk_ok=yes, gtk_ok=no)
190
AC_MSG_RESULT($gtk_ok)
191
if test "$gtk_ok" = "yes"; then
192
AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
193
[Define if _NL_MEASUREMENT_MEASUREMENT is available])
196
dnl ***************************************************************************
197
dnl *** Find tzdata ***
198
dnl ***************************************************************************
199
AC_ARG_WITH(zoneinfo-dir,
200
[ --with-zoneinfo-dir tzdata zoneinfo directory],
201
ZONEINFO_DIR="$withval")
202
if test -z "$ZONEINFO_DIR"; then
203
if test -d /usr/share/zoneinfo; then
204
ZONEINFO_DIR="/usr/share/zoneinfo"
205
elif test -d /usr/share/lib/zoneinfo/tab; then
206
ZONEINFO_DIR="/usr/share/lib/zoneinfo/tab"
208
AC_MSG_ERROR(Can't find zoneinfo directory. Use --with-zoneinfo-dir)
211
AC_DEFINE_UNQUOTED(ZONEINFO_DIR, "$ZONEINFO_DIR", [zoneinfo directory])
213
dnl ***************************************************************************
214
dnl *** Python bindings
215
dnl ***************************************************************************
216
AC_ARG_ENABLE(python,
217
[AC_HELP_STRING([--enable-python],
218
[Build libgweather python bindings])],
221
if test "$enable_python" = "yes"; then
223
AM_CHECK_PYTHON_HEADERS(,enable_python=no)
224
PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0)
225
pygtk_defsdir=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
226
PYGTK_DEFS="$pygtk_defsdir/gtk.defs"
229
AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" = "xyes")
231
dnl ***************************************************************************
232
dnl *** Honour aclocal flags ***
233
dnl ***************************************************************************
234
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
235
AC_SUBST(ACLOCAL_AMFLAGS)
244
##################################################
245
# Checks for gtk-doc and docbook-tools
246
##################################################
249
dnl ***************************************************************************
250
dnl *** Output Makefiles et al ***
251
dnl ***************************************************************************
256
po-locations/Makefile
258
libgweather/gweather.pc
259
libgweather/gweather-uninstalled.pc
265
if test "x$enable_big_xml" = "xyes"; then
266
LOCATIONS_XML_TRANSLATIONS="one big file"
268
LOCATIONS_XML_TRANSLATIONS="one file per translation"
271
dnl ***************************************************************************
272
dnl *** Display Summary ***
273
dnl ***************************************************************************
275
libgweather-$VERSION configure summary:
278
Source code location: ${srcdir}
280
Python bindings: ${enable_python}
281
Locations.xml translations: ${LOCATIONS_XML_TRANSLATIONS}
282
Locations.xml compression: ${enable_locations_compression}