From 3f4df1132934565cbcc448d52b3f6dc84b572455 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 22 Jun 2024 18:30:20 +0200 Subject: [PATCH] Fixes to the GhostPCL library names on Linux and Mac. --- src/printer/prt_ps.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/printer/prt_ps.c b/src/printer/prt_ps.c index 3e6612ce1..998343c4d 100644 --- a/src/printer/prt_ps.c +++ b/src/printer/prt_ps.c @@ -54,13 +54,14 @@ # endif #elif defined __APPLE__ # define PATH_GHOSTSCRIPT_DLL "libgs.dylib" -# define PATH_GHOSTPCL_DLL "libgpcl6.dylib" +# define PATH_GHOSTPCL_DLL "libgpcl6.9.54.dylib" #else # define PATH_GHOSTSCRIPT_DLL "libgs.so.9" # define PATH_GHOSTSCRIPT_DLL_ALT1 "libgs.so.10" # define PATH_GHOSTSCRIPT_DLL_ALT2 "libgs.so" -# define PATH_GHOSTPCL_DLL "libgpcl6.so.10" -# define PATH_GHOSTPCL_DLL_ALT "libgpcl6.so" +# define PATH_GHOSTPCL_DLL "libgpcl6.so.9" +# define PATH_GHOSTPCL_DLL_ALT1 "libgpcl6.so.10" +# define PATH_GHOSTPCL_DLL_ALT2 "libgpcl6.so" #endif #define POSTSCRIPT_BUFFER_LENGTH 65536 @@ -424,9 +425,13 @@ pcl_init(void *lpt) /* Try loading the DLL. */ ghostscript_handle = dynld_module(PATH_GHOSTPCL_DLL, ghostscript_imports); -#ifdef PATH_GHOSTPCL_DLL_ALT +#ifdef PATH_GHOSTPCL_DLL_ALT1 if (ghostscript_handle == NULL) { - ghostscript_handle = dynld_module(PATH_GHOSTPCL_DLL_ALT, ghostscript_imports); + ghostscript_handle = dynld_module(PATH_GHOSTPCL_DLL_ALT1, ghostscript_imports); +# ifdef PATH_GHOSTPCL_DLL_ALT2 + if (ghostscript_handle == NULL) + ghostscript_handle = dynld_module(PATH_GHOSTPCL_DLL_ALT2, ghostscript_imports); +# endif } #endif if (ghostscript_handle == NULL) {