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 a HTML -> Latex converter],html_to_latex_command, "html2latex \$\$i")
273 SEARCH_PROG([for a MSWord -> Latex converter],word_to_latex_command, "wvCleanLatex \$\$i \$\$o" "wvCleanLatex \$\$i \$\$o")
275 SEARCH_PROG([for Image converter],image_command, "convert \$\$i \$\$o")
277 SEARCH_PROG([for an OpenOffice.org -> Latex converter],sxw_to_latex_command, "w2l -clean \$\$i")
279 # oolatex is the original name, SuSE has oolatex.sh
280 SEARCH_PROG([for an Latex -> OpenOffice.org converter],latex_to_sxw_command, "oolatex \$\$i" "oolatex.sh \$\$i")
282 # Search something to preview postscript
283 SEARCH_PROG([for a Postscript previewer],PS_VIEWER,gsview32 gv "ghostview -swap" kghostview)
284 EPS_VIEWER=$PS_VIEWER
286 # Search for a program to preview pdf
287 SEARCH_PROG([for a PDF previewer],PDF_VIEWER, acrobat acrord32 gsview32 acroread gv ghostview xpdf kpdf kghostview)
289 # Search something to preview dvi
290 SEARCH_PROG([for a DVI previewer],DVI_VIEWER, xdvi windvi yap kdvi)
292 # Search something to preview html
293 SEARCH_PROG([for a HTML previewer],HTML_VIEWER, "mozilla file://\$\$p\$\$i" netscape)
295 # Search for a program to convert ps to pdf
296 SEARCH_PROG([for a PS to PDF converter],ps_to_pdf_command, "ps2pdf13 \$\$i")
298 # Search for a program to convert dvi to ps
299 SEARCH_PROG([for a DVI to PS converter],dvi_to_ps_command, "dvips -o \$\$o \$\$i")
301 # Search for a program to convert dvi to pdf
302 SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command, "dvipdfm \$\$i")
304 # We have a script to convert previewlyx to ppm or to png
305 lyxpreview_to_bitmap_command='python $$s/scripts/lyxpreview2bitmap.py'
307 # Search for 'dvipng'. Only enable the conversion from lyxpreview -> png
308 # if dvipng is found.
309 SEARCH_PROG([for dvipng],DVIPNG,dvipng)
311 test "$DVIPNG" = "dvipng" && \
312 lyxpreview_to_png_command=$lyxpreview_to_bitmap_command
314 # Search a *roff program (used to translate tables in ASCII export)
315 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
316 "groff -t -Tlatin1 \$\$FName" nroff,dnl
317 test "$prog" = "nroff" && prog='tbl $$FName | nroff')
319 # Search the ChkTeX program
320 LYXRC_PROG([for ChkTeX], \chktex_command,dnl
321 "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38")
323 # Search for a spellchecker
324 LYXRC_PROG([for a spell-checker], \spell_command, ispell)
326 # Search for computer algebra systems
327 SEARCH_PROG([for Octave],OCTAVE,octave)
328 SEARCH_PROG([for Maple],MAPLE,maple)
330 dnl # Search a Fax handling program
331 dnl SEARCH_PROG([for a fax driver], FAX, sendfax faxsend fax)
332 dnl if test $FAX = sendfax ; then
333 dnl fax_command="sendfax -n -h '\$\$Host' -c '\$\$Comment' -x '\$\$Enterprise' -d '\$\$Name'@'\$\$Phone' '\$\$FName'"
334 dnl elif test $FAX = faxsend ; then
335 dnl fax_command="faxsend '\$\$Phone' '\$\$FName'"
336 dnl elif test $FAX = fax ; then
337 dnl fax_command="fax send '\$\$Phone' '\$\$FName'"
339 dnl fax_command="none"
342 # Search a GUI Fax program
343 SEARCH_PROG([for a fax program], fax_command, "kdeprintfax \$\$i" "ksendfax \$\$i")
345 # Search for LinuxDoc support
346 SEARCH_PROG([for SGML-tools 1.x (LinuxDoc)], LINUXDOC, sgml2lyx)
347 if test $LINUXDOC != none; then
350 linuxdoc_cmd="\\def\\haslinuxdoc{yes}"
358 linuxdoc_to_latex_command="sgml2latex \$\$i"
359 linuxdoc_to_dvi_command="sgml2latex -o dvi \$\$i"
360 linuxdoc_to_html_command="sgml2html \$\$i"
361 linuxdoc_to_lyx_command="sgml2lyx \$\$i";;
363 linuxdoc_to_latex_command="none"
364 linuxdoc_to_dvi_command="none"
365 linuxdoc_to_html_command="none"
366 linuxdoc_to_lyx_command="none";;
369 # Search for DocBook support
370 SEARCH_PROG([for SGML-tools 2.x (DocBook) or db2x scripts], DOCBOOK, sgmltools db2dvi)
371 if test $DOCBOOK != none; then
374 docbook_cmd="\\def\\hasdocbook{yes}"
382 docbook_to_dvi_command="sgmltools -b dvi \$\$i"
383 docbook_to_html_command="sgmltools -b html \$\$i";;
385 docbook_to_dvi_command="db2dvi \$\$i"
386 docbook_to_html_command="db2html \$\$i";;
388 docbook_to_dvi_command="none"
389 docbook_to_html_command="none";;
392 # Search for a spool command
393 LYXRC_PROG([for a spool command], \print_spool_command, lp lpr)
395 lp) print_spool_printerprefix="-d ";;
396 lpr) print_spool_printerprefix="-P";;
397 *) :;; # leave to empty values
399 LYXRC_VAR(\print_spool_printerprefix, $print_spool_printerprefix)
401 SEARCH_PROG([for a LaTeX -> HTML converter], latex_to_html_command,dnl
402 "tth -t -e2 -L\$\$b < \$\$i > \$\$o" dnl
403 "latex2html -no_subdir -split 0 -show_section_numbers \$\$i" dnl
406 #### Explore the LaTeX configuration
407 MSG_CHECKING(LaTeX configuration)
408 # First, remove the files that we want to re-create
409 rm -f textclass.lst packages.lst chkconfig.sed
410 if test ${lyx_check_config} = no ; then
411 MSG_RESULT(default values)
412 MSG_CHECKING(list of textclasses,+)
413 cat >textclass.lst <<EOF
414 # This file declares layouts and their associated definition files
415 # (include dir. relative to the place where this file is).
416 # It contains only default values, since chkconfig.ltx could not be run
417 # for some reason. Run ./configure if you need to update it after a
418 # configuration change.
420 # build the list of available layout files and convert it to entries
421 # for the default textclass.lst file
422 for file in ./layouts/*.layout "${srcdir}"/layouts/*.layout ; do
425 *) if test -r "$file" ; then
426 class=`echo $file | sed -e 's%^.*layouts/\(.*\)\.layout$%\1%'`
427 cleanclass=`echo $class | tr ' -' '__'`
429 # make sure the same class is not considered twice
430 if test x`[eval] echo $ac_n '${found_'$cleanclass'}'` = x ; then
431 [eval] "found_$cleanclass=yes"
434 # We manipulate only those lines that contain
435 # "\Declare(LaTeX|DocBook|LinuxDoc)Class"
436 /\\DeclareLaTeXClass/bmatch
437 /\\DeclareDocBookClass/bmatch
438 /\\DeclareLinuxDocClass/bmatch
442 # Remove the \DeclareFOOClass macro and add the correct boolean
443 # at the end of the line telling whether the class is
445 s/^.*\DeclareLaTeXClass *\(.*\)/\1 "false"/
446 s/^.*\DeclareDocBookClass *\(.*\)/\1 "'$bool_docbook'"/
447 s/^.*\DeclareLinuxDocClass *\(.*\)/\1 "'$bool_linuxdoc'"/
448 # If the macro had an optional argument with several
449 # parameters, only keep the first one
450 s/\[\([^,]*\),[^]]*\]/[\1]/
451 # If the macro did not have an optional argument, provide one
452 # (equal to the class name)
454 # Remove brackets and replace with correctly quoted entries
455 s/\[\([^]]*\)\] *{\([^}]*\)}/"'$class'" "\1" "\2"/
456 # Print the maninpulated text
458 # We are interested in the first instance of \DeclareFOOClass only,
461 ' "$file" >> textclass.lst
469 rm -f wrap_chkconfig.ltx chkconfig.vars chkconfig.classes chklayouts.tex
470 if test ! -r "chkconfig.ltx" ; then
471 cp "${srcdir}"/chkconfig.ltx .
474 cat >wrap_chkconfig.ltx <<EOF
477 \\input{chkconfig.ltx}
479 ## Construct the list of classes to test for.
480 # build the list of available layout files and convert it to commands
482 for file in ./layouts/*.layout "${srcdir}"/layouts/*.layout ; do
485 *) if test -r "$file" ; then
486 class=`echo $file | sed -e 's%^.*layouts/\(.*\)\.layout$%\1%'`
487 # Generate the proper TestDocClass command for this layout
489 # We manipulate only those lines that contain
490 # "\Declare(LaTeX|DocBook|LinuxDoc)Class"
491 /\\DeclareLaTeXClass/bmatch
492 /\\DeclareDocBookClass/bmatch
493 /\\DeclareLinuxDocClass/bmatch
497 # Wrap the entire line (minus the leading "# ") inside a
498 # "\TestDocClass{CLASS}{...}" command
499 s/^\# *\(.*\)$/\\TestDocClass{'${class}'}{\1}/
500 # Print the result and quit.
506 done > chklayouts.tex
507 ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
509 [eval] `cat chkconfig.vars | sed 's/-/_/g'`
511 test -n "${rmcopy}" && rm -f chkconfig.ltx
514 # Do we have all the files we need? Useful if latex did not run
517 PROVIDE_DEFAULT_FILE(chkconfig.sed,[s/@.*@/???/g])
519 echo "creating packages.lst"
520 PROVIDE_DEFAULT_FILE(packages.lst,dnl
521 [# This file should contain the list of LaTeX packages that have been
522 # recognized by LyX. Unfortunately, since configure could not find
523 # your LaTeX2e program, the tests have not been run. Run ./configure
524 # if you need to update it after a configuration change.
528 echo "creating doc/LaTeXConfig.lyx"
529 echo "s/@chk_linuxdoc@/$chk_linuxdoc/g" >> chkconfig.sed
530 echo "s/@chk_docbook@/$chk_docbook/g" >> chkconfig.sed
532 if test `uname -s | grep 'MINGW'` ; then
533 # Before running chkconfig.sed, remove the trailing '\r'
534 # characters that can bugger up various versions of sed.
535 tr -d '\r' < chkconfig.sed > chkconfig2.sed
536 mv -f chkconfig2.sed chkconfig.sed
539 sed -f chkconfig.sed "${srcdir}"/doc/LaTeXConfig.lyx.in >doc/LaTeXConfig.lyx
541 ### Let's check whether spaces are allowed in TeX file names
542 MSG_CHECKING(whether TeX allows spaces in file names)
543 if test ${lyx_check_config} = no ; then
544 tex_allows_spaces=false
548 echo "\\message{working^^J}" >"$fname".tex
549 if ${LATEX} "$fname" </dev/null | grep 'working' >/dev/null ; then
551 tex_allows_spaces=true
554 tex_allows_spaces=false
556 rm -f "$fname".* texput.log
559 echo "creating $outfile"
561 # This file has been automatically generated by LyX' lib/configure
562 # script. It contains default settings that have been determined by
563 # examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you
564 # want to customize LyX, make a copy of the file LYXDIR/lyxrc as
565 # ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
566 # override the values given here.
567 \\Format asciichess asc "Plain text (chess output)" "" "" "$TEXT_EDITOR"
568 \\Format asciiimage asc "Plain text (image)" "" "" "$TEXT_EDITOR"
569 \\Format asciixfig asc "Plain text (xfig output)" "" "" "$TEXT_EDITOR"
570 \\Format agr agr GRACE "" "$GRACE_VIEWER" "$GRACE_EDITOR"
571 \\Format bmp bmp BMP "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
572 \\Format date "" "date command" "" "" ""
573 \\Format dateout tmp "date (output)" "" "" "$TEXT_EDITOR"
574 \\Format docbook sgml DocBook B "" "$TEXT_EDITOR"
575 \\Format docbook-xml xml "Docbook (xml)" "" "" "$TEXT_EDITOR"
576 \\Format dvi dvi DVI D "$DVI_VIEWER" ""
577 \\Format eps eps EPS "" "$EPS_VIEWER" ""
578 \\Format fax "" Fax "" "" ""
579 \\Format fen fen FEN "" "$FEN_VIEWER" "$FEN_EDITOR"
580 \\Format fig fig XFig "" "$FIG_VIEWER" "$FIG_EDITOR"
581 \\Format gif gif GIF "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
582 \\Format html html HTML H "$HTML_VIEWER" ""
583 \\Format jpg jpg JPG "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
584 \\Format latex tex LaTeX L "" "$TEXT_EDITOR"
585 \\Format linuxdoc sgml LinuxDoc x "" "$TEXT_EDITOR"
586 \\Format lyx lyx LyX "" "lyx" "lyx"
587 \\Format lyxpreview lyxpreview "LyX Preview" "" "" ""
588 \\Format literate nw NoWeb N "" "$TEXT_EDITOR"
589 \\Format pbm pbm PBM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
590 \\Format pdf pdf "PDF (ps2pdf)" P "$PDF_VIEWER" ""
591 \\Format pdf2 pdf "PDF (pdflatex)" F "$PDF_VIEWER" ""
592 \\Format pdf3 pdf "PDF (dvipdfm)" m "$PDF_VIEWER" ""
593 \\Format pdftex pdftex_t PDFTEX "" "" ""
594 \\Format pgm pgm PGM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
595 \\Format png png PNG "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
596 \\Format ppm ppm PPM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
597 \\Format program "" Program "" "" ""
598 \\Format ps ps Postscript t "$PS_VIEWER" ""
599 \\Format pstex pstex_t PSTEX "" "" ""
600 \\Format tgif obj TGIF "" "$TGIF_VIEWER" "$TGIF_EDITOR"
601 \\Format sxw sxw "OpenOffice.Org Writer" O "" ""
602 \\Format text txt "Plain text" a "" "$TEXT_EDITOR"
603 \\Format textparagraph txt "Plain text (paragraphs)" "" "" "$TEXT_EDITOR"
604 \\Format tiff tif TIFF "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
605 \\Format word doc Word W "" ""
606 \\Format xbm xbm XBM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
607 \\Format xpm xpm XPM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
609 \\converter date dateout "date +%d-%m-%Y > \$\$o" ""
610 \\converter docbook docbook-xml "cp \$\$i \$\$o" "xml"
611 \\converter docbook dvi "$docbook_to_dvi_command" ""
612 \\converter docbook html "$docbook_to_html_command" ""
613 \\converter dvi pdf3 "$dvi_to_pdf_command" ""
614 \\converter dvi ps "$dvi_to_ps_command" ""
615 \\converter fen asciichess "python \$\$s/scripts/fen2ascii.py \$\$i \$\$o" ""
616 \\converter fig pdftex "sh \$\$s/scripts/fig2pdftex.sh \$\$i \$\$o" ""
617 \\converter fig pstex "sh \$\$s/scripts/fig2pstex.sh \$\$i \$\$o" ""
618 \\converter html latex "$html_to_latex_command" ""
619 \\converter latex html "$latex_to_html_command" "originaldir,needaux"
620 \\converter latex dvi "$latex_to_dvi" "latex"
621 \\converter latex lyx "$tex_to_lyx_command" ""
622 \\converter latex pdf2 "$latex_to_pdf" "latex"
623 \\converter latex sxw "$latex_to_sxw_command" "latex"
624 \\converter linuxdoc dvi "$linuxdoc_to_dvi_command" ""
625 \\converter linuxdoc html "$linuxdoc_to_html_command" ""
626 \\converter linuxdoc latex "$linuxdoc_to_latex_command" ""
627 \\converter linuxdoc lyx "$linuxdoc_to_lyx_command" ""
628 \\converter literate latex "$literate_to_tex_command" ""
629 \\converter literate lyx "$literate_to_lyx_command" ""
630 \\converter lyxpreview png "$lyxpreview_to_png_command" ""
631 \\converter lyxpreview ppm "$lyxpreview_to_bitmap_command" ""
632 \\converter ps fax "$fax_command" ""
633 \\converter ps pdf "$ps_to_pdf_command" ""
634 \\converter sxw latex "$sxw_to_latex_command" ""
635 \\converter word latex "$word_to_latex_command" ""
638 ### the graphic converter part with the predefined ones
639 #### Search for the nonstandard converting progs
641 SEARCH_PROG([for an FIG -> EPS/PPM converter], FIG2DEV, fig2dev)
642 if test "$FIG2DEV" = "fig2dev"; then
644 \\converter fig eps "fig2dev -L eps \$\$i \$\$o" ""
645 \\converter fig ppm "fig2dev -L ppm \$\$i \$\$o" ""
646 \\converter fig png "fig2dev -L png \$\$i \$\$o" ""
650 SEARCH_PROG([for an TIFF -> PS converter], TIFF2PS, tiff2ps)
651 if test "$TIFF2PS" = "tiff2ps"; then
653 \\converter tiff eps "tiff2ps \$\$i > \$\$o" ""
657 SEARCH_PROG([for an TGIF -> EPS/PPM converter], TGIF, tgif)
658 if test "$TGIF" = "tgif"; then
660 \\converter tgif eps "tgif -stdout -print -color -eps \$\$i > \$\$o" ""
661 \\converter tgif pdf "tgif -stdout -print -color -pdf \$\$i > \$\$o" ""
665 SEARCH_PROG([for an EPS -> PDF converter], EPSTOPDF, epstopdf)
666 if test "$EPSTOPDF" = "epstopdf"; then
668 \\converter eps pdf "epstopdf --outfile=\$\$o \$\$i" ""
672 #### Add Grace conversions (xmgrace needs an Xserver, gracebat doesn't.)
673 SEARCH_PROG([for a Grace -> Image converter], GRACE, gracebat)
674 if test "$GRACE" = "gracebat"; then
676 \\converter agr eps "gracebat -hardcopy -printfile \$\$o -hdevice EPS \$\$i 2>/dev/null" ""
677 \\converter agr png "gracebat -hardcopy -printfile \$\$o -hdevice PNG \$\$i 2>/dev/null" ""
678 \\converter agr jpg "gracebat -hardcopy -printfile \$\$o -hdevice JPEG \$\$i 2>/dev/null" ""
679 \\converter agr ppm "gracebat -hardcopy -printfile \$\$o -hdevice PNM \$\$i 2>/dev/null" ""
685 \\copier fig "sh \$\$s/scripts/fig_copy.sh \$\$i \$\$o"
686 \\copier pstex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
687 \\copier pdftex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
690 \\font_encoding "$chk_fontenc"
691 \\tex_allows_spaces $tex_allows_spaces
694 if [ "x$use_cygwin_path_fix" != "x" ]
696 echo "\\cygwin_path_fix_needed $use_cygwin_path_fix" >> $outfile
699 # Remove superfluous files if we are not writing in the main lib
701 for file in $outfile textclass.lst packages.lst \
702 doc/LaTeXConfig.lyx ; do
703 # we rename the file first, so that we avoid comparing a file with itself
705 if test -r "${srcdir}"/$file && diff $file.new "${srcdir}"/$file >/dev/null 2>/dev/null ;
707 echo "removing $file, which is identical to the system global version"
715 if test $lyx_keep_temps = no ; then
716 rm -f chkconfig.sed chkconfig.vars wrap_chkconfig.* chklayouts.tex \