]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.m4
Oops! Forgot to commit a few files.
[lyx.git] / lib / configure.m4
index 5263c06218a9f4d333a703d720d298e7f934fce9..ce3855ddc4d5419db51ceed506428bdcd4665575 100644 (file)
@@ -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 ui ; do
   test ! -d $dir && mkdir $dir
 done
 
@@ -185,8 +186,8 @@ SEARCH_PROG([for reLyX LaTeX-to-LyX translator],RELYX,reLyX)
 PATH=${save_PATH}
 
 # Search something to process a literate document
-SEARCH_PROG([for a Literate programming processor],LITERATE,"noweave -delay -index")
-if test "$LITERATE" = "none"; then LITERATE_EXT="none"; else LITERATE_EXT=".nw"; fi
+SEARCH_PROG([for a Literate programming processor],LITERATE,"noweave -delay -index \$\$FName > \$\$OutName")
+if test "$LITERATE" = "none"; then LITERATE_EXT="none"; else LITERATE_EXT="nw"; fi
 
 # Search for a Postscript interpreter
 SEARCH_PROG([for a Postscript interpreter],GS, gs)
@@ -195,13 +196,21 @@ SEARCH_PROG([for a Postscript interpreter],GS, gs)
 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_PROG([for a PDF preview],PDF_VIEWER,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 something to preview dvi
+SEARCH_PROG([for a DVI previewer],DVI_VIEWER, xdvi)
+
+# Search something to preview html
+SEARCH_PROG([for a HTML previewer],HTML_VIEWER, netscape)
+
+# Search for a program to convert ps to pdf
+SEARCH_PROG([for a PS to PDF converter],ps_to_pdf_command,ps2pdf)
+test $ps_to_pdf_command = "ps2pdf" && ps_to_pdf_command="ps2pdf \$\$FName"
 
 # Search for a program to convert dvi to ps
-SEARCH_PROG([for a DVI to PS converter],DVIPS,dvips)
+SEARCH_PROG([for a DVI to PS converter],dvi_to_ps_command,dvips)
+test $dvi_to_ps_command = "dvips" && dvi_to_ps_command="dvips -o \$\$OutName \$\$FName"
 
 # Search a *roff program (used to translate tables in ASCII export)
 SEARCH_PROG([for a *roff formatter],ROFF,groff nroff)
@@ -239,11 +248,13 @@ fi
 
 case $LINUXDOC in
   sgml2lyx)
-    linuxdoc_to_latex_command="sgml2latex"
-    linuxdoc_to_html_command="sgml2html '\$\$FName'"
+    linuxdoc_to_latex_command="sgml2latex \$\$FName"
+    linuxdoc_to_dvi_command="sgml2latex -o dvi \$\$FName"
+    linuxdoc_to_html_command="sgml2html \$\$FName"
     linuxdoc_to_lyx_command="sgml2lyx";;
   none)
     linuxdoc_to_latex_command="none"
+    linuxdoc_to_dvi_command="none"
     linuxdoc_to_html_command="none"
     linuxdoc_to_lyx_command="none";;
 esac
@@ -258,11 +269,11 @@ fi
 
 case $DOCBOOK in
   sgmltools)
-    docbook_to_dvi_command="sgmltools -b dvi"
-    docbook_to_html_command="sgmltools -b html '\$\$FName'";;
+    docbook_to_dvi_command="sgmltools -b dvi \$\$FName"
+    docbook_to_html_command="sgmltools -b html \$\$FName";;
   db2dvi)
-    docbook_to_dvi_command="db2dvi"
-    docbook_to_html_command="db2html '\$\$FName'";;
+    docbook_to_dvi_command="db2dvi \$\$FName"
+    docbook_to_html_command="db2html \$\$FName";;
   none)
     docbook_to_dvi_command="none"
     docbook_to_html_command="none";;
@@ -280,10 +291,11 @@ esac
 
 # Search for a latex to html converter
 SEARCH_PROG([for an HTML converter], TOHTML, tth latex2html hevea)
+latex_to_html_command = $TOHTML
 case $TOHTML in
-       tth) html_command="tth -t < '\$\$FName' > '\$\$OutName'";;
- latex2html) html_command="latex2html -no_subdir -split 0 -show_section_numbers '\$\$FName'";;
-      hevea) html_command="hevea -s '\$\$FName'";;
+       tth) latex_to_html_command="tth -t -e2 -L\$\$BaseName < \$\$FName > \$\$OutName";;
+ latex2html) latex_to_html_command="latex2html -no_subdir -split 0 -show_section_numbers \$\$FName";;
+      hevea) latex_to_html_command="hevea -s \$\$FName";;
 esac
 
 #### Explore the LaTeX configuration
@@ -357,27 +369,33 @@ cat >lyxrc.defaults <<EOF
 # want to customize LyX, make a copy of the file LYXDIR/lyxrc as
 # ~/.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"
+\\converter tex dvi "$LATEX" ""
+\\converter tex pdf "$PDFLATEX" ""
+\\converter dvi ps "$dvi_to_ps_command" ""
+\\converter ps pdf "$ps_to_pdf_command" ""
+\\converter sgml tex "$linuxdoc_to_latex_command" ""
+\\converter sgml dvi "$linuxdoc_to_dvi_command" ""
+\\converter sgml html "$linuxdoc_to_html_command" ""
+\\converter docbook dvi "$docbook_to_dvi_command" ""
+\\converter docbook html "$docbook_to_html_command" ""
+\\converter tex html "$latex_to_html_command"
+       "originaldir,needaux"
+\\converter $LITERATE_EXT tex "$LITERATE" ""
+
+\\viewer dvi "$DVI_VIEWER"
+\\viewer html "$HTML_VIEWER"
+\\viewer pdf "$PDF_VIEWER"
+\\viewer ps "$GHOSTVIEW -swap"
+\\viewer eps "$GHOSTVIEW"
+
 \\relyx_command "$RELYX"
-\\literate_command "$LITERATE"
+\\linuxdoc_to_lyx_command "$linuxdoc_to_lyx_command"
 \\literate_extension "$LITERATE_EXT"
 \\ps_command "$GS"
-\\view_ps_command "$GHOSTVIEW -swap"
-\\view_pspic_command "$GHOSTVIEW"
 \\ascii_roff_command "$ascii_roff_command"
 \\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"
 \\font_encoding "$chk_fontenc"