~ubuntu-branches/ubuntu/quantal/libgweather/quantal

« back to all changes in this revision

Viewing changes to .pc/01_gettext_not_xml.patch/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-05-17 15:26:05 UTC
  • mfrom: (1.1.28 upstream) (5.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20110517152605-anf9c03d1ny7yn54
Tags: 3.0.0-0ubuntu1
* Resynchronize on Debian and update to the current version, remaining diff:
* debian/control.in:
  - Build-depend on dh-autoreconf, gnome-common
  - use Conflicts on the ppa binaries names differently for easier upgrades
* debian/rules:
  - Run autotools on build
  - Generate POT files on build
* debian/patches/01_gettext_not_xml.patch: 
  - using gettext rather than add translations to the xml databases
* debian/watch: 
  - Watch unstable series  

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT([libgweather],[2.30.3])
2
 
AC_PREREQ(2.59)
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])
8
 
 
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)
14
 
#   change to C+1:0:0
15
 
# - If the interface is the same as the previous version, change to C:R+1:A
16
 
 
17
 
LT_VERSION=7:10:6
18
 
AC_SUBST(LT_VERSION)
19
 
 
20
 
AC_CANONICAL_HOST
21
 
AC_MSG_CHECKING([for Win32])
22
 
case "$host" in
23
 
  *-*-mingw*)
24
 
    gweather_native_win32="yes"
25
 
    ;;
26
 
  *)
27
 
    gweather_native_win32="no"
28
 
    ;;
29
 
esac
30
 
AC_MSG_RESULT([$gweather_native_win32])
31
 
AM_CONDITIONAL(OS_WIN32, [test "$gweather_native_win32" = "yes"])
32
 
 
33
 
GTK_REQUIRED=2.11.0
34
 
GLIB_REQUIRED=2.13.0
35
 
LIBSOUP_REQUIRED=2.4.0
36
 
LIBSOUP_GNOME_REQUIRED=2.25.1
37
 
GCONF_REQUIRED=2.8.0
38
 
LIBXML_REQUIRED=2.6.0
39
 
 
40
 
AM_MAINTAINER_MODE
41
 
GNOME_MAINTAINER_MODE_DEFINES
42
 
 
43
 
IT_PROG_INTLTOOL([0.40.3])
44
 
PKG_PROG_PKG_CONFIG([0.19])
45
 
 
46
 
AC_PROG_CC
47
 
AM_PROG_CC_C_O
48
 
AC_ISC_POSIX
49
 
AC_STDC_HEADERS
50
 
AM_PROG_LIBTOOL
51
 
AC_PATH_PROG(GCONFTOOL, gconftool-2)
52
 
 
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)])],
56
 
        [enable_big_xml=yes],
57
 
        [enable_big_xml=no])
58
 
AM_CONDITIONAL(USE_ONE_BIG_XML, test "x$enable_big_xml" = "xyes")
59
 
 
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
66
 
    COMPRESS_EXT=.gz
67
 
else
68
 
    COMPRESS_EXT=
69
 
fi
70
 
AC_SUBST(COMPRESS_EXT)
71
 
 
72
 
GNOME_COMPILE_WARNINGS
73
 
 
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",[
80
 
    set_more_warnings=no
81
 
])
82
 
AC_MSG_CHECKING(for more warnings, including -Werror)
83
 
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
84
 
    AC_MSG_RESULT(yes)
85
 
    CFLAGS="\
86
 
    -Wall \
87
 
    -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
88
 
    -Wnested-externs -Wpointer-arith \
89
 
    -Wcast-align -Wsign-compare \
90
 
    -std=gnu89 \
91
 
    $CFLAGS"
92
 
 
93
 
    for option in -Wno-strict-aliasing -Wno-sign-compare; do
94
 
        SAVE_CFLAGS="$CFLAGS"
95
 
        CFLAGS="$CFLAGS $option"
96
 
        AC_MSG_CHECKING([whether gcc understands $option])
97
 
        AC_TRY_COMPILE([], [],
98
 
            has_option=yes,
99
 
            has_option=no,)
100
 
        if test $has_option = no; then
101
 
            CFLAGS="$SAVE_CFLAGS"
102
 
        fi
103
 
        AC_MSG_RESULT($has_option)
104
 
        unset has_option
105
 
        unset SAVE_CFLAGS
106
 
    done
107
 
    unset option
108
 
else
109
 
    AC_MSG_RESULT(no)
110
 
fi
111
 
 
112
 
if test "x$enable_maintainer_mode" = "xyes"; then
113
 
        CFLAGS="$CFLAGS $DISABLE_DEPRECATED"
114
 
fi
115
 
 
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"
119
 
AC_SUBST(GTK_CFLAGS)
120
 
AC_SUBST(GTK_LIBS)
121
 
 
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)
126
 
 
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)
136
 
 
137
 
dnl -- check for gconf (required) -----------------------------------------
138
 
PKG_CHECK_MODULES(GCONF, 
139
 
                  [gconf-2.0 >= $GCONF_REQUIRED])
140
 
AC_SUBST(GCONF_CFLAGS)
141
 
AC_SUBST(GCONF_LIBS)
142
 
 
143
 
AM_GCONF_SOURCE_2
144
 
 
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"
148
 
 
149
 
dnl gettext
150
 
 
151
 
GETTEXT_PACKAGE=libgweather
152
 
AC_SUBST(GETTEXT_PACKAGE)
153
 
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
154
 
AM_GLIB_GNU_GETTEXT
155
 
 
156
 
 
157
 
dnl ***************************************************************************
158
 
dnl ***  REGEX                                                              ***
159
 
dnl ***************************************************************************
160
 
AC_CHECK_FUNCS(regexec,,[AC_CHECK_LIB(regex,regexec,
161
 
               [REGEX_LIBS=-lregex],
162
 
               [AC_MSG_ERROR([No regex library found])])])
163
 
AC_SUBST(REGEX_LIBS)
164
 
 
165
 
 
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
171
 
        true)
172
 
                AC_DEFINE_UNQUOTED(HAVE_TM_TM_GMOFF, 1, Have the tm.tm_gmtoff member.)
173
 
                ;;
174
 
        *)
175
 
                AC_CHECK_DECL(timezone,AC_DEFINE(HAVE_TIMEZONE,1,Have timezone),,
176
 
[
177
 
#include <time.h>
178
 
])
179
 
                ;;
180
 
esac
181
 
 
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>], [
187
 
char c;
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])
194
 
fi
195
 
 
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"
207
 
    else
208
 
        AC_MSG_ERROR(Can't find zoneinfo directory. Use --with-zoneinfo-dir)
209
 
    fi
210
 
fi
211
 
AC_DEFINE_UNQUOTED(ZONEINFO_DIR, "$ZONEINFO_DIR", [zoneinfo directory])
212
 
 
213
 
dnl ***************************************************************************
214
 
dnl *** Python bindings
215
 
dnl ***************************************************************************
216
 
AC_ARG_ENABLE(python,
217
 
        [AC_HELP_STRING([--enable-python],
218
 
                        [Build libgweather python bindings])],
219
 
        [enable_python=yes],
220
 
        [enable_python=no])
221
 
if test "$enable_python" = "yes"; then
222
 
   AM_PATH_PYTHON()
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"
227
 
   AC_SUBST(PYGTK_DEFS)
228
 
fi
229
 
AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" = "xyes")
230
 
 
231
 
dnl ***************************************************************************
232
 
dnl *** Honour aclocal flags                                                ***
233
 
dnl ***************************************************************************
234
 
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
235
 
AC_SUBST(ACLOCAL_AMFLAGS)
236
 
 
237
 
AC_SUBST(VERSION)
238
 
AC_SUBST(PACKAGE)
239
 
AC_SUBST(DATADIR)
240
 
AC_SUBST(LIBDIR)
241
 
AC_SUBST(PYTHONDIR)
242
 
AC_SUBST(GLADEDIR)
243
 
 
244
 
##################################################
245
 
# Checks for gtk-doc and docbook-tools
246
 
##################################################
247
 
GTK_DOC_CHECK([1.9])
248
 
 
249
 
dnl ***************************************************************************
250
 
dnl *** Output Makefiles et al                                              ***
251
 
dnl ***************************************************************************
252
 
AC_OUTPUT([
253
 
Makefile
254
 
doc/Makefile
255
 
po/Makefile.in
256
 
po-locations/Makefile
257
 
libgweather/Makefile
258
 
libgweather/gweather.pc
259
 
libgweather/gweather-uninstalled.pc
260
 
data/Makefile
261
 
python/Makefile
262
 
icons/Makefile
263
 
])
264
 
 
265
 
if test "x$enable_big_xml" = "xyes"; then
266
 
        LOCATIONS_XML_TRANSLATIONS="one big file"
267
 
else
268
 
        LOCATIONS_XML_TRANSLATIONS="one file per translation"
269
 
fi
270
 
 
271
 
dnl ***************************************************************************
272
 
dnl *** Display Summary                                                     ***
273
 
dnl ***************************************************************************
274
 
echo "
275
 
libgweather-$VERSION configure summary:
276
 
 
277
 
        Prefix:                         ${prefix}
278
 
        Source code location:           ${srcdir}
279
 
        Compiler:                       ${CC}
280
 
        Python bindings:                ${enable_python}
281
 
        Locations.xml translations:     ${LOCATIONS_XML_TRANSLATIONS}
282
 
        Locations.xml compression:      ${enable_locations_compression}
283
 
" >&2