From 67bc959eef9a1d5113248ad72a0eedcd6b93b5af Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 28 Sep 2009 15:47:20 +0000 Subject: epstopdf 20030804 git-svn-id: svn://tug.org/texlive/trunk@15520 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/epstopdf/epstopdf.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Build') diff --git a/Build/source/utils/epstopdf/epstopdf.pl b/Build/source/utils/epstopdf/epstopdf.pl index 4f2c408ed83..1b948dc072d 100755 --- a/Build/source/utils/epstopdf/epstopdf.pl +++ b/Build/source/utils/epstopdf/epstopdf.pl @@ -46,6 +46,8 @@ use strict; # whitespace at the end of the eps file. # +my $IsWin32 = ($^O =~ /MSWin32/i); + ### program identification my $program = "epstopdf"; my $filedate="2001/03/05"; @@ -58,6 +60,17 @@ my $GS = "gs"; $GS = "gswin32c" if $^O eq 'MSWin32'; $GS = "gswin32c" if $^O =~ /cygwin/; +if ($IsWin32) { + $GS = `kpsecheck --ghostscript`; + $GS =~ m/^dll\s*:\s*(.+)/mio; + $GS = $1; + $GS =~ s/gsdll32.dll/gswin32c.exe/io; + if ($GS eq "") { + $GS = "gswin32c.exe"; + } + $GS = "\"$GS\"" if ($GS =~ m/\s/); +} + ### options $::opt_help=0; $::opt_debug=0; -- cgit v1.2.3