added textile-mode and mmm-mode. xpath stuff
[emacs-init.git] / mmm-mode-0.4.8 / aclocal.m4
1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 dnl
15 dnl Execute arbitrary emacs lisp
16 dnl
17 AC_DEFUN(AC_EMACS_LISP, [
18 elisp="$2"
19 if test -z "$3"; then
20         AC_MSG_CHECKING(for $1)
21 fi
22 AC_CACHE_VAL(EMACS_cv_SYS_$1,[
23         OUTPUT=./conftest-$$
24         echo ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil \"${OUTPUT}\"))" >& AC_FD_CC 2>&1  
25         ${EMACS} -batch -eval "(let ((x ${elisp})) (write-region (if (stringp x) (princ x 'ignore) (prin1-to-string x)) nil \"${OUTPUT}\"nil 5))" >& AC_FD_CC 2>&1
26         retval=`cat ${OUTPUT}`
27         echo "=> ${retval}" >& AC_FD_CC 2>&1
28         rm -f ${OUTPUT}
29         EMACS_cv_SYS_$1=$retval
30 ])
31 $1=${EMACS_cv_SYS_$1}
32 if test -z "$3"; then
33         AC_MSG_RESULT($$1)
34 fi
35 ])
36
37 AC_DEFUN(AC_XEMACS_P, [
38   AC_MSG_CHECKING([if $EMACS is really XEmacs])
39   AC_EMACS_LISP(xemacsp,(if (string-match \"XEmacs\" emacs-version) \"yes\" \"no\") ,"noecho")
40   XEMACS=${EMACS_cv_SYS_xemacsp}
41   EMACS_FLAVOR=emacs
42   if test "$XEMACS" = "yes"; then
43      EMACS_FLAVOR=xemacs
44   fi
45   AC_MSG_RESULT($XEMACS)
46   AC_SUBST(XEMACS)
47   AC_SUBST(EMACS_FLAVOR)
48 ])
49
50 AC_DEFUN(AC_PATH_LISPDIR, [
51   AC_XEMACS_P
52   if test "$prefix" = "NONE"; then
53         AC_MSG_CHECKING([prefix for your Emacs])
54         AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho")
55         prefix=${EMACS_cv_SYS_prefix}
56         AC_MSG_RESULT($prefix)
57   fi
58   AC_ARG_WITH(lispdir,          --with-lispdir            Where to install lisp files, lispdir=${withval})
59   AC_MSG_CHECKING([where .elc files should go])
60   if test -z "$lispdir"; then
61     dnl Set default value
62     theprefix=$prefix
63     if test "x$theprefix" = "xNONE"; then
64         theprefix=$ac_default_prefix
65     fi
66     lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp"
67     for thedir in share lib; do
68         potential=
69         if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then
70            lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp"
71            break
72         fi
73     done
74   fi
75   AC_MSG_RESULT($lispdir)
76   AC_SUBST(lispdir)
77 ])
78
79 dnl
80 dnl Determine the emacs version we are running.
81 dnl Automatically substitutes @EMACS_VERSION@ with this number.
82 dnl
83 AC_DEFUN(AC_EMACS_VERSION, [
84 AC_MSG_CHECKING(for emacs version)
85 AC_EMACS_LISP(version,(and (boundp 'emacs-major-version) (format \"%d.%d\" emacs-major-version emacs-minor-version)),"noecho")
86
87 EMACS_VERSION=${EMACS_cv_SYS_version}
88 AC_SUBST(EMACS_VERSION)
89 AC_MSG_RESULT(${EMACS_VERSION})
90 ])
91
92 dnl
93 dnl Determine whether the specified version of Emacs supports packages
94 dnl or not.  Currently, only XEmacs 20.3 does, but this is a general
95 dnl check.
96 dnl
97 AC_DEFUN(AC_EMACS_PACKAGES, [
98 AC_ARG_WITH(package-dir,      --with-package-dir        Configure as a XEmacs package in directory, [ EMACS_PACKAGE_DIR="${withval}"])
99 if test -n "$EMACS_PACKAGE_DIR"; then
100   if test "$prefix" != "NONE"; then
101         AC_MSG_ERROR([--with-package-dir and --prefix are mutually exclusive])
102   fi
103   dnl Massage everything to use $(prefix) correctly.
104   prefix=$EMACS_PACKAGE_DIR
105   datadir='$(prefix)/etc/w3'
106   infodir='$(prefix)/info'
107   lispdir='$(prefix)/lisp/w3'
108 fi
109 AC_SUBST(EMACS_PACKAGE_DIR)
110 ])
111
112 dnl
113 dnl Check whether a function exists in a library
114 dnl All '_' characters in the first argument are converted to '-'
115 dnl
116 AC_DEFUN(AC_EMACS_CHECK_LIB, [
117 if test -z "$3"; then
118         AC_MSG_CHECKING(for $2 in $1)
119 fi
120 library=`echo $1 | tr _ -`
121 AC_EMACS_LISP($1,(progn (fmakunbound '$2) (condition-case nil (progn (require '$library) (fboundp '$2)) (error (prog1 nil (message \"$library not found\"))))),"noecho")
122 if test "${EMACS_cv_SYS_$1}" = "nil"; then
123         EMACS_cv_SYS_$1=no
124 fi
125 if test "${EMACS_cv_SYS_$1}" = "t"; then
126         EMACS_cv_SYS_$1=yes
127 fi
128 HAVE_$1=${EMACS_cv_SYS_$1}
129 AC_SUBST(HAVE_$1)
130 if test -z "$3"; then
131         AC_MSG_RESULT($HAVE_$1)
132 fi
133 ])
134
135 dnl
136 dnl Check whether a variable exists in a library
137 dnl All '_' characters in the first argument are converted to '-'
138 dnl
139 AC_DEFUN(AC_EMACS_CHECK_VAR, [
140 AC_MSG_CHECKING(for $2 in $1)
141 library=`echo $1 | tr _ -`
142 AC_EMACS_LISP($1,(progn (makunbound '$2) (condition-case nil (progn (require '$library) (boundp '$2)) (error nil))),"noecho")
143 if test "${EMACS_cv_SYS_$1}" = "nil"; then
144         EMACS_cv_SYS_$1=no
145 fi
146 HAVE_$1=${EMACS_cv_SYS_$1}
147 AC_SUBST(HAVE_$1)
148 AC_MSG_RESULT($HAVE_$1)
149 ])
150
151 dnl
152 dnl Perform sanity checking and try to locate the custom and widget packages
153 dnl
154 AC_DEFUN(AC_CHECK_CUSTOM, [
155 AC_MSG_CHECKING(for acceptable custom library)
156 AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_CUSTOM,[
157 AC_EMACS_CHECK_LIB(widget,widget-convert-text,"noecho")
158 AC_EMACS_CHECK_LIB(wid_edit,widget-convert-text,"noecho")
159 if test "${HAVE_widget}" = "yes"; then
160         EMACS_cv_ACCEPTABLE_CUSTOM=yes
161 else
162         if test "${HAVE_wid_edit}" != "no"; then
163                 EMACS_cv_ACCEPTABLE_CUSTOM=yes
164         else
165                 EMACS_cv_ACCEPTABLE_CUSTOM=no
166         fi
167 fi
168 if test "${EMACS_cv_ACCEPTABLE_CUSTOM}" = "yes"; then
169         AC_EMACS_LISP(widget_dir,(file-name-directory (locate-library \"widget\")),"noecho")
170         EMACS_cv_ACCEPTABLE_CUSTOM=$EMACS_cv_SYS_widget_dir
171 fi
172 ])
173    AC_ARG_WITH(custom,           --with-custom             Specify where to find the custom package, [ EMACS_cv_ACCEPTABLE_CUSTOM=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
174    CUSTOM=${EMACS_cv_ACCEPTABLE_CUSTOM}
175    AC_SUBST(CUSTOM)
176    AC_MSG_RESULT("${CUSTOM}")
177 ])
178
179
180 # Do all the work for Automake.                            -*- Autoconf -*-
181
182 # This macro actually does too much some checks are only needed if
183 # your package does certain things.  But this isn't really a big deal.
184
185 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
186 # Free Software Foundation, Inc.
187
188 # This program is free software; you can redistribute it and/or modify
189 # it under the terms of the GNU General Public License as published by
190 # the Free Software Foundation; either version 2, or (at your option)
191 # any later version.
192
193 # This program is distributed in the hope that it will be useful,
194 # but WITHOUT ANY WARRANTY; without even the implied warranty of
195 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
196 # GNU General Public License for more details.
197
198 # You should have received a copy of the GNU General Public License
199 # along with this program; if not, write to the Free Software
200 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
201 # 02111-1307, USA.
202
203 # serial 10
204
205 AC_PREREQ([2.54])
206
207 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
208 # the ones we care about.
209 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
210
211 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
212 # AM_INIT_AUTOMAKE([OPTIONS])
213 # -----------------------------------------------
214 # The call with PACKAGE and VERSION arguments is the old style
215 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
216 # and VERSION should now be passed to AC_INIT and removed from
217 # the call to AM_INIT_AUTOMAKE.
218 # We support both call styles for the transition.  After
219 # the next Automake release, Autoconf can make the AC_INIT
220 # arguments mandatory, and then we can depend on a new Autoconf
221 # release and drop the old call support.
222 AC_DEFUN([AM_INIT_AUTOMAKE],
223 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
224  AC_REQUIRE([AC_PROG_INSTALL])dnl
225 # test to see if srcdir already configured
226 if test "`cd $srcdir && pwd`" != "`pwd`" &&
227    test -f $srcdir/config.status; then
228   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
229 fi
230
231 # test whether we have cygpath
232 if test -z "$CYGPATH_W"; then
233   if (cygpath --version) >/dev/null 2>/dev/null; then
234     CYGPATH_W='cygpath -w'
235   else
236     CYGPATH_W=echo
237   fi
238 fi
239 AC_SUBST([CYGPATH_W])
240
241 # Define the identity of the package.
242 dnl Distinguish between old-style and new-style calls.
243 m4_ifval([$2],
244 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
245  AC_SUBST([PACKAGE], [$1])dnl
246  AC_SUBST([VERSION], [$2])],
247 [_AM_SET_OPTIONS([$1])dnl
248  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
249  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
250
251 _AM_IF_OPTION([no-define],,
252 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
253  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
254
255 # Some tools Automake needs.
256 AC_REQUIRE([AM_SANITY_CHECK])dnl
257 AC_REQUIRE([AC_ARG_PROGRAM])dnl
258 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
259 AM_MISSING_PROG(AUTOCONF, autoconf)
260 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
261 AM_MISSING_PROG(AUTOHEADER, autoheader)
262 AM_MISSING_PROG(MAKEINFO, makeinfo)
263 AM_MISSING_PROG(AMTAR, tar)
264 AM_PROG_INSTALL_SH
265 AM_PROG_INSTALL_STRIP
266 # We need awk for the "check" target.  The system "awk" is bad on
267 # some platforms.
268 AC_REQUIRE([AC_PROG_AWK])dnl
269 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
270 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
271
272 _AM_IF_OPTION([no-dependencies],,
273 [AC_PROVIDE_IFELSE([AC_PROG_CC],
274                   [_AM_DEPENDENCIES(CC)],
275                   [define([AC_PROG_CC],
276                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
277 AC_PROVIDE_IFELSE([AC_PROG_CXX],
278                   [_AM_DEPENDENCIES(CXX)],
279                   [define([AC_PROG_CXX],
280                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
281 ])
282 ])
283
284
285 # When config.status generates a header, we must update the stamp-h file.
286 # This file resides in the same directory as the config header
287 # that is generated.  The stamp files are numbered to have different names.
288
289 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
290 # loop where config.status creates the headers, so we can generate
291 # our stamp files there.
292 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
293 [# Compute $1's index in $config_headers.
294 _am_stamp_count=1
295 for _am_header in $config_headers :; do
296   case $_am_header in
297     $1 | $1:* )
298       break ;;
299     * )
300       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
301   esac
302 done
303 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
304
305 # Copyright 2002  Free Software Foundation, Inc.
306
307 # This program is free software; you can redistribute it and/or modify
308 # it under the terms of the GNU General Public License as published by
309 # the Free Software Foundation; either version 2, or (at your option)
310 # any later version.
311
312 # This program is distributed in the hope that it will be useful,
313 # but WITHOUT ANY WARRANTY; without even the implied warranty of
314 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
315 # GNU General Public License for more details.
316
317 # You should have received a copy of the GNU General Public License
318 # along with this program; if not, write to the Free Software
319 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
320
321 # AM_AUTOMAKE_VERSION(VERSION)
322 # ----------------------------
323 # Automake X.Y traces this macro to ensure aclocal.m4 has been
324 # generated from the m4 files accompanying Automake X.Y.
325 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
326
327 # AM_SET_CURRENT_AUTOMAKE_VERSION
328 # -------------------------------
329 # Call AM_AUTOMAKE_VERSION so it can be traced.
330 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
331 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
332          [AM_AUTOMAKE_VERSION([1.7.9])])
333
334 # Helper functions for option handling.                    -*- Autoconf -*-
335
336 # Copyright 2001, 2002  Free Software Foundation, Inc.
337
338 # This program is free software; you can redistribute it and/or modify
339 # it under the terms of the GNU General Public License as published by
340 # the Free Software Foundation; either version 2, or (at your option)
341 # any later version.
342
343 # This program is distributed in the hope that it will be useful,
344 # but WITHOUT ANY WARRANTY; without even the implied warranty of
345 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
346 # GNU General Public License for more details.
347
348 # You should have received a copy of the GNU General Public License
349 # along with this program; if not, write to the Free Software
350 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
351 # 02111-1307, USA.
352
353 # serial 2
354
355 # _AM_MANGLE_OPTION(NAME)
356 # -----------------------
357 AC_DEFUN([_AM_MANGLE_OPTION],
358 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
359
360 # _AM_SET_OPTION(NAME)
361 # ------------------------------
362 # Set option NAME.  Presently that only means defining a flag for this option.
363 AC_DEFUN([_AM_SET_OPTION],
364 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
365
366 # _AM_SET_OPTIONS(OPTIONS)
367 # ----------------------------------
368 # OPTIONS is a space-separated list of Automake options.
369 AC_DEFUN([_AM_SET_OPTIONS],
370 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
371
372 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
373 # -------------------------------------------
374 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
375 AC_DEFUN([_AM_IF_OPTION],
376 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
377
378 #
379 # Check to make sure that the build environment is sane.
380 #
381
382 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
383
384 # This program is free software; you can redistribute it and/or modify
385 # it under the terms of the GNU General Public License as published by
386 # the Free Software Foundation; either version 2, or (at your option)
387 # any later version.
388
389 # This program is distributed in the hope that it will be useful,
390 # but WITHOUT ANY WARRANTY; without even the implied warranty of
391 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
392 # GNU General Public License for more details.
393
394 # You should have received a copy of the GNU General Public License
395 # along with this program; if not, write to the Free Software
396 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
397 # 02111-1307, USA.
398
399 # serial 3
400
401 # AM_SANITY_CHECK
402 # ---------------
403 AC_DEFUN([AM_SANITY_CHECK],
404 [AC_MSG_CHECKING([whether build environment is sane])
405 # Just in case
406 sleep 1
407 echo timestamp > conftest.file
408 # Do `set' in a subshell so we don't clobber the current shell's
409 # arguments.  Must try -L first in case configure is actually a
410 # symlink; some systems play weird games with the mod time of symlinks
411 # (eg FreeBSD returns the mod time of the symlink's containing
412 # directory).
413 if (
414    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
415    if test "$[*]" = "X"; then
416       # -L didn't work.
417       set X `ls -t $srcdir/configure conftest.file`
418    fi
419    rm -f conftest.file
420    if test "$[*]" != "X $srcdir/configure conftest.file" \
421       && test "$[*]" != "X conftest.file $srcdir/configure"; then
422
423       # If neither matched, then we have a broken ls.  This can happen
424       # if, for instance, CONFIG_SHELL is bash and it inherits a
425       # broken ls alias from the environment.  This has actually
426       # happened.  Such a system could not be considered "sane".
427       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
428 alias in your environment])
429    fi
430
431    test "$[2]" = conftest.file
432    )
433 then
434    # Ok.
435    :
436 else
437    AC_MSG_ERROR([newly created file is older than distributed files!
438 Check your system clock])
439 fi
440 AC_MSG_RESULT(yes)])
441
442 #  -*- Autoconf -*-
443
444
445 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
446
447 # This program is free software; you can redistribute it and/or modify
448 # it under the terms of the GNU General Public License as published by
449 # the Free Software Foundation; either version 2, or (at your option)
450 # any later version.
451
452 # This program is distributed in the hope that it will be useful,
453 # but WITHOUT ANY WARRANTY; without even the implied warranty of
454 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
455 # GNU General Public License for more details.
456
457 # You should have received a copy of the GNU General Public License
458 # along with this program; if not, write to the Free Software
459 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
460 # 02111-1307, USA.
461
462 # serial 3
463
464 # AM_MISSING_PROG(NAME, PROGRAM)
465 # ------------------------------
466 AC_DEFUN([AM_MISSING_PROG],
467 [AC_REQUIRE([AM_MISSING_HAS_RUN])
468 $1=${$1-"${am_missing_run}$2"}
469 AC_SUBST($1)])
470
471
472 # AM_MISSING_HAS_RUN
473 # ------------------
474 # Define MISSING if not defined so far and test if it supports --run.
475 # If it does, set am_missing_run to use it, otherwise, to nothing.
476 AC_DEFUN([AM_MISSING_HAS_RUN],
477 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
478 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
479 # Use eval to expand $SHELL
480 if eval "$MISSING --run true"; then
481   am_missing_run="$MISSING --run "
482 else
483   am_missing_run=
484   AC_MSG_WARN([`missing' script is too old or missing])
485 fi
486 ])
487
488 # AM_AUX_DIR_EXPAND
489
490 # Copyright 2001 Free Software Foundation, Inc.
491
492 # This program is free software; you can redistribute it and/or modify
493 # it under the terms of the GNU General Public License as published by
494 # the Free Software Foundation; either version 2, or (at your option)
495 # any later version.
496
497 # This program is distributed in the hope that it will be useful,
498 # but WITHOUT ANY WARRANTY; without even the implied warranty of
499 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
500 # GNU General Public License for more details.
501
502 # You should have received a copy of the GNU General Public License
503 # along with this program; if not, write to the Free Software
504 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
505 # 02111-1307, USA.
506
507 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
508 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
509 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
510 #
511 # Of course, Automake must honor this variable whenever it calls a
512 # tool from the auxiliary directory.  The problem is that $srcdir (and
513 # therefore $ac_aux_dir as well) can be either absolute or relative,
514 # depending on how configure is run.  This is pretty annoying, since
515 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
516 # source directory, any form will work fine, but in subdirectories a
517 # relative path needs to be adjusted first.
518 #
519 # $ac_aux_dir/missing
520 #    fails when called from a subdirectory if $ac_aux_dir is relative
521 # $top_srcdir/$ac_aux_dir/missing
522 #    fails if $ac_aux_dir is absolute,
523 #    fails when called from a subdirectory in a VPATH build with
524 #          a relative $ac_aux_dir
525 #
526 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
527 # are both prefixed by $srcdir.  In an in-source build this is usually
528 # harmless because $srcdir is `.', but things will broke when you
529 # start a VPATH build or use an absolute $srcdir.
530 #
531 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
532 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
533 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
534 # and then we would define $MISSING as
535 #   MISSING="\${SHELL} $am_aux_dir/missing"
536 # This will work as long as MISSING is not called from configure, because
537 # unfortunately $(top_srcdir) has no meaning in configure.
538 # However there are other variables, like CC, which are often used in
539 # configure, and could therefore not use this "fixed" $ac_aux_dir.
540 #
541 # Another solution, used here, is to always expand $ac_aux_dir to an
542 # absolute PATH.  The drawback is that using absolute paths prevent a
543 # configured tree to be moved without reconfiguration.
544
545 # Rely on autoconf to set up CDPATH properly.
546 AC_PREREQ([2.50])
547
548 AC_DEFUN([AM_AUX_DIR_EXPAND], [
549 # expand $ac_aux_dir to an absolute path
550 am_aux_dir=`cd $ac_aux_dir && pwd`
551 ])
552
553 # AM_PROG_INSTALL_SH
554 # ------------------
555 # Define $install_sh.
556
557 # Copyright 2001 Free Software Foundation, Inc.
558
559 # This program is free software; you can redistribute it and/or modify
560 # it under the terms of the GNU General Public License as published by
561 # the Free Software Foundation; either version 2, or (at your option)
562 # any later version.
563
564 # This program is distributed in the hope that it will be useful,
565 # but WITHOUT ANY WARRANTY; without even the implied warranty of
566 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
567 # GNU General Public License for more details.
568
569 # You should have received a copy of the GNU General Public License
570 # along with this program; if not, write to the Free Software
571 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
572 # 02111-1307, USA.
573
574 AC_DEFUN([AM_PROG_INSTALL_SH],
575 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
576 install_sh=${install_sh-"$am_aux_dir/install-sh"}
577 AC_SUBST(install_sh)])
578
579 # AM_PROG_INSTALL_STRIP
580
581 # Copyright 2001 Free Software Foundation, Inc.
582
583 # This program is free software; you can redistribute it and/or modify
584 # it under the terms of the GNU General Public License as published by
585 # the Free Software Foundation; either version 2, or (at your option)
586 # any later version.
587
588 # This program is distributed in the hope that it will be useful,
589 # but WITHOUT ANY WARRANTY; without even the implied warranty of
590 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
591 # GNU General Public License for more details.
592
593 # You should have received a copy of the GNU General Public License
594 # along with this program; if not, write to the Free Software
595 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
596 # 02111-1307, USA.
597
598 # One issue with vendor `install' (even GNU) is that you can't
599 # specify the program used to strip binaries.  This is especially
600 # annoying in cross-compiling environments, where the build's strip
601 # is unlikely to handle the host's binaries.
602 # Fortunately install-sh will honor a STRIPPROG variable, so we
603 # always use install-sh in `make install-strip', and initialize
604 # STRIPPROG with the value of the STRIP variable (set by the user).
605 AC_DEFUN([AM_PROG_INSTALL_STRIP],
606 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
607 # Installed binaries are usually stripped using `strip' when the user
608 # run `make install-strip'.  However `strip' might not be the right
609 # tool to use in cross-compilation environments, therefore Automake
610 # will honor the `STRIP' environment variable to overrule this program.
611 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
612 if test "$cross_compiling" != no; then
613   AC_CHECK_TOOL([STRIP], [strip], :)
614 fi
615 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
616 AC_SUBST([INSTALL_STRIP_PROGRAM])])
617
618 #                                                          -*- Autoconf -*-
619 # Copyright (C) 2003  Free Software Foundation, Inc.
620
621 # This program is free software; you can redistribute it and/or modify
622 # it under the terms of the GNU General Public License as published by
623 # the Free Software Foundation; either version 2, or (at your option)
624 # any later version.
625
626 # This program is distributed in the hope that it will be useful,
627 # but WITHOUT ANY WARRANTY; without even the implied warranty of
628 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
629 # GNU General Public License for more details.
630
631 # You should have received a copy of the GNU General Public License
632 # along with this program; if not, write to the Free Software
633 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
634 # 02111-1307, USA.
635
636 # serial 1
637
638 # Check whether the underlying file-system supports filenames
639 # with a leading dot.  For instance MS-DOS doesn't.
640 AC_DEFUN([AM_SET_LEADING_DOT],
641 [rm -rf .tst 2>/dev/null
642 mkdir .tst 2>/dev/null
643 if test -d .tst; then
644   am__leading_dot=.
645 else
646   am__leading_dot=_
647 fi
648 rmdir .tst 2>/dev/null
649 AC_SUBST([am__leading_dot])])
650
651 # serial 5                                              -*- Autoconf -*-
652
653 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
654
655 # This program is free software; you can redistribute it and/or modify
656 # it under the terms of the GNU General Public License as published by
657 # the Free Software Foundation; either version 2, or (at your option)
658 # any later version.
659
660 # This program is distributed in the hope that it will be useful,
661 # but WITHOUT ANY WARRANTY; without even the implied warranty of
662 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
663 # GNU General Public License for more details.
664
665 # You should have received a copy of the GNU General Public License
666 # along with this program; if not, write to the Free Software
667 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
668 # 02111-1307, USA.
669
670
671 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
672 # written in clear, in which case automake, when reading aclocal.m4,
673 # will think it sees a *use*, and therefore will trigger all it's
674 # C support machinery.  Also note that it means that autoscan, seeing
675 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
676
677
678
679 # _AM_DEPENDENCIES(NAME)
680 # ----------------------
681 # See how the compiler implements dependency checking.
682 # NAME is "CC", "CXX", "GCJ", or "OBJC".
683 # We try a few techniques and use that to set a single cache variable.
684 #
685 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
686 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
687 # dependency, and given that the user is not expected to run this macro,
688 # just rely on AC_PROG_CC.
689 AC_DEFUN([_AM_DEPENDENCIES],
690 [AC_REQUIRE([AM_SET_DEPDIR])dnl
691 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
692 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
693 AC_REQUIRE([AM_DEP_TRACK])dnl
694
695 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
696        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
697        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
698        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
699                    [depcc="$$1"   am_compiler_list=])
700
701 AC_CACHE_CHECK([dependency style of $depcc],
702                [am_cv_$1_dependencies_compiler_type],
703 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
704   # We make a subdir and do the tests there.  Otherwise we can end up
705   # making bogus files that we don't know about and never remove.  For
706   # instance it was reported that on HP-UX the gcc test will end up
707   # making a dummy file named `D' -- because `-MD' means `put the output
708   # in D'.
709   mkdir conftest.dir
710   # Copy depcomp to subdir because otherwise we won't find it if we're
711   # using a relative directory.
712   cp "$am_depcomp" conftest.dir
713   cd conftest.dir
714   # We will build objects and dependencies in a subdirectory because
715   # it helps to detect inapplicable dependency modes.  For instance
716   # both Tru64's cc and ICC support -MD to output dependencies as a
717   # side effect of compilation, but ICC will put the dependencies in
718   # the current directory while Tru64 will put them in the object
719   # directory.
720   mkdir sub
721
722   am_cv_$1_dependencies_compiler_type=none
723   if test "$am_compiler_list" = ""; then
724      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
725   fi
726   for depmode in $am_compiler_list; do
727     # Setup a source with many dependencies, because some compilers
728     # like to wrap large dependency lists on column 80 (with \), and
729     # we should not choose a depcomp mode which is confused by this.
730     #
731     # We need to recreate these files for each test, as the compiler may
732     # overwrite some of them when testing with obscure command lines.
733     # This happens at least with the AIX C compiler.
734     : > sub/conftest.c
735     for i in 1 2 3 4 5 6; do
736       echo '#include "conftst'$i'.h"' >> sub/conftest.c
737       : > sub/conftst$i.h
738     done
739     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
740
741     case $depmode in
742     nosideeffect)
743       # after this tag, mechanisms are not by side-effect, so they'll
744       # only be used when explicitly requested
745       if test "x$enable_dependency_tracking" = xyes; then
746         continue
747       else
748         break
749       fi
750       ;;
751     none) break ;;
752     esac
753     # We check with `-c' and `-o' for the sake of the "dashmstdout"
754     # mode.  It turns out that the SunPro C++ compiler does not properly
755     # handle `-M -o', and we need to detect this.
756     if depmode=$depmode \
757        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
758        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
759        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
760          >/dev/null 2>conftest.err &&
761        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
762        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
763        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
764       # icc doesn't choke on unknown options, it will just issue warnings
765       # (even with -Werror).  So we grep stderr for any message
766       # that says an option was ignored.
767       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
768         am_cv_$1_dependencies_compiler_type=$depmode
769         break
770       fi
771     fi
772   done
773
774   cd ..
775   rm -rf conftest.dir
776 else
777   am_cv_$1_dependencies_compiler_type=none
778 fi
779 ])
780 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
781 AM_CONDITIONAL([am__fastdep$1], [
782   test "x$enable_dependency_tracking" != xno \
783   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
784 ])
785
786
787 # AM_SET_DEPDIR
788 # -------------
789 # Choose a directory name for dependency files.
790 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
791 AC_DEFUN([AM_SET_DEPDIR],
792 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
793 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
794 ])
795
796
797 # AM_DEP_TRACK
798 # ------------
799 AC_DEFUN([AM_DEP_TRACK],
800 [AC_ARG_ENABLE(dependency-tracking,
801 [  --disable-dependency-tracking Speeds up one-time builds
802   --enable-dependency-tracking  Do not reject slow dependency extractors])
803 if test "x$enable_dependency_tracking" != xno; then
804   am_depcomp="$ac_aux_dir/depcomp"
805   AMDEPBACKSLASH='\'
806 fi
807 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
808 AC_SUBST([AMDEPBACKSLASH])
809 ])
810
811 # Generate code to set up dependency tracking.   -*- Autoconf -*-
812
813 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
814
815 # This program is free software; you can redistribute it and/or modify
816 # it under the terms of the GNU General Public License as published by
817 # the Free Software Foundation; either version 2, or (at your option)
818 # any later version.
819
820 # This program is distributed in the hope that it will be useful,
821 # but WITHOUT ANY WARRANTY; without even the implied warranty of
822 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
823 # GNU General Public License for more details.
824
825 # You should have received a copy of the GNU General Public License
826 # along with this program; if not, write to the Free Software
827 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
828 # 02111-1307, USA.
829
830 #serial 2
831
832 # _AM_OUTPUT_DEPENDENCY_COMMANDS
833 # ------------------------------
834 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
835 [for mf in $CONFIG_FILES; do
836   # Strip MF so we end up with the name of the file.
837   mf=`echo "$mf" | sed -e 's/:.*$//'`
838   # Check whether this is an Automake generated Makefile or not.
839   # We used to match only the files named `Makefile.in', but
840   # some people rename them; so instead we look at the file content.
841   # Grep'ing the first line is not enough: some people post-process
842   # each Makefile.in and add a new line on top of each file to say so.
843   # So let's grep whole file.
844   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
845     dirpart=`AS_DIRNAME("$mf")`
846   else
847     continue
848   fi
849   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
850   # Extract the definition of DEP_FILES from the Makefile without
851   # running `make'.
852   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
853   test -z "$DEPDIR" && continue
854   # When using ansi2knr, U may be empty or an underscore; expand it
855   U=`sed -n -e '/^U = / s///p' < "$mf"`
856   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
857   # We invoke sed twice because it is the simplest approach to
858   # changing $(DEPDIR) to its actual value in the expansion.
859   for file in `sed -n -e '
860     /^DEP_FILES = .*\\\\$/ {
861       s/^DEP_FILES = //
862       :loop
863         s/\\\\$//
864         p
865         n
866         /\\\\$/ b loop
867       p
868     }
869     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
870        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
871     # Make sure the directory exists.
872     test -f "$dirpart/$file" && continue
873     fdir=`AS_DIRNAME(["$file"])`
874     AS_MKDIR_P([$dirpart/$fdir])
875     # echo "creating $dirpart/$file"
876     echo '# dummy' > "$dirpart/$file"
877   done
878 done
879 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
880
881
882 # AM_OUTPUT_DEPENDENCY_COMMANDS
883 # -----------------------------
884 # This macro should only be invoked once -- use via AC_REQUIRE.
885 #
886 # This code is only required when automatic dependency tracking
887 # is enabled.  FIXME.  This creates each `.P' file that we will
888 # need in order to bootstrap the dependency handling code.
889 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
890 [AC_CONFIG_COMMANDS([depfiles],
891      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
892      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
893 ])
894
895 # Check to see how 'make' treats includes.      -*- Autoconf -*-
896
897 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
898
899 # This program is free software; you can redistribute it and/or modify
900 # it under the terms of the GNU General Public License as published by
901 # the Free Software Foundation; either version 2, or (at your option)
902 # any later version.
903
904 # This program is distributed in the hope that it will be useful,
905 # but WITHOUT ANY WARRANTY; without even the implied warranty of
906 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
907 # GNU General Public License for more details.
908
909 # You should have received a copy of the GNU General Public License
910 # along with this program; if not, write to the Free Software
911 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
912 # 02111-1307, USA.
913
914 # serial 2
915
916 # AM_MAKE_INCLUDE()
917 # -----------------
918 # Check to see how make treats includes.
919 AC_DEFUN([AM_MAKE_INCLUDE],
920 [am_make=${MAKE-make}
921 cat > confinc << 'END'
922 am__doit:
923         @echo done
924 .PHONY: am__doit
925 END
926 # If we don't find an include directive, just comment out the code.
927 AC_MSG_CHECKING([for style of include used by $am_make])
928 am__include="#"
929 am__quote=
930 _am_result=none
931 # First try GNU make style include.
932 echo "include confinc" > confmf
933 # We grep out `Entering directory' and `Leaving directory'
934 # messages which can occur if `w' ends up in MAKEFLAGS.
935 # In particular we don't look at `^make:' because GNU make might
936 # be invoked under some other name (usually "gmake"), in which
937 # case it prints its new name instead of `make'.
938 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
939    am__include=include
940    am__quote=
941    _am_result=GNU
942 fi
943 # Now try BSD make style include.
944 if test "$am__include" = "#"; then
945    echo '.include "confinc"' > confmf
946    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
947       am__include=.include
948       am__quote="\""
949       _am_result=BSD
950    fi
951 fi
952 AC_SUBST([am__include])
953 AC_SUBST([am__quote])
954 AC_MSG_RESULT([$_am_result])
955 rm -f confinc confmf
956 ])
957
958 # AM_CONDITIONAL                                              -*- Autoconf -*-
959
960 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
961
962 # This program is free software; you can redistribute it and/or modify
963 # it under the terms of the GNU General Public License as published by
964 # the Free Software Foundation; either version 2, or (at your option)
965 # any later version.
966
967 # This program is distributed in the hope that it will be useful,
968 # but WITHOUT ANY WARRANTY; without even the implied warranty of
969 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
970 # GNU General Public License for more details.
971
972 # You should have received a copy of the GNU General Public License
973 # along with this program; if not, write to the Free Software
974 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
975 # 02111-1307, USA.
976
977 # serial 5
978
979 AC_PREREQ(2.52)
980
981 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
982 # -------------------------------------
983 # Define a conditional.
984 AC_DEFUN([AM_CONDITIONAL],
985 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
986         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
987 AC_SUBST([$1_TRUE])
988 AC_SUBST([$1_FALSE])
989 if $2; then
990   $1_TRUE=
991   $1_FALSE='#'
992 else
993   $1_TRUE='#'
994   $1_FALSE=
995 fi
996 AC_CONFIG_COMMANDS_PRE(
997 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
998   AC_MSG_ERROR([conditional "$1" was never defined.
999 Usually this means the macro was only invoked conditionally.])
1000 fi])])
1001
1002
1003 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1004 #   Free Software Foundation, Inc.
1005
1006 # This program is free software; you can redistribute it and/or modify
1007 # it under the terms of the GNU General Public License as published by
1008 # the Free Software Foundation; either version 2, or (at your option)
1009 # any later version.
1010
1011 # This program is distributed in the hope that it will be useful,
1012 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1013 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1014 # GNU General Public License for more details.
1015
1016 # You should have received a copy of the GNU General Public License
1017 # along with this program; if not, write to the Free Software
1018 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1019 # 02111-1307, USA.
1020
1021 # serial 7
1022
1023 # AM_PATH_LISPDIR
1024 # ---------------
1025 AC_DEFUN([AM_PATH_LISPDIR],
1026 [AC_ARG_WITH(lispdir,
1027  [  --with-lispdir          Override the default lisp directory ],
1028  [ lispdir="$withval"
1029    AC_MSG_CHECKING([where .elc files should go])
1030    AC_MSG_RESULT([$lispdir])],
1031  [
1032  # If set to t, that means we are running in a shell under Emacs.
1033  # If you have an Emacs named "t", then use the full path.
1034  test x"$EMACS" = xt && EMACS=
1035  AC_CHECK_PROGS(EMACS, emacs xemacs, no)
1036  if test $EMACS != "no"; then
1037    if test x${lispdir+set} != xset; then
1038      AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
1039        [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
1040   # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
1041   #  which is non-obvious for non-emacs users.
1042   # Redirecting /dev/null should help a bit; pity we can't detect "broken"
1043   #  emacsen earlier and avoid running this altogether.
1044   AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
1045         am_cv_lispdir=`sed -n \
1046        -e 's,/$,,' \
1047        -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
1048        -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \
1049        conftest.out`
1050        rm conftest.out
1051        if test -z "$am_cv_lispdir"; then
1052          am_cv_lispdir='${datadir}/emacs/site-lisp'
1053        fi
1054      ])
1055      lispdir="$am_cv_lispdir"
1056    fi
1057  fi
1058 ])
1059 AC_SUBST(lispdir)
1060 ])# AM_PATH_LISPDIR
1061
1062 AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
1063