~ubuntu-branches/ubuntu/wily/gnome-chess/wily

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort, Jeremy Bicha, Emilio Pozuelo Monfort
  • Date: 2013-05-25 18:48:35 UTC
  • mfrom: (0.1.6 sid) (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130525184835-jdun5lv3y5ztbqx3
Tags: 1:3.8.2-1
[ Jeremy Bicha ]
* Package split from gnome-games
* Add transitional package for rename from glchess

[ Emilio Pozuelo Monfort ]
* debian/control.in:
  + Swith valac-0.18 build dependency to valac (>= 0.18).

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
21
 
 
22
# gnome-common.m4
 
23
#
 
24
# serial 3
 
25
 
26
 
 
27
dnl GNOME_COMMON_INIT
 
28
 
 
29
AU_DEFUN([GNOME_COMMON_INIT],
 
30
[
 
31
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
32
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
33
 
 
34
  dnl ensure that when the Automake generated makefile calls aclocal,
 
35
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
36
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
37
  if test -n "$ac_macro_dir"; then
 
38
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
39
  fi
 
40
 
 
41
  AC_SUBST([ACLOCAL_AMFLAGS])
 
42
],
 
43
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
 
44
in your top-level Makefile.am, instead, where "m4" is the macro directory set
 
45
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
 
46
 
 
47
AC_DEFUN([GNOME_DEBUG_CHECK],
 
48
[
 
49
        AC_ARG_ENABLE([debug],
 
50
                      AC_HELP_STRING([--enable-debug],
 
51
                                     [turn on debugging]),,
 
52
                      [enable_debug=no])
 
53
 
 
54
        if test x$enable_debug = xyes ; then
 
55
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
56
                [Enable additional debugging at the expense of performance and size])
 
57
        fi
 
58
])
 
59
 
 
60
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
61
dnl define DISABLE_DEPRECATED
 
62
dnl
 
63
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
64
[
 
65
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
66
 
 
67
        DISABLE_DEPRECATED=""
 
68
        if test $USE_MAINTAINER_MODE = yes; then
 
69
                DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
 
70
                for DOMAIN in $DOMAINS; do
 
71
                       DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
 
72
                done
 
73
        fi
 
74
 
 
75
        AC_SUBST(DISABLE_DEPRECATED)
 
76
])
 
77
 
 
78
dnl GLIB_GSETTINGS
 
79
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
 
80
dnl the schema should be compiled
 
81
dnl
 
82
 
 
83
AC_DEFUN([GLIB_GSETTINGS],
 
84
[
 
85
  m4_pattern_allow([AM_V_GEN])
 
86
  AC_ARG_ENABLE(schemas-compile,
 
87
                AS_HELP_STRING([--disable-schemas-compile],
 
88
                               [Disable regeneration of gschemas.compiled on install]),
 
89
                [case ${enableval} in
 
90
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
 
91
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
 
92
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
 
93
                 esac])
 
94
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
 
95
  PKG_PROG_PKG_CONFIG([0.16])
 
96
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
 
97
  if test x$cross_compiling != xyes; then
 
98
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
 
99
  else
 
100
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
 
101
  fi
 
102
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
 
103
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
 
104
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
 
105
  else
 
106
    ifelse([$1],,[:],[$1])
 
107
  fi
 
108
 
 
109
  GSETTINGS_RULES='
 
110
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
 
111
 
 
112
mostlyclean-am: clean-gsettings-schemas
 
113
 
 
114
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
 
115
 
 
116
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
 
117
        $(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 [$]@
 
118
 
 
119
all-am: $(gsettings_SCHEMAS:.xml=.valid)
 
120
uninstall-am: uninstall-gsettings-schemas
 
121
install-data-am: install-gsettings-schemas
 
122
 
 
123
.SECONDARY: $(gsettings_SCHEMAS)
 
124
 
 
125
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
 
126
        @$(NORMAL_INSTALL)
 
127
        if test -n "$^"; then \
 
128
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
 
129
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
 
130
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
 
131
        fi
 
132
 
 
133
uninstall-gsettings-schemas:
 
134
        @$(NORMAL_UNINSTALL)
 
135
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
 
136
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
 
137
        test -n "$$files" || exit 0; \
 
138
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
 
139
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
 
140
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
 
141
 
 
142
clean-gsettings-schemas:
 
143
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
 
144
 
 
145
ifdef gsettings_ENUM_NAMESPACE
 
146
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
 
147
        $(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 [$]@
 
148
endif
 
149
'
 
150
  _GSETTINGS_SUBST(GSETTINGS_RULES)
 
151
])
 
152
 
 
153
dnl _GSETTINGS_SUBST(VARIABLE)
 
154
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
155
AC_DEFUN([_GSETTINGS_SUBST],
 
156
[
 
157
AC_SUBST([$1])
 
158
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
159
]
 
160
)
 
161
 
 
162
 
 
163
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
164
# serial 42 IT_PROG_INTLTOOL
 
165
AC_DEFUN([IT_PROG_INTLTOOL], [
 
166
AC_PREREQ([2.50])dnl
 
167
AC_REQUIRE([AM_NLS])dnl
 
168
 
 
169
case "$am__api_version" in
 
170
    1.[01234])
 
171
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
172
    ;;
 
173
    *)
 
174
    ;;
 
175
esac
 
176
 
 
177
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
178
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
179
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
180
if test -n "$1"; then
 
181
    AC_MSG_CHECKING([for intltool >= $1])
 
182
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
183
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
184
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
185
fi
 
186
 
 
187
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
188
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
189
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
190
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
191
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
192
fi
 
193
 
 
194
if test -z "$AM_DEFAULT_VERBOSITY"; then
 
195
  AM_DEFAULT_VERBOSITY=1
 
196
fi
 
197
AC_SUBST([AM_DEFAULT_VERBOSITY])
 
198
 
 
199
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
 
200
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
 
201
INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
 
202
AC_SUBST(INTLTOOL_V_MERGE)
 
203
AC_SUBST(INTLTOOL__v_MERGE_)
 
204
AC_SUBST(INTLTOOL__v_MERGE_0)
 
205
 
 
206
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
 
207
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
 
208
intltool__v_merge_options_0='-q'
 
209
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
 
210
AC_SUBST(intltool__v_merge_options_)
 
211
AC_SUBST(intltool__v_merge_options_0)
 
212
 
 
213
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
214
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
215
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
216
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
217
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
 
218
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
219
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
220
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
221
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
222
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
223
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
224
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
 
225
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
 
226
else
 
227
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
 
228
fi
 
229
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
230
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
231
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
232
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
233
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
234
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
235
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
236
 
 
237
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
238
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
239
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
240
_IT_SUBST(INTLTOOL_PROP_RULE)
 
241
_IT_SUBST(INTLTOOL_OAF_RULE)
 
242
_IT_SUBST(INTLTOOL_PONG_RULE)
 
243
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
244
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
245
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
246
_IT_SUBST(INTLTOOL_UI_RULE)
 
247
_IT_SUBST(INTLTOOL_XAM_RULE)
 
248
_IT_SUBST(INTLTOOL_KBD_RULE)
 
249
_IT_SUBST(INTLTOOL_XML_RULE)
 
250
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
251
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
252
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
253
_IT_SUBST(INTLTOOL_THEME_RULE)
 
254
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
255
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
256
 
 
257
# Check the gettext tools to make sure they are GNU
 
258
AC_PATH_PROG(XGETTEXT, xgettext)
 
259
AC_PATH_PROG(MSGMERGE, msgmerge)
 
260
AC_PATH_PROG(MSGFMT, msgfmt)
 
261
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
262
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
263
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
264
fi
 
265
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
266
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
267
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
268
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
269
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
270
fi
 
271
 
 
272
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
273
if test -z "$INTLTOOL_PERL"; then
 
274
   AC_MSG_ERROR([perl not found])
 
275
fi
 
276
AC_MSG_CHECKING([for perl >= 5.8.1])
 
277
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
278
if test $? -ne 0; then
 
279
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
280
else
 
281
   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
 
282
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
283
fi
 
284
if test "x$2" != "xno-xml"; then
 
285
   AC_MSG_CHECKING([for XML::Parser])
 
286
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
287
       AC_MSG_RESULT([ok])
 
288
   else
 
289
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
290
   fi
 
291
fi
 
292
 
 
293
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
294
AC_SUBST(ALL_LINGUAS)
 
295
 
 
296
# Set DATADIRNAME correctly if it is not set yet
 
297
# (copied from glib-gettext.m4)
 
298
if test -z "$DATADIRNAME"; then
 
299
  AC_LINK_IFELSE(
 
300
    [AC_LANG_PROGRAM([[]],
 
301
                     [[extern int _nl_msg_cat_cntr;
 
302
                       return _nl_msg_cat_cntr]])],
 
303
    [DATADIRNAME=share],
 
304
    [case $host in
 
305
    *-*-solaris*)
 
306
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
307
    dnl GNU format message catalog is always supported,
 
308
    dnl since both are added to the libc all together.
 
309
    dnl Hence, we'd like to go with DATADIRNAME=share
 
310
    dnl in this case.
 
311
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
312
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
313
    ;;
 
314
    *)
 
315
    [DATADIRNAME=lib]
 
316
    ;;
 
317
    esac])
 
318
fi
 
319
AC_SUBST(DATADIRNAME)
 
320
 
 
321
IT_PO_SUBDIR([po])
 
322
 
 
323
])
 
324
 
 
325
 
 
326
# IT_PO_SUBDIR(DIRNAME)
 
327
# ---------------------
 
328
# All po subdirs have to be declared with this macro; the subdir "po" is
 
329
# declared by IT_PROG_INTLTOOL.
 
330
#
 
331
AC_DEFUN([IT_PO_SUBDIR],
 
332
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
333
dnl
 
334
dnl The following CONFIG_COMMANDS should be executed at the very end
 
335
dnl of config.status.
 
336
AC_CONFIG_COMMANDS_PRE([
 
337
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
338
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
339
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
340
    fi
 
341
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
342
    >"$1/stamp-it.tmp"
 
343
    [sed '/^#/d
 
344
         s/^[[].*] *//
 
345
         /^[    ]*$/d
 
346
        '"s|^|  $ac_top_srcdir/|" \
 
347
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
348
    ]
 
349
    [sed '/^POTFILES =/,/[^\\]$/ {
 
350
                /^POTFILES =/!d
 
351
                r $1/POTFILES
 
352
          }
 
353
         ' "$1/Makefile.in" >"$1/Makefile"]
 
354
    rm -f "$1/Makefile.tmp"
 
355
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
356
  ])
 
357
])dnl
 
358
])
 
359
 
 
360
# _IT_SUBST(VARIABLE)
 
361
# -------------------
 
362
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
363
#
 
364
AC_DEFUN([_IT_SUBST],
 
365
[
 
366
AC_SUBST([$1])
 
367
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
368
]
 
369
)
 
370
 
 
371
# deprecated macros
 
372
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
373
# A hint is needed for aclocal from Automake <= 1.9.4:
 
374
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
375
 
 
376
 
 
377
# nls.m4 serial 5 (gettext-0.18)
 
378
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
 
379
dnl Inc.
 
380
dnl This file is free software; the Free Software Foundation
 
381
dnl gives unlimited permission to copy and/or distribute it,
 
382
dnl with or without modifications, as long as this notice is preserved.
 
383
dnl
 
384
dnl This file can can be used in projects which are not available under
 
385
dnl the GNU General Public License or the GNU Library General Public
 
386
dnl License but which still want to provide support for the GNU gettext
 
387
dnl functionality.
 
388
dnl Please note that the actual code of the GNU gettext library is covered
 
389
dnl by the GNU Library General Public License, and the rest of the GNU
 
390
dnl gettext package package is covered by the GNU General Public License.
 
391
dnl They are *not* in the public domain.
 
392
 
 
393
dnl Authors:
 
394
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
395
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
396
 
 
397
AC_PREREQ([2.50])
 
398
 
 
399
AC_DEFUN([AM_NLS],
 
400
[
 
401
  AC_MSG_CHECKING([whether NLS is requested])
 
402
  dnl Default is enabled NLS
 
403
  AC_ARG_ENABLE([nls],
 
404
    [  --disable-nls           do not use Native Language Support],
 
405
    USE_NLS=$enableval, USE_NLS=yes)
 
406
  AC_MSG_RESULT([$USE_NLS])
 
407
  AC_SUBST([USE_NLS])
 
408
])
 
409
 
 
410
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
411
# serial 1 (pkg-config-0.24)
 
412
 
413
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
414
#
 
415
# This program is free software; you can redistribute it and/or modify
 
416
# it under the terms of the GNU General Public License as published by
 
417
# the Free Software Foundation; either version 2 of the License, or
 
418
# (at your option) any later version.
 
419
#
 
420
# This program is distributed in the hope that it will be useful, but
 
421
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
422
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
423
# General Public License for more details.
 
424
#
 
425
# You should have received a copy of the GNU General Public License
 
426
# along with this program; if not, write to the Free Software
 
427
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
428
#
 
429
# As a special exception to the GNU General Public License, if you
 
430
# distribute this file as part of a program that contains a
 
431
# configuration script generated by Autoconf, you may include it under
 
432
# the same distribution terms that you use for the rest of that program.
 
433
 
 
434
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
435
# ----------------------------------
 
436
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
437
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
438
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
439
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
440
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
441
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
442
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
443
 
 
444
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
445
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
446
fi
 
447
if test -n "$PKG_CONFIG"; then
 
448
        _pkg_min_version=m4_default([$1], [0.9.0])
 
449
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
450
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
451
                AC_MSG_RESULT([yes])
 
452
        else
 
453
                AC_MSG_RESULT([no])
 
454
                PKG_CONFIG=""
 
455
        fi
 
456
fi[]dnl
 
457
])# PKG_PROG_PKG_CONFIG
 
458
 
 
459
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
460
#
 
461
# Check to see whether a particular set of modules exists.  Similar
 
462
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
463
#
 
464
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
465
# only at the first occurence in configure.ac, so if the first place
 
466
# it's called might be skipped (such as if it is within an "if", you
 
467
# have to call PKG_CHECK_EXISTS manually
 
468
# --------------------------------------------------------------
 
469
AC_DEFUN([PKG_CHECK_EXISTS],
 
470
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
471
if test -n "$PKG_CONFIG" && \
 
472
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
473
  m4_default([$2], [:])
 
474
m4_ifvaln([$3], [else
 
475
  $3])dnl
 
476
fi])
 
477
 
 
478
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
479
# ---------------------------------------------
 
480
m4_define([_PKG_CONFIG],
 
481
[if test -n "$$1"; then
 
482
    pkg_cv_[]$1="$$1"
 
483
 elif test -n "$PKG_CONFIG"; then
 
484
    PKG_CHECK_EXISTS([$3],
 
485
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
486
                      test "x$?" != "x0" && pkg_failed=yes ],
 
487
                     [pkg_failed=yes])
 
488
 else
 
489
    pkg_failed=untried
 
490
fi[]dnl
 
491
])# _PKG_CONFIG
 
492
 
 
493
# _PKG_SHORT_ERRORS_SUPPORTED
 
494
# -----------------------------
 
495
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
496
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
497
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
498
        _pkg_short_errors_supported=yes
 
499
else
 
500
        _pkg_short_errors_supported=no
 
501
fi[]dnl
 
502
])# _PKG_SHORT_ERRORS_SUPPORTED
 
503
 
 
504
 
 
505
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
506
# [ACTION-IF-NOT-FOUND])
 
507
#
 
508
#
 
509
# Note that if there is a possibility the first call to
 
510
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
511
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
512
#
 
513
#
 
514
# --------------------------------------------------------------
 
515
AC_DEFUN([PKG_CHECK_MODULES],
 
516
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
517
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
518
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
519
 
 
520
pkg_failed=no
 
521
AC_MSG_CHECKING([for $1])
 
522
 
 
523
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
524
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
525
 
 
526
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
527
and $1[]_LIBS to avoid the need to call pkg-config.
 
528
See the pkg-config man page for more details.])
 
529
 
 
530
if test $pkg_failed = yes; then
 
531
        AC_MSG_RESULT([no])
 
532
        _PKG_SHORT_ERRORS_SUPPORTED
 
533
        if test $_pkg_short_errors_supported = yes; then
 
534
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
535
        else 
 
536
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
537
        fi
 
538
        # Put the nasty error message in config.log where it belongs
 
539
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
540
 
 
541
        m4_default([$4], [AC_MSG_ERROR(
 
542
[Package requirements ($2) were not met:
 
543
 
 
544
$$1_PKG_ERRORS
 
545
 
 
546
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
547
installed software in a non-standard prefix.
 
548
 
 
549
_PKG_TEXT])[]dnl
 
550
        ])
 
551
elif test $pkg_failed = untried; then
 
552
        AC_MSG_RESULT([no])
 
553
        m4_default([$4], [AC_MSG_FAILURE(
 
554
[The pkg-config script could not be found or is too old.  Make sure it
 
555
is in your PATH or set the PKG_CONFIG environment variable to the full
 
556
path to pkg-config.
 
557
 
 
558
_PKG_TEXT
 
559
 
 
560
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
561
        ])
 
562
else
 
563
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
564
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
565
        AC_MSG_RESULT([yes])
 
566
        $3
 
567
fi[]dnl
 
568
])# PKG_CHECK_MODULES
 
569
 
 
570
 
 
571
# PKG_INSTALLDIR(DIRECTORY)
 
572
# -------------------------
 
573
# Substitutes the variable pkgconfigdir as the location where a module
 
574
# should install pkg-config .pc files. By default the directory is
 
575
# $libdir/pkgconfig, but the default can be changed by passing
 
576
# DIRECTORY. The user can override through the --with-pkgconfigdir
 
577
# parameter.
 
578
AC_DEFUN([PKG_INSTALLDIR],
 
579
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 
580
m4_pushdef([pkg_description],
 
581
    [pkg-config installation directory @<:@]pkg_default[@:>@])
 
582
AC_ARG_WITH([pkgconfigdir],
 
583
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
 
584
    [with_pkgconfigdir=]pkg_default)
 
585
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 
586
m4_popdef([pkg_default])
 
587
m4_popdef([pkg_description])
 
588
]) dnl PKG_INSTALLDIR
 
589
 
 
590
 
 
591
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
 
592
# -------------------------
 
593
# Substitutes the variable noarch_pkgconfigdir as the location where a
 
594
# module should install arch-independent pkg-config .pc files. By
 
595
# default the directory is $datadir/pkgconfig, but the default can be
 
596
# changed by passing DIRECTORY. The user can override through the
 
597
# --with-noarch-pkgconfigdir parameter.
 
598
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 
599
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 
600
m4_pushdef([pkg_description],
 
601
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
 
602
AC_ARG_WITH([noarch-pkgconfigdir],
 
603
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
 
604
    [with_noarch_pkgconfigdir=]pkg_default)
 
605
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 
606
m4_popdef([pkg_default])
 
607
m4_popdef([pkg_description])
 
608
]) dnl PKG_NOARCH_INSTALLDIR
 
609
 
 
610
AC_DEFUN([YELP_HELP_INIT],
 
611
[
 
612
AC_REQUIRE([AC_PROG_LN_S])
 
613
m4_pattern_allow([AM_V_at])
 
614
m4_pattern_allow([AM_V_GEN])
 
615
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
 
616
AC_ARG_WITH([help-dir],
 
617
            AC_HELP_STRING([--with-help-dir=DIR],
 
618
                           [path where help files are installed]),,
 
619
            [with_help_dir='${datadir}/help'])
 
620
HELP_DIR="$with_help_dir"
 
621
AC_SUBST(HELP_DIR)
 
622
 
 
623
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
 
624
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
 
625
if test x"$ITSTOOL" = x; then
 
626
  AC_MSG_ERROR([itstool not found])
 
627
fi
 
628
 
 
629
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
 
630
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
 
631
if test x"$XMLLINT" = x; then
 
632
  AC_MSG_ERROR([xmllint not found])
 
633
fi
 
634
 
 
635
YELP_HELP_RULES='
 
636
HELP_ID ?=
 
637
HELP_POT ?=
 
638
HELP_FILES ?=
 
639
HELP_EXTRA ?=
 
640
HELP_MEDIA ?=
 
641
HELP_LINGUAS ?=
 
642
 
 
643
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
 
644
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
 
645
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
 
646
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
 
647
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
 
648
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
 
649
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
 
650
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
 
651
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
 
652
 
 
653
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
 
654
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
 
655
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
 
656
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
 
657
_HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
 
658
 
 
659
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
 
660
 
 
661
.PHONY: pot
 
662
pot: $(_HELP_POTFILE)
 
663
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
 
664
        $(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
 
665
 
 
666
.PHONY: repo
 
667
repo: $(_HELP_POTFILE)
 
668
        $(AM_V_at)for po in $(_HELP_POFILES); do \
 
669
          if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
 
670
          msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
 
671
        done
 
672
 
 
673
$(_HELP_POFILES):
 
674
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
675
        $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
 
676
        $(AM_V_GEN)if ! test -f "[$]@"; then \
 
677
          (cd "$(dir [$]@)" && \
 
678
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
 
679
            mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
 
680
        else \
 
681
          (cd "$(dir [$]@)" && \
 
682
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
 
683
            msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
 
684
            rm "$(notdir [$]@).tmp"); \
 
685
        fi
 
686
 
 
687
$(_HELP_MOFILES): %.mo: %.po
 
688
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
689
        $(AM_V_GEN)msgfmt -o "[$]@" "$<"
 
690
 
 
691
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
 
692
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
 
693
$(_HELP_LC_STAMPS): %.stamp: %.mo
 
694
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
 
695
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
 
696
        $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
 
697
        mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
 
698
        if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
 
699
        (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
 
700
        touch "[$]@"
 
701
 
 
702
.PHONY: clean-help
 
703
mostlyclean-am: $(if $(HELP_ID),clean-help)
 
704
clean-help:
 
705
        rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
 
706
 
 
707
EXTRA_DIST ?=
 
708
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
 
709
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
 
710
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
 
711
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
 
712
 
 
713
distdir: distdir-help-files
 
714
distdir-help-files:
 
715
        @for lc in C $(HELP_LINGUAS); do \
 
716
          $(MKDIR_P) "$(distdir)/$$lc"; \
 
717
          for file in $(HELP_FILES); do \
 
718
            if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
 
719
            cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
 
720
          done; \
 
721
        done; \
 
722
 
 
723
.PHONY: check-help
 
724
check: check-help
 
725
check-help:
 
726
        for lc in C $(_HELP_LINGUAS); do \
 
727
          if test -d "$$lc"; \
 
728
            then d=; \
 
729
            xmlpath="$$lc"; \
 
730
          else \
 
731
            d="$(srcdir)/"; \
 
732
            xmlpath="$$lc:$(srcdir)/$$lc"; \
 
733
          fi; \
 
734
          for page in $(HELP_FILES); do \
 
735
            echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
 
736
            $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
 
737
          done; \
 
738
        done
 
739
 
 
740
 
 
741
.PHONY: install-help
 
742
install-data-am: $(if $(HELP_ID),install-help)
 
743
install-help:
 
744
        @for lc in C $(_HELP_LINGUAS); do \
 
745
          $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
 
746
        done
 
747
        @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
 
748
          if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
 
749
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
750
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
 
751
          echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
 
752
          $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
 
753
        done; done
 
754
        @for f in $(_HELP_C_EXTRA); do \
 
755
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
 
756
          if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
 
757
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
758
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
 
759
          echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
 
760
          $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
 
761
        done
 
762
        @for f in $(HELP_MEDIA); do \
 
763
          for lc in C $(_HELP_LINGUAS); do \
 
764
            if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
 
765
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
766
            mdir=`dirname "$$f"`; \
 
767
            if test "x$mdir" = "x."; then mdir=""; fi; \
 
768
            if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
 
769
            if test -f "$$d$$lc/$$f"; then \
 
770
              echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
 
771
              $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
 
772
            elif test "x$$lc" != "xC"; then \
 
773
              echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
 
774
              $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
 
775
            fi; \
 
776
          done; \
 
777
        done
 
778
 
 
779
.PHONY: uninstall-help
 
780
uninstall-am: $(if $(HELP_ID),uninstall-help)
 
781
uninstall-help:
 
782
        for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
 
783
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
784
          echo "rm -f $$helpdir`basename $$f`"; \
 
785
          rm -f "$$helpdir`basename $$f`"; \
 
786
        done; done
 
787
        @for f in $(_HELP_C_EXTRA); do \
 
788
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
 
789
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
790
          echo "rm -f $$helpdir`basename $$f`"; \
 
791
          rm -f "$$helpdir`basename $$f`"; \
 
792
        done
 
793
        @for f in $(HELP_MEDIA); do \
 
794
          for lc in C $(_HELP_LINGUAS); do \
 
795
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
 
796
            echo "rm -f $$helpdir$$f"; \
 
797
            rm -f "$$helpdir$$f"; \
 
798
          done; \
 
799
        done;
 
800
'
 
801
AC_SUBST([YELP_HELP_RULES])
 
802
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
 
803
])
 
804
 
22
805
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
23
806
#
24
807
# This file is free software; the Free Software Foundation
1137
1920
          AC_MSG_ERROR([Vala $1 not found.], [77])])])])
1138
1921
])
1139
1922
 
1140
 
# gnome-common.m4
1141
 
#
1142
 
# serial 3
1143
 
1144
 
 
1145
 
dnl GNOME_COMMON_INIT
1146
 
 
1147
 
AU_DEFUN([GNOME_COMMON_INIT],
1148
 
[
1149
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
1150
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1151
 
 
1152
 
  dnl ensure that when the Automake generated makefile calls aclocal,
1153
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
1154
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1155
 
  if test -n "$ac_macro_dir"; then
1156
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1157
 
  fi
1158
 
 
1159
 
  AC_SUBST([ACLOCAL_AMFLAGS])
1160
 
],
1161
 
[[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
1162
 
in your top-level Makefile.am, instead, where "m4" is the macro directory set
1163
 
with AC_CONFIG_MACRO_DIR() in your configure.ac]])
1164
 
 
1165
 
AC_DEFUN([GNOME_DEBUG_CHECK],
1166
 
[
1167
 
        AC_ARG_ENABLE([debug],
1168
 
                      AC_HELP_STRING([--enable-debug],
1169
 
                                     [turn on debugging]),,
1170
 
                      [enable_debug=no])
1171
 
 
1172
 
        if test x$enable_debug = xyes ; then
1173
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1174
 
                [Enable additional debugging at the expense of performance and size])
1175
 
        fi
1176
 
])
1177
 
 
1178
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
1179
 
dnl define DISABLE_DEPRECATED
1180
 
dnl
1181
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1182
 
[
1183
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
1184
 
 
1185
 
        DISABLE_DEPRECATED=""
1186
 
        if test $USE_MAINTAINER_MODE = yes; then
1187
 
                DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
1188
 
                for DOMAIN in $DOMAINS; do
1189
 
                       DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1190
 
                done
1191
 
        fi
1192
 
 
1193
 
        AC_SUBST(DISABLE_DEPRECATED)
1194
 
])
1195
 
 
1196
 
 
1197
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1198
 
# serial 42 IT_PROG_INTLTOOL
1199
 
AC_DEFUN([IT_PROG_INTLTOOL], [
1200
 
AC_PREREQ([2.50])dnl
1201
 
AC_REQUIRE([AM_NLS])dnl
1202
 
 
1203
 
case "$am__api_version" in
1204
 
    1.[01234])
1205
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1206
 
    ;;
1207
 
    *)
1208
 
    ;;
1209
 
esac
1210
 
 
1211
 
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1212
 
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1213
 
INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1214
 
if test -n "$1"; then
1215
 
    AC_MSG_CHECKING([for intltool >= $1])
1216
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1217
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1218
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1219
 
fi
1220
 
 
1221
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1222
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1223
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1224
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1225
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1226
 
fi
1227
 
 
1228
 
if test -z "$AM_DEFAULT_VERBOSITY"; then
1229
 
  AM_DEFAULT_VERBOSITY=1
1230
 
fi
1231
 
AC_SUBST([AM_DEFAULT_VERBOSITY])
1232
 
 
1233
 
INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1234
 
INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1235
 
INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
1236
 
AC_SUBST(INTLTOOL_V_MERGE)
1237
 
AC_SUBST(INTLTOOL__v_MERGE_)
1238
 
AC_SUBST(INTLTOOL__v_MERGE_0)
1239
 
 
1240
 
INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1241
 
intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1242
 
intltool__v_merge_options_0='-q'
1243
 
AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1244
 
AC_SUBST(intltool__v_merge_options_)
1245
 
AC_SUBST(intltool__v_merge_options_0)
1246
 
 
1247
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1248
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1249
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1250
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1251
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
1252
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1253
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1254
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1255
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1256
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1257
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1258
 
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1259
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
1260
 
else
1261
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
1262
 
fi
1263
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1264
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1265
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1266
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1267
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
1268
 
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1269
 
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1270
 
 
1271
 
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1272
 
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1273
 
_IT_SUBST(INTLTOOL_KEYS_RULE)
1274
 
_IT_SUBST(INTLTOOL_PROP_RULE)
1275
 
_IT_SUBST(INTLTOOL_OAF_RULE)
1276
 
_IT_SUBST(INTLTOOL_PONG_RULE)
1277
 
_IT_SUBST(INTLTOOL_SERVER_RULE)
1278
 
_IT_SUBST(INTLTOOL_SHEET_RULE)
1279
 
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1280
 
_IT_SUBST(INTLTOOL_UI_RULE)
1281
 
_IT_SUBST(INTLTOOL_XAM_RULE)
1282
 
_IT_SUBST(INTLTOOL_KBD_RULE)
1283
 
_IT_SUBST(INTLTOOL_XML_RULE)
1284
 
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1285
 
_IT_SUBST(INTLTOOL_CAVES_RULE)
1286
 
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1287
 
_IT_SUBST(INTLTOOL_THEME_RULE)
1288
 
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1289
 
_IT_SUBST(INTLTOOL_POLICY_RULE)
1290
 
 
1291
 
# Check the gettext tools to make sure they are GNU
1292
 
AC_PATH_PROG(XGETTEXT, xgettext)
1293
 
AC_PATH_PROG(MSGMERGE, msgmerge)
1294
 
AC_PATH_PROG(MSGFMT, msgfmt)
1295
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1296
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1297
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1298
 
fi
1299
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1300
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1301
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1302
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1303
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1304
 
fi
1305
 
 
1306
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
1307
 
if test -z "$INTLTOOL_PERL"; then
1308
 
   AC_MSG_ERROR([perl not found])
1309
 
fi
1310
 
AC_MSG_CHECKING([for perl >= 5.8.1])
1311
 
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1312
 
if test $? -ne 0; then
1313
 
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1314
 
else
1315
 
   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1316
 
   AC_MSG_RESULT([$IT_PERL_VERSION])
1317
 
fi
1318
 
if test "x$2" != "xno-xml"; then
1319
 
   AC_MSG_CHECKING([for XML::Parser])
1320
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1321
 
       AC_MSG_RESULT([ok])
1322
 
   else
1323
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1324
 
   fi
1325
 
fi
1326
 
 
1327
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1328
 
AC_SUBST(ALL_LINGUAS)
1329
 
 
1330
 
# Set DATADIRNAME correctly if it is not set yet
1331
 
# (copied from glib-gettext.m4)
1332
 
if test -z "$DATADIRNAME"; then
1333
 
  AC_LINK_IFELSE(
1334
 
    [AC_LANG_PROGRAM([[]],
1335
 
                     [[extern int _nl_msg_cat_cntr;
1336
 
                       return _nl_msg_cat_cntr]])],
1337
 
    [DATADIRNAME=share],
1338
 
    [case $host in
1339
 
    *-*-solaris*)
1340
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
1341
 
    dnl GNU format message catalog is always supported,
1342
 
    dnl since both are added to the libc all together.
1343
 
    dnl Hence, we'd like to go with DATADIRNAME=share
1344
 
    dnl in this case.
1345
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
1346
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
1347
 
    ;;
1348
 
    *)
1349
 
    [DATADIRNAME=lib]
1350
 
    ;;
1351
 
    esac])
1352
 
fi
1353
 
AC_SUBST(DATADIRNAME)
1354
 
 
1355
 
IT_PO_SUBDIR([po])
1356
 
 
1357
 
])
1358
 
 
1359
 
 
1360
 
# IT_PO_SUBDIR(DIRNAME)
1361
 
# ---------------------
1362
 
# All po subdirs have to be declared with this macro; the subdir "po" is
1363
 
# declared by IT_PROG_INTLTOOL.
1364
 
#
1365
 
AC_DEFUN([IT_PO_SUBDIR],
1366
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1367
 
dnl
1368
 
dnl The following CONFIG_COMMANDS should be executed at the very end
1369
 
dnl of config.status.
1370
 
AC_CONFIG_COMMANDS_PRE([
1371
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
1372
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1373
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1374
 
    fi
1375
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1376
 
    >"$1/stamp-it.tmp"
1377
 
    [sed '/^#/d
1378
 
         s/^[[].*] *//
1379
 
         /^[    ]*$/d
1380
 
        '"s|^|  $ac_top_srcdir/|" \
1381
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1382
 
    ]
1383
 
    [sed '/^POTFILES =/,/[^\\]$/ {
1384
 
                /^POTFILES =/!d
1385
 
                r $1/POTFILES
1386
 
          }
1387
 
         ' "$1/Makefile.in" >"$1/Makefile"]
1388
 
    rm -f "$1/Makefile.tmp"
1389
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
1390
 
  ])
1391
 
])dnl
1392
 
])
1393
 
 
1394
 
# _IT_SUBST(VARIABLE)
1395
 
# -------------------
1396
 
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1397
 
#
1398
 
AC_DEFUN([_IT_SUBST],
1399
 
[
1400
 
AC_SUBST([$1])
1401
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1402
 
]
1403
 
)
1404
 
 
1405
 
# deprecated macros
1406
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1407
 
# A hint is needed for aclocal from Automake <= 1.9.4:
1408
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1409
 
 
1410
 
 
1411
 
# nls.m4 serial 5 (gettext-0.18)
1412
 
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1413
 
dnl Inc.
1414
 
dnl This file is free software; the Free Software Foundation
1415
 
dnl gives unlimited permission to copy and/or distribute it,
1416
 
dnl with or without modifications, as long as this notice is preserved.
1417
 
dnl
1418
 
dnl This file can can be used in projects which are not available under
1419
 
dnl the GNU General Public License or the GNU Library General Public
1420
 
dnl License but which still want to provide support for the GNU gettext
1421
 
dnl functionality.
1422
 
dnl Please note that the actual code of the GNU gettext library is covered
1423
 
dnl by the GNU Library General Public License, and the rest of the GNU
1424
 
dnl gettext package package is covered by the GNU General Public License.
1425
 
dnl They are *not* in the public domain.
1426
 
 
1427
 
dnl Authors:
1428
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1429
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1430
 
 
1431
 
AC_PREREQ([2.50])
1432
 
 
1433
 
AC_DEFUN([AM_NLS],
1434
 
[
1435
 
  AC_MSG_CHECKING([whether NLS is requested])
1436
 
  dnl Default is enabled NLS
1437
 
  AC_ARG_ENABLE([nls],
1438
 
    [  --disable-nls           do not use Native Language Support],
1439
 
    USE_NLS=$enableval, USE_NLS=yes)
1440
 
  AC_MSG_RESULT([$USE_NLS])
1441
 
  AC_SUBST([USE_NLS])
1442
 
])
1443
 
 
1444
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1445
 
# serial 1 (pkg-config-0.24)
1446
 
1447
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1448
 
#
1449
 
# This program is free software; you can redistribute it and/or modify
1450
 
# it under the terms of the GNU General Public License as published by
1451
 
# the Free Software Foundation; either version 2 of the License, or
1452
 
# (at your option) any later version.
1453
 
#
1454
 
# This program is distributed in the hope that it will be useful, but
1455
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1456
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1457
 
# General Public License for more details.
1458
 
#
1459
 
# You should have received a copy of the GNU General Public License
1460
 
# along with this program; if not, write to the Free Software
1461
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1462
 
#
1463
 
# As a special exception to the GNU General Public License, if you
1464
 
# distribute this file as part of a program that contains a
1465
 
# configuration script generated by Autoconf, you may include it under
1466
 
# the same distribution terms that you use for the rest of that program.
1467
 
 
1468
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1469
 
# ----------------------------------
1470
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1471
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1472
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1473
 
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1474
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1475
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1476
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1477
 
 
1478
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1479
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1480
 
fi
1481
 
if test -n "$PKG_CONFIG"; then
1482
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1483
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1484
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1485
 
                AC_MSG_RESULT([yes])
1486
 
        else
1487
 
                AC_MSG_RESULT([no])
1488
 
                PKG_CONFIG=""
1489
 
        fi
1490
 
fi[]dnl
1491
 
])# PKG_PROG_PKG_CONFIG
1492
 
 
1493
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1494
 
#
1495
 
# Check to see whether a particular set of modules exists.  Similar
1496
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1497
 
#
1498
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1499
 
# only at the first occurence in configure.ac, so if the first place
1500
 
# it's called might be skipped (such as if it is within an "if", you
1501
 
# have to call PKG_CHECK_EXISTS manually
1502
 
# --------------------------------------------------------------
1503
 
AC_DEFUN([PKG_CHECK_EXISTS],
1504
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1505
 
if test -n "$PKG_CONFIG" && \
1506
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1507
 
  m4_default([$2], [:])
1508
 
m4_ifvaln([$3], [else
1509
 
  $3])dnl
1510
 
fi])
1511
 
 
1512
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1513
 
# ---------------------------------------------
1514
 
m4_define([_PKG_CONFIG],
1515
 
[if test -n "$$1"; then
1516
 
    pkg_cv_[]$1="$$1"
1517
 
 elif test -n "$PKG_CONFIG"; then
1518
 
    PKG_CHECK_EXISTS([$3],
1519
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1520
 
                      test "x$?" != "x0" && pkg_failed=yes ],
1521
 
                     [pkg_failed=yes])
1522
 
 else
1523
 
    pkg_failed=untried
1524
 
fi[]dnl
1525
 
])# _PKG_CONFIG
1526
 
 
1527
 
# _PKG_SHORT_ERRORS_SUPPORTED
1528
 
# -----------------------------
1529
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1530
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1531
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1532
 
        _pkg_short_errors_supported=yes
1533
 
else
1534
 
        _pkg_short_errors_supported=no
1535
 
fi[]dnl
1536
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1537
 
 
1538
 
 
1539
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1540
 
# [ACTION-IF-NOT-FOUND])
1541
 
#
1542
 
#
1543
 
# Note that if there is a possibility the first call to
1544
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1545
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1546
 
#
1547
 
#
1548
 
# --------------------------------------------------------------
1549
 
AC_DEFUN([PKG_CHECK_MODULES],
1550
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1551
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1552
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1553
 
 
1554
 
pkg_failed=no
1555
 
AC_MSG_CHECKING([for $1])
1556
 
 
1557
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1558
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1559
 
 
1560
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1561
 
and $1[]_LIBS to avoid the need to call pkg-config.
1562
 
See the pkg-config man page for more details.])
1563
 
 
1564
 
if test $pkg_failed = yes; then
1565
 
        AC_MSG_RESULT([no])
1566
 
        _PKG_SHORT_ERRORS_SUPPORTED
1567
 
        if test $_pkg_short_errors_supported = yes; then
1568
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1569
 
        else 
1570
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1571
 
        fi
1572
 
        # Put the nasty error message in config.log where it belongs
1573
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1574
 
 
1575
 
        m4_default([$4], [AC_MSG_ERROR(
1576
 
[Package requirements ($2) were not met:
1577
 
 
1578
 
$$1_PKG_ERRORS
1579
 
 
1580
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1581
 
installed software in a non-standard prefix.
1582
 
 
1583
 
_PKG_TEXT])[]dnl
1584
 
        ])
1585
 
elif test $pkg_failed = untried; then
1586
 
        AC_MSG_RESULT([no])
1587
 
        m4_default([$4], [AC_MSG_FAILURE(
1588
 
[The pkg-config script could not be found or is too old.  Make sure it
1589
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1590
 
path to pkg-config.
1591
 
 
1592
 
_PKG_TEXT
1593
 
 
1594
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1595
 
        ])
1596
 
else
1597
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1598
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1599
 
        AC_MSG_RESULT([yes])
1600
 
        $3
1601
 
fi[]dnl
1602
 
])# PKG_CHECK_MODULES
1603
 
 
1604
 
 
1605
 
# PKG_INSTALLDIR(DIRECTORY)
1606
 
# -------------------------
1607
 
# Substitutes the variable pkgconfigdir as the location where a module
1608
 
# should install pkg-config .pc files. By default the directory is
1609
 
# $libdir/pkgconfig, but the default can be changed by passing
1610
 
# DIRECTORY. The user can override through the --with-pkgconfigdir
1611
 
# parameter.
1612
 
AC_DEFUN([PKG_INSTALLDIR],
1613
 
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1614
 
m4_pushdef([pkg_description],
1615
 
    [pkg-config installation directory @<:@]pkg_default[@:>@])
1616
 
AC_ARG_WITH([pkgconfigdir],
1617
 
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1618
 
    [with_pkgconfigdir=]pkg_default)
1619
 
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1620
 
m4_popdef([pkg_default])
1621
 
m4_popdef([pkg_description])
1622
 
]) dnl PKG_INSTALLDIR
1623
 
 
1624
 
 
1625
 
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1626
 
# -------------------------
1627
 
# Substitutes the variable noarch_pkgconfigdir as the location where a
1628
 
# module should install arch-independent pkg-config .pc files. By
1629
 
# default the directory is $datadir/pkgconfig, but the default can be
1630
 
# changed by passing DIRECTORY. The user can override through the
1631
 
# --with-noarch-pkgconfigdir parameter.
1632
 
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1633
 
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1634
 
m4_pushdef([pkg_description],
1635
 
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1636
 
AC_ARG_WITH([noarch-pkgconfigdir],
1637
 
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1638
 
    [with_noarch_pkgconfigdir=]pkg_default)
1639
 
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1640
 
m4_popdef([pkg_default])
1641
 
m4_popdef([pkg_description])
1642
 
]) dnl PKG_NOARCH_INSTALLDIR
1643
 
 
1644
 
AC_DEFUN([YELP_HELP_INIT],
1645
 
[
1646
 
AC_REQUIRE([AC_PROG_LN_S])
1647
 
m4_pattern_allow([AM_V_at])
1648
 
m4_pattern_allow([AM_V_GEN])
1649
 
m4_pattern_allow([AM_DEFAULT_VERBOSITY])
1650
 
AC_ARG_WITH([help-dir],
1651
 
            AC_HELP_STRING([--with-help-dir=DIR],
1652
 
                           [path where help files are installed]),,
1653
 
            [with_help_dir='${datadir}/help'])
1654
 
HELP_DIR="$with_help_dir"
1655
 
AC_SUBST(HELP_DIR)
1656
 
 
1657
 
AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
1658
 
AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
1659
 
if test x"$ITSTOOL" = x; then
1660
 
  AC_MSG_ERROR([itstool not found])
1661
 
fi
1662
 
 
1663
 
AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
1664
 
AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
1665
 
if test x"$XMLLINT" = x; then
1666
 
  AC_MSG_ERROR([xmllint not found])
1667
 
fi
1668
 
 
1669
 
YELP_HELP_RULES='
1670
 
HELP_ID ?=
1671
 
HELP_POT ?=
1672
 
HELP_FILES ?=
1673
 
HELP_EXTRA ?=
1674
 
HELP_MEDIA ?=
1675
 
HELP_LINGUAS ?=
1676
 
 
1677
 
_HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
1678
 
_HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
1679
 
_HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
1680
 
_HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
1681
 
_HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
1682
 
_HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
1683
 
_HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
1684
 
_HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
1685
 
_HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
1686
 
 
1687
 
_HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
1688
 
_HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
1689
 
_HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
1690
 
_HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
1691
 
_HELP_LC_VERBOSE_0 = @echo "  GEN    "$(dir [$]@);
1692
 
 
1693
 
all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
1694
 
 
1695
 
.PHONY: pot
1696
 
pot: $(_HELP_POTFILE)
1697
 
$(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1698
 
        $(AM_V_GEN)$(ITSTOOL) -o "[$]@" $(_HELP_C_FILES)
1699
 
 
1700
 
.PHONY: repo
1701
 
repo: $(_HELP_POTFILE)
1702
 
        $(AM_V_at)for po in $(_HELP_POFILES); do \
1703
 
          if test "x[$](_HELP_V)" = "x0"; then echo "  GEN    $${po}"; fi; \
1704
 
          msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
1705
 
        done
1706
 
 
1707
 
$(_HELP_POFILES):
1708
 
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1709
 
        $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
1710
 
        $(AM_V_GEN)if ! test -f "[$]@"; then \
1711
 
          (cd "$(dir [$]@)" && \
1712
 
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1713
 
            mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
1714
 
        else \
1715
 
          (cd "$(dir [$]@)" && \
1716
 
            $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
1717
 
            msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
1718
 
            rm "$(notdir [$]@).tmp"); \
1719
 
        fi
1720
 
 
1721
 
$(_HELP_MOFILES): %.mo: %.po
1722
 
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1723
 
        $(AM_V_GEN)msgfmt -o "[$]@" "$<"
1724
 
 
1725
 
$(_HELP_LC_FILES): $(_HELP_LINGUAS)
1726
 
$(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
1727
 
$(_HELP_LC_STAMPS): %.stamp: %.mo
1728
 
$(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
1729
 
        $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
1730
 
        $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
1731
 
        mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
1732
 
        if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
1733
 
        (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
1734
 
        touch "[$]@"
1735
 
 
1736
 
.PHONY: clean-help
1737
 
mostlyclean-am: $(if $(HELP_ID),clean-help)
1738
 
clean-help:
1739
 
        rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
1740
 
 
1741
 
EXTRA_DIST ?=
1742
 
EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
1743
 
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
1744
 
EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
1745
 
EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
1746
 
 
1747
 
distdir: distdir-help-files
1748
 
distdir-help-files:
1749
 
        @for lc in C $(HELP_LINGUAS); do \
1750
 
          $(MKDIR_P) "$(distdir)/$$lc"; \
1751
 
          for file in $(HELP_FILES); do \
1752
 
            if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
1753
 
            cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
1754
 
          done; \
1755
 
        done; \
1756
 
 
1757
 
.PHONY: check-help
1758
 
check: check-help
1759
 
check-help:
1760
 
        for lc in C $(_HELP_LINGUAS); do \
1761
 
          if test -d "$$lc"; \
1762
 
            then d=; \
1763
 
            xmlpath="$$lc"; \
1764
 
          else \
1765
 
            d="$(srcdir)/"; \
1766
 
            xmlpath="$$lc:$(srcdir)/$$lc"; \
1767
 
          fi; \
1768
 
          for page in $(HELP_FILES); do \
1769
 
            echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
1770
 
            $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
1771
 
          done; \
1772
 
        done
1773
 
 
1774
 
 
1775
 
.PHONY: install-help
1776
 
install-data-am: $(if $(HELP_ID),install-help)
1777
 
install-help:
1778
 
        @for lc in C $(_HELP_LINGUAS); do \
1779
 
          $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
1780
 
        done
1781
 
        @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1782
 
          if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
1783
 
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1784
 
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1785
 
          echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
1786
 
          $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
1787
 
        done; done
1788
 
        @for f in $(_HELP_C_EXTRA); do \
1789
 
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1790
 
          if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
1791
 
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1792
 
          if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
1793
 
          echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
1794
 
          $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
1795
 
        done
1796
 
        @for f in $(HELP_MEDIA); do \
1797
 
          for lc in C $(_HELP_LINGUAS); do \
1798
 
            if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
1799
 
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1800
 
            mdir=`dirname "$$f"`; \
1801
 
            if test "x$mdir" = "x."; then mdir=""; fi; \
1802
 
            if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
1803
 
            if test -f "$$d$$lc/$$f"; then \
1804
 
              echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
1805
 
              $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
1806
 
            elif test "x$$lc" != "xC"; then \
1807
 
              echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
1808
 
              $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
1809
 
            fi; \
1810
 
          done; \
1811
 
        done
1812
 
 
1813
 
.PHONY: uninstall-help
1814
 
uninstall-am: $(if $(HELP_ID),uninstall-help)
1815
 
uninstall-help:
1816
 
        for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
1817
 
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1818
 
          echo "rm -f $$helpdir`basename $$f`"; \
1819
 
          rm -f "$$helpdir`basename $$f`"; \
1820
 
        done; done
1821
 
        @for f in $(_HELP_C_EXTRA); do \
1822
 
          lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
1823
 
          helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1824
 
          echo "rm -f $$helpdir`basename $$f`"; \
1825
 
          rm -f "$$helpdir`basename $$f`"; \
1826
 
        done
1827
 
        @for f in $(HELP_MEDIA); do \
1828
 
          for lc in C $(_HELP_LINGUAS); do \
1829
 
            helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
1830
 
            echo "rm -f $$helpdir$$f"; \
1831
 
            rm -f "$$helpdir$$f"; \
1832
 
          done; \
1833
 
        done;
1834
 
'
1835
 
AC_SUBST([YELP_HELP_RULES])
1836
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
1837
 
])
1838
 
 
1839
 
dnl GLIB_GSETTINGS
1840
 
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1841
 
dnl the schema should be compiled
1842
 
dnl
1843
 
 
1844
 
AC_DEFUN([GLIB_GSETTINGS],
1845
 
[
1846
 
  m4_pattern_allow([AM_V_GEN])
1847
 
  AC_ARG_ENABLE(schemas-compile,
1848
 
                AS_HELP_STRING([--disable-schemas-compile],
1849
 
                               [Disable regeneration of gschemas.compiled on install]),
1850
 
                [case ${enableval} in
1851
 
                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
1852
 
                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1853
 
                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1854
 
                 esac])
1855
 
  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1856
 
  PKG_PROG_PKG_CONFIG([0.16])
1857
 
  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1858
 
  if test x$cross_compiling != xyes; then
1859
 
    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1860
 
  else
1861
 
    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1862
 
  fi
1863
 
  AC_SUBST(GLIB_COMPILE_SCHEMAS)
1864
 
  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1865
 
    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1866
 
  else
1867
 
    ifelse([$1],,[:],[$1])
1868
 
  fi
1869
 
 
1870
 
  GSETTINGS_RULES='
1871
 
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1872
 
 
1873
 
mostlyclean-am: clean-gsettings-schemas
1874
 
 
1875
 
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1876
 
 
1877
 
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1878
 
        $(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 [$]@
1879
 
 
1880
 
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1881
 
uninstall-am: uninstall-gsettings-schemas
1882
 
install-data-am: install-gsettings-schemas
1883
 
 
1884
 
.SECONDARY: $(gsettings_SCHEMAS)
1885
 
 
1886
 
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1887
 
        @$(NORMAL_INSTALL)
1888
 
        if test -n "$^"; then \
1889
 
                test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1890
 
                $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1891
 
                test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1892
 
        fi
1893
 
 
1894
 
uninstall-gsettings-schemas:
1895
 
        @$(NORMAL_UNINSTALL)
1896
 
        @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1897
 
        files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1898
 
        test -n "$$files" || exit 0; \
1899
 
        echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1900
 
        cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1901
 
        test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1902
 
 
1903
 
clean-gsettings-schemas:
1904
 
        rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1905
 
 
1906
 
ifdef gsettings_ENUM_NAMESPACE
1907
 
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1908
 
        $(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 [$]@
1909
 
endif
1910
 
'
1911
 
  _GSETTINGS_SUBST(GSETTINGS_RULES)
1912
 
])
1913
 
 
1914
 
dnl _GSETTINGS_SUBST(VARIABLE)
1915
 
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1916
 
AC_DEFUN([_GSETTINGS_SUBST],
1917
 
[
1918
 
AC_SUBST([$1])
1919
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1920
 
]
1921
 
)
1922