1 # shamelessly copied from navi2ch-cvs-0.0.20031209
2 # $Id: configure.in,v 1.225 2012-12-29 00:59:48 hira Exp $
4 AC_INIT([howm], [1.4.5-snapshot])
8 # Emacs set environment variable EMACS as t
9 test "x$EMACS" = xt && unset EMACS
11 emacsen="emacs xemacs"
18 emacsen="$emacsen MeadowNT.exe Meadow95.exe Meadow.exe"
23 [ --with-bash Use Bash to build],
27 *) SHELL="$withval" ;;
31 [ --with-xemacs Use XEmacs to build],
33 yes) emacsen="xemacs" ;;
34 no) emacsen="emacs" ;;
35 *) EMACS="$withval" ;;
39 [ --with-emacs Use Emacs to build],
41 yes) emacsen="emacs" ;;
42 no) emacsen="xemacs" ;;
43 *) EMACS="$withval" ;;
46 if test -n "${with_xemacs+set}" && test -n "${with_emacs+set}"; then
47 AC_MSG_ERROR(specify one of --with-xemacs or --with-emacs)
50 AC_CHECK_PROG(CVS, cvs, cvs -z3, :)
53 AC_CHECK_PROGS(EMACS, ${emacsen}, no)
54 if test "$EMACS" = "no"; then
55 AC_MSG_ERROR(cannot find emacs)
58 AC_MSG_CHECKING([detecting your emacs type])
59 AC_EMACS_LISP(emacstype, [dnl
60 (princ (cond ((featurep 'xemacs) 'xemacs)
61 ((>= emacs-major-version 21) 'emacs21)
62 ((= emacs-major-version 20) 'emacs20)
64 AC_MSG_RESULT([$emacstype])
66 if test -z "$emacstype" || test "$emacstype" = UNKNOWN; then
67 AC_MSG_ERROR(this package does not work on your emacs)
71 AC_ARG_WITH(packagedir,
72 [ --with-packagedir[[=DIR]] Use package directory
73 (With XEmacs, this option also sets
74 docdir, lispdir, etc...)],
75 [ AC_MSG_CHECKING([where package files should go])
76 test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs)
78 yes) AC_EMACS_LISP(packagedir, [dnl
79 (princ (expand-file-name "../site-packages" data-directory))])
81 no) unset packagedir ;;
82 *) packagedir="$withval" ;;
84 AC_MSG_RESULT([$packagedir])])
88 if test "$emacstype" = xemacs && test -n "$packagedir"; then
89 lispdir='${packagedir}/lisp'
90 docdir='${datadir}/howm/doc'
91 extdir='${datadir}/howm/ext'
97 [ --with-howmdir=DIR Override the default howm directory],
99 AC_MSG_CHECKING([where howm files should go])
100 AC_MSG_RESULT([$howmdir])],
102 if test -z "${howmdir}"; then
103 AC_CACHE_CHECK([where howm files should go], [ac_cv_howmdir], [dnl
104 ac_cv_howmdir='${lispdir}/howm'
106 howmdir="$ac_cv_howmdir"
111 [ --with-docdir=DIR Override the default docs directory],
113 AC_MSG_CHECKING([where doc files should go])
114 AC_MSG_RESULT([$docdir])],
116 if test -z "${docdir}"; then
117 AC_CACHE_CHECK([where doc files should go], [ac_cv_docdir], [dnl
118 dnl AC_EMACS_LISP(ac_cv_docdir,[dnl
119 dnl (princ (expand-file-name "howm/doc" data-directory))])
120 dnl if test -z "$ac_cv_docdir"; then
121 dnl ac_cv_docdir='${datadir}/pixmaps/howm'
123 ac_cv_docdir='${datadir}/howm/doc'
125 docdir="$ac_cv_docdir"
130 [ --with-extdir=DIR Override the default ext directory],
132 AC_MSG_CHECKING([where ext files should go])
133 AC_MSG_RESULT([$extdir])],
135 if test -z "${extdir}"; then
136 AC_CACHE_CHECK([where ext files should go], [ac_cv_extdir], [dnl
137 ac_cv_extdir='${datadir}/howm/ext'
139 extdir="$ac_cv_extdir"
144 [ --with-endir=DIR Obsolete. no need. no effect.],
146 AC_MSG_WARN([--with-endir is obsolete. no need. no effect.])
150 [ --with-jadir=DIR Obsolete. no need. no effect.],
152 AC_MSG_WARN([--with-jadir is obsolete. no need. no effect.])
160 if test `cd ${srcdir}; pwd` != `pwd`; then
161 AC_CONFIG_COMMANDS([link-lisp],
164 ${howm_ln_s} ${ac_srcdir}/*.el .
165 ], [howm_ln_s="${LN_S}"])
166 # AC_CONFIG_LINKS(doc/howm.info:doc/howm.info)
169 AC_OUTPUT([Makefile doc/Makefile ext/Makefile en/Makefile ja/Makefile sample/Makefile howm.el])