3 dnl notes-mode configure.in
4 dnl Copyright (C) 1997-1998 by John Heidemann <johnh@isi.edu>
7 dnl Process this file with autoconf to produce a configure script.
16 AC_CHECK_PROGS(emacsbin, emacs gemacs xemacs)
21 AC_PATH_PROGS(perlbin, perl perl5, no)
22 perl_vers=`$perlbin -e 'print $]'`
24 [1234].*) perlbin=no;;
26 if test "$perlbin" = no; then
27 AC_MSG_ERROR($package requires perl 5.0 or later.)
33 AC_MSG_CHECKING([mkdir -p])
34 if mkdir -p /tmp/mkdir.$$
38 AC_MSG_RESULT($mkdir_p)
39 elif test -x ./install-sh
41 mkdir_p="./install-sh -d "
42 AC_MSG_RESULT($mkdir_p)
44 AC_MSG_RESULT([none found])
45 AC_MSG_WARN([ Couldn't find mkdir -p. You may have to manually mkdir some directories.])
55 if test "x$prefix" = xNONE -o "x$prefix" = xnone
57 # hack for install purposes
59 prefix_specified=false
65 AC_MSG_CHECKING(lisp installation directory)
66 AC_ARG_WITH(lisp-dir, --with-lisp-dir=path specify a path for where to install .el files,lisp_dir=$withval,lisp_dir="")
67 if test x$lisp_dir = x
69 lisp_dir=`$emacsbin -batch -q -l notes-bootstrap.el -f notes-load-path | grep site-lisp | sed '2,$d'`
71 if test "x$lisp_dir" = x
73 AC_MSG_RESULT(no site-lisp)
74 echo " ERROR: could not find site-lisp directory in load-path."
75 echo " Specify destination for lisp file with --with-lisp-dir=/your/path"
78 AC_MSG_RESULT($lisp_dir)
81 if test "x$withval" = x
83 echo " WARNING: you gave a prefix of $prefix, but emacs wants lisp"
84 echo " code in $lisp_dir and so that's where it will be installed."
85 echo " (Currently --prefix doesn't change where lisp code goes.)"
86 echo " If you want to force it under your prefix,"
87 echo " then specify the configure option --with-lisp-dir=$prefix/whatever"
90 if test -w "$lisp_dir" -o ! -d "$lisp_dir"
94 echo " WARNING: You do not have write permissions to $lisp_dir."
95 echo " (Where the lisp code will be installed.)"
96 echo " Please do make install with more privileges (as root?),"
97 echo " fix permissions on the directory,"
98 echo " or specify a writable destination with --with-lisp-dir=/your/path."
102 AC_MSG_CHECKING(script install directory)
104 AC_MSG_RESULT($datadir/$package)
105 tdatadir=`eval "echo $datadir"`
106 if test -w "$tdatadir" -o ! -d "$tdatadir"
110 echo " WARNING: You do not have write permissions to $datadir ($tdatadir)."
111 echo " (The program scripts will be installed in $datadir/$package.)"
112 echo " Please do make install with more priviledges (as root?),"
113 echo " fix permissions on the directory,"
114 echo " or specify a writable destination with --datadir=/your/path."
116 AC_MSG_CHECKING(info install directory)
118 AC_MSG_RESULT($infodir)
119 tinfodir=`eval "echo $infodir"`
120 if test -w "$tinfodir" -o ! -d "$tinfodir"
124 echo " WARNING: You do not have write permissions to $infodir ($tinfodir)."
125 echo " (Where the info documentation will be put.)"
126 echo " Please do make install with more priviledges (as root?),"
127 echo " fix permissions on the directory,"
128 echo " or specify a writable destination with --infodir=/your/path."
131 AC_PATH_PROG(install_info, install-info, no, $PATH:/sbin:/usr/sbin)
132 install_info_section='--section=Emacs'
133 if test x"$install_info" = xno
135 echo " WARNING: Could not find install-info."
136 echo " you will need to add notes-info.info to"
137 echo " master file ($infodir/dir) manually."
139 dnl detect debian install-info
140 AC_MSG_CHECKING(debian install-info)
141 if $install_info --version 2>&1 |grep 'Ian Jackson' >/dev/null
144 echo " WARNING: You appear to have the Debian install info."
145 echo " Their install-info 1.10.21 has an incompatible usage of --section."
146 echo " Please get them to fix this problem."
147 echo " For now, I will install without specifying a section"
148 install_info_section=''
153 AC_SUBST(install_info_section)