]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.m4
fix bug 1821
[lyx.git] / lib / configure.m4
index d47a25bf62b52912187c05c7cf8efe4de58cada8..fce618c0947015f9e7a338f02e72fe12b1e6b12d 100644 (file)
@@ -174,6 +174,7 @@ if test ! -r "${srcdir}"/chkconfig.ltx ; then
 fi
 
 #### Adjust PATH for Win32 (Cygwin)
+use_cygwin_path_fix=''
 case `uname -s` in
    CYGWIN*)
      tmpfname="/tmp/x$$.ltx";
@@ -188,8 +189,10 @@ case `uname -s` in
        echo "configure: cygwin detected; path correction"
        srcdir=`cygpath -w "${srcdir}" | tr '\\\\' /`
        echo "srcdir=${srcdir}"
+       use_cygwin_path_fix='true'
      else
        echo "configure: cygwin detected; path correction is not needed"
+       use_cygwin_path_fix='false'
      fi
      ;;
 esac
@@ -292,7 +295,7 @@ test "$latex_to_sxw_command" != "none" && latex_to_sxw_command="$latex_to_sxw_co
 # Search something to preview postscript
 SEARCH_PROG([for a Postscript previewer],GHOSTVIEW,gsview32 gv ghostview kghostview)
 case $GHOSTVIEW in
-  gv|ghostview) PS_VIEWER="$GHOSTVIEW -swap" ;;
+  ghostview) PS_VIEWER="$GHOSTVIEW -swap" ;;
   *) PS_VIEWER="$GHOSTVIEW";;
 esac
 EPS_VIEWER=$GHOSTVIEW
@@ -319,7 +322,7 @@ SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command,dvipdfm)
 test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i"
 
 # We have a script to convert previewlyx to ppm or to png
-lyxpreview_to_bitmap_command='python $$s/lyxpreview2bitmap.py'
+lyxpreview_to_bitmap_command='python $$s/scripts/lyxpreview2bitmap.py'
 
 # Search for 'dvipng'. Only enable the conversion from lyxpreview -> png
 # if dvipng is found.
@@ -330,7 +333,7 @@ test "$DVIPNG" = "dvipng" && \
 
 # Search a *roff program (used to translate tables in ASCII export)
 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
-  'groff -t -Tlatin1 $$FName' nroff,dnl
+  "groff -t -Tlatin1 \$\$FName" nroff,dnl
   test "$prog" = "nroff" && prog='tbl $$FName | nroff')
 
 # Search the ChkTeX program
@@ -581,9 +584,9 @@ cat >$outfile <<EOF
 \\converter docbook    html       "$docbook_to_html_command"   ""
 \\converter dvi        pdf3       "$dvi_to_pdf_command"        ""
 \\converter dvi        ps         "$dvi_to_ps_command" ""
-\\converter fen        asciichess "python \$\$s/fen2ascii.py \$\$i \$\$o"      ""
-\\converter fig        pdftex     "sh \$\$s/fig2pdftex.sh \$\$i \$\$o" ""
-\\converter fig        pstex      "sh \$\$s/fig2pstex.sh \$\$i \$\$o"  ""
+\\converter fen        asciichess "python \$\$s/scripts/fen2ascii.py \$\$i \$\$o"      ""
+\\converter fig        pdftex     "sh \$\$s/scripts/fig2pdftex.sh \$\$i \$\$o" ""
+\\converter fig        pstex      "sh \$\$s/scripts/fig2pstex.sh \$\$i \$\$o"  ""
 \\converter html       latex      "$html_to_latex_command"     ""
 \\converter latex      html       "$latex_to_html_command"     "originaldir,needaux"
 \\converter latex      dvi        "$latex_to_dvi"      "latex"
@@ -651,14 +654,19 @@ fi
 
 cat >>$outfile <<EOF
 
-\\copier    fig        "sh \$\$s/fig_copy.sh \$\$i \$\$o"
-\\copier    pstex      "python \$\$s/tex_copy.py \$\$i \$\$o \$\$l"
-\\copier    pdftex     "python \$\$s/tex_copy.py \$\$i \$\$o \$\$l"
+\\copier    fig        "sh \$\$s/scripts/fig_copy.sh \$\$i \$\$o"
+\\copier    pstex      "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
+\\copier    pdftex     "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
 
 $rc_entries
 \\font_encoding "$chk_fontenc"
 EOF
 
+if [ "x$use_cygwin_path_fix" != "x" ]
+then
+  echo "\\cygwin_path_fix_needed $use_cygwin_path_fix" >> $outfile
+fi
+
 ######## X FONTS
 # create a fonts.dir file to make X fonts available to LyX
 echo "checking for TeX fonts"