Initial release of Maemo 5 port of gnuplot
[gnuplot] / lisp / configure.in
1 # $HEader$
2
3 AC_INIT(dot.el)
4 AC_PREREQ(2.52)
5
6 PACKAGE=gnuplot-mode
7 GPM_MAJOR=0
8 GPM_MINOR=6
9 GPM_REVISION=0
10 AM_INIT_AUTOMAKE([$PACKAGE], [$GPM_MAJOR.$GPM_MINOR.$GPM_REVISION])
11
12 AC_SET_MAKE
13 AC_PROG_INSTALL
14 AM_PATH_LISPDIR
15
16 EMACS=`basename $EMACS`
17
18 AC_CHECK_PROGS(DVIPS, dvips, no)
19 AC_CHECK_PROGS(LATEX, latex latex2e, no)
20 AC_PATH_PROG(MAKEINFO, makeinfo, no)
21
22 dnl for pdf format docs
23 AC_CHECK_PROGS(PDFLATEX, pdflatex, no)
24
25 if test "$EMACS" = no; then
26   LISPFILES=noelcs
27   INSTALL_LISP=install-nolisp
28 else
29   LISPFILES=elcs
30   INSTALL_LISP=install-lisp
31 fi
32
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
36      LISPFILES=noelcs
37      INSTALL_LISP=install-nolisp
38    fi])
39
40 # need to copy some stuff if we compile outside the source disrectory
41 if test ! -f ./gnuplot.el ; then
42   # all except dot.el
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 .
47 fi
48
49 INFO_LOOK_ELC=info-look.elc
50 dnl
51 dnl There are many possibilities for info-look:
52 dnl
53 dnl     EMACS version            use
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
59 dnl
60 dnl want to use my modified version even if 20.2 is installed because a
61 dnl bug is fixed
62 dnl
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
66 dnl hassle, or what?!
67 dnl
68 AC_MSG_CHECKING([for emacs version])
69 if test "$EMACS" = no; then
70   emacs_version="none found"
71 else
72   emacs_version=`$EMACS --version |sed 's/^GNU //' |awk '/Emacs [[12]]/{print $2}'`
73 fi
74 AC_MSG_RESULT([$emacs_version])
75 vnum=`echo $emacs_version |awk -F\. '{print 100*$1+$2}'`
76
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"
81     INFO_LOOK_ELC=
82   else
83     info_look="using info-look.20.2.el"
84     cp info-look.20.2.el info-look.el
85   fi
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
90   else
91     info_look="using info-look.20.2.el"
92     cp info-look.20.2.el info-look.el
93   fi
94 else
95   info_look="using none"
96 fi
97 AC_MSG_RESULT([$info_look])
98
99 AC_SUBST(INFO_LOOK_ELC)
100 AC_SUBST(LISPFILES)
101 AC_SUBST(INSTALL_LISP)
102
103 AC_OUTPUT(Makefile)