2 dnl Use 'make' to create configure from this m4 script.
3 # This script is a hand-made configure script. It contains a lot of
4 # code stolen from GNU autoconf. I removed all the code that was not
5 # useful for configuring a LyX installation.
8 dnl ######### Begin M4 macros #########################################
9 dnl This is a template for my stripped-down configure script.
10 dnl First, a few convenient macros.
14 dnl MSG_CHECKING(FEATURE-DESCRIPTION,PREFIX)
17 [echo $ac_n "$2checking $1""... $ac_c"])dnl
20 dnl MSG_RESULT(RESULT-DESCRIPTION)
23 [echo "$ac_t""$1"])dnl
26 dnl SEARCH_PROG(FEATURE-DESCRIPTION,VARIABLE-NAME,PROGRAMS-LIST,
27 dnl ACTION-IF-FOUND,ACTION-IF-NOT-FOUND)
29 define(SEARCH_PROG,[dnl
36 # Extract the first word of "$ac_prog", so it can be a program name with args.
37 set dummy $ac_prog ; ac_word=$[2]
38 if test -n "$ac_word"; then
39 MSG_CHECKING([for \"$ac_word\"],[+])
40 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
41 save_PATH=$PATH ; PATH=:$PATH
42 for ac_dir in ${PATH} ; do
43 if test -x [$ac_dir/$ac_word]; then
51 if test -n "[$]$2"; then
57 MSG_RESULT($ac_result)
58 test -n "[$]$2" && break
62 if test -z "[$]$2" ; then
71 dnl LYXRC_VAR(VARIABLE_NAME, VALUE)
73 rc_entries="$rc_entries
77 dnl LYXRC_PROG(FEATURE-DESCRIPTION,VARIABLE-NAME,PROGRAMS-LIST,
78 dnl ACTION-IF-FOUND,ACTION-IF-NOT-FOUND)
79 define(LYXRC_PROG,[dnl
80 SEARCH_PROG($1,prog,$3,$4,$5)
84 dnl PROVIDE_DEFAULT_FILE(FILE, DEFAULT-VALUE)
86 define(PROVIDE_DEFAULT_FILE,[dnl
87 # if $1 does not exist (because LaTeX did not run),
88 # then provide a standard version.
89 if test ! -f $1 ; then
95 dnl ######### End M4 macros #############################################
98 # Be Bourne compatible (taken from autoconf 2.53)
99 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
102 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
108 ####some configuration variables
109 outfile=lyxrc.defaults
116 #### Parse the command line
121 Usage: configure [options]
123 --help show this help lines
124 --keep-temps keep temporary files (for debug. purposes)
125 --without-latex-config do not run LaTeX to determine configuration
126 --with-version-suffix=suffix suffix of binary installed files
129 --without-latex-config)
130 lyx_check_config=no ;;
132 lyx_keep_temps=yes ;;
133 --with-version-suffix*)
134 version_suffix=`echo "$ac_option" | sed 's,--with-version-suffix=,,'`
139 #### Checking for some echo oddities
140 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
141 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
142 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
149 ac_n= ac_c='\c' ac_t=
153 #### I do not really know why this is useful, but we might as well keep it.
155 # Only set these to C if already set. These must not be set unconditionally
156 # because not all systems understand e.g. LANG=C (notably SCO).
157 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
158 # Non-C LC_CTYPE values break the ctype check.
159 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
160 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
161 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
162 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
165 #### Guess the directory in which configure is located.
169 srcdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
170 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
171 test "x${srcdir}" = "x$ac_prog" && srcdir=.
172 if test ! -r "${srcdir}"/chkconfig.ltx ; then
173 echo "configure: error: cannot find chkconfig.ltx script"
177 #### Adjust PATH for Win32 (Cygwin)
178 use_cygwin_path_fix=''
181 tmpfname="/tmp/x$$.ltx";
182 echo "\\documentstyle{article}" > $tmpfname
183 echo "\\begin{document}\\end{document}" >> $tmpfname
184 inpname=`cygpath -w $tmpfname | tr '\\\\' /`
185 echo "\\input{$inpname}" > wrap_temp$$.ltx
186 check_err=`latex wrap_temp$$.ltx 2>&1 < /dev/null | grep Error`
187 rm -f wrap_temp$$.* /tmp/x$$.*
188 if [ x"$check_err" = "x" ]
190 echo "configure: cygwin detected; path correction"
191 srcdir=`cygpath -w "${srcdir}" | tr '\\\\' /`
192 echo "srcdir=${srcdir}"
193 use_cygwin_path_fix='true'
195 echo "configure: cygwin detected; path correction is not needed"
196 use_cygwin_path_fix='false'
201 #### Create the build directories if necessary
202 for dir in bind clipart doc examples images kbd layouts \
203 scripts templates ui ; do
204 test ! -d $dir && mkdir $dir
208 #### Searching some useful programs
209 define(CHECKLATEX2E,[
210 ## Check whether this is really LaTeX2e
212 cat >chklatex.ltx <<EOF
213 \\nonstopmode\\makeatletter
214 \\ifx\\undefined\\documentclass\\else
215 \\message{ThisIsLaTeX2e}
219 if eval ${LATEX} chklatex.ltx </dev/null 2>/dev/null \
220 | grep 'ThisIsLaTeX2e' >/dev/null; then
224 ac_result="not useable"
226 rm -f chklatex.ltx chklatex.log])dnl
229 SEARCH_PROG([for a LaTeX2e program],LATEX,pplatex latex2e latex,CHECKLATEX2E,dnl
230 [lyx_check_config=no])
232 test -z "$latex_to_dvi" && latex_to_dvi="none"
234 # Search for pdflatex
235 if test ${lyx_check_config} = no ; then
238 SEARCH_PROG([for the pdflatex program],latex_to_pdf,pdflatex)
241 test $latex_to_dvi != "none" && latex_to_dvi="$latex_to_dvi \$\$i"
242 test $latex_to_pdf != "none" && latex_to_pdf="$latex_to_pdf \$\$i"
244 SEARCH_PROG([for a Tgif viewer and editor], TGIF_EDITOR, tgif)
245 TGIF_VIEWER="$TGIF_EDITOR"
247 SEARCH_PROG([for a FIG viewer and editor], FIG_EDITOR, xfig)
248 FIG_VIEWER="$FIG_EDITOR"
250 SEARCH_PROG([for a Grace viewer and editor], GRACE_EDITOR, xmgrace)
251 GRACE_VIEWER="$GRACE_EDITOR"
253 SEARCH_PROG([for a FEN viewer and editor], FEN_EDITOR, "xboard -lpf \$\$i -mode EditPosition")
254 FEN_VIEWER="$FEN_EDITOR"
256 SEARCH_PROG([for a raster image viewer], RASTERIMAGE_VIEWER, xv kview gimp)
258 SEARCH_PROG([for a raster image editor], RASTERIMAGE_EDITOR, gimp)
260 SEARCH_PROG([for a text editor], TEXT_EDITOR, xemacs gvim kedit kwrite kate nedit gedit notepad)
262 # Search for an installed tex2lyx or a ready-to-install one
263 SEARCH_PROG([for a LaTeX -> LyX converter],tex_to_lyx_command, "$PWD/../src/tex2lyx/tex2lyx -f \$\$i \$\$o" "tex2lyx$version_suffix -f \$\$i \$\$o")
265 SEARCH_PROG([for a Noweb -> LyX converter],literate_to_lyx_command,"noweb2lyx \$\$i \$\$o")
266 literate_to_lyx_command=`echo $literate_to_lyx_command | sed "s,noweb2lyx,noweb2lyx$version_suffix,"`
268 # Search something to process a literate document
269 SEARCH_PROG([for a Noweb -> LaTeX converter],literate_to_tex_command,"noweave -delay -index \$\$i > \$\$o")
271 SEARCH_PROG([for an HTML -> LaTeX converter],html_to_latex_command, "html2latex \$\$i")
273 SEARCH_PROG([for an MS Word -> LaTeX converter],word_to_latex_command, "wvCleanLatex \$\$i \$\$o")
275 # tex4ht generates HTML output that is well-suited for MS Word
276 SEARCH_PROG([for a LaTeX -> MS Word converter],latex_to_word_command, "htlatex")
277 test "$latex_to_word_command" = "htlatex" && latex_to_word_command="htlatex \$\$i 'html,word' 'symbol/!' '-cvalidate'"
281 SEARCH_PROG([for Image converter],image_command, "convert \$\$i \$\$o")
283 SEARCH_PROG([for an OpenOffice.org -> LaTeX converter],sxw_to_latex_command, "w2l -clean \$\$i")
285 # oolatex is the original name, SuSE has oolatex.sh
286 SEARCH_PROG([for a LaTeX -> OpenOffice.org converter],latex_to_sxw_command, "oolatex \$\$i" "oolatex.sh \$\$i")
288 # Search something to preview postscript
289 SEARCH_PROG([for a Postscript previewer],PS_VIEWER,gsview32 gv "ghostview -swap" kghostview)
290 EPS_VIEWER=$PS_VIEWER
292 # Search for a program to preview pdf
293 SEARCH_PROG([for a PDF previewer],PDF_VIEWER, acrobat acrord32 gsview32 acroread gv ghostview xpdf kpdf kghostview)
295 # Search something to preview dvi
296 SEARCH_PROG([for a DVI previewer],DVI_VIEWER, xdvi windvi yap kdvi)
298 # Search something to preview html
299 SEARCH_PROG([for a HTML previewer],HTML_VIEWER, "mozilla file://\$\$p\$\$i" netscape)
301 # Search for a program to convert ps to pdf
302 SEARCH_PROG([for a PS to PDF converter],ps_to_pdf_command, "ps2pdf13 \$\$i")
304 # Search for a program to convert dvi to ps
305 SEARCH_PROG([for a DVI to PS converter],dvi_to_ps_command, "dvips -o \$\$o \$\$i")
307 # Search for a program to convert dvi to pdf
308 SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command, "dvipdfm \$\$i")
310 # We have a script to convert previewlyx to ppm or to png
311 lyxpreview_to_bitmap_command='python $$s/scripts/lyxpreview2bitmap.py'
313 # Search for 'dvipng'. Only enable the conversion from lyxpreview -> png
314 # if dvipng is found.
315 SEARCH_PROG([for dvipng],DVIPNG,dvipng)
317 test "$DVIPNG" = "dvipng" && \
318 lyxpreview_to_png_command=$lyxpreview_to_bitmap_command
320 # Search a *roff program (used to translate tables in ASCII export)
321 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
322 "groff -t -Tlatin1 \$\$FName" nroff,dnl
323 test "$prog" = "nroff" && prog='tbl $$FName | nroff')
325 # Search the ChkTeX program
326 LYXRC_PROG([for ChkTeX], \chktex_command,dnl
327 "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38")
329 # Search for a spellchecker
330 LYXRC_PROG([for a spellchecker], \spell_command, ispell)
332 # Search for computer algebra systems
333 SEARCH_PROG([for Octave],OCTAVE,octave)
334 SEARCH_PROG([for Maple],MAPLE,maple)
336 dnl # Search a Fax handling program
337 dnl SEARCH_PROG([for a fax driver], FAX, sendfax faxsend fax)
338 dnl if test $FAX = sendfax ; then
339 dnl fax_command="sendfax -n -h '\$\$Host' -c '\$\$Comment' -x '\$\$Enterprise' -d '\$\$Name'@'\$\$Phone' '\$\$FName'"
340 dnl elif test $FAX = faxsend ; then
341 dnl fax_command="faxsend '\$\$Phone' '\$\$FName'"
342 dnl elif test $FAX = fax ; then
343 dnl fax_command="fax send '\$\$Phone' '\$\$FName'"
345 dnl fax_command="none"
348 # Search a GUI Fax program
349 SEARCH_PROG([for a fax program], fax_command, "kdeprintfax \$\$i" "ksendfax \$\$i")
351 # Search for LinuxDoc support
352 SEARCH_PROG([for SGML-tools 1.x (LinuxDoc)], LINUXDOC, sgml2lyx)
353 if test $LINUXDOC != none; then
356 linuxdoc_cmd="\\def\\haslinuxdoc{yes}"
364 linuxdoc_to_latex_command="sgml2latex \$\$i"
365 linuxdoc_to_dvi_command="sgml2latex -o dvi \$\$i"
366 linuxdoc_to_html_command="sgml2html \$\$i"
367 linuxdoc_to_lyx_command="sgml2lyx \$\$i";;
369 linuxdoc_to_latex_command="none"
370 linuxdoc_to_dvi_command="none"
371 linuxdoc_to_html_command="none"
372 linuxdoc_to_lyx_command="none";;
375 # Search for DocBook support
376 SEARCH_PROG([for SGML-tools 2.x (DocBook) or db2x scripts], DOCBOOK, sgmltools db2dvi)
377 if test $DOCBOOK != none; then
380 docbook_cmd="\\def\\hasdocbook{yes}"
388 docbook_to_dvi_command="sgmltools -b dvi \$\$i"
389 docbook_to_html_command="sgmltools -b html \$\$i";;
391 docbook_to_dvi_command="db2dvi \$\$i"
392 docbook_to_html_command="db2html \$\$i";;
394 docbook_to_dvi_command="none"
395 docbook_to_html_command="none";;
398 # Search for a spool command
399 LYXRC_PROG([for a spool command], \print_spool_command, lp lpr)
401 lp) print_spool_printerprefix="-d ";;
402 lpr) print_spool_printerprefix="-P";;
403 *) :;; # leave to empty values
405 LYXRC_VAR(\print_spool_printerprefix, $print_spool_printerprefix)
407 SEARCH_PROG([for a LaTeX -> HTML converter], latex_to_html_command,dnl
409 "tth -t -e2 -L\$\$b < \$\$i > \$\$o" dnl
410 "latex2html -no_subdir -split 0 -show_section_numbers \$\$i" dnl
413 #### Explore the LaTeX configuration
414 MSG_CHECKING(LaTeX configuration)
415 # First, remove the files that we want to re-create
416 rm -f textclass.lst packages.lst chkconfig.sed
417 if test ${lyx_check_config} = no ; then
418 MSG_RESULT(default values)
419 MSG_CHECKING(list of textclasses,+)
420 cat >textclass.lst <<EOF
421 # This file declares layouts and their associated definition files
422 # (include dir. relative to the place where this file is).
423 # It contains only default values, since chkconfig.ltx could not be run
424 # for some reason. Run ./configure if you need to update it after a
425 # configuration change.
427 # build the list of available layout files and convert it to entries
428 # for the default textclass.lst file
429 for file in ./layouts/*.layout "${srcdir}"/layouts/*.layout ; do
432 *) if test -r "$file" ; then
433 class=`echo $file | sed -e 's%^.*layouts/\(.*\)\.layout$%\1%'`
434 cleanclass=`echo $class | tr ' -' '__'`
436 # make sure the same class is not considered twice
437 if test x`[eval] echo $ac_n '${found_'$cleanclass'}'` = x ; then
438 [eval] "found_$cleanclass=yes"
441 # We manipulate only those lines that contain
442 # "\Declare(LaTeX|DocBook|LinuxDoc)Class"
443 /\\DeclareLaTeXClass/bmatch
444 /\\DeclareDocBookClass/bmatch
445 /\\DeclareLinuxDocClass/bmatch
449 # Remove the \DeclareFOOClass macro and add the correct boolean
450 # at the end of the line telling whether the class is
452 s/^.*\DeclareLaTeXClass *\(.*\)/\1 "false"/
453 s/^.*\DeclareDocBookClass *\(.*\)/\1 "'$bool_docbook'"/
454 s/^.*\DeclareLinuxDocClass *\(.*\)/\1 "'$bool_linuxdoc'"/
455 # If the macro had an optional argument with several
456 # parameters, only keep the first one
457 s/\[\([^,]*\),[^]]*\]/[\1]/
458 # If the macro did not have an optional argument, provide one
459 # (equal to the class name)
461 # Remove brackets and replace with correctly quoted entries
462 s/\[\([^]]*\)\] *{\([^}]*\)}/"'$class'" "\1" "\2"/
463 # Print the maninpulated text
465 # We are interested in the first instance of \DeclareFOOClass only,
468 ' "$file" >> textclass.lst
476 rm -f wrap_chkconfig.ltx chkconfig.vars chkconfig.classes chklayouts.tex
477 if test ! -r "chkconfig.ltx" ; then
478 cp "${srcdir}"/chkconfig.ltx .
481 cat >wrap_chkconfig.ltx <<EOF
484 \\input{chkconfig.ltx}
486 ## Construct the list of classes to test for.
487 # build the list of available layout files and convert it to commands
489 for file in ./layouts/*.layout "${srcdir}"/layouts/*.layout ; do
492 *) if test -r "$file" ; then
493 class=`echo $file | sed -e 's%^.*layouts/\(.*\)\.layout$%\1%'`
494 # Generate the proper TestDocClass command for this layout
496 # We manipulate only those lines that contain
497 # "\Declare(LaTeX|DocBook|LinuxDoc)Class"
498 /\\DeclareLaTeXClass/bmatch
499 /\\DeclareDocBookClass/bmatch
500 /\\DeclareLinuxDocClass/bmatch
504 # Wrap the entire line (minus the leading "# ") inside a
505 # "\TestDocClass{CLASS}{...}" command
506 s/^\# *\(.*\)$/\\TestDocClass{'${class}'}{\1}/
507 # Print the result and quit.
513 done > chklayouts.tex
514 ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
516 [eval] `cat chkconfig.vars | sed 's/-/_/g'`
518 test -n "${rmcopy}" && rm -f chkconfig.ltx
521 # Do we have all the files we need? Useful if latex did not run
524 PROVIDE_DEFAULT_FILE(chkconfig.sed,[s/@.*@/???/g])
526 echo "creating packages.lst"
527 PROVIDE_DEFAULT_FILE(packages.lst,dnl
528 [# This file should contain the list of LaTeX packages that have been
529 # recognized by LyX. Unfortunately, since configure could not find
530 # your LaTeX2e program, the tests have not been run. Run ./configure
531 # if you need to update it after a configuration change.
535 echo "creating doc/LaTeXConfig.lyx"
536 echo "s/@chk_linuxdoc@/$chk_linuxdoc/g" >> chkconfig.sed
537 echo "s/@chk_docbook@/$chk_docbook/g" >> chkconfig.sed
539 if test `uname -s | grep 'MINGW'` ; then
540 # Before running chkconfig.sed, remove the trailing '\r'
541 # characters that can bugger up various versions of sed.
542 tr -d '\r' < chkconfig.sed > chkconfig2.sed
543 mv -f chkconfig2.sed chkconfig.sed
546 sed -f chkconfig.sed "${srcdir}"/doc/LaTeXConfig.lyx.in >doc/LaTeXConfig.lyx
548 ### Let's check whether spaces are allowed in TeX file names
549 MSG_CHECKING(whether TeX allows spaces in file names)
550 if test ${lyx_check_config} = no ; then
551 tex_allows_spaces=false
555 echo "\\message{working^^J}" >"$fname".tex
556 if ${LATEX} "$fname" </dev/null | grep 'working' >/dev/null ; then
558 tex_allows_spaces=true
561 tex_allows_spaces=false
563 rm -f "$fname".* texput.log
566 echo "creating $outfile"
568 # This file has been automatically generated by LyX' lib/configure
569 # script. It contains default settings that have been determined by
570 # examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you
571 # want to customize LyX, make a copy of the file LYXDIR/lyxrc as
572 # ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
573 # override the values given here.
574 \\Format asciichess asc "Plain text (chess output)" "" "" "$TEXT_EDITOR"
575 \\Format asciiimage asc "Plain text (image)" "" "" "$TEXT_EDITOR"
576 \\Format asciixfig asc "Plain text (Xfig output)" "" "" "$TEXT_EDITOR"
577 \\Format agr agr Grace "" "$GRACE_VIEWER" "$GRACE_EDITOR"
578 \\Format bmp bmp BMP "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
579 \\Format date "" "date command" "" "" ""
580 \\Format dateout tmp "date (output)" "" "" "$TEXT_EDITOR"
581 \\Format docbook sgml DocBook B "" "$TEXT_EDITOR"
582 \\Format docbook-xml xml "Docbook (XML)" "" "" "$TEXT_EDITOR"
583 \\Format dvi dvi DVI D "$DVI_VIEWER" ""
584 \\Format eps eps EPS "" "$EPS_VIEWER" ""
585 \\Format fax "" Fax "" "" ""
586 \\Format fen fen FEN "" "$FEN_VIEWER" "$FEN_EDITOR"
587 \\Format fig fig FIG "" "$FIG_VIEWER" "$FIG_EDITOR"
588 \\Format gif gif GIF "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
589 \\Format html html HTML H "$HTML_VIEWER" ""
590 \\Format jpg jpg JPEG "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
591 \\Format latex tex LaTeX L "" "$TEXT_EDITOR"
592 \\Format linuxdoc sgml LinuxDoc x "" "$TEXT_EDITOR"
593 \\Format lyx lyx LyX "" "lyx" "lyx"
594 \\Format lyxpreview lyxpreview "LyX Preview" "" "" ""
595 \\Format literate nw NoWeb N "" "$TEXT_EDITOR"
596 \\Format pbm pbm PBM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
597 \\Format pdf pdf "PDF (ps2pdf)" P "$PDF_VIEWER" ""
598 \\Format pdf2 pdf "PDF (pdflatex)" F "$PDF_VIEWER" ""
599 \\Format pdf3 pdf "PDF (dvipdfm)" m "$PDF_VIEWER" ""
600 \\Format pdftex pdftex_t PDFTEX "" "" ""
601 \\Format pgm pgm PGM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
602 \\Format png png PNG "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
603 \\Format ppm ppm PPM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
604 \\Format program "" Program "" "" ""
605 \\Format ps ps Postscript t "$PS_VIEWER" ""
606 \\Format pstex pstex_t PSTEX "" "" ""
607 \\Format tgif obj Tgif "" "$TGIF_VIEWER" "$TGIF_EDITOR"
608 \\Format sxw sxw "OpenOffice.Org Writer" O "" ""
609 \\Format text txt "Plain text" a "" "$TEXT_EDITOR"
610 \\Format textparagraph txt "Plain text (paragraphs)" "" "" "$TEXT_EDITOR"
611 \\Format tiff tif TIFF "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
612 \\Format word doc "MS Word" W "" ""
613 \\Format wordhtml html "MS Word (HTML)" "" "" ""
614 \\Format xbm xbm XBM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
615 \\Format xpm xpm XPM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
617 \\converter date dateout "date +%d-%m-%Y > \$\$o" ""
618 \\converter docbook docbook-xml "cp \$\$i \$\$o" "xml"
619 \\converter docbook dvi "$docbook_to_dvi_command" ""
620 \\converter docbook html "$docbook_to_html_command" ""
621 \\converter dvi pdf3 "$dvi_to_pdf_command" ""
622 \\converter dvi ps "$dvi_to_ps_command" ""
623 \\converter fen asciichess "python \$\$s/scripts/fen2ascii.py \$\$i \$\$o" ""
624 \\converter fig pdftex "sh \$\$s/scripts/fig2pdftex.sh \$\$i \$\$o" ""
625 \\converter fig pstex "sh \$\$s/scripts/fig2pstex.sh \$\$i \$\$o" ""
626 \\converter html latex "$html_to_latex_command" ""
627 \\converter latex html "$latex_to_html_command" "originaldir,needaux"
628 \\converter latex dvi "$latex_to_dvi" "latex"
629 \\converter latex lyx "$tex_to_lyx_command" ""
630 \\converter latex pdf2 "$latex_to_pdf" "latex"
631 \\converter latex sxw "$latex_to_sxw_command" "latex"
632 \\converter latex wordhtml "$latex_to_word_command" ""
633 \\converter linuxdoc dvi "$linuxdoc_to_dvi_command" ""
634 \\converter linuxdoc html "$linuxdoc_to_html_command" ""
635 \\converter linuxdoc latex "$linuxdoc_to_latex_command" ""
636 \\converter linuxdoc lyx "$linuxdoc_to_lyx_command" ""
637 \\converter literate latex "$literate_to_tex_command" ""
638 \\converter literate lyx "$literate_to_lyx_command" ""
639 \\converter lyxpreview png "$lyxpreview_to_png_command" ""
640 \\converter lyxpreview ppm "$lyxpreview_to_bitmap_command" ""
641 \\converter ps fax "$fax_command" ""
642 \\converter ps pdf "$ps_to_pdf_command" ""
643 \\converter sxw latex "$sxw_to_latex_command" ""
644 \\converter word latex "$word_to_latex_command" ""
647 ### the graphic converter part with the predefined ones
648 #### Search for the nonstandard converting progs
650 SEARCH_PROG([for a FIG -> EPS/PPM/PNG converter], FIG2DEV, fig2dev)
651 if test "$FIG2DEV" = "fig2dev"; then
653 \\converter fig eps "fig2dev -L eps \$\$i \$\$o" ""
654 \\converter fig ppm "fig2dev -L ppm \$\$i \$\$o" ""
655 \\converter fig png "fig2dev -L png \$\$i \$\$o" ""
659 SEARCH_PROG([for a TIFF -> PS converter], TIFF2PS, tiff2ps)
660 if test "$TIFF2PS" = "tiff2ps"; then
662 \\converter tiff eps "tiff2ps \$\$i > \$\$o" ""
666 SEARCH_PROG([for a Tgif -> EPS/PDF converter], TGIF, tgif)
667 if test "$TGIF" = "tgif"; then
669 \\converter tgif eps "tgif -stdout -print -color -eps \$\$i > \$\$o" ""
670 \\converter tgif pdf "tgif -stdout -print -color -pdf \$\$i > \$\$o" ""
674 SEARCH_PROG([for an EPS -> PDF converter], EPSTOPDF, epstopdf)
675 if test "$EPSTOPDF" = "epstopdf"; then
677 \\converter eps pdf "epstopdf --outfile=\$\$o \$\$i" ""
681 #### Add Grace conversions (xmgrace needs an Xserver, gracebat doesn't.)
682 SEARCH_PROG([for a Grace -> Image converter], GRACE, gracebat)
683 if test "$GRACE" = "gracebat"; then
685 \\converter agr eps "gracebat -hardcopy -printfile \$\$o -hdevice EPS \$\$i 2>/dev/null" ""
686 \\converter agr png "gracebat -hardcopy -printfile \$\$o -hdevice PNG \$\$i 2>/dev/null" ""
687 \\converter agr jpg "gracebat -hardcopy -printfile \$\$o -hdevice JPEG \$\$i 2>/dev/null" ""
688 \\converter agr ppm "gracebat -hardcopy -printfile \$\$o -hdevice PNM \$\$i 2>/dev/null" ""
694 \\copier fig "sh \$\$s/scripts/fig_copy.sh \$\$i \$\$o"
695 \\copier pstex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
696 \\copier pdftex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
699 \\font_encoding "$chk_fontenc"
700 \\tex_allows_spaces $tex_allows_spaces
703 if [ "x$use_cygwin_path_fix" != "x" ]
705 echo "\\cygwin_path_fix_needed $use_cygwin_path_fix" >> $outfile
708 # Remove superfluous files if we are not writing in the main lib
710 for file in $outfile textclass.lst packages.lst \
711 doc/LaTeXConfig.lyx ; do
712 # we rename the file first, so that we avoid comparing a file with itself
714 if test -r "${srcdir}"/$file && diff $file.new "${srcdir}"/$file >/dev/null 2>/dev/null ;
716 echo "removing $file, which is identical to the system global version"
724 if test $lyx_keep_temps = no ; then
725 rm -f chkconfig.sed chkconfig.vars wrap_chkconfig.* chklayouts.tex \