]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.m4
Toolbar icons and banner are now read when needed from disk. Read ChangeLog.
[lyx.git] / lib / configure.m4
index 0e56d4c6d200e583d90fdd0f85ed113518bc291d..07874301a57a26c3a0a359adc792f2e363529ead 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
@@ -146,7 +146,8 @@ fi
 
 
 #### Create the build directories if necessary
-for dir in bind doc kbd layouts templates reLyX ; do
+for dir in bind clipart doc examples images kbd layouts reLyX \
+    scripts templates ; do
   test ! -d $dir && mkdir $dir
 done
 
@@ -194,6 +195,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
@@ -228,14 +238,36 @@ if test $LINUXDOC != none; then
   linuxdoc_cmd="\\def\\haslinuxdoc{yes}"
 fi
 
+case $LINUXDOC in
+  sgml2lyx)
+    linuxdoc_to_latex_command="sgml2latex"
+    linuxdoc_to_html_command="sgml2html '\$\$FName'"
+    linuxdoc_to_lyx_command="sgml2lyx";;
+  none)
+    linuxdoc_to_latex_command="none"
+    linuxdoc_to_html_command="none"
+    linuxdoc_to_lyx_command="none";;
+esac
+
 # Search for DocBook support
-SEARCH_PROG([for SGML-tools 2.x (DocBook)], DOCBOOK, sgmltools)
+SEARCH_PROG([for SGML-tools 2.x (DocBook) or db2x scripts], DOCBOOK, sgmltools db2dvi)
 chk_docbook=no
 if test $DOCBOOK != none; then
   chk_docbook=yes
   docbook_cmd="\\def\\hasdocbook{yes}"
 fi
 
+case $DOCBOOK in
+  sgmltools)
+    docbook_to_dvi_command="sgmltools -b dvi"
+    docbook_to_html_command="sgmltools -b html '\$\$FName'";;
+  db2dvi)
+    docbook_to_dvi_command="db2dvi"
+    docbook_to_html_command="db2html '\$\$FName'";;
+  none)
+    docbook_to_dvi_command="none"
+    docbook_to_html_command="none";;
+esac
 
 # Search for a spool command
 SEARCH_PROG([for a spool command], LPR, lp lpr)
@@ -276,7 +308,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 +359,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"
@@ -337,6 +373,11 @@ cat >lyxrc.defaults <<EOF
 \\chktex_command "$chktex_command"
 \\spell_command "$SPELL"
 \\fax_command "$fax_command"
+\\linuxdoc_to_latex_command "$linuxdoc_to_latex_command"
+\\linuxdoc_to_html_command "$linuxdoc_to_html_command"
+\\linuxdoc_to_lyx_command "$linuxdoc_to_lyx_command"
+\\docbook_to_dvi_command "$docbook_to_dvi_command"
+\\docbook_to_html_command "$docbook_to_html_command"
 \\html_command "$html_command"
 \\print_spool_command "$print_spool_command"
 \\print_spool_printerprefix "$print_spool_printerprefix"