~noskcaj/ubuntu/vivid/gnome-system-monitor/3.15

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2013-03-22 16:44:14 UTC
  • mfrom: (1.5.1) (2.2.1 sid)
  • mto: (2.2.2 sid)
  • mto: This revision was merged to the branch mainline in revision 100.
  • Revision ID: package-import@ubuntu.com-20130322164414-lg3x8lv9owt6cfnl
Tags: 3.7.92-1
* New upstream release.
* Bump build-dependencies according to configure.ac:
  - libgtk-3-dev bumped from (>= 3.0.0) to (>= 3.5.12)
  - libgtkmm-3.0-dev bumped from (>= 2.99) to (>= 3.3.18)
* Change build-dependencies for new documentation infrastructure:
 - drop gnome-doc-tools
 - add yelp-tools and itstool
* Drop patches
  - 03_dont_show_in_KDE.patch and 04_kfreebsd_cputime.patch both
    applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.11.4 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
2
2
 
3
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
4
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
14
14
 
15
15
m4_ifndef([AC_AUTOCONF_VERSION],
16
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
 
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18
 
[m4_warning([this file was generated for autoconf 2.68.
 
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
 
18
[m4_warning([this file was generated for autoconf 2.69.
19
19
You have another version of autoconf.  It may work, but is not guaranteed to.
20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
22
 
 
23
# gnome-common.m4
 
24
#
 
25
# serial 3
 
26
 
27
 
 
28
dnl GNOME_COMMON_INIT
 
29
 
 
30
AU_DEFUN([GNOME_COMMON_INIT],
 
31
[
 
32
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
33
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
34
 
 
35
  dnl ensure that when the Automake generated makefile calls aclocal,
 
36
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
37
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
38
  if test -n "$ac_macro_dir"; then
 
39
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
40
  fi
 
41
 
 
42
  AC_SUBST([ACLOCAL_AMFLAGS])
 
43
],
 
44
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
 
45
in your top-level Makefile.am, instead, where "m4" is the macro directory set
 
46
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
 
47
 
 
48
AC_DEFUN([GNOME_DEBUG_CHECK],
 
49
[
 
50
        AC_ARG_ENABLE([debug],
 
51
                      AC_HELP_STRING([--enable-debug],
 
52
                                     [turn on debugging]),,
 
53
                      [enable_debug=no])
 
54
 
 
55
        if test x$enable_debug = xyes ; then
 
56
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
57
                [Enable additional debugging at the expense of performance and size])
 
58
        fi
 
59
])
 
60
 
 
61
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
62
dnl define DISABLE_DEPRECATED
 
63
dnl
 
64
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
65
[
 
66
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
67
 
 
68
        DISABLE_DEPRECATED=""
 
69
        if test $USE_MAINTAINER_MODE = yes; then
 
70
                DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
 
71
                for DOMAIN in $DOMAINS; do
 
72
                       DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
 
73
                done
 
74
        fi
 
75
 
 
76
        AC_SUBST(DISABLE_DEPRECATED)
 
77
])
 
78
 
 
79
dnl GNOME_COMPILE_WARNINGS
 
80
dnl Turn on many useful compiler warnings
 
81
dnl For now, only works on GCC
 
82
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
83
    dnl ******************************
 
84
    dnl More compiler warnings
 
85
    dnl ******************************
 
86
 
 
87
    AC_ARG_ENABLE(compile-warnings, 
 
88
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
89
                                 [Turn on compiler warnings]),,
 
90
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
91
 
 
92
    warnCFLAGS=
 
93
    if test "x$GCC" != xyes; then
 
94
        enable_compile_warnings=no
 
95
    fi
 
96
 
 
97
    warning_flags=
 
98
    realsave_CFLAGS="$CFLAGS"
 
99
 
 
100
    case "$enable_compile_warnings" in
 
101
    no)
 
102
        warning_flags=
 
103
        ;;
 
104
    minimum)
 
105
        warning_flags="-Wall"
 
106
        ;;
 
107
    yes)
 
108
        warning_flags="-Wall -Wmissing-prototypes"
 
109
        ;;
 
110
    maximum|error)
 
111
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
112
        CFLAGS="$warning_flags $CFLAGS"
 
113
        for option in -Wno-sign-compare; do
 
114
                SAVE_CFLAGS="$CFLAGS"
 
115
                CFLAGS="$CFLAGS $option"
 
116
                AC_MSG_CHECKING([whether gcc understands $option])
 
117
                AC_TRY_COMPILE([], [],
 
118
                        has_option=yes,
 
119
                        has_option=no,)
 
120
                CFLAGS="$SAVE_CFLAGS"
 
121
                AC_MSG_RESULT($has_option)
 
122
                if test $has_option = yes; then
 
123
                  warning_flags="$warning_flags $option"
 
124
                fi
 
125
                unset has_option
 
126
                unset SAVE_CFLAGS
 
127
        done
 
128
        unset option
 
129
        if test "$enable_compile_warnings" = "error" ; then
 
130
            warning_flags="$warning_flags -Werror"
 
131
        fi
 
132
        ;;
 
133
    *)
 
134
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
135
        ;;
 
136
    esac
 
137
    CFLAGS="$realsave_CFLAGS"
 
138
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
139
    AC_MSG_RESULT($warning_flags)
 
140
 
 
141
    AC_ARG_ENABLE(iso-c,
 
142
                  AC_HELP_STRING([--enable-iso-c],
 
143
                                 [Try to warn if code is not ISO C ]),,
 
144
                  [enable_iso_c=no])
 
145
 
 
146
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
147
    complCFLAGS=
 
148
    if test "x$enable_iso_c" != "xno"; then
 
149
        if test "x$GCC" = "xyes"; then
 
150
        case " $CFLAGS " in
 
151
            *[\ \       ]-ansi[\ \      ]*) ;;
 
152
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
153
        esac
 
154
        case " $CFLAGS " in
 
155
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
156
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
157
        esac
 
158
        fi
 
159
    fi
 
160
    AC_MSG_RESULT($complCFLAGS)
 
161
 
 
162
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
163
    AC_SUBST(WARN_CFLAGS)
 
164
])
 
165
 
 
166
dnl For C++, do basically the same thing.
 
167
 
 
168
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
169
  AC_ARG_ENABLE(cxx-warnings,
 
170
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
171
                               [Turn on compiler warnings.]),,
 
172
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
173
 
 
174
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
175
  warnCXXFLAGS=
 
176
  if test "x$GXX" != xyes; then
 
177
    enable_cxx_warnings=no
 
178
  fi
 
179
  if test "x$enable_cxx_warnings" != "xno"; then
 
180
    if test "x$GXX" = "xyes"; then
 
181
      case " $CXXFLAGS " in
 
182
      *[\ \     ]-Wall[\ \      ]*) ;;
 
183
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
184
      esac
 
185
 
 
186
      ## -W is not all that useful.  And it cannot be controlled
 
187
      ## with individual -Wno-xxx flags, unlike -Wall
 
188
      if test "x$enable_cxx_warnings" = "xyes"; then
 
189
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
190
      fi
 
191
    fi
 
192
  fi
 
193
  AC_MSG_RESULT($warnCXXFLAGS)
 
194
 
 
195
   AC_ARG_ENABLE(iso-cxx,
 
196
                 AC_HELP_STRING([--enable-iso-cxx],
 
197
                                [Try to warn if code is not ISO C++ ]),,
 
198
                 [enable_iso_cxx=no])
 
199
 
 
200
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
201
   complCXXFLAGS=
 
202
   if test "x$enable_iso_cxx" != "xno"; then
 
203
     if test "x$GXX" = "xyes"; then
 
204
      case " $CXXFLAGS " in
 
205
      *[\ \     ]-ansi[\ \      ]*) ;;
 
206
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
207
      esac
 
208
 
 
209
      case " $CXXFLAGS " in
 
210
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
211
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
212
      esac
 
213
     fi
 
214
   fi
 
215
  AC_MSG_RESULT($complCXXFLAGS)
 
216
 
 
217
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
218
  AC_SUBST(WARN_CXXFLAGS)
 
219
])
 
220
 
 
221
dnl GLIB_GSETTINGS
 
222
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
 
223
dnl the schema should be compiled
 
224
dnl
 
225
 
 
226
AC_DEFUN([GLIB_GSETTINGS],
 
227
[
 
228
  m4_pattern_allow([AM_V_GEN])
 
229
  AC_ARG_ENABLE(schemas-compile,
 
230
                AS_HELP_STRING([--disable-schemas-compile],
 
231
                               [Disable regeneration of gschemas.compiled on install]),
 
232
                [case ${enableval} in
 
233
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
 
234
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
 
235
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
 
236
                 esac])
 
237
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
 
238
  PKG_PROG_PKG_CONFIG([0.16])
 
239
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
 
240
  if test x$cross_compiling != xyes; then
 
241
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
 
242
  else
 
243
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
 
244
  fi
 
245
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
 
246
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
 
247
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
 
248
  else
 
249
    ifelse([$1],,[:],[$1])
 
250
  fi
 
251
 
 
252
  GSETTINGS_RULES='
 
253
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
 
254
 
 
255
mostlyclean-am: clean-gsettings-schemas
 
256
 
 
257
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
 
258
 
 
259
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
 
260
        $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
 
261
 
 
262
all-am: $(gsettings_SCHEMAS:.xml=.valid)
 
263
uninstall-am: uninstall-gsettings-schemas
 
264
install-data-am: install-gsettings-schemas
 
265
 
 
266
.SECONDARY: $(gsettings_SCHEMAS)
 
267
 
 
268
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
 
269
        @$(NORMAL_INSTALL)
 
270
        if test -n "$^"; then \
 
271
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
 
272
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
 
273
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
 
274
        fi
 
275
 
 
276
uninstall-gsettings-schemas:
 
277
        @$(NORMAL_UNINSTALL)
 
278
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
 
279
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
 
280
        test -n "$$files" || exit 0; \
 
281
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
 
282
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
 
283
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
 
284
 
 
285
clean-gsettings-schemas:
 
286
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
 
287
 
 
288
ifdef gsettings_ENUM_NAMESPACE
 
289
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
 
290
        $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
 
291
endif
 
292
'
 
293
  _GSETTINGS_SUBST(GSETTINGS_RULES)
 
294
])
 
295
 
 
296
dnl _GSETTINGS_SUBST(VARIABLE)
 
297
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
298
AC_DEFUN([_GSETTINGS_SUBST],
 
299
[
 
300
AC_SUBST([$1])
 
301
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
302
]
 
303
)
 
304
 
 
305
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
306
# serial 1 (pkg-config-0.24)
 
307
 
308
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
309
#
 
310
# This program is free software; you can redistribute it and/or modify
 
311
# it under the terms of the GNU General Public License as published by
 
312
# the Free Software Foundation; either version 2 of the License, or
 
313
# (at your option) any later version.
 
314
#
 
315
# This program is distributed in the hope that it will be useful, but
 
316
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
317
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
318
# General Public License for more details.
 
319
#
 
320
# You should have received a copy of the GNU General Public License
 
321
# along with this program; if not, write to the Free Software
 
322
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
323
#
 
324
# As a special exception to the GNU General Public License, if you
 
325
# distribute this file as part of a program that contains a
 
326
# configuration script generated by Autoconf, you may include it under
 
327
# the same distribution terms that you use for the rest of that program.
 
328
 
 
329
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
330
# ----------------------------------
 
331
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
332
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
333
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
334
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
335
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
336
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
337
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
338
 
 
339
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
340
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
341
fi
 
342
if test -n "$PKG_CONFIG"; then
 
343
        _pkg_min_version=m4_default([$1], [0.9.0])
 
344
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
345
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
346
                AC_MSG_RESULT([yes])
 
347
        else
 
348
                AC_MSG_RESULT([no])
 
349
                PKG_CONFIG=""
 
350
        fi
 
351
fi[]dnl
 
352
])# PKG_PROG_PKG_CONFIG
 
353
 
 
354
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
355
#
 
356
# Check to see whether a particular set of modules exists.  Similar
 
357
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
358
#
 
359
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
360
# only at the first occurence in configure.ac, so if the first place
 
361
# it's called might be skipped (such as if it is within an "if", you
 
362
# have to call PKG_CHECK_EXISTS manually
 
363
# --------------------------------------------------------------
 
364
AC_DEFUN([PKG_CHECK_EXISTS],
 
365
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
366
if test -n "$PKG_CONFIG" && \
 
367
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
368
  m4_default([$2], [:])
 
369
m4_ifvaln([$3], [else
 
370
  $3])dnl
 
371
fi])
 
372
 
 
373
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
374
# ---------------------------------------------
 
375
m4_define([_PKG_CONFIG],
 
376
[if test -n "$$1"; then
 
377
    pkg_cv_[]$1="$$1"
 
378
 elif test -n "$PKG_CONFIG"; then
 
379
    PKG_CHECK_EXISTS([$3],
 
380
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
381
                      test "x$?" != "x0" && pkg_failed=yes ],
 
382
                     [pkg_failed=yes])
 
383
 else
 
384
    pkg_failed=untried
 
385
fi[]dnl
 
386
])# _PKG_CONFIG
 
387
 
 
388
# _PKG_SHORT_ERRORS_SUPPORTED
 
389
# -----------------------------
 
390
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
391
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
392
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
393
        _pkg_short_errors_supported=yes
 
394
else
 
395
        _pkg_short_errors_supported=no
 
396
fi[]dnl
 
397
])# _PKG_SHORT_ERRORS_SUPPORTED
 
398
 
 
399
 
 
400
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
401
# [ACTION-IF-NOT-FOUND])
 
402
#
 
403
#
 
404
# Note that if there is a possibility the first call to
 
405
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
406
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
407
#
 
408
#
 
409
# --------------------------------------------------------------
 
410
AC_DEFUN([PKG_CHECK_MODULES],
 
411
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
412
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
413
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
414
 
 
415
pkg_failed=no
 
416
AC_MSG_CHECKING([for $1])
 
417
 
 
418
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
419
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
420
 
 
421
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
422
and $1[]_LIBS to avoid the need to call pkg-config.
 
423
See the pkg-config man page for more details.])
 
424
 
 
425
if test $pkg_failed = yes; then
 
426
        AC_MSG_RESULT([no])
 
427
        _PKG_SHORT_ERRORS_SUPPORTED
 
428
        if test $_pkg_short_errors_supported = yes; then
 
429
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
430
        else 
 
431
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
432
        fi
 
433
        # Put the nasty error message in config.log where it belongs
 
434
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
435
 
 
436
        m4_default([$4], [AC_MSG_ERROR(
 
437
[Package requirements ($2) were not met:
 
438
 
 
439
$$1_PKG_ERRORS
 
440
 
 
441
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
442
installed software in a non-standard prefix.
 
443
 
 
444
_PKG_TEXT])[]dnl
 
445
        ])
 
446
elif test $pkg_failed = untried; then
 
447
        AC_MSG_RESULT([no])
 
448
        m4_default([$4], [AC_MSG_FAILURE(
 
449
[The pkg-config script could not be found or is too old.  Make sure it
 
450
is in your PATH or set the PKG_CONFIG environment variable to the full
 
451
path to pkg-config.
 
452
 
 
453
_PKG_TEXT
 
454
 
 
455
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
456
        ])
 
457
else
 
458
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
459
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
460
        AC_MSG_RESULT([yes])
 
461
        $3
 
462
fi[]dnl
 
463
])# PKG_CHECK_MODULES
 
464
 
 
465
AC_DEFUN([YELP_HELP_INIT],
 
466
[
 
467
AC_REQUIRE([AC_PROG_LN_S])
 
468
m4_pattern_allow([AM_V_at])
 
469
m4_pattern_allow([AM_V_GEN])
 
470
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
 
471
AC_ARG_WITH([help-dir],
 
472
            AC_HELP_STRING([--with-help-dir=DIR],
 
473
                           [path where help files are installed]),,
 
474
            [with_help_dir='${datadir}/help'])
 
475
HELP_DIR="$with_help_dir"
 
476
AC_SUBST(HELP_DIR)
 
477
 
 
478
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
 
479
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
 
480
if test x"$ITSTOOL" = x; then
 
481
  AC_MSG_ERROR([itstool not found])
 
482
fi
 
483
 
 
484
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
 
485
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
 
486
if test x"$XMLLINT" = x; then
 
487
  AC_MSG_ERROR([xmllint not found])
 
488
fi
 
489
 
 
490
YELP_HELP_RULES='
 
491
HELP_ID ?=
 
492
HELP_POT ?=
 
493
HELP_FILES ?=
 
494
HELP_EXTRA ?=
 
495
HELP_MEDIA ?=
 
496
HELP_LINGUAS ?=
 
497
 
 
498
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
 
499
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
 
500
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
 
501
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
 
502
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
 
503
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
 
504
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
 
505
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
 
506
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
 
507
 
 
508
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
 
509
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
 
510
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
 
511
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
 
512
_HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
 
513
 
 
514
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
 
515
 
 
516
.PHONY: pot
 
517
pot: $(_HELP_POTFILE)
 
518
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
 
519
        $(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
 
520
 
 
521
.PHONY: repo
 
522
repo: $(_HELP_POTFILE)
 
523
        $(AM_V_at)for po in $(_HELP_POFILES); do \
 
524
          if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
 
525
          msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
 
526
        done
 
527
 
 
528
$(_HELP_POFILES):
 
529
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
530
        $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
 
531
        $(AM_V_GEN)if ! test -f "[$]@"; then \
 
532
          (cd "$(dir [$]@)" && \
 
533
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
 
534
            mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
 
535
        else \
 
536
          (cd "$(dir [$]@)" && \
 
537
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
 
538
            msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
 
539
            rm "$(notdir [$]@).tmp"); \
 
540
        fi
 
541
 
 
542
$(_HELP_MOFILES): %.mo: %.po
 
543
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
544
        $(AM_V_GEN)msgfmt -o "[$]@" "$<"
 
545
 
 
546
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
 
547
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
 
548
$(_HELP_LC_STAMPS): %.stamp: %.mo
 
549
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
 
550
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
551
        $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
 
552
        mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
 
553
        if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
 
554
        (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
 
555
        touch "[$]@"
 
556
 
 
557
.PHONY: clean-help
 
558
mostlyclean-am: $(if $(HELP_ID),clean-help)
 
559
clean-help:
 
560
        rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
 
561
 
 
562
EXTRA_DIST ?=
 
563
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
 
564
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
 
565
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
 
566
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
 
567
 
 
568
distdir: distdir-help-files
 
569
distdir-help-files:
 
570
        @for lc in C $(HELP_LINGUAS); do \
 
571
          $(MKDIR_P) "$(distdir)/$$lc"; \
 
572
          for file in $(HELP_FILES); do \
 
573
            if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
 
574
            cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
 
575
          done; \
 
576
        done; \
 
577
 
 
578
.PHONY: check-help
 
579
check: check-help
 
580
check-help:
 
581
        for lc in C $(_HELP_LINGUAS); do \
 
582
          if test -d "$$lc"; \
 
583
            then d=; \
 
584
            xmlpath="$$lc"; \
 
585
          else \
 
586
            d="$(srcdir)/"; \
 
587
            xmlpath="$$lc:$(srcdir)/$$lc"; \
 
588
          fi; \
 
589
          for page in $(HELP_FILES); do \
 
590
            echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
 
591
            $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
 
592
          done; \
 
593
        done
 
594
 
 
595
 
 
596
.PHONY: install-help
 
597
install-data-am: $(if $(HELP_ID),install-help)
 
598
install-help:
 
599
        @for lc in C $(_HELP_LINGUAS); do \
 
600
          $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
 
601
        done
 
602
        @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
 
603
          if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
 
604
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
605
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
 
606
          echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
 
607
          $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
 
608
        done; done
 
609
        @for f in $(_HELP_C_EXTRA); do \
 
610
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
 
611
          if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
 
612
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
613
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
 
614
          echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
 
615
          $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
 
616
        done
 
617
        @for f in $(HELP_MEDIA); do \
 
618
          for lc in C $(_HELP_LINGUAS); do \
 
619
            if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
 
620
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
621
            mdir=`dirname "$$f"`; \
 
622
            if test "x$mdir" = "x."; then mdir=""; fi; \
 
623
            if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
 
624
            if test -f "$$d$$lc/$$f"; then \
 
625
              echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
 
626
              $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
 
627
            elif test "x$$lc" != "xC"; then \
 
628
              echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
 
629
              $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
 
630
            fi; \
 
631
          done; \
 
632
        done
 
633
 
 
634
.PHONY: uninstall-help
 
635
uninstall-am: $(if $(HELP_ID),uninstall-help)
 
636
uninstall-help:
 
637
        for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
 
638
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
639
          echo "rm -f $$helpdir`basename $$f`"; \
 
640
          rm -f "$$helpdir`basename $$f`"; \
 
641
        done; done
 
642
        @for f in $(_HELP_C_EXTRA); do \
 
643
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
 
644
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
645
          echo "rm -f $$helpdir`basename $$f`"; \
 
646
          rm -f "$$helpdir`basename $$f`"; \
 
647
        done
 
648
        @for f in $(HELP_MEDIA); do \
 
649
          for lc in C $(_HELP_LINGUAS); do \
 
650
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
651
            echo "rm -f $$helpdir$$f"; \
 
652
            rm -f "$$helpdir$$f"; \
 
653
          done; \
 
654
        done;
 
655
'
 
656
AC_SUBST([YELP_HELP_RULES])
 
657
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
 
658
])
 
659
 
23
660
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
24
661
# Foundation, Inc.
25
662
#
38
675
[am__api_version='1.11'
39
676
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
40
677
dnl require some minimum version.  Point them to the right macro.
41
 
m4_if([$1], [1.11.4], [],
 
678
m4_if([$1], [1.11.6], [],
42
679
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
43
680
])
44
681
 
54
691
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
55
692
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
56
693
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57
 
[AM_AUTOMAKE_VERSION([1.11.4])dnl
 
694
[AM_AUTOMAKE_VERSION([1.11.6])dnl
58
695
m4_ifndef([AC_AUTOCONF_VERSION],
59
696
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
60
697
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1066
1703
AC_SUBST([am__untar])
1067
1704
]) # _AM_PROG_TAR
1068
1705
 
1069
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1070
 
# serial 1 (pkg-config-0.24)
1071
 
1072
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1073
 
#
1074
 
# This program is free software; you can redistribute it and/or modify
1075
 
# it under the terms of the GNU General Public License as published by
1076
 
# the Free Software Foundation; either version 2 of the License, or
1077
 
# (at your option) any later version.
1078
 
#
1079
 
# This program is distributed in the hope that it will be useful, but
1080
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1081
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1082
 
# General Public License for more details.
1083
 
#
1084
 
# You should have received a copy of the GNU General Public License
1085
 
# along with this program; if not, write to the Free Software
1086
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1087
 
#
1088
 
# As a special exception to the GNU General Public License, if you
1089
 
# distribute this file as part of a program that contains a
1090
 
# configuration script generated by Autoconf, you may include it under
1091
 
# the same distribution terms that you use for the rest of that program.
1092
 
 
1093
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1094
 
# ----------------------------------
1095
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1096
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1097
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1098
 
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1099
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1100
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1101
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1102
 
 
1103
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1104
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1105
 
fi
1106
 
if test -n "$PKG_CONFIG"; then
1107
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1108
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1109
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1110
 
                AC_MSG_RESULT([yes])
1111
 
        else
1112
 
                AC_MSG_RESULT([no])
1113
 
                PKG_CONFIG=""
1114
 
        fi
1115
 
fi[]dnl
1116
 
])# PKG_PROG_PKG_CONFIG
1117
 
 
1118
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1119
 
#
1120
 
# Check to see whether a particular set of modules exists.  Similar
1121
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1122
 
#
1123
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1124
 
# only at the first occurence in configure.ac, so if the first place
1125
 
# it's called might be skipped (such as if it is within an "if", you
1126
 
# have to call PKG_CHECK_EXISTS manually
1127
 
# --------------------------------------------------------------
1128
 
AC_DEFUN([PKG_CHECK_EXISTS],
1129
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1130
 
if test -n "$PKG_CONFIG" && \
1131
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1132
 
  m4_default([$2], [:])
1133
 
m4_ifvaln([$3], [else
1134
 
  $3])dnl
1135
 
fi])
1136
 
 
1137
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1138
 
# ---------------------------------------------
1139
 
m4_define([_PKG_CONFIG],
1140
 
[if test -n "$$1"; then
1141
 
    pkg_cv_[]$1="$$1"
1142
 
 elif test -n "$PKG_CONFIG"; then
1143
 
    PKG_CHECK_EXISTS([$3],
1144
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1145
 
                      test "x$?" != "x0" && pkg_failed=yes ],
1146
 
                     [pkg_failed=yes])
1147
 
 else
1148
 
    pkg_failed=untried
1149
 
fi[]dnl
1150
 
])# _PKG_CONFIG
1151
 
 
1152
 
# _PKG_SHORT_ERRORS_SUPPORTED
1153
 
# -----------------------------
1154
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1155
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1156
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1157
 
        _pkg_short_errors_supported=yes
1158
 
else
1159
 
        _pkg_short_errors_supported=no
1160
 
fi[]dnl
1161
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1162
 
 
1163
 
 
1164
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1165
 
# [ACTION-IF-NOT-FOUND])
1166
 
#
1167
 
#
1168
 
# Note that if there is a possibility the first call to
1169
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1170
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1171
 
#
1172
 
#
1173
 
# --------------------------------------------------------------
1174
 
AC_DEFUN([PKG_CHECK_MODULES],
1175
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1176
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1177
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1178
 
 
1179
 
pkg_failed=no
1180
 
AC_MSG_CHECKING([for $1])
1181
 
 
1182
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1183
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1184
 
 
1185
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1186
 
and $1[]_LIBS to avoid the need to call pkg-config.
1187
 
See the pkg-config man page for more details.])
1188
 
 
1189
 
if test $pkg_failed = yes; then
1190
 
        AC_MSG_RESULT([no])
1191
 
        _PKG_SHORT_ERRORS_SUPPORTED
1192
 
        if test $_pkg_short_errors_supported = yes; then
1193
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1194
 
        else 
1195
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1196
 
        fi
1197
 
        # Put the nasty error message in config.log where it belongs
1198
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1199
 
 
1200
 
        m4_default([$4], [AC_MSG_ERROR(
1201
 
[Package requirements ($2) were not met:
1202
 
 
1203
 
$$1_PKG_ERRORS
1204
 
 
1205
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1206
 
installed software in a non-standard prefix.
1207
 
 
1208
 
_PKG_TEXT])[]dnl
1209
 
        ])
1210
 
elif test $pkg_failed = untried; then
1211
 
        AC_MSG_RESULT([no])
1212
 
        m4_default([$4], [AC_MSG_FAILURE(
1213
 
[The pkg-config script could not be found or is too old.  Make sure it
1214
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1215
 
path to pkg-config.
1216
 
 
1217
 
_PKG_TEXT
1218
 
 
1219
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1220
 
        ])
1221
 
else
1222
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1223
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1224
 
        AC_MSG_RESULT([yes])
1225
 
        $3
1226
 
fi[]dnl
1227
 
])# PKG_CHECK_MODULES
1228
 
 
1229
 
# gnome-common.m4
1230
 
#
1231
 
# serial 3
1232
 
1233
 
 
1234
 
dnl GNOME_COMMON_INIT
1235
 
 
1236
 
AU_DEFUN([GNOME_COMMON_INIT],
1237
 
[
1238
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
1239
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1240
 
 
1241
 
  dnl ensure that when the Automake generated makefile calls aclocal,
1242
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
1243
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1244
 
  if test -n "$ac_macro_dir"; then
1245
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1246
 
  fi
1247
 
 
1248
 
  AC_SUBST([ACLOCAL_AMFLAGS])
1249
 
],
1250
 
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
1251
 
in your top-level Makefile.am, instead, where "m4" is the macro directory set
1252
 
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
1253
 
 
1254
 
AC_DEFUN([GNOME_DEBUG_CHECK],
1255
 
[
1256
 
        AC_ARG_ENABLE([debug],
1257
 
                      AC_HELP_STRING([--enable-debug],
1258
 
                                     [turn on debugging]),,
1259
 
                      [enable_debug=no])
1260
 
 
1261
 
        if test x$enable_debug = xyes ; then
1262
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1263
 
                [Enable additional debugging at the expense of performance and size])
1264
 
        fi
1265
 
])
1266
 
 
1267
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
1268
 
dnl define DISABLE_DEPRECATED
1269
 
dnl
1270
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1271
 
[
1272
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
1273
 
 
1274
 
        DISABLE_DEPRECATED=""
1275
 
        if test $USE_MAINTAINER_MODE = yes; then
1276
 
                DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
1277
 
                for DOMAIN in $DOMAINS; do
1278
 
                       DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1279
 
                done
1280
 
        fi
1281
 
 
1282
 
        AC_SUBST(DISABLE_DEPRECATED)
1283
 
])
1284
 
 
1285
 
dnl GNOME_COMPILE_WARNINGS
1286
 
dnl Turn on many useful compiler warnings
1287
 
dnl For now, only works on GCC
1288
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1289
 
    dnl ******************************
1290
 
    dnl More compiler warnings
1291
 
    dnl ******************************
1292
 
 
1293
 
    AC_ARG_ENABLE(compile-warnings, 
1294
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1295
 
                                 [Turn on compiler warnings]),,
1296
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
1297
 
 
1298
 
    warnCFLAGS=
1299
 
    if test "x$GCC" != xyes; then
1300
 
        enable_compile_warnings=no
1301
 
    fi
1302
 
 
1303
 
    warning_flags=
1304
 
    realsave_CFLAGS="$CFLAGS"
1305
 
 
1306
 
    case "$enable_compile_warnings" in
1307
 
    no)
1308
 
        warning_flags=
1309
 
        ;;
1310
 
    minimum)
1311
 
        warning_flags="-Wall"
1312
 
        ;;
1313
 
    yes)
1314
 
        warning_flags="-Wall -Wmissing-prototypes"
1315
 
        ;;
1316
 
    maximum|error)
1317
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1318
 
        CFLAGS="$warning_flags $CFLAGS"
1319
 
        for option in -Wno-sign-compare; do
1320
 
                SAVE_CFLAGS="$CFLAGS"
1321
 
                CFLAGS="$CFLAGS $option"
1322
 
                AC_MSG_CHECKING([whether gcc understands $option])
1323
 
                AC_TRY_COMPILE([], [],
1324
 
                        has_option=yes,
1325
 
                        has_option=no,)
1326
 
                CFLAGS="$SAVE_CFLAGS"
1327
 
                AC_MSG_RESULT($has_option)
1328
 
                if test $has_option = yes; then
1329
 
                  warning_flags="$warning_flags $option"
1330
 
                fi
1331
 
                unset has_option
1332
 
                unset SAVE_CFLAGS
1333
 
        done
1334
 
        unset option
1335
 
        if test "$enable_compile_warnings" = "error" ; then
1336
 
            warning_flags="$warning_flags -Werror"
1337
 
        fi
1338
 
        ;;
1339
 
    *)
1340
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1341
 
        ;;
1342
 
    esac
1343
 
    CFLAGS="$realsave_CFLAGS"
1344
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1345
 
    AC_MSG_RESULT($warning_flags)
1346
 
 
1347
 
    AC_ARG_ENABLE(iso-c,
1348
 
                  AC_HELP_STRING([--enable-iso-c],
1349
 
                                 [Try to warn if code is not ISO C ]),,
1350
 
                  [enable_iso_c=no])
1351
 
 
1352
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1353
 
    complCFLAGS=
1354
 
    if test "x$enable_iso_c" != "xno"; then
1355
 
        if test "x$GCC" = "xyes"; then
1356
 
        case " $CFLAGS " in
1357
 
            *[\ \       ]-ansi[\ \      ]*) ;;
1358
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
1359
 
        esac
1360
 
        case " $CFLAGS " in
1361
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
1362
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
1363
 
        esac
1364
 
        fi
1365
 
    fi
1366
 
    AC_MSG_RESULT($complCFLAGS)
1367
 
 
1368
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
1369
 
    AC_SUBST(WARN_CFLAGS)
1370
 
])
1371
 
 
1372
 
dnl For C++, do basically the same thing.
1373
 
 
1374
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
1375
 
  AC_ARG_ENABLE(cxx-warnings,
1376
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1377
 
                               [Turn on compiler warnings.]),,
1378
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
1379
 
 
1380
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1381
 
  warnCXXFLAGS=
1382
 
  if test "x$GXX" != xyes; then
1383
 
    enable_cxx_warnings=no
1384
 
  fi
1385
 
  if test "x$enable_cxx_warnings" != "xno"; then
1386
 
    if test "x$GXX" = "xyes"; then
1387
 
      case " $CXXFLAGS " in
1388
 
      *[\ \     ]-Wall[\ \      ]*) ;;
1389
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1390
 
      esac
1391
 
 
1392
 
      ## -W is not all that useful.  And it cannot be controlled
1393
 
      ## with individual -Wno-xxx flags, unlike -Wall
1394
 
      if test "x$enable_cxx_warnings" = "xyes"; then
1395
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1396
 
      fi
1397
 
    fi
1398
 
  fi
1399
 
  AC_MSG_RESULT($warnCXXFLAGS)
1400
 
 
1401
 
   AC_ARG_ENABLE(iso-cxx,
1402
 
                 AC_HELP_STRING([--enable-iso-cxx],
1403
 
                                [Try to warn if code is not ISO C++ ]),,
1404
 
                 [enable_iso_cxx=no])
1405
 
 
1406
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1407
 
   complCXXFLAGS=
1408
 
   if test "x$enable_iso_cxx" != "xno"; then
1409
 
     if test "x$GXX" = "xyes"; then
1410
 
      case " $CXXFLAGS " in
1411
 
      *[\ \     ]-ansi[\ \      ]*) ;;
1412
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1413
 
      esac
1414
 
 
1415
 
      case " $CXXFLAGS " in
1416
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
1417
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1418
 
      esac
1419
 
     fi
1420
 
   fi
1421
 
  AC_MSG_RESULT($complCXXFLAGS)
1422
 
 
1423
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1424
 
  AC_SUBST(WARN_CXXFLAGS)
1425
 
])
1426
 
 
1427
 
dnl GLIB_GSETTINGS
1428
 
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1429
 
dnl the schema should be compiled
1430
 
dnl
1431
 
 
1432
 
AC_DEFUN([GLIB_GSETTINGS],
1433
 
[
1434
 
  m4_pattern_allow([AM_V_GEN])
1435
 
  AC_ARG_ENABLE(schemas-compile,
1436
 
                AS_HELP_STRING([--disable-schemas-compile],
1437
 
                               [Disable regeneration of gschemas.compiled on install]),
1438
 
                [case ${enableval} in
1439
 
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
1440
 
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1441
 
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1442
 
                 esac])
1443
 
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1444
 
  PKG_PROG_PKG_CONFIG([0.16])
1445
 
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1446
 
  if test x$cross_compiling != xyes; then
1447
 
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1448
 
  else
1449
 
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1450
 
  fi
1451
 
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
1452
 
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1453
 
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1454
 
  else
1455
 
    ifelse([$1],,[:],[$1])
1456
 
  fi
1457
 
 
1458
 
  GSETTINGS_RULES='
1459
 
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1460
 
 
1461
 
mostlyclean-am: clean-gsettings-schemas
1462
 
 
1463
 
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1464
 
 
1465
 
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1466
 
        $(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
1467
 
 
1468
 
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1469
 
uninstall-am: uninstall-gsettings-schemas
1470
 
install-data-am: install-gsettings-schemas
1471
 
 
1472
 
.SECONDARY: $(gsettings_SCHEMAS)
1473
 
 
1474
 
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1475
 
        @$(NORMAL_INSTALL)
1476
 
        if test -n "$^"; then \
1477
 
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1478
 
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1479
 
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1480
 
        fi
1481
 
 
1482
 
uninstall-gsettings-schemas:
1483
 
        @$(NORMAL_UNINSTALL)
1484
 
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1485
 
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1486
 
        test -n "$$files" || exit 0; \
1487
 
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1488
 
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1489
 
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1490
 
 
1491
 
clean-gsettings-schemas:
1492
 
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1493
 
 
1494
 
ifdef gsettings_ENUM_NAMESPACE
1495
 
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1496
 
        $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
1497
 
endif
1498
 
'
1499
 
  _GSETTINGS_SUBST(GSETTINGS_RULES)
1500
 
])
1501
 
 
1502
 
dnl _GSETTINGS_SUBST(VARIABLE)
1503
 
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1504
 
AC_DEFUN([_GSETTINGS_SUBST],
1505
 
[
1506
 
AC_SUBST([$1])
1507
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1508
 
]
1509
 
)
1510
 
 
1511
1706
m4_include([m4/gettext.m4])
1512
 
m4_include([m4/gnome-doc-utils.m4])
1513
1707
m4_include([m4/iconv.m4])
1514
1708
m4_include([m4/intlmacosx.m4])
1515
1709
m4_include([m4/intltool.m4])