~xnox/ubiquity/fixup-owner-with-remove

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Colin Watson
  • Date: 2006-05-09 10:16:49 UTC
  • Revision ID: colin.watson@canonical.com-20060509101649-0d5ea876e1d561cd
intltoolize

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
  rm -f conf.gtktest
209
209
])
210
210
 
 
211
 
 
212
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
213
# serial 2 IT_PROG_INTLTOOL
 
214
AC_DEFUN([IT_PROG_INTLTOOL],
 
215
[AC_PREREQ([2.50])dnl
 
216
 
 
217
case "$am__api_version" in
 
218
    1.[01234])
 
219
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
220
    ;;
 
221
    *)
 
222
    ;;
 
223
esac
 
224
 
 
225
if test -n "$1"; then
 
226
    AC_MSG_CHECKING(for intltool >= $1)
 
227
 
 
228
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'`
 
229
    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
 
230
    [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in`
 
231
    ]
 
232
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
233
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
234
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
235
fi
 
236
 
 
237
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
238
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
239
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
240
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
241
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
242
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
243
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
244
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
245
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
246
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
247
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
248
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
249
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
250
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
251
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
252
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
253
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
254
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
255
 
 
256
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
257
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
258
AC_SUBST(INTLTOOL_KEYS_RULE)
 
259
AC_SUBST(INTLTOOL_PROP_RULE)
 
260
AC_SUBST(INTLTOOL_OAF_RULE)
 
261
AC_SUBST(INTLTOOL_PONG_RULE)
 
262
AC_SUBST(INTLTOOL_SERVER_RULE)
 
263
AC_SUBST(INTLTOOL_SHEET_RULE)
 
264
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
265
AC_SUBST(INTLTOOL_UI_RULE)
 
266
AC_SUBST(INTLTOOL_XAM_RULE)
 
267
AC_SUBST(INTLTOOL_KBD_RULE)
 
268
AC_SUBST(INTLTOOL_XML_RULE)
 
269
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
270
AC_SUBST(INTLTOOL_CAVES_RULE)
 
271
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
272
AC_SUBST(INTLTOOL_THEME_RULE)
 
273
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
274
 
 
275
# Use the tools built into the package, not the ones that are installed.
 
276
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
 
277
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
 
278
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
 
279
 
 
280
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
281
if test -z "$INTLTOOL_PERL"; then
 
282
   AC_MSG_ERROR([perl not found; required for intltool])
 
283
fi
 
284
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
285
   AC_MSG_ERROR([perl 5.x required for intltool])
 
286
fi
 
287
if test "x$2" != "xno-xml"; then
 
288
   AC_MSG_CHECKING([for XML::Parser])
 
289
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
290
       AC_MSG_RESULT([ok])
 
291
   else
 
292
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
293
   fi
 
294
fi
 
295
 
 
296
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
 
297
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
 
298
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
 
299
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
 
300
 
 
301
IT_PO_SUBDIR([po])
 
302
 
 
303
dnl The following is very similar to
 
304
dnl
 
305
dnl     AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
 
306
dnl
 
307
dnl with the following slight differences:
 
308
dnl  - the *.in files are in ac_aux_dir,
 
309
dnl  - if the file haven't changed upon reconfigure, it's not touched,
 
310
dnl  - the evaluation of the third parameter enables a hack which computes
 
311
dnl    the actual value of $libdir,
 
312
dnl  - the user sees "executing intltool commands", instead of
 
313
dnl    "creating intltool-extract" and such.
 
314
dnl
 
315
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
 
316
dnl a reason for it.
 
317
 
 
318
AC_CONFIG_COMMANDS([intltool], [
 
319
 
 
320
for file in intltool-extract intltool-merge intltool-update; do
 
321
  sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
 
322
      -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
 
323
      -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
 
324
      -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
 
325
      -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
 
326
      -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
 
327
      -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
 
328
        < ${ac_aux_dir}/${file}.in > ${file}.out
 
329
  if cmp -s ${file} ${file}.out 2>/dev/null; then
 
330
    rm -f ${file}.out
 
331
  else
 
332
    mv -f ${file}.out ${file}
 
333
  fi
 
334
  chmod ugo+x ${file}
 
335
  chmod u+w ${file}
 
336
done
 
337
 
 
338
],
 
339
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
 
340
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" 
 
341
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
 
342
INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
 
343
INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
 
344
 
 
345
])
 
346
 
 
347
 
 
348
# IT_PO_SUBDIR(DIRNAME)
 
349
# ---------------------
 
350
# All po subdirs have to be declared with this macro; the subdir "po" is
 
351
# declared by IT_PROG_INTLTOOL.
 
352
#
 
353
AC_DEFUN([IT_PO_SUBDIR],
 
354
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
355
dnl
 
356
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
357
dnl of config.status.
 
358
AC_CONFIG_COMMANDS_PRE([
 
359
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
360
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
361
    >"$1/stamp-it.tmp"
 
362
    [sed '/^#/d
 
363
         s/^[[].*] *//
 
364
         /^[    ]*$/d
 
365
        '"s|^|  $ac_top_srcdir/|" \
 
366
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
367
    ]
 
368
    if test ! -f "$1/Makefile"; then
 
369
      AC_MSG_ERROR([$1/Makefile is not ready.])
 
370
    fi
 
371
    mv "$1/Makefile" "$1/Makefile.tmp"
 
372
    [sed '/^POTFILES =/,/[^\\]$/ {
 
373
                /^POTFILES =/!d
 
374
                r $1/POTFILES
 
375
          }
 
376
         ' "$1/Makefile.tmp" >"$1/Makefile"]
 
377
    rm -f "$1/Makefile.tmp"
 
378
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
379
  ])
 
380
])dnl
 
381
])
 
382
 
 
383
 
 
384
# deprecated macros
 
385
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
386
# A hint is needed for aclocal from Automake <= 1.9.4:
 
387
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
388
 
 
389
 
211
390
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
212
391
 
213
392
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL