Require `base64' instead of to autoload it.
[elisp/gnus.git-] / aclocal.m4
1 AC_DEFUN(AC_DEFINE_GNUS_PRODUCT_NAME,
2  [dnl Defining gnus product name.
3   GNUS_PRODUCT_NAME=$1])
4
5 AC_DEFUN(AC_CHECK_EMACS,
6  [dnl Check for Emacsen.
7
8   dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
9   dnl environment variable to 't'.  Lets undo the damage.
10   test x$EMACS = xt && EMACS=
11
12   AC_ARG_WITH(emacs,
13    [  --with-emacs=EMACS      compile with EMACS [EMACS=emacs, mule...]],
14    [if test x$withval = xyes -o x$withval = x; then
15       AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
16     else
17       AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
18     fi])
19   AC_ARG_WITH(xemacs,
20    [  --with-xemacs=XEMACS    compile with XEMACS [XEMACS=xemacs]],
21    [if test x$withval = xyes -o x$withval = x; then
22       AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs)
23     else
24       AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs)
25     fi
26     EMACS=$XEMACS],
27    [XEMACS=xemacs
28     test x$EMACS = x &&\
29       AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
30   AC_SUBST(EMACS)
31   AC_SUBST(XEMACS)])
32
33 AC_DEFUN(AC_PATH_LISPDIR,
34  [dnl Check for LISPDIR.
35   AC_MSG_CHECKING([where lisp files should go])
36   AC_ARG_WITH(lispdir,
37    [  --with-lispdir=DIR      Where to install lisp files
38                           (for XEmacs package, use --with-packagedir instead)],
39    lispdir=$withval,
40    [emacsdir=$datadir/emacs
41     test x$prefix = xNONE && prefix=$ac_default_prefix
42     case `echo x$EMACS | sed -e 's/x//' -e 's/^.*\///'` in
43     emacs|emacs-*)
44       if test -d $prefix/share/emacs; then
45         emacsdir=$prefix/share/emacs
46       elif test -d $prefix/lib/emacs; then
47         emacsdir=$prefix/lib/emacs
48       fi;;
49     xemacs|xemacs-*)
50       if test -d $prefix/lib/xemacs; then
51         emacsdir=$prefix/lib/xemacs
52       elif test -d $prefix/share/xemacs; then
53         emacsdir=$prefix/share/xemacs
54       fi;;
55     mule|mule-*)
56       if test -d $prefix/share/mule; then
57         emacsdir=$prefix/share/mule
58       elif test -d $prefix/lib/mule; then
59         emacsdir=$prefix/lib/mule
60       elif test -d $prefix/share/emacs; then
61         emacsdir=$prefix/share/emacs
62       elif test -d $prefix/lib/emacs; then
63         emacsdir=$prefix/lib/emacs
64       fi;;
65     esac
66     lispdir=$emacsdir/site-lisp/$GNUS_PRODUCT_NAME])
67   AC_MSG_RESULT([$lispdir
68          (it will be ignored when \"make install-package[[-ja]]\" is done)])
69   AC_SUBST(lispdir)])
70
71 AC_DEFUN(AC_PATH_PACKAGEDIR,
72  [dnl Check for PACKAGEDIR.
73   AC_ARG_WITH(packagedir,
74    [  --with-packagedir=DIR   package DIR for XEmacs],
75    [if test x$withval != xyes -a x$withval != x; then
76       AC_MSG_CHECKING([where the package should go])
77       PACKAGEDIR=$withval
78       AC_MSG_RESULT($PACKAGEDIR)
79     fi],
80     PACKAGEDIR=)
81   AC_SUBST(PACKAGEDIR)])
82
83 AC_DEFUN(AC_ADD_LOAD_PATH,
84  [dnl Check for additional load path.
85   AC_ARG_WITH(addpath,
86    [  --with-addpath=PATH     search Emacs-Lisp libraries with PATH
87                           use colons to separate directory names],
88    [if test x$withval != xyes -a x$withval != x; then
89       AC_MSG_CHECKING([where to find the additional elisp libraries])
90       ADDITIONAL_LOAD_PATH=$withval
91       AC_MSG_RESULT($ADDITIONAL_LOAD_PATH)
92     fi],
93     ADDITIONAL_LOAD_PATH=)
94   AC_SUBST(ADDITIONAL_LOAD_PATH)])