10 AM_INIT_AUTOMAKE([$PACKAGE], [$GPM_MAJOR.$GPM_MINOR.$GPM_REVISION])
16 EMACS=`basename $EMACS`
18 AC_CHECK_PROGS(DVIPS, dvips, no)
19 AC_CHECK_PROGS(LATEX, latex latex2e, no)
20 AC_PATH_PROG(MAKEINFO, makeinfo, no)
22 dnl for pdf format docs
23 AC_CHECK_PROGS(PDFLATEX, pdflatex, no)
25 if test "$EMACS" = no; then
27 INSTALL_LISP=install-nolisp
30 INSTALL_LISP=install-lisp
33 AC_ARG_WITH(lisp-files,dnl
34 [ --without-lisp-files do not build emacs lisp files],
35 [if test "$with_lisp_files" = no; then
37 INSTALL_LISP=install-nolisp
40 # need to copy some stuff if we compile outside the source disrectory
41 if test ! -f ./gnuplot.el ; then
43 AC_MSG_RESULT([Compiling outside source directory - copying needed .el files])
44 cp ${srcdir}/gnuplot.el ${srcdir}/gnuplot-gui.el ${srcdir}/info-look.20.2.el \
45 ${srcdir}/info-look.20.3.el .
46 cp ${srcdir}/gpelcard.tex .
49 INFO_LOOK_ELC=info-look.elc
51 dnl There are many possibilities for info-look:
54 dnl -----------------------------------------
55 dnl Emacs or XEmacs 19 info-look.20.2.el
56 dnl Emacs 20.2 or less info-look.20.2.el
57 dnl Emacs 20.3 nothing
58 dnl XEmacs 20+ info-look.20.3.el
60 dnl want to use my modified version even if 20.2 is installed because a
63 dnl the first 6 lines attempt to ascertain the version number of
64 dnl $(EMACS), then multiply by 100 to convert it to an integer for the
65 dnl sake of the integer comparisons in the following lines. Is this a
68 AC_MSG_CHECKING([for emacs version])
69 if test "$EMACS" = no; then
70 emacs_version="none found"
72 emacs_version=`$EMACS --version |sed 's/^GNU //' |awk '/Emacs [[12]]/{print $2}'`
74 AC_MSG_RESULT([$emacs_version])
75 vnum=`echo $emacs_version |awk -F\. '{print 100*$1+$2}'`
77 AC_MSG_CHECKING([whether info-look.el is needed])
78 if test "$EMACS" = emacs ; then
79 if test "$vnum" -ge 2030 ; then
80 info_look="not needed with emacs $emacs_version"
83 info_look="using info-look.20.2.el"
84 cp info-look.20.2.el info-look.el
86 elif test "$EMACS" = xemacs ; then
87 if test "$vnum" -ge 2000 ; then
88 info_look="using info-look.20.3.el"
89 cp info-look.20.3.el info-look.el
91 info_look="using info-look.20.2.el"
92 cp info-look.20.2.el info-look.el
95 info_look="using none"
97 AC_MSG_RESULT([$info_look])
99 AC_SUBST(INFO_LOOK_ELC)
101 AC_SUBST(INSTALL_LISP)