~ubuntu-branches/ubuntu/maverick/autoconf/maverick

« back to all changes in this revision

Viewing changes to m4/m4.m4

  • Committer: Bazaar Package Importer
  • Author(s): Ben Pfaff
  • Date: 2007-01-17 19:57:13 UTC
  • mfrom: (3.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070117195713-n2q7e2pbpu4ezbx7
Tags: 2.61-4
debian/control: Require m4 version 1.4.8 or later.  Thanks to Jim
Paris <jim@jtan.com> for reporting this bug.  Closes: #407385.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# m4.m4 serial 2
 
2
dnl Copyright (C) 2000, 2006 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
# AC_PROG_GNU_M4
 
8
# --------------
 
9
# Check for GNU m4, at least 1.3 (supports frozen files).
 
10
# Also, check whether --error-output (through 1.4.x) or --debugfile (2.0)
 
11
# is supported, and AC_SUBST M4_DEBUGFILE accordingly.
 
12
AC_DEFUN([AC_PROG_GNU_M4],
 
13
[AC_PATH_PROGS([M4], [gm4 gnum4 m4], [m4])
 
14
AC_CACHE_CHECK([whether m4 supports frozen files], [ac_cv_prog_gnu_m4],
 
15
[ac_cv_prog_gnu_m4=no
 
16
if test x"$M4" != x; then
 
17
  case `$M4 --help < /dev/null 2>&1` in
 
18
    *reload-state*) ac_cv_prog_gnu_m4=yes ;;
 
19
  esac
 
20
fi])
 
21
if test $ac_cv_prog_gnu_m4 = yes ; then
 
22
  AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
 
23
  [case `$M4 --help < /dev/null 2>&1` in
 
24
    *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
 
25
    *) ac_cv_prog_gnu_m4_debugfile=--error-output ;;
 
26
  esac])
 
27
  AC_SUBST([M4_DEBUGFILE], $ac_cv_prog_gnu_m4_debugfile)
 
28
fi
 
29
])