2 # This script is a hand-made configure script. It contains a lot of
3 # code stolen from GNU autoconf. I removed all the code that was not
4 # useful for configuring a LyX installation.
10 ####some configuration variables
15 #### Parse the command line
20 Usage: configure [options]
22 --help show this help lines
23 --keep-temps keep temporary files (for debug. purposes)
24 --without-latex-config do not run LaTeX to determine configuration
27 --without-latex-config)
28 lyx_check_config=no ;;
35 #### Checking for some echo oddities
36 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
37 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
38 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
49 #### I do not really know why this is useful, but we might as well keep it.
51 # Only set these to C if already set. These must not be set unconditionally
52 # because not all systems understand e.g. LANG=C (notably SCO).
53 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
54 # Non-C LC_CTYPE values break the ctype check.
55 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
56 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
57 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
58 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
61 #### Guess the directory in which configure is located.
63 srcdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
64 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
65 test "x$srcdir" = "x$ac_prog" && srcdir=.
66 if test ! -r ${srcdir}/chkconfig.ltx ; then
67 echo "configure: error: cannot find chkconfig.ltx script"
72 #### Create the build directories if necessary
73 for dir in bind clipart doc examples images kbd layouts reLyX \
74 scripts templates ui ; do
75 test ! -d $dir && mkdir $dir
79 #### Searching some useful programs
81 echo $ac_n "checking for a LaTeX2e program""... $ac_c"
82 echo "$ac_t""(latex latex2e)"
84 for ac_prog in latex latex2e
86 # Extract the first word of "$ac_prog", so it can be a program name with args.
87 set dummy $ac_prog ; ac_word=$2
88 if test -n "$ac_word"; then
89 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
90 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
91 for ac_dir in $PATH; do
92 test -z "$ac_dir" && ac_dir=.
93 if test -x $ac_dir/$ac_word; then
100 if test -n "$LATEX"; then
106 ## Check whether this is really LaTeX2e
108 cat >chklatex.ltx <<EOF
109 \\nonstopmode\\makeatletter
110 \\ifx\\undefined\\documentclass\\else
111 \\message{ThisIsLaTeX2e}
115 if eval ${LATEX} chklatex.ltx </dev/null 2>/dev/null \
116 | grep 'ThisIsLaTeX2e' >/dev/null; then
120 ac_result="not useable"
122 rm -f chklatex.ltx chklatex.log
123 echo "$ac_t""$ac_result"
124 test -n "$LATEX" && break
128 if test -z "$LATEX" ; then
133 if test x$lyx_check_config != x ; then
134 echo $ac_n "checking for the pdflatex program""... $ac_c"
135 echo "$ac_t""(pdflatex)"
137 for ac_prog in pdflatex
139 # Extract the first word of "$ac_prog", so it can be a program name with args.
140 set dummy $ac_prog ; ac_word=$2
141 if test -n "$ac_word"; then
142 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
143 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
144 for ac_dir in $PATH; do
145 test -z "$ac_dir" && ac_dir=.
146 if test -x $ac_dir/$ac_word; then
153 if test -n "$PDFLATEX"; then
159 ## Check whether this is really LaTeX2e
161 cat >chklatex.ltx <<EOF
162 \\nonstopmode\\makeatletter
163 \\ifx\\undefined\\documentclass\\else
164 \\message{ThisIsLaTeX2e}
168 if eval ${LATEX} chklatex.ltx </dev/null 2>/dev/null \
169 | grep 'ThisIsLaTeX2e' >/dev/null; then
173 ac_result="not useable"
175 rm -f chklatex.ltx chklatex.log
176 echo "$ac_t""$ac_result"
177 test -n "$PDFLATEX" && break
181 if test -z "$PDFLATEX" ; then
187 # Search for an installed reLyX or a ready-to-install one
189 PATH=${PATH}:./reLyX/
190 echo $ac_n "checking for a LaTeX -> LyX converter""... $ac_c"
191 echo "$ac_t""(reLyX)"
195 # Extract the first word of "$ac_prog", so it can be a program name with args.
196 set dummy $ac_prog ; ac_word=$2
197 if test -n "$ac_word"; then
198 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
199 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
200 for ac_dir in $PATH; do
201 test -z "$ac_dir" && ac_dir=.
202 if test -x $ac_dir/$ac_word; then
203 tex_to_lyx_command="$ac_prog"
209 if test -n "$tex_to_lyx_command"; then
215 echo "$ac_t""$ac_result"
216 test -n "$tex_to_lyx_command" && break
220 if test -z "$tex_to_lyx_command" ; then
221 tex_to_lyx_command=none
225 test $tex_to_lyx_command = "reLyX" && tex_to_lyx_command="reLyX -f \$\$FName"
227 echo $ac_n "checking for a Noweb -> LyX converter""... $ac_c"
228 echo "$ac_t""(noweb2lyx)"
229 literate_to_lyx_command=
230 for ac_prog in noweb2lyx
232 # Extract the first word of "$ac_prog", so it can be a program name with args.
233 set dummy $ac_prog ; ac_word=$2
234 if test -n "$ac_word"; then
235 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
236 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
237 for ac_dir in $PATH; do
238 test -z "$ac_dir" && ac_dir=.
239 if test -x $ac_dir/$ac_word; then
240 literate_to_lyx_command="$ac_prog"
246 if test -n "$literate_to_lyx_command"; then
252 echo "$ac_t""$ac_result"
253 test -n "$literate_to_lyx_command" && break
257 if test -z "$literate_to_lyx_command" ; then
258 literate_to_lyx_command=none
261 test $literate_to_lyx_command = "noweb2lyx" && literate_to_lyx_command="noweb2lyx \$\$FName \$\$OutName"
263 # Search something to process a literate document
264 echo $ac_n "checking for a Noweb -> LaTeX converter""... $ac_c"
265 echo "$ac_t""(noweave)"
266 literate_to_tex_command=
267 for ac_prog in noweave
269 # Extract the first word of "$ac_prog", so it can be a program name with args.
270 set dummy $ac_prog ; ac_word=$2
271 if test -n "$ac_word"; then
272 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
273 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
274 for ac_dir in $PATH; do
275 test -z "$ac_dir" && ac_dir=.
276 if test -x $ac_dir/$ac_word; then
277 literate_to_tex_command="$ac_prog"
283 if test -n "$literate_to_tex_command"; then
289 echo "$ac_t""$ac_result"
290 test -n "$literate_to_tex_command" && break
294 if test -z "$literate_to_tex_command" ; then
295 literate_to_tex_command=none
298 test $literate_to_tex_command = "noweave" && literate_to_tex_command="noweave -delay -index \$\$FName > \$\$OutName"
300 echo $ac_n "checking for a HTML -> Latex converter""... $ac_c"
301 echo "$ac_t""(html2latex)"
302 html_to_latex_command=
303 for ac_prog in html2latex
305 # Extract the first word of "$ac_prog", so it can be a program name with args.
306 set dummy $ac_prog ; ac_word=$2
307 if test -n "$ac_word"; then
308 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
310 for ac_dir in $PATH; do
311 test -z "$ac_dir" && ac_dir=.
312 if test -x $ac_dir/$ac_word; then
313 html_to_latex_command="$ac_prog"
319 if test -n "$html_to_latex_command"; then
325 echo "$ac_t""$ac_result"
326 test -n "$html_to_latex_command" && break
330 if test -z "$html_to_latex_command" ; then
331 html_to_latex_command=none
334 test $html_to_latex_command = "html2latex" && html_to_latex_command="html2latex \$\$FName"
336 echo $ac_n "checking for Image converter""... $ac_c"
337 echo "$ac_t""(convert)"
339 for ac_prog in convert
341 # Extract the first word of "$ac_prog", so it can be a program name with args.
342 set dummy $ac_prog ; ac_word=$2
343 if test -n "$ac_word"; then
344 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
346 for ac_dir in $PATH; do
347 test -z "$ac_dir" && ac_dir=.
348 if test -x $ac_dir/$ac_word; then
349 image_command="$ac_prog"
355 if test -n "$image_command"; then
361 echo "$ac_t""$ac_result"
362 test -n "$image_command" && break
366 if test -z "$image_command" ; then
370 test $image_command = "convert" && image_command="convert \$\$FName \$\$OutName"
372 # Search for a Postscript interpreter
373 echo $ac_n "checking for a Postscript interpreter""... $ac_c"
378 # Extract the first word of "$ac_prog", so it can be a program name with args.
379 set dummy $ac_prog ; ac_word=$2
380 if test -n "$ac_word"; then
381 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
383 for ac_dir in $PATH; do
384 test -z "$ac_dir" && ac_dir=.
385 if test -x $ac_dir/$ac_word; then
392 if test -n "$GS"; then
398 echo "$ac_t""$ac_result"
399 test -n "$GS" && break
403 if test -z "$GS" ; then
408 # Search something to preview postscript
409 echo $ac_n "checking for a Postscript previewer""... $ac_c"
410 echo "$ac_t""(gv ghostview)"
412 for ac_prog in gv ghostview
414 # Extract the first word of "$ac_prog", so it can be a program name with args.
415 set dummy $ac_prog ; ac_word=$2
416 if test -n "$ac_word"; then
417 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
419 for ac_dir in $PATH; do
420 test -z "$ac_dir" && ac_dir=.
421 if test -x $ac_dir/$ac_word; then
428 if test -n "$GHOSTVIEW"; then
434 echo "$ac_t""$ac_result"
435 test -n "$GHOSTVIEW" && break
439 if test -z "$GHOSTVIEW" ; then
444 # Search for a program to preview pdf
445 echo $ac_n "checking for a PDF preview""... $ac_c"
446 echo "$ac_t""(acroread gv ghostview xpdf)"
448 for ac_prog in acroread gv ghostview xpdf
450 # Extract the first word of "$ac_prog", so it can be a program name with args.
451 set dummy $ac_prog ; ac_word=$2
452 if test -n "$ac_word"; then
453 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
454 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
455 for ac_dir in $PATH; do
456 test -z "$ac_dir" && ac_dir=.
457 if test -x $ac_dir/$ac_word; then
458 PDF_VIEWER="$ac_prog"
464 if test -n "$PDF_VIEWER"; then
470 echo "$ac_t""$ac_result"
471 test -n "$PDF_VIEWER" && break
475 if test -z "$PDF_VIEWER" ; then
480 # Search something to preview dvi
481 echo $ac_n "checking for a DVI previewer""... $ac_c"
486 # Extract the first word of "$ac_prog", so it can be a program name with args.
487 set dummy $ac_prog ; ac_word=$2
488 if test -n "$ac_word"; then
489 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
490 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
491 for ac_dir in $PATH; do
492 test -z "$ac_dir" && ac_dir=.
493 if test -x $ac_dir/$ac_word; then
494 DVI_VIEWER="$ac_prog"
500 if test -n "$DVI_VIEWER"; then
506 echo "$ac_t""$ac_result"
507 test -n "$DVI_VIEWER" && break
511 if test -z "$DVI_VIEWER" ; then
516 # Search something to preview html
517 echo $ac_n "checking for a HTML previewer""... $ac_c"
518 echo "$ac_t""(netscape)"
520 for ac_prog in netscape
522 # Extract the first word of "$ac_prog", so it can be a program name with args.
523 set dummy $ac_prog ; ac_word=$2
524 if test -n "$ac_word"; then
525 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
526 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
527 for ac_dir in $PATH; do
528 test -z "$ac_dir" && ac_dir=.
529 if test -x $ac_dir/$ac_word; then
530 HTML_VIEWER="$ac_prog"
536 if test -n "$HTML_VIEWER"; then
542 echo "$ac_t""$ac_result"
543 test -n "$HTML_VIEWER" && break
547 if test -z "$HTML_VIEWER" ; then
552 # Search for a program to convert ps to pdf
553 echo $ac_n "checking for a PS to PDF converter""... $ac_c"
554 echo "$ac_t""(ps2pdf)"
556 for ac_prog in ps2pdf
558 # Extract the first word of "$ac_prog", so it can be a program name with args.
559 set dummy $ac_prog ; ac_word=$2
560 if test -n "$ac_word"; then
561 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
562 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
563 for ac_dir in $PATH; do
564 test -z "$ac_dir" && ac_dir=.
565 if test -x $ac_dir/$ac_word; then
566 ps_to_pdf_command="$ac_prog"
572 if test -n "$ps_to_pdf_command"; then
578 echo "$ac_t""$ac_result"
579 test -n "$ps_to_pdf_command" && break
583 if test -z "$ps_to_pdf_command" ; then
584 ps_to_pdf_command=none
587 test $ps_to_pdf_command = "ps2pdf" && ps_to_pdf_command="ps2pdf \$\$FName"
589 # Search for a program to convert dvi to ps
590 echo $ac_n "checking for a DVI to PS converter""... $ac_c"
591 echo "$ac_t""(dvips)"
595 # Extract the first word of "$ac_prog", so it can be a program name with args.
596 set dummy $ac_prog ; ac_word=$2
597 if test -n "$ac_word"; then
598 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
599 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
600 for ac_dir in $PATH; do
601 test -z "$ac_dir" && ac_dir=.
602 if test -x $ac_dir/$ac_word; then
603 dvi_to_ps_command="$ac_prog"
609 if test -n "$dvi_to_ps_command"; then
615 echo "$ac_t""$ac_result"
616 test -n "$dvi_to_ps_command" && break
620 if test -z "$dvi_to_ps_command" ; then
621 dvi_to_ps_command=none
624 test $dvi_to_ps_command = "dvips" && dvi_to_ps_command="dvips -o \$\$OutName \$\$FName"
626 # Search a *roff program (used to translate tables in ASCII export)
627 echo $ac_n "checking for a *roff formatter""... $ac_c"
628 echo "$ac_t""(groff nroff)"
630 for ac_prog in groff nroff
632 # Extract the first word of "$ac_prog", so it can be a program name with args.
633 set dummy $ac_prog ; ac_word=$2
634 if test -n "$ac_word"; then
635 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
636 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
637 for ac_dir in $PATH; do
638 test -z "$ac_dir" && ac_dir=.
639 if test -x $ac_dir/$ac_word; then
646 if test -n "$ROFF"; then
652 echo "$ac_t""$ac_result"
653 test -n "$ROFF" && break
657 if test -z "$ROFF" ; then
661 ascii_roff_command=$ROFF
662 test $ROFF = "groff" && ascii_roff_command="groff -t -Tlatin1 \$\$FName"
663 test $ROFF = "nroff" && ascii_roff_command="tbl \$\$FName | nroff"
665 # Search the ChkTeX program
666 echo $ac_n "checking for ChkTeX""... $ac_c"
667 echo "$ac_t""(chktex)"
669 for ac_prog in chktex
671 # Extract the first word of "$ac_prog", so it can be a program name with args.
672 set dummy $ac_prog ; ac_word=$2
673 if test -n "$ac_word"; then
674 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
675 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
676 for ac_dir in $PATH; do
677 test -z "$ac_dir" && ac_dir=.
678 if test -x $ac_dir/$ac_word; then
685 if test -n "$CHKTEX"; then
691 echo "$ac_t""$ac_result"
692 test -n "$CHKTEX" && break
696 if test -z "$CHKTEX" ; then
700 chktex_command=$CHKTEX
701 test $CHKTEX = "chktex" && chktex_command="$CHKTEX -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38"
703 # Search for a spellchecker
704 echo $ac_n "checking for a spell-checker""... $ac_c"
705 echo "$ac_t""(ispell)"
707 for ac_prog in ispell
709 # Extract the first word of "$ac_prog", so it can be a program name with args.
710 set dummy $ac_prog ; ac_word=$2
711 if test -n "$ac_word"; then
712 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
713 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
714 for ac_dir in $PATH; do
715 test -z "$ac_dir" && ac_dir=.
716 if test -x $ac_dir/$ac_word; then
723 if test -n "$SPELL"; then
729 echo "$ac_t""$ac_result"
730 test -n "$SPELL" && break
734 if test -z "$SPELL" ; then
740 # Search for LinuxDoc support
741 echo $ac_n "checking for SGML-tools 1.x (LinuxDoc)""... $ac_c"
742 echo "$ac_t""(sgml2lyx)"
744 for ac_prog in sgml2lyx
746 # Extract the first word of "$ac_prog", so it can be a program name with args.
747 set dummy $ac_prog ; ac_word=$2
748 if test -n "$ac_word"; then
749 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
751 for ac_dir in $PATH; do
752 test -z "$ac_dir" && ac_dir=.
753 if test -x $ac_dir/$ac_word; then
760 if test -n "$LINUXDOC"; then
766 echo "$ac_t""$ac_result"
767 test -n "$LINUXDOC" && break
771 if test -z "$LINUXDOC" ; then
776 if test $LINUXDOC != none; then
778 linuxdoc_cmd="\\def\\haslinuxdoc{yes}"
783 linuxdoc_to_latex_command="sgml2latex \$\$FName"
784 linuxdoc_to_dvi_command="sgml2latex -o dvi \$\$FName"
785 linuxdoc_to_html_command="sgml2html \$\$FName"
786 linuxdoc_to_lyx_command="sgml2lyx \$\$FName";;
788 linuxdoc_to_latex_command="none"
789 linuxdoc_to_dvi_command="none"
790 linuxdoc_to_html_command="none"
791 linuxdoc_to_lyx_command="none";;
794 # Search for DocBook support
795 echo $ac_n "checking for SGML-tools 2.x (DocBook) or db2x scripts""... $ac_c"
796 echo "$ac_t""(sgmltools db2dvi)"
798 for ac_prog in sgmltools db2dvi
800 # Extract the first word of "$ac_prog", so it can be a program name with args.
801 set dummy $ac_prog ; ac_word=$2
802 if test -n "$ac_word"; then
803 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
805 for ac_dir in $PATH; do
806 test -z "$ac_dir" && ac_dir=.
807 if test -x $ac_dir/$ac_word; then
814 if test -n "$DOCBOOK"; then
820 echo "$ac_t""$ac_result"
821 test -n "$DOCBOOK" && break
825 if test -z "$DOCBOOK" ; then
830 if test $DOCBOOK != none; then
832 docbook_cmd="\\def\\hasdocbook{yes}"
837 docbook_to_dvi_command="sgmltools -b dvi \$\$FName"
838 docbook_to_html_command="sgmltools -b html \$\$FName";;
840 docbook_to_dvi_command="db2dvi \$\$FName"
841 docbook_to_html_command="db2html \$\$FName";;
843 docbook_to_dvi_command="none"
844 docbook_to_html_command="none";;
847 # Search for a spool command
848 echo $ac_n "checking for a spool command""... $ac_c"
849 echo "$ac_t""(lp lpr)"
851 for ac_prog in lp lpr
853 # Extract the first word of "$ac_prog", so it can be a program name with args.
854 set dummy $ac_prog ; ac_word=$2
855 if test -n "$ac_word"; then
856 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
858 for ac_dir in $PATH; do
859 test -z "$ac_dir" && ac_dir=.
860 if test -x $ac_dir/$ac_word; then
867 if test -n "$LPR"; then
873 echo "$ac_t""$ac_result"
874 test -n "$LPR" && break
878 if test -z "$LPR" ; then
883 lp) print_spool_command=lp
884 print_spool_printerprefix="-d ";;
885 lpr) print_spool_command=lpr
886 print_spool_printerprefix="-P";;
887 *) :;; # leave to empty values
890 echo $ac_n "checking for a LaTeX -> HTML converter""... $ac_c"
891 echo "$ac_t""(tth latex2html hevea)"
893 for ac_prog in tth latex2html hevea
895 # Extract the first word of "$ac_prog", so it can be a program name with args.
896 set dummy $ac_prog ; ac_word=$2
897 if test -n "$ac_word"; then
898 echo $ac_n "+checking for \"$ac_word\"""... $ac_c"
899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
900 for ac_dir in $PATH; do
901 test -z "$ac_dir" && ac_dir=.
902 if test -x $ac_dir/$ac_word; then
909 if test -n "$TOHTML"; then
915 echo "$ac_t""$ac_result"
916 test -n "$TOHTML" && break
920 if test -z "$TOHTML" ; then
924 latex_to_html_command = $TOHTML
926 tth) latex_to_html_command="tth -t -e2 -L\$\$BaseName < \$\$FName > \$\$OutName";;
927 latex2html) latex_to_html_command="latex2html -no_subdir -split 0 -show_section_numbers \$\$FName";;
928 hevea) latex_to_html_command="hevea -s \$\$FName";;
931 #### Explore the LaTeX configuration
932 echo $ac_n "checking LaTeX configuration""... $ac_c"
933 # First, remove the files that we want to re-create
934 rm -f textclass.lst packages.lst chkconfig.sed
935 if test ${lyx_check_config} = no ; then
936 echo "$ac_t""default values"
939 rm -f wrap_chkconfig.ltx chkconfig.vars chkconfig.classes chklayouts.tex
940 cat >wrap_chkconfig.ltx <<EOF
941 \\newcommand\\srcdir{${srcdir}}
944 \\input{${srcdir}/chkconfig.ltx}
946 ## Construct the list of classes to test for.
947 # build the list of available layout files and convert it to commands
949 for file in ./layouts/*.layout ${srcdir}/layouts/*.layout ; do
952 *) test -r "$file" && echo $file ;;
954 done | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'\
956 eval ${LATEX} wrap_chkconfig.ltx 2>/dev/null | grep '^\+'
957 eval `cat chkconfig.vars | sed 's/-/_/g'`
960 # Do we have all the files we need? Useful if latex did not run
961 echo creating textclass.lst
962 # if textclass.lst does not exist (because LaTeX did not run),
963 # then provide a standard version.
964 if test ! -f textclass.lst ; then
965 cat >textclass.lst <<EOF
966 # This file declares layouts and their associated definition files
967 # (include dir. relative to the place where this file is).
968 # It contains only default values, since chkconfig.ltx could not be run
969 # for some reason. Run ./configure if you need to update it after a
970 # configuration change.
971 article article article
974 linuxdoc linuxdoc linuxdoc
979 # if chkconfig.sed does not exist (because LaTeX did not run),
980 # then provide a standard version.
981 if test ! -f chkconfig.sed ; then
982 cat >chkconfig.sed <<EOF
987 echo creating packages.lst
988 # if packages.lst does not exist (because LaTeX did not run),
989 # then provide a standard version.
990 if test ! -f packages.lst ; then
991 cat >packages.lst <<EOF
992 # This file should contain the list of LaTeX packages that have been
993 # recognized by LyX. Unfortunately, since configure could not find
994 # your LaTeX2e program, the tests have not been run. Run ./configure
995 # if you need to update it after a configuration change.
1000 echo creating doc/LaTeXConfig.lyx
1001 echo "s/@chk_linuxdoc@/$chk_linuxdoc/g" >> chkconfig.sed
1002 echo "s/@chk_docbook@/$chk_docbook/g" >> chkconfig.sed
1003 sed -f chkconfig.sed ${srcdir}/doc/LaTeXConfig.lyx.in >doc/LaTeXConfig.lyx
1005 echo creating lyxrc.defaults
1006 rm -f lyxrc.defaults
1007 cat >lyxrc.defaults <<EOF
1008 # This file has been automatically generated by LyX' lib/configure
1009 # script. It contains default settings that have been determined by
1010 # examining your system. PLEASE DO NOT MODIFY ANYTHING HERE! If you
1011 # want to customize LyX, make a copy of the file LYXDIR/lyxrc as
1012 # ~/.lyx/lyxrc and edit this file instead. Any setting in lyxrc will
1013 # override the values given here.
1014 \\Format latex tex LaTeX L
1015 \\Format dvi dvi DVI D
1016 \\Format ps ps Postscript t
1017 \\Format pdf pdf PDF P
1018 \\Format html html HTML H
1019 \\Format text txt ASCII A
1020 \\Format literate nw NoWeb W
1021 \\Format linuxdoc sgml LinuxDoc x
1022 \\Format docbook sgml DocBook B
1023 \\Format program run Program r
1025 \\converter latex lyx "$tex_to_lyx_command" ""
1026 \\converter latex dvi "$LATEX" "latex,disable=linuxdoc&docbook"
1027 \\converter latex pdf "$PDFLATEX" "latex,disable=linuxdoc&docbook"
1028 \\converter latex html "$latex_to_html_command"
1029 "originaldir,needaux,disable=linuxdoc&docbook"
1030 \\converter literate lyx "$literate_to_lyx_command" ""
1031 \\converter literate latex "$literate_to_tex_command" ""
1032 \\converter dvi ps "$dvi_to_ps_command" ""
1033 \\converter ps pdf "$ps_to_pdf_command" ""
1034 \\converter linuxdoc lyx "$linuxdoc_to_lyx_command" ""
1035 \\converter linuxdoc latex "$linuxdoc_to_latex_command" ""
1036 \\converter linuxdoc dvi "$linuxdoc_to_dvi_command" ""
1037 \\converter linuxdoc html "$linuxdoc_to_html_command" ""
1038 \\converter docbook dvi "$docbook_to_dvi_command" ""
1039 \\converter docbook html "$docbook_to_html_command" ""
1040 \\converter html latex "$html_to_latex_command"
1041 "disable=latex&literate&linuxdoc&docbook"
1043 \converter gif eps "$image_command" ""
1044 \converter png eps "$image_command" ""
1045 \converter jpg eps "$image_command" ""
1046 \converter gif png "$image_command" ""
1048 \\viewer dvi "$DVI_VIEWER"
1049 \\viewer html "$HTML_VIEWER"
1050 \\viewer pdf "$PDF_VIEWER"
1051 \\viewer ps "$GHOSTVIEW -swap"
1052 \\viewer eps "$GHOSTVIEW"
1055 \\ascii_roff_command "$ascii_roff_command"
1056 \\chktex_command "$chktex_command"
1057 \\spell_command "$SPELL"
1058 \\print_spool_command "$print_spool_command"
1059 \\print_spool_printerprefix "$print_spool_printerprefix"
1060 \\font_encoding "$chk_fontenc"
1063 # Remove superfluous files if we are not writing in the main lib
1065 for file in lyxrc.defaults textclass.lst packages.lst \
1066 doc/LaTeXConfig.lyx ; do
1067 # we rename the file first, so that we avoid comparing a file with itself
1069 if test -r $srcdir/$file && diff $file.new $srcdir/$file >/dev/null 2>/dev/null ;
1071 echo "removing $file, which is identical to the system global version"
1080 if test $lyx_keep_temps = no ; then
1081 rm -f chkconfig.sed chkconfig.vars wrap_chkconfig.* chklayouts.tex \