]> git.lyx.org Git - lyx.git/blobdiff - lib/configure
Angus' patch to comment out debug mode's coloured frames
[lyx.git] / lib / configure
index b265fe2e8e5710bf090fc19033b6f41735eb5f89..1c3155f9a749a1450a6ac027b868dbd6d952c582 100755 (executable)
@@ -1122,6 +1122,47 @@ case $TOPNG in
        pnmtopng) gif_to_png="giftopnm \$\$i | pnmtopng >\$\$o" eps_to_png="pstopnm \$\$i| pnmtopng >\$\$o" jpg_to_png="jpegtopnm \$\$i | pnmtopng >\$\$o";;
 esac
 
+echo $ac_n "checking for a Image -> XPM converter""... $ac_c"
+echo "$ac_t""(convert)"
+TOXPM=
+for ac_prog in convert
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog ; ac_word=$2
+if test -n "$ac_word"; then
+  echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -x $ac_dir/$ac_word; then
+      TOXPM="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+
+  if test -n "$TOXPM"; then
+    ac_result=yes
+    
+  else
+    ac_result=no
+  fi
+  echo "$ac_t""$ac_result"
+  test -n "$TOXPM" && break
+fi
+done
+
+if test -z "$TOXPM" ; then
+  TOXPM=none
+fi
+
+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"
+fi
+
 echo $ac_n "checking For an EPS -> PDF converter""... $ac_c"
 echo "$ac_t""(epstopdf)"
 EPSTOPDF=
@@ -1263,6 +1304,7 @@ cat >lyxrc.defaults <<EOF
 \\Format png     png   PNG             ""
 \\Format ps      ps    Postscript      t
 \\Format program  ""   Program         ""
+\\Format xpm      xpm   XPM             ""
 \\Format word    doc   Word            W
 
 \\converter latex dvi "$latex_to_dvi" "latex"
@@ -1294,6 +1336,12 @@ cat >lyxrc.defaults <<EOF
 \\converter epsi png "$eps_to_png" ""
 \\converter jpg  png "$jpg_to_png" ""
 
+\\converter gif  xpm "$gif_to_xpm" ""
+\\converter eps  xpm "$eps_to_xpm" ""
+\\converter epsi xpm "$eps_to_xpm" ""
+\\converter jpg  xpm "$jpg_to_xpm" ""
+\\converter png  xpm "$png_to_xpm" ""
 \\converter eps  pdf "$eps_to_pdf" ""
 \\converter epsi pdf "$eps_to_pdf" ""