1 # shamelessly copied from navi2ch-cvs-0.0.20031209
3 AC_INIT([howm], [1.4.8-snapshot1])
7 # Emacs set environment variable EMACS as t
8 test "x$EMACS" = xt && unset EMACS
10 emacsen="emacs xemacs"
17 emacsen="$emacsen MeadowNT.exe Meadow95.exe Meadow.exe"
22 [ --with-bash Use Bash to build],
26 *) SHELL="$withval" ;;
30 [ --with-xemacs Use XEmacs to build],
32 yes) emacsen="xemacs" ;;
33 no) emacsen="emacs" ;;
34 *) EMACS="$withval" ;;
38 [ --with-emacs Use Emacs to build],
40 yes) emacsen="emacs" ;;
41 no) emacsen="xemacs" ;;
42 *) EMACS="$withval" ;;
45 if test -n "${with_xemacs+set}" && test -n "${with_emacs+set}"; then
46 AC_MSG_ERROR(specify one of --with-xemacs or --with-emacs)
49 AC_CHECK_PROG(CVS, cvs, cvs -z3, :)
52 AC_CHECK_PROGS(EMACS, ${emacsen}, no)
53 if test "$EMACS" = "no"; then
54 AC_MSG_ERROR(cannot find emacs)
57 AC_MSG_CHECKING([detecting your emacs type])
58 AC_EMACS_LISP(emacstype, [dnl
59 (princ (cond ((featurep 'xemacs) 'xemacs)
60 ((>= emacs-major-version 21) 'emacs21)
61 ((= emacs-major-version 20) 'emacs20)
63 AC_MSG_RESULT([$emacstype])
65 if test -z "$emacstype" || test "$emacstype" = UNKNOWN; then
66 AC_MSG_ERROR(this package does not work on your emacs)
70 AC_ARG_WITH(packagedir,
71 [ --with-packagedir[[=DIR]] Use package directory
72 (With XEmacs, this option also sets
73 docdir, lispdir, etc...)],
74 [ AC_MSG_CHECKING([where package files should go])
75 test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs)
77 yes) AC_EMACS_LISP(packagedir, [dnl
78 (princ (expand-file-name "../site-packages" data-directory))])
80 no) unset packagedir ;;
81 *) packagedir="$withval" ;;
83 AC_MSG_RESULT([$packagedir])])
87 if test "$emacstype" = xemacs && test -n "$packagedir"; then
88 lispdir='${packagedir}/lisp'
89 docdir='${datadir}/howm/doc'
90 extdir='${datadir}/howm/ext'
96 [ --with-howmdir=DIR Override the default howm directory],
98 AC_MSG_CHECKING([where howm files should go])
99 AC_MSG_RESULT([$howmdir])],
101 if test -z "${howmdir}"; then
102 AC_CACHE_CHECK([where howm files should go], [ac_cv_howmdir], [dnl
103 ac_cv_howmdir='${lispdir}/howm'
105 howmdir="$ac_cv_howmdir"
110 [ --with-docdir=DIR Override the default docs directory],
112 AC_MSG_CHECKING([where doc files should go])
113 AC_MSG_RESULT([$docdir])],
115 if test -z "${docdir}"; then
116 AC_CACHE_CHECK([where doc files should go], [ac_cv_docdir], [dnl
117 dnl AC_EMACS_LISP(ac_cv_docdir,[dnl
118 dnl (princ (expand-file-name "howm/doc" data-directory))])
119 dnl if test -z "$ac_cv_docdir"; then
120 dnl ac_cv_docdir='${datadir}/pixmaps/howm'
122 ac_cv_docdir='${datadir}/howm/doc'
124 docdir="$ac_cv_docdir"
129 [ --with-extdir=DIR Override the default ext directory],
131 AC_MSG_CHECKING([where ext files should go])
132 AC_MSG_RESULT([$extdir])],
134 if test -z "${extdir}"; then
135 AC_CACHE_CHECK([where ext files should go], [ac_cv_extdir], [dnl
136 ac_cv_extdir='${datadir}/howm/ext'
138 extdir="$ac_cv_extdir"
143 [ --with-endir=DIR Obsolete. no need. no effect.],
145 AC_MSG_WARN([--with-endir is obsolete. no need. no effect.])
149 [ --with-jadir=DIR Obsolete. no need. no effect.],
151 AC_MSG_WARN([--with-jadir is obsolete. no need. no effect.])
159 if test `cd ${srcdir}; pwd` != `pwd`; then
160 AC_CONFIG_COMMANDS([link-lisp],
163 ${howm_ln_s} ${ac_srcdir}/*.el .
164 ], [howm_ln_s="${LN_S}"])
165 # AC_CONFIG_LINKS(doc/howm.info:doc/howm.info)
169 Makefile doc/Makefile ext/Makefile sample/Makefile
170 en/Makefile fr/Makefile ja/Makefile