]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.m4
Fix xforms home page URL; small bug in lib/configure when layout files are not readable
[lyx.git] / lib / configure.m4
index 0e56d4c6d200e583d90fdd0f85ed113518bc291d..3a96a0a5a3e4e4dcf65353e3bbe8d7b0af813c8a 100644 (file)
@@ -29,7 +29,7 @@ dnl
 define(SEARCH_PROG,[dnl
 changequote([,])dnl
 MSG_CHECKING($1)
-MSG_RESULT()
+MSG_RESULT(($3))
 $2=
 for ac_prog in $3
 do
@@ -37,7 +37,7 @@ do
 set dummy $ac_prog ; ac_word=$[2]
 if test -n "$ac_word"; then
   MSG_CHECKING([for \"$ac_word\"],[+])
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  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
@@ -194,6 +194,15 @@ SEARCH_PROG([for a Postscript interpreter],GS, gs)
 # Search something to preview postscript
 SEARCH_PROG([for a Postscript previewer],GHOSTVIEW,gv ghostview)
 
+# Search for a program to preview pdf
+SEARCH_PROG([for a PDF preview],PDFVIEWER,xpdf acroread gv ghostview)
+
+# Search for a program to convert pdf to ps
+SEARCH_PROG([for a PDF to PS converter],PDFPS,pdf2ps pdftops)
+
+# Search for a program to convert dvi to ps
+SEARCH_PROG([for a DVI to PS converter],DVIPS,dvips)
+
 # Search a *roff program (used to translate tables in ASCII export)
 SEARCH_PROG([for a *roff formatter],ROFF,groff nroff)
 ascii_roff_command=$ROFF
@@ -276,7 +285,7 @@ EOF
   for file in ./layouts/*.layout ${srcdir}/layouts/*.layout ; do 
     case $file in
       */\*.layout) ;;
-      *) echo $file ;;
+      *) test -r "$file" && echo $file ;;
     esac
   done | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'\
              > chklayouts.tex
@@ -327,6 +336,10 @@ cat >lyxrc.defaults <<EOF
 # ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
 # override the values given here.
 \\latex_command "$LATEX"
+\\pdflatex_command "$PDFLATEX"
+\\view_pdf_command "$PDFVIEWER"
+\\pdf_to_ps_command "$PDFPS"
+\\dvi_to_ps_command "$DVIPS"
 \\relyx_command "$RELYX"
 \\literate_command "$LITERATE"
 \\literate_extension "$LITERATE_EXT"