(gnus-offline-set-unplugged-state): Call the original
[elisp/gnus.git-] / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.3
2
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.
7
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.
12
13 dnl Copyright (C) 1999 NISHIDA Keisuke <knishida@ring.aist.go.jp>
14 dnl
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.
19 dnl
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.
24 dnl
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
28 dnl 02111-1307, USA.
29
30 AC_DEFUN(AM_PATH_LISPDIR,
31  [dnl #
32   dnl # Check Emacs
33   dnl #
34   AC_ARG_WITH(emacs,
35     [  --with-emacs=EMACS      compile with EMACS [EMACS=emacs, xemacs...]],
36     [case "${withval}" in
37        yes)     EMACS= ;;
38        no)      AC_MSG_ERROR([emacs is not available]) ;;
39        *)       EMACS=${withval} ;;
40      esac], EMACS=)
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)
45     fi
46   fi
47   dnl # 
48   dnl # Check Emacs directories
49   dnl #
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
55     fi
56     emacsdir="\$(datadir)/emacs"
57     case "$EMACS_BASENAME" in
58     emacs|emacs-*)
59       if test -d $prefix/lib/emacs; then
60         emacsdir="$prefix/lib/emacs"
61       fi
62       if test -d $prefix/share/emacs; then
63         emacsdir="$prefix/share/emacs"
64       fi
65       ;;
66     xemacs|xemacs-*)
67       if test -d $prefix/lib/xemacs; then
68         emacsdir="$prefix/lib/xemacs"
69       fi
70       if test -d $prefix/share/xemacs; then
71         emacsdir="$prefix/share/xemacs"
72       fi
73       ;;
74     mule|mule-*)
75       if test -d $prefix/lib/emacs; then
76         emacsdir="$prefix/lib/emacs"
77       fi
78       if test -d $prefix/share/emacs; then
79         emacsdir="$prefix/share/emacs"
80       fi
81       if test -d $prefix/lib/mule; then
82         emacsdir="$prefix/lib/mule"
83       fi
84       if test -d $prefix/share/mule; then
85         emacsdir="$prefix/share/mule"
86       fi
87       ;;
88     esac
89   fi
90   AC_MSG_RESULT($emacsdir)
91   AC_SUBST(emacsdir)
92   dnl # 
93   dnl # Check Emacs site-lisp directories
94   dnl #
95   AC_ARG_WITH(lispdir,
96     [  --with-lispdir=DIR      emacs lisp files go to DIR [guessed]],
97     [case "${withval}" in
98        yes)     lispdir= ;;
99        no)      AC_MSG_ERROR(lispdir is not available) ;;
100        *)       lispdir=${withval} ;;
101      esac], lispdir=)
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"
107     fi
108     case "$EMACS_BASENAME" in
109     xemacs|xemacs-*)
110       lispdir="$lispdir/tgnus"
111       ;;
112     esac
113   fi
114   AC_MSG_RESULT($lispdir)
115   AC_SUBST(lispdir)])
116
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.
120
121 # serial 1
122
123 dnl Usage:
124 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
125
126 AC_DEFUN(AM_INIT_AUTOMAKE,
127 [AC_REQUIRE([AM_PROG_INSTALL])
128 PACKAGE=[$1]
129 AC_SUBST(PACKAGE)
130 VERSION=[$2]
131 AC_SUBST(VERSION)
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])
135 fi
136 ifelse([$3],,
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])])
149
150
151 # serial 1
152
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
157 ])
158
159 #
160 # Check to make sure that the build environment is sane.
161 #
162
163 AC_DEFUN(AM_SANITY_CHECK,
164 [AC_MSG_CHECKING([whether build environment is sane])
165 # Just in case
166 sleep 1
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
172 # directory).
173 if (
174    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
175    if test "[$]*" = "X"; then
176       # -L didn't work.
177       set X `ls -t $srcdir/configure conftestfile`
178    fi
179    if test "[$]*" != "X $srcdir/configure conftestfile" \
180       && test "[$]*" != "X conftestfile $srcdir/configure"; then
181
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])
188    fi
189
190    test "[$]2" = conftestfile
191    )
192 then
193    # Ok.
194    :
195 else
196    AC_MSG_ERROR([newly created file is older than distributed files!
197 Check your system clock])
198 fi
199 rm -f conftest*
200 AC_MSG_RESULT(yes)])
201
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
210    $1=$2
211    AC_MSG_RESULT(found)
212 else
213    $1="$3/missing $2"
214    AC_MSG_RESULT(missing)
215 fi
216 AC_SUBST($1)])
217