1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file 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/lookup"
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([AC_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", [Name of package])
138 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
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])])
151 # Check to make sure that the build environment is sane.
154 AC_DEFUN(AM_SANITY_CHECK,
155 [AC_MSG_CHECKING([whether build environment is sane])
158 echo timestamp > conftestfile
159 # Do `set' in a subshell so we don't clobber the current shell's
160 # arguments. Must try -L first in case configure is actually a
161 # symlink; some systems play weird games with the mod time of symlinks
162 # (eg FreeBSD returns the mod time of the symlink's containing
165 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
166 if test "[$]*" = "X"; then
168 set X `ls -t $srcdir/configure conftestfile`
170 if test "[$]*" != "X $srcdir/configure conftestfile" \
171 && test "[$]*" != "X conftestfile $srcdir/configure"; then
173 # If neither matched, then we have a broken ls. This can happen
174 # if, for instance, CONFIG_SHELL is bash and it inherits a
175 # broken ls alias from the environment. This has actually
176 # happened. Such a system could not be considered "sane".
177 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
178 alias in your environment])
181 test "[$]2" = conftestfile
187 AC_MSG_ERROR([newly created file is older than distributed files!
188 Check your system clock])
193 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
194 dnl The program must properly implement --version.
195 AC_DEFUN(AM_MISSING_PROG,
196 [AC_MSG_CHECKING(for working $2)
197 # Run test in a subshell; some versions of sh will print an error if
198 # an executable is not found, even if stderr is redirected.
199 # Redirect stdin to placate older versions of autoconf. Sigh.
200 if ($2 --version) < /dev/null > /dev/null 2>&1; then
205 AC_MSG_RESULT(missing)