]> git.lyx.org Git - features.git/commitdiff
test for grace converters; check for gnu m4
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Apr 2002 21:51:02 +0000 (21:51 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 24 Apr 2002 21:51:02 +0000 (21:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4063 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
configure.in
lib/ChangeLog
lib/Makefile.am
lib/configure.m4

index 50eef785e7469f9db1fd0ad1bf308dc9e0ad96bc..ab38a6c0e1cc36f476e6d906508a417da75ab70c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-04-24  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
+       * configure.in: add check for GNU m4 (does not check that program
+       is actually gnu m4, but better than nothing)
+
        * configure.in: small hack for compatibility with autoconf 2.52.
        Basically, there is a weird interference with stdlib.h with g++
        and _some_ functions (mkstemp, mktemp...)
index a558cebf5e5381996af94132c413e7071bad0908..368f8253c8b08eddc9f432251fd92834ea5753e2 100644 (file)
@@ -40,6 +40,7 @@ if test "x$KPSEWHICH" = xkpsewhich ; then
     AC_DEFINE(HAVE_KPSEWHICH, 1,
     [Define this if you have the kpsewhich program working on your system.])
 fi
+AC_CHECK_PROGS(M4, gm4 gnum4 m4, m4)
 
 # Work around a problem in automake 1.4: when invoking install-strip,
 # INSTALL_PROGRAM is changed to 'install -s', and since
index 4c661086357888a68c105e9a44e5ddde3f87b4f6..9ef5a8d6d6cd46d7e85d00c3443fe87ba06d2a55 100644 (file)
@@ -1,3 +1,11 @@
+2002-04-24  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * Makefile.am: do not set M4 explicitely
+
+2002-04-24  Rob Lahaye  <lahaye@users.sourceforge.net>
+       * configure.m4: add 'convert XPM to EPS', add more Grace conversions
+       and change tab to double space indentation in conversion section
+
 2002-04-23  Mike Ressler  <mike.ressler@alum.mit.edu>
 
        * layouts/aastex.layout: add ProvidesNatbib
index ea5c5ea4d3a64220b8f9727f2883ab8168c67e5d..984aa2869a26a107d67276c777d43dfced41dad3 100644 (file)
@@ -4,7 +4,6 @@ DISTCLEANFILES = *.orig *.rej *~ *.bak core textclass.lst packages.lst \
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 SUBDIRS = reLyX
 
-M4=m4
 CHMOD=chmod
 
 BIND = bind/*.bind
index 2d0e32f1e9703f5dddad74f632bb5412b681a5f0..9fbf2391a765bd55a70af13ff2b8ab5d0b5d405d 100644 (file)
@@ -355,29 +355,65 @@ esac
 #### Search for image conversion ####
 SEARCH_PROG([for an Image -> EPS converter], TOEPS, convert pnmtops)
 case $TOEPS in
-       convert) bmp_to_eps="convert BMP:\$\$i EPS:\$\$o" fits_to_eps="convert FITS:\$\$i EPS:\$\$o" gif_to_eps="convert GIF:\$\$i EPS:\$\$o" jpg_to_eps="convert JPG:\$\$i EPS:\$\$o" pbm_to_eps="convert PBM:\$\$i EPS:\$\$o" pgm_to_eps="convert PGM:\$\$i EPS:\$\$o" png_to_eps="convert PNG:\$\$i EPS:\$\$o" ppm_to_eps="convert PPM:\$\$i EPS:\$\$o" sgi_to_eps="convert SGI:\$\$i EPS:\$\$o" xbm_to_eps="convert XBM:\$\$i EPS:\$\$o" xwd_to_eps="convert XWD:\$\$i EPS:\$\$o" ;;
-       pnmtops) gif_to_eps="giftopnm \$\$i | pnmtops > \$\$o" png_to_eps="pngtopnm \$\$i | pnmtops >\$\$o" jpg_to_eps="jpegtopnm \$\$i | pnmtops >\$\$o";;
+  convert)
+    bmp_to_eps="convert BMP:\$\$i EPS:\$\$o"
+    fits_to_eps="convert FITS:\$\$i EPS:\$\$o"
+    gif_to_eps="convert GIF:\$\$i EPS:\$\$o"
+    jpg_to_eps="convert JPG:\$\$i EPS:\$\$o"
+    pbm_to_eps="convert PBM:\$\$i EPS:\$\$o"
+    pgm_to_eps="convert PGM:\$\$i EPS:\$\$o"
+    png_to_eps="convert PNG:\$\$i EPS:\$\$o"
+    ppm_to_eps="convert PPM:\$\$i EPS:\$\$o"
+    sgi_to_eps="convert SGI:\$\$i EPS:\$\$o"
+    xbm_to_eps="convert XBM:\$\$i EPS:\$\$o"
+    xwd_to_eps="convert XWD:\$\$i EPS:\$\$o"
+    xpm_to_eps="convert XPM:\$\$i EPS:\$\$o" ;;
+  pnmtops) gif_to_eps="giftopnm \$\$i | pnmtops > \$\$o"
+    png_to_eps="pngtopnm \$\$i | pnmtops >\$\$o"
+    jpg_to_eps="jpegtopnm \$\$i | pnmtops >\$\$o";;
 esac
 
-SEARCH_PROG([for a Image -> PNG converter], TOPNG, convert pnmtopng)
+SEARCH_PROG([for an Image -> PNG converter], TOPNG, convert pnmtopng)
 case $TOPNG in
-       convert) gif_to_png="convert GIF:\$\$i PNG:\$\$o" eps_to_png="convert EPS:\$\$i PNG:\$\$o" jpg_to_png="convert JPG:\$\$i PNG:\$\$o";;
-       pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
+  convert)
+    gif_to_png="convert GIF:\$\$i PNG:\$\$o"
+    eps_to_png="convert EPS:\$\$i PNG:\$\$o"
+    jpg_to_png="convert JPG:\$\$i PNG:\$\$o";;
+  pnmtopng)
+    gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o"
+    eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o"
+    jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
 esac
 
-SEARCH_PROG([for a Image -> XPM converter], TOXPM, convert)
+SEARCH_PROG([for an Image -> XPM converter], TOXPM, convert)
 if test "$TOXPM" = "convert"; then
-       gif_to_xpm="convert GIF:\$\$i XPM:\$\$o"
-       eps_to_xpm="convert EPS:\$\$i XPM:\$\$o"
-       jpg_to_xpm="convert JPG:\$\$i XPM:\$\$o"
-       png_to_xpm="convert PNG:\$\$i XPM:\$\$o"
-       ps_to_xpm="convert PS:\$\$i XPM:\$\$o"
-       xbm_to_xpm="convert XBM:\$\$i XPM:\$\$o"
+  gif_to_xpm="convert GIF:\$\$i XPM:\$\$o"
+  eps_to_xpm="convert EPS:\$\$i XPM:\$\$o"
+  jpg_to_xpm="convert JPG:\$\$i XPM:\$\$o"
+  png_to_xpm="convert PNG:\$\$i XPM:\$\$o"
+  ps_to_xpm="convert PS:\$\$i XPM:\$\$o"
+  xbm_to_xpm="convert XBM:\$\$i XPM:\$\$o"
 fi
 
-SEARCH_PROG([For an EPS -> PDF converter], EPSTOPDF, epstopdf)
+SEARCH_PROG([for an EPS -> PDF converter], EPSTOPDF, epstopdf)
 case $EPSTOPDF in
-       epstopdf) eps_to_pdf="epstopdf --outfile=\$\$o \$\$i";;
+  epstopdf) eps_to_pdf="epstopdf --outfile=\$\$o \$\$i";;
+esac
+
+#### Add Grace conversions (xmgrace needs an Xserver, gracebat doesn't.)
+SEARCH_PROG([for a Grace -> Image converter], GRACE, gracebat)
+case $GRACE in
+ gracebat) 
+  for device in `gracebat -version 2>/dev/null | grep "^Dummy"` ; do
+    case $device in
+      EPS)
+        agr_to_eps="xmgrace -hardcopy -printfile \$\$o -hdevice $device \$\$i";;
+      PDF)
+        agr_to_pdf="xmgrace -hardcopy -printfile \$\$o -hdevice $device \$\$i";;
+      PNG)
+        agr_to_png="xmgrace -hardcopy -printfile \$\$o -hdevice $device \$\$i";;
+    esac
+  done 
 esac
 
 #### Explore the LaTeX configuration
@@ -504,7 +540,6 @@ cat >$outfile <<EOF
 \\converter html latex "$html_to_latex_command" ""
 \\converter word latex "$word_to_latex_command" ""
 
-\\converter agr  eps "xmgrace -hardcopy -printfile \$\$o -hdevice EPS \$\$i" ""
 \\converter bmp  eps "$bmp_to_eps" ""
 \\converter fits  eps "$fits_to_eps" ""
 \\converter gif  eps "$gif_to_eps" ""
@@ -517,6 +552,7 @@ cat >$outfile <<EOF
 \\converter tgif eps "tgif -print -eps \$\$i" ""
 \\converter tiff eps "tiff2ps \$\$i > \$\$o" ""
 \\converter xbm  eps "$xbm_to_eps" ""
+\\converter xpm  eps "$xpm_to_eps" ""
 \\converter xwd  eps "$xwd_to_eps" ""
 
 \\converter tgif xpm "tgif -print -stdout -xpm \$\$i > \$\$o" ""
@@ -539,6 +575,10 @@ cat >$outfile <<EOF
 \\converter eps  pdf "$eps_to_pdf" ""
 \\converter epsi pdf "$eps_to_pdf" ""
 
+\\converter agr  eps "$agr_to_eps" ""
+\\converter agr  pdf "$agr_to_pdf" ""
+\\converter agr  png "$agr_to_png" ""
+
 \\viewer dvi "$DVI_VIEWER"
 \\viewer html "$HTML_VIEWER"
 \\viewer pdf "$PDF_VIEWER"