annotate modules/aclocal.m4 @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents 8efd647ea9ca
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
1 AC_DEFUN(XE_EMACS, [
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
2 dnl
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
3 dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
4 dnl environment variable to 't'. Lets undo the damage.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
5 dnl
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
6 if test "${EMACS}" = "t"; then
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
7 EMACS=""
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
8 fi
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
9
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
10 AC_ARG_WITH(xemacs, --with-xemacs Use XEmacs to build, [ if test "${withval}" = "yes"; then EMACS=xemacs; else EMACS=${withval}; fi ])
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
11 AC_ARG_WITH(emacs, --with-emacs Use Emacs to build, [ if test "${withval}" = "yes"; then EMACS=emacs; else EMACS=${withval}; fi ])
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
12 AC_CHECK_PROG(EMACS, xemacs, xemacs, emacs)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
13 AC_SUBST(EMACS)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
14 ])
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
15
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
16 AC_DEFUN(XE_CONFIG_VALUE, [
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
17 OUTPUT=./conftest-$$
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
18 rm -f ${OUTPUT}
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
19 ${EMACS} -batch -eval "
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
20 (let ((hash (config-value-hash-table))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
21 (desired (split-string \"$1\")))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
22 (mapcar
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
23 (lambda (key)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
24 (message \"Checking for %S\" (intern key))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
25 (if (config-value (intern key))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
26 (progn
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
27 (write-region (format \"%s=\\\"%s\\\"\n\" key (config-value (intern key)))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
28 nil \"${OUTPUT}\" t))))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
29 desired))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
30 " 2> /dev/null > /dev/null
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
31 test -f ${OUTPUT} && . ${OUTPUT}
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
32 rm -f ${OUTPUT}
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
33 for ac_func in $1; do
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
34 :
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
35 done
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
36 ])