1 --- configure.old 2010-10-09 12:25:07.000000000 +0800
2 +++ configure 2010-10-09 12:44:07.000000000 +0800
6 echo "HAVE_READLINE=-D HAVE_READLINE=1" >> Makefile
7 - echo "LINK_READLINE=-ltermcap -lreadline" >> Makefile
8 + echo "LINK_READLINE=-lreadline" >> Makefile
13 # 19. CHECK TO SEE WHETHER THIS SYSTEM HAS KPATHSEA HEADERS
15 echo $ECHO_N "Checking for libkpathsea-dev ............. $ECHO_C"
16 -if printf '#include <stdlib.h>\n#include <stdio.h>\n#include <kpathsea/kpathsea.h>\nint main() { return 0; }\n' | gcc -x c - -o conf.out > conf.stdout 2> conf.stderr
20 - echo "HAVE_KPATHSEA=-D HAVE_KPATHSEA=1" >> Makefile
21 - echo "LINK_KPATHSEA=-lkpathsea" >> Makefile
22 - echo "KPSE_COMMAND=/dev/null" >> Makefile
26 echo "HAVE_KPATHSEA=-D NOHAVE_KPATHSEA=1" >> Makefile
27 echo "LINK_KPATHSEA=" >> Makefile
30 echo "NO" ; echo "ERROR: Neither the header files for the library 'libkpathsea-dev', nor the program kpsewhich could not be found." >&2 ; exit
34 +# +1 CHECK FOR PYTHON 2
35 +echo $ECHO_N "Checking for suitable Python ............. $ECHO_C"
36 +whichout_python=`which python 2> conf.stderr`
38 +unset PY_MAJOR PY_MID PY_MIN
39 +eval `$whichout_python -V 2>&1 | awk '{printf("PY_MAJOR=%d\nPY_MID=%d\nPY_MIN=%d\n",substr($2,1,1),substr($2,3,1),substr($2,5,1));}'`
40 +if [ $PY_MAJOR -gt 2 ]
42 + whichout_python=`which python2 2> conf.stderr`
44 + unset PY_MAJOR PY_MID PY_MIN
45 + eval `$whichout_python -V 2>&1 | awk '{printf("PY_MAJOR=%d\nPY_MID=%d\nPY_MIN=%d\n",substr($2,1,1),substr($2,3,1),substr($2,5,1));}'`
46 + if [ $PY_MAJOR -eq 2 ]
48 + echo "YES ($whichout_python)"
49 + echo "PYTHON_COMMAND=${whichout_python}" >> Makefile
50 + PYTHON_COMMAND="$whichout_python"
53 + echo "ERROR: Required python 2.x.x version could not be found." >&2
57 + echo "YES ($whichout_python)"
58 + echo "PYTHON_COMMAND=${whichout_python}" >> Makefile
59 + PYTHON_COMMAND="$whichout_python"
65 cat Makefile.skel >> Makefile
66 --- Makefile.skel.old 2010-10-09 12:46:17.000000000 +0800
67 +++ Makefile.skel 2010-10-09 12:48:34.000000000 +0800
69 all: $(LOCAL_BINDIR)/pyxplot $(LOCAL_BINDIR)/pyxplot_watch $(LOCAL_BINDIR)/pyxplot_fitshelper $(LOCAL_BINDIR)/pyxplot_timehelper $(LOCAL_BINDIR)/debug/pyxplot $(LOCAL_BINDIR)/debug/pyxplot_watch $(LOCAL_BINDIR)/install/pyxplot $(LOCAL_BINDIR)/install/pyxplot_watch $(LOCAL_BINDIR)/install/pyxplot_fitshelper $(LOCAL_BINDIR)/install/pyxplot_timehelper pyxplot.1 pyxplot_watch.1
71 src/EPSMaker/eps_colours.h: colourlist_generate.py
72 - python colourlist_generate.py
73 + $(PYTHON_COMMAND) colourlist_generate.py
75 src/EPSMaker/eps_colours.c: src/EPSMaker/eps_colours.h
80 pyxplot.1: manpage_pyxplot.py
81 - python manpage_pyxplot.py ${DOCDIR}/pyxplot.pdf > pyxplot.1
82 + $(PYTHON_COMMAND) manpage_pyxplot.py ${DOCDIR}/pyxplot.pdf > pyxplot.1
84 pyxplot_watch.1: manpage_pyxplot_watch.py
85 - python manpage_pyxplot_watch.py ${DOCDIR}/pyxplot.pdf > pyxplot_watch.1
86 + $(PYTHON_COMMAND) manpage_pyxplot_watch.py ${DOCDIR}/pyxplot.pdf > pyxplot_watch.1