1 dnl aclocal.m4 generated automatically by aclocal 1.3
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl Copyright (C) 1999 NISHIDA Keisuke <knishida@ring.aist.go.jp>
15 dnl This program is free software; you can redistribute it and/or modify
16 dnl it under the terms of the GNU General Public License as published by
17 dnl the Free Software Foundation; either version 2, or (at your option)
18 dnl any later version.
20 dnl This program is distributed in the hope that it will be useful,
21 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
22 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 dnl GNU General Public License for more details.
25 dnl You should have received a copy of the GNU General Public License
26 dnl along with this program; if not, write to the Free Software
27 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
30 AC_DEFUN(AM_PATH_LISPDIR,
35 [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, xemacs...]],
38 no) AC_MSG_ERROR([emacs is not available]) ;;
39 *) EMACS=${withval} ;;
41 if test "x$EMACS" = "xt" -o "x$EMACS" = x; then
42 AC_PATH_PROGS(EMACS, emacs xemacs mule, no)
43 if test $EMACS = no; then
44 AC_MSG_ERROR(you should install Emacs first)
48 dnl # Check Emacs directories
50 AC_MSG_CHECKING([where emacs files are in])
51 EMACS_BASENAME="`echo x$EMACS | sed -e 's/x//' -e 's/^.*\///'`"
52 if test "x$emacsdir" = x; then
53 if test "x$prefix" = "xNONE"; then
54 prefix=$ac_default_prefix
56 emacsdir="\$(datadir)/emacs"
57 case "$EMACS_BASENAME" in
59 if test -d $prefix/lib/emacs; then
60 emacsdir="$prefix/lib/emacs"
62 if test -d $prefix/share/emacs; then
63 emacsdir="$prefix/share/emacs"
67 if test -d $prefix/lib/xemacs; then
68 emacsdir="$prefix/lib/xemacs"
70 if test -d $prefix/share/xemacs; then
71 emacsdir="$prefix/share/xemacs"
75 if test -d $prefix/lib/emacs; then
76 emacsdir="$prefix/lib/emacs"
78 if test -d $prefix/share/emacs; then
79 emacsdir="$prefix/share/emacs"
81 if test -d $prefix/lib/mule; then
82 emacsdir="$prefix/lib/mule"
84 if test -d $prefix/share/mule; then
85 emacsdir="$prefix/share/mule"
90 AC_MSG_RESULT($emacsdir)
93 dnl # Check Emacs site-lisp directories
96 [ --with-lispdir=DIR emacs lisp files go to DIR [guessed]],
99 no) AC_MSG_ERROR(lispdir is not available) ;;
100 *) lispdir=${withval} ;;
102 AC_MSG_CHECKING([where .elc files should go])
103 if test "x$lispdir" = x; then
104 lispdir="$emacsdir/site-lisp"
105 if test -d $emacsdir/lisp; then
106 lispdir="$emacsdir/lisp"
108 case "$EMACS_BASENAME" in
110 lispdir="$lispdir/tgnus"
114 AC_MSG_RESULT($lispdir)
117 # Do all the work for Automake. This macro actually does too much --
118 # some checks are only needed if your package does certain things.
119 # But this isn't really a big deal.
124 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
126 AC_DEFUN(AM_INIT_AUTOMAKE,
127 [AC_REQUIRE([AM_PROG_INSTALL])
132 dnl test to see if srcdir already configured
133 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
134 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
137 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
138 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
139 AC_REQUIRE([AM_SANITY_CHECK])
140 AC_REQUIRE([AC_ARG_PROGRAM])
141 dnl FIXME This is truly gross.
142 missing_dir=`cd $ac_aux_dir && pwd`
143 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
144 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
145 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
146 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
147 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
148 AC_REQUIRE([AC_PROG_MAKE_SET])])
153 AC_DEFUN(AM_PROG_INSTALL,
154 [AC_REQUIRE([AC_PROG_INSTALL])
155 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
156 AC_SUBST(INSTALL_SCRIPT)dnl
160 # Check to make sure that the build environment is sane.
163 AC_DEFUN(AM_SANITY_CHECK,
164 [AC_MSG_CHECKING([whether build environment is sane])
167 echo timestamp > conftestfile
168 # Do `set' in a subshell so we don't clobber the current shell's
169 # arguments. Must try -L first in case configure is actually a
170 # symlink; some systems play weird games with the mod time of symlinks
171 # (eg FreeBSD returns the mod time of the symlink's containing
174 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
175 if test "[$]*" = "X"; then
177 set X `ls -t $srcdir/configure conftestfile`
179 if test "[$]*" != "X $srcdir/configure conftestfile" \
180 && test "[$]*" != "X conftestfile $srcdir/configure"; then
182 # If neither matched, then we have a broken ls. This can happen
183 # if, for instance, CONFIG_SHELL is bash and it inherits a
184 # broken ls alias from the environment. This has actually
185 # happened. Such a system could not be considered "sane".
186 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
187 alias in your environment])
190 test "[$]2" = conftestfile
196 AC_MSG_ERROR([newly created file is older than distributed files!
197 Check your system clock])
202 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
203 dnl The program must properly implement --version.
204 AC_DEFUN(AM_MISSING_PROG,
205 [AC_MSG_CHECKING(for working $2)
206 # Run test in a subshell; some versions of sh will print an error if
207 # an executable is not found, even if stderr is redirected.
208 # Redirect stdin to placate older versions of autoconf. Sigh.
209 if ($2 --version) < /dev/null > /dev/null 2>&1; then
214 AC_MSG_RESULT(missing)