~ubuntu-branches/ubuntu/trusty/gnome-utils/trusty

« back to all changes in this revision

Viewing changes to .pc/04_lpi.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-03-21 21:13:36 UTC
  • Revision ID: package-import@ubuntu.com-20120321211336-3joprtdk2evtqf1j
Tags: 3.2.1-0ubuntu6
Dropped other binaries which have their sources, keep the transitional
dummy gnome-utils for the lts though

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
m4_define([gnome_utils_major], [3])
2
 
m4_define([gnome_utils_minor], [2])
3
 
m4_define([gnome_utils_micro], [1])
4
 
 
5
 
m4_define([gnome_utils_version], [gnome_utils_major.gnome_utils_minor.gnome_utils_micro])
6
 
 
7
 
AC_PREREQ([2.64])
8
 
 
9
 
AC_INIT([gnome-utils],
10
 
        [gnome_utils_version],
11
 
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-utils],
12
 
        [gnome-utils],
13
 
        [http://live.gnome.org/GnomeUtils])
14
 
 
15
 
AC_CONFIG_HEADERS([config.h])
16
 
AC_CONFIG_MACRO_DIR([m4])
17
 
 
18
 
AM_INIT_AUTOMAKE([1.11 -Wno-portability dist-bzip2])
19
 
AM_SILENT_RULES([yes])
20
 
AM_MAINTAINER_MODE
21
 
 
22
 
IT_PROG_INTLTOOL([0.40.0])
23
 
 
24
 
AC_PROG_CXX
25
 
AC_PROG_CC
26
 
AC_PROG_CPP
27
 
AC_HEADER_STDC
28
 
AC_PROG_INSTALL
29
 
AC_PROG_LN_S
30
 
AC_PROG_MAKE_SET
31
 
 
32
 
AC_PATH_PROG(GLIB_GENMARSHAL, [glib-genmarshal])
33
 
AC_PATH_PROG(GLIB_MKENUMS, [glib-mkenums])
34
 
 
35
 
GNOME_COMPILE_WARNINGS([maximum])
36
 
 
37
 
AC_PATH_XTRA
38
 
 
39
 
AC_TYPE_OFF_T
40
 
AC_TYPE_PID_T
41
 
AC_TYPE_SIZE_T
42
 
AC_HEADER_TIME
43
 
AC_STRUCT_TM
44
 
AC_FUNC_STRFTIME
45
 
AC_CHECK_FUNCS([getpgid])
46
 
 
47
 
# Before making a release, the LT_VERSION string should be modified.
48
 
# The string is of the form C:R:A.
49
 
# - If interfaces have been changed or added, but binary compatibility has
50
 
#   been preserved, change to C+1:0:A+1
51
 
# - If binary compatibility has been broken (eg removed or changed interfaces)
52
 
#   change to C+1:0:0
53
 
# - If the interface is the same as the previous version, change to C:R+1:A
54
 
 
55
 
LT_PREREQ([2.2.6])
56
 
LT_INIT([disable-static win32-dll])
57
 
 
58
 
LIBGDICT_LT_VERSION=6:7:0
59
 
AC_SUBST(LIBGDICT_LT_VERSION)
60
 
 
61
 
dnl host architecture check
62
 
AS_CASE([$host],
63
 
 
64
 
        [*-*-solaris*], [SUN_OS="-DON_SUN_OS"],
65
 
        [*],            [SUN_OS=""]
66
 
)
67
 
AC_SUBST(SUN_OS)
68
 
 
69
 
dnl pkg-config check
70
 
 
71
 
GLIB_REQUIRED=2.29.14
72
 
GTK_REQUIRED=3.0.3
73
 
LIBGTOP_REQUIRED=2.12.0
74
 
LIBCANBERRA_GTK_REQUIRED=0.26
75
 
 
76
 
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_REQUIRED])
77
 
AC_SUBST(GLIB_CFLAGS)
78
 
AC_SUBST(GLIB_LIBS)
79
 
 
80
 
PKG_CHECK_MODULES([GTHREAD], [gthread-2.0 >= $GLIB_REQUIRED])
81
 
AC_SUBST(GTHREAD_CFLAGS)
82
 
AC_SUBST(GTHREAD_LIBS)
83
 
 
84
 
PKG_CHECK_MODULES([GIO], [gio-2.0])
85
 
AC_SUBST(GIO_CFLAGS)
86
 
AC_SUBST(GIO_LIBS)
87
 
 
88
 
PKG_CHECK_MODULES([GIO_UNIX], [gio-unix-2.0])
89
 
AC_SUBST(GIO_UNIX_CFLAGS)
90
 
AC_SUBST(GIO_UNIX_LIBS)
91
 
 
92
 
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQUIRED])
93
 
AC_SUBST(GTK_CFLAGS)
94
 
AC_SUBST(GTK_LIBS)
95
 
 
96
 
PKG_CHECK_MODULES(LIBEGGSMCLIENT, gtk+-3.0 >= $GTK_REQUIRED)
97
 
AC_SUBST(LIBEGGSMCLIENT_CFLAGS)
98
 
AC_SUBST(LIBEGGSMCLIENT_LIBS)
99
 
 
100
 
PKG_CHECK_MODULES(DESKTOP_GSETTINGS, gsettings-desktop-schemas)
101
 
AC_SUBST(DESKTOP_GSETTINGS)
102
 
AC_SUBST(DESKTOP_GSETTINGS)
103
 
 
104
 
PKG_CHECK_MODULES(GCONF, gconf-2.0)
105
 
AC_SUBST(GCONF_CFLAGS)
106
 
AC_SUBST(GCONF_LIBS)
107
 
 
108
 
# For each cycle:
109
 
#       first release: increment major += 1, minor = micro = 0;
110
 
#       each release before API freeze: minor += 1;
111
 
#       each release after API freeze: micro += 1;
112
 
# Even if this library is not part of the developers platform, we
113
 
# follow the same rules: no ABI breakage (unless unavoidable) and
114
 
# no API breakage past the API freeze.
115
 
m4_define([gdict_major_version], [0])
116
 
m4_define([gdict_minor_version], [11])
117
 
m4_define([gdict_micro_version], [0])
118
 
m4_define([gdict_version], [gdict_major_version.gdict_minor_version.gdict_micro_version])
119
 
 
120
 
GDICT_MAJOR_VERSION=gdict_major_version
121
 
GDICT_MINOR_VERSION=gdict_minor_version
122
 
GDICT_MICRO_VERSION=gdict_micro_version
123
 
GDICT_VERSION=gdict_version
124
 
 
125
 
AC_SUBST(GDICT_MAJOR_VERSION)
126
 
AC_SUBST(GDICT_MINOR_VERSION)
127
 
AC_SUBST(GDICT_MICRO_VERSION)
128
 
AC_SUBST(GDICT_VERSION)
129
 
 
130
 
# xext for gnome-screenshot; in theory checking for xext should be
131
 
# enough but there are a lot of broken distros out there
132
 
PKG_CHECK_MODULES([XSHAPE],
133
 
                  [xext x11],
134
 
                  [
135
 
                    AC_CHECK_HEADERS([X11/extensions/shape.h],
136
 
                                     [XSHAPE_LIBS="-lXext -lX11"])
137
 
                  ])
138
 
AC_SUBST(XSHAPE_LIBS)
139
 
 
140
 
# for anything which calls gconftool-2 correctly
141
 
AC_PATH_PROG(GCONFTOOL, [gconftool-2], [no])
142
 
AS_IF([test "x$GCONFTOOL" = "xno"],
143
 
      [AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])]
144
 
)
145
 
 
146
 
# Baobab checks
147
 
PKG_CHECK_MODULES([LIBGTOP], [libgtop-2.0 >= $LIBGTOP_REQUIRED])
148
 
AC_SUBST(LIBGTOP_CFLAGS)
149
 
AC_SUBST(LIBGTOP_LIBS)
150
 
 
151
 
PKG_CHECK_MODULES([LIBCANBERRA_GTK], [libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED])
152
 
AC_SUBST(LIBCANBERRA_GTK_CFLAGS)
153
 
AC_SUBST(LIBCANBERRA_GTK_LIBS)
154
 
 
155
 
dnl ***************************************************************
156
 
dnl Other miscellaneous checks 
157
 
dnl ***************************************************************
158
 
 
159
 
dnl Enable debug messages
160
 
m4_define([debug_default], [m4_if(m4_eval(gdict_minor_version % 2), [1], [yes], [minimum])])
161
 
AC_ARG_ENABLE([debug],
162
 
              [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
163
 
                              [Enable debug messages @<:@default=debug_default@:>@])],
164
 
              [],
165
 
              [enable_debug=debug_default])
166
 
 
167
 
AS_CASE([$enable_debug],
168
 
 
169
 
        [yes],
170
 
        [
171
 
          test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
172
 
          GDICT_DEBUG_CFLAGS="-DGDICT_ENABLE_DEBUG"
173
 
        ],
174
 
 
175
 
        [minimum],
176
 
        [GDICT_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"],
177
 
 
178
 
        [no],
179
 
        [GDICT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
180
 
 
181
 
        [*], [AC_MSG_ERROR([Unknown argument to --enable-debug])]
182
 
)
183
 
 
184
 
AC_SUBST(GDICT_DEBUG_CFLAGS)
185
 
 
186
 
dnl IPv6 support
187
 
AC_MSG_CHECKING([whether to enable IPv6])
188
 
AC_ARG_ENABLE([ipv6],
189
 
              [AS_HELP_STRING([--enable-ipv6=@<:@yes/no@:>@],
190
 
                              [Enables compilation of IPv6 code])],
191
 
              [],
192
 
              [enable_ipv6=yes])
193
 
 
194
 
AS_IF([test "x$enable_ipv6" = "xyes"],
195
 
      [
196
 
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
197
 
            #include <sys/socket.h>
198
 
            #include <sys/types.h>
199
 
          ]], [[
200
 
            struct sockaddr_storage ss;
201
 
            socket(AF_INET6, SOCK_STREAM, 0)
202
 
          ]])],
203
 
          [have_ipv6=yes],
204
 
          [have_ipv6=no]
205
 
        )
206
 
      ]
207
 
)
208
 
 
209
 
AS_IF([test "x$have_ipv6" = "xyes"],
210
 
      [
211
 
        have_getaddrinfo=no
212
 
        AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
213
 
 
214
 
        AS_IF([test "x$have_getaddrinfo" != "xyes"],
215
 
              [
216
 
                for lib in bsd socket inet; do
217
 
                  AC_CHECK_LIB($lib,
218
 
                               [getaddrinfo],
219
 
                               ["LIBS=$LIBS -l$lib"; have_getaddrinfo=yes; break])
220
 
                done
221
 
              ]
222
 
        )
223
 
 
224
 
        AS_IF([test "x$have_getaddrinfo" = "xyes"],
225
 
              [AC_DEFINE([ENABLE_IPV6], [1], [Define whether IPv6 support is enabled])]
226
 
        )
227
 
      ]
228
 
)
229
 
 
230
 
 
231
 
dnl strftime extension checks
232
 
AC_RUN_IFELSE(
233
 
  [AC_LANG_SOURCE([[
234
 
  #include <time.h>
235
 
  int main (void) {
236
 
    char buf[100];
237
 
    struct tm tm = {0};
238
 
    tm.tm_year = 99;
239
 
    if (strftime(buf, 100, "%EY", &tm) == 4 && strcmp (buf, "1999")==0)
240
 
      return 0;
241
 
    return 1;
242
 
  }
243
 
  ]])],[
244
 
    AC_DEFINE([HAVE_STRFTIME_EXTENSION], [1],
245
 
              [Define if strftime supports %E and %O modifiers.])
246
 
  ],
247
 
  [],[])
248
 
 
249
 
dnl gnome-search-tool checks
250
 
withval=""
251
 
AC_ARG_WITH([grep],
252
 
            AS_HELP_STRING([--with-grep=@<:@grep command@:>@],
253
 
                           [Specify where to find the grep binary]),
254
 
            [
255
 
              AS_IF([test x$withval != x],
256
 
                    [AC_MSG_RESULT(${withval} is used for gnome-search-tool.)],
257
 
 
258
 
                    [AC_MSG_RESULT(grep is used for gnome-search-tool.)]
259
 
              )
260
 
            ])
261
 
 
262
 
AS_IF([test x$withval != x],
263
 
      [GREP_COMMAND="$withval"],
264
 
 
265
 
      [GREP_COMMAND="grep"]
266
 
)
267
 
 
268
 
AC_SUBST(GREP_COMMAND)
269
 
 
270
 
 
271
 
dnl logview checks
272
 
AC_ARG_ENABLE([zlib],
273
 
              [AS_HELP_STRING([--disable-zlib],[disable zlib support])])
274
 
msg_zlib=no
275
 
Z_LIBS=
276
 
 
277
 
AS_IF([test "x$enable_zlib" != "xno"],
278
 
      [
279
 
        AC_CHECK_HEADER([zlib.h], [AC_CHECK_LIB([z], [inflate], [msg_zlib=yes])])
280
 
 
281
 
        AS_IF([test "x$msg_zlib" = "xyes"],
282
 
              [
283
 
                AC_DEFINE(HAVE_ZLIB, [1],
284
 
                          [Define to 1 if we're building with ZLib support])
285
 
                Z_LIBS="-lz"
286
 
              ]
287
 
        )
288
 
      ]
289
 
)
290
 
 
291
 
AC_SUBST(Z_LIBS)
292
 
 
293
 
dnl scrollkeeper checks 
294
 
AC_PATH_PROG(SCROLLKEEPER_CONFIG, [scrollkeeper-config], [no])
295
 
AS_IF([test x$SCROLLKEEPER_CONFIG = xno],
296
 
      [
297
 
        AC_MSG_ERROR([Couldn't find scrollkeeper-config. Please install the scrollkeeper package])
298
 
      ]
299
 
)
300
 
 
301
 
dnl = Enable strict compiler flags =========================================
302
 
 
303
 
# use strict compiler flags only on development releases
304
 
m4_define([maintainer_flags_default], [m4_if(m4_eval(gnome_utils_minor % 2), [1], [yes], [no])])
305
 
AC_ARG_ENABLE([maintainer-flags],
306
 
              [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
307
 
                              [Use strict compiler flags @<:@default=maintainer_flags_default@:>@])],
308
 
              [],
309
 
              [enable_maintainer_flags=maintainer_flags_default])
310
 
 
311
 
AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
312
 
      [
313
 
        MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wformat-security -Winit-self"
314
 
        AC_SUBST(MAINTAINER_CFLAGS)
315
 
      ]
316
 
)
317
 
 
318
 
dnl Internationalization
319
 
GETTEXT_PACKAGE=gnome-utils-2.0
320
 
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define the gettext package to use])
321
 
AC_SUBST(GETTEXT_PACKAGE)
322
 
AM_GLIB_GNU_GETTEXT
323
 
 
324
 
# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
325
 
# this is the directory where the *.{mo,gmo} files are installed
326
 
gnomeutilslocaledir='${prefix}/${DATADIRNAME}/locale'
327
 
AC_SUBST(gnomeutilslocaledir)
328
 
 
329
 
GLIB_GSETTINGS
330
 
AM_GCONF_SOURCE_2
331
 
 
332
 
dnl gtk-doc stuff
333
 
GTK_DOC_CHECK([1.10])
334
 
 
335
 
dnl gnome-doc-utils stuff
336
 
GNOME_DOC_INIT
337
 
 
338
 
AC_CONFIG_FILES([
339
 
        Makefile
340
 
 
341
 
        m4/Makefile
342
 
 
343
 
        po/Makefile.in
344
 
 
345
 
        libeggsmclient/Makefile
346
 
 
347
 
        baobab/Makefile
348
 
        baobab/data/Makefile
349
 
        baobab/pixmaps/Makefile
350
 
        baobab/src/Makefile
351
 
        baobab/help/Makefile
352
 
 
353
 
        logview/Makefile
354
 
        logview/data/Makefile
355
 
        logview/data/icons/Makefile
356
 
        logview/tests/Makefile
357
 
        logview/help/Makefile
358
 
 
359
 
        gsearchtool/Makefile
360
 
        gsearchtool/data/Makefile
361
 
        gsearchtool/help/Makefile
362
 
        gsearchtool/libgnomeui-deprecated/Makefile
363
 
 
364
 
        gnome-dictionary/Makefile
365
 
        gnome-dictionary/libgdict/Makefile
366
 
        gnome-dictionary/libgdict/gdict-version.h
367
 
        gnome-dictionary/libgdict/gdict-1.0.pc
368
 
        gnome-dictionary/data/Makefile
369
 
        gnome-dictionary/data/org.gnome.dictionary.gschema.xml.in
370
 
        gnome-dictionary/docs/Makefile
371
 
        gnome-dictionary/docs/reference/Makefile
372
 
        gnome-dictionary/docs/reference/gdict/Makefile
373
 
        gnome-dictionary/docs/reference/gdict/version.xml
374
 
        gnome-dictionary/help/Makefile
375
 
        gnome-dictionary/src/Makefile
376
 
 
377
 
        gnome-screenshot/Makefile
378
 
 
379
 
        font-viewer/Makefile
380
 
        font-viewer/gnome-font-viewer.desktop.in
381
 
])
382
 
 
383
 
AC_OUTPUT
384
 
 
385
 
dnl <= Configuration summary =>
386
 
 
387
 
echo "
388
 
gnome-utils $VERSION configuration summary:
389
 
 
390
 
                   Compiler flags : $CFLAGS
391
 
                     Linker flags : $LDFLAGS
392
 
        Maintainer compiler flags : $MAINTAINER_CFLAGS
393
 
 
394
 
                           prefix : $prefix
395
 
                      sysconf dir : $sysconfdir
396
 
                          bin dir : $bindir
397
 
                         sbin dir : $sbindir
398
 
                         data dir : $datadir
399
 
 
400
 
        Debug messages (libgdict) : $enable_debug
401
 
         API Reference (libgdict) : $enable_gtk_doc
402
 
  Logview built with ZLib support : $msg_zlib
403
 
"