Although the configure script provides the --with-gs option to set the interpreter name the 'gs' name is hard coded in scripts such as ps2pdf. Additionally the 'gs' used by such scripts depends on the $PATH. This is a minor annoyance if one tries the AFPL version installing it in /usr/local and leaves the distribution version in /usr.
Ok, raph and I had a smart idea for how to do this is a way that doesn't look egregious from the point of the other builds. Just add: # This definition is changed on install to match the # executable name set in the makefile GS_EXECUTABLE=gs And then just use sed to update then in unixinst.mak.
I've committed the proposed fix to HEAD. It should be part of the 8.50 release, or 8.32 if we do another beta between here and there.
I believe this is broken again. When I build and install, I see code fragments like the following at the beginning of ps2pdfwr and similar scripts: # This definition is changed on install to match the # executable name set in the makefile GS_EXECUTABLE=gs gs="`dirname $0`/$GS_EXECUTABLE" if test ! -x "$gs"; then gs="$GS_EXECUTABLE" fi GS_EXECUTABLE=gs The second assignment to GS_EXECUTABLE undoes the work of the previous few lines, so that we will always use the version of gs that is in the user's PATH, rather than preferring the version of gs in the same directory as ps2pdfwr, as intended. I think this is an interaction between two fixes: 686863 ghostscript interpreter name hard coded in scripts 689318 Using full path in scripts like pdf2ps etc.? The sed code in base/unixinst.mak incorrectly modifies both of the assignments to GS_EXECUTABLE in the code fragment above, where it should only modify the first one. I believe this can be fixed by modifying base/unixinst.mak, according to the attached patch.
Created attachment 5684 [details] patch-686863 Proposed fix.
You're right. Thanks for the patch. I've applied in r10349.