summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in1
-rw-r--r--base/unixlink.mak8
-rw-r--r--configure.ac3
-rw-r--r--gpdl/gpdl.mak11
-rw-r--r--psi/msvc.mak9
5 files changed, 25 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index adfc8bbf9..469e4e93e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -355,6 +355,7 @@ SURFX_H=@SURFX_H@
# Do we have SmartOffice support?
ENABLE_SO=@ENABLESO@
GPDL_SO_TOP_OBJ=@GPDL_SO_TOP_OBJ@
+SO_PDFEXPORT_LIB=@SO_PDFEXPORT_LIB@
EXPATSRCDIR=@EXPATDIR@
EXPAT_CFLAGS=@EXPAT_CFLAGS@ @XML_HIDDEN_CFLAGS@
diff --git a/base/unixlink.mak b/base/unixlink.mak
index be5d82265..0eea5cf8a 100644
--- a/base/unixlink.mak
+++ b/base/unixlink.mak
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2021 Artifex Software, Inc.
+# Copyright (C) 2001-2022 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
@@ -122,7 +122,7 @@ $(GXPS_A_XE): $(GXPS_A) $(REALMAIN_OBJ)
libgpdl_tr=$(GLOBJ)libgpdl.tr
GPDL_A=$(BINDIR)$(D)$(GPDL).a
-$(GPDL_A): $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(MAIN_OBJ) \
+$(GPDL_A): $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(SO_TOP_OBJ) $(MAIN_OBJ) \
$(XOBJS) $(GLOBJDIR)/pdlromfs$(COMPILE_INITS).$(OBJ) \
$(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c0.$(OBJ) \
$(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c1.$(OBJ) \
@@ -133,7 +133,7 @@ $(GPDL_A): $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ
$(UNIXLINK_MAK)
rm -f $(GPDL_A)
$(ECHOGS_XE) -w $(libgpdl_tr) -n - $(AR) $(ARFLAGS) $(GPDL_A)
- $(ECHOGS_XE) -a $(libgpdl_tr) -n -s $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(XOBJS) -s
+ $(ECHOGS_XE) -a $(libgpdl_tr) -n -s $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(SO_TOP_OBJ) $(SO_PDFEXPORT_LIB) $(XOBJS) -s
$(ECHOGS_XE) -a $(libgpdl_tr) -n -s $(GLOBJDIR)/pdlromfs$(COMPILE_INITS).$(OBJ) -s
$(ECHOGS_XE) -a $(libgpdl_tr) -n -s $(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c0.$(OBJ) -s
$(ECHOGS_XE) -a $(libgpdl_tr) -n -s $(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c1.$(OBJ) -s
@@ -258,7 +258,7 @@ $(GPDL_XE): $(ld_tr) $(gpdl_tr) $(INT_ARCHIVE_ALL) $(REALMAIN_OBJ) $(MAIN_OBJ) \
$(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c3.$(OBJ) \
$(PSINT_ARCHIVE_ALL) $(UNIXLINK_MAK)
$(ECHOGS_XE) -w $(gpdlldt_tr) -n - $(CCLD) $(PDL_LDFLAGS) $(XLIBDIRS) -o $(GPDL_XE)
- $(ECHOGS_XE) -a $(gpdlldt_tr) -n -s $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PDF_TOP_OBJ) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(XOBJS) -s
+ $(ECHOGS_XE) -a $(gpdlldt_tr) -n -s $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PDF_TOP_OBJ) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(SO_TOP_OBJ) $(SO_PDFEXPORT_LIB) $(XOBJS) -s
cat $(gpdlld_tr) >> $(gpdlldt_tr)
$(ECHOGS_XE) -a $(gpdlldt_tr) -n -s - $(GLOBJDIR)/pdlromfs$(COMPILE_INITS).$(OBJ)
$(ECHOGS_XE) -a $(gpdlldt_tr) -n -s - $(GLOBJDIR)/pdlromfs$(COMPILE_INITS)c0.$(OBJ)
diff --git a/configure.ac b/configure.ac
index 33ae7515b..f1e11940b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2188,11 +2188,14 @@ if test x$with_so != xno; then
AC_MSG_RESULT([yes])
ENABLESO="\$(D_)SO_INCLUDED\$(_D)"
GPDL_SO_TOP_OBJ="\$(GPDLOBJ)/\$(GPDL_SO_TOP_OBJ_FILE)"
+ # This will do for now, though clearly it's not ideal.
+ SO_PDFEXPORT_LIB="\$(SOSRCDIR)/lib/linux/x64/smart-office-lib.a"
fi
fi
AC_SUBST(ENABLESO)
AC_SUBST(GPDL_SO_TOP_OBJ)
+AC_SUBST(SO_PDFEXPORT_LIB)
AC_ARG_WITH([cal], AS_HELP_STRING([--without-cal],
[do not try to use the CAL library for acceleration]))
diff --git a/gpdl/gpdl.mak b/gpdl/gpdl.mak
index 899716e36..28183f8e2 100644
--- a/gpdl/gpdl.mak
+++ b/gpdl/gpdl.mak
@@ -76,7 +76,9 @@ LANG_CFLAGS=\
$(D_)PNG_INCLUDED$(_D)\
$(ENABLE_SO)\
-GPDLCC=$(CC_) $(LANG_CFLAGS) $(I_)$(PSSRCDIR)$(_I) $(I_)$(PLSRCDIR)$(_I) $(I_)$(GLSRCDIR)$(_I) $(I_)$(DEVSRCDIR)$(_I) $(I_)$(GLGENDIR)$(_I) $(C_)
+GPDL_CFLAGS=$(LANG_CFLAGS) $(I_)$(PSSRCDIR)$(_I) $(I_)$(PLSRCDIR)$(_I) $(I_)$(GLSRCDIR)$(_I) $(I_)$(DEVSRCDIR)$(_I) $(I_)$(GLGENDIR)$(_I) $(C_)
+
+GPDLCC=$(CC_) $(GPDL_CFLAGS)
GPDLJB2CC=$(CC) $(LANG_CFLAGS) $(I_)$(LDF_JB2I_) $(JBIG2_CFLAGS) $(II)$(JB2I_)$(_I) $(I_)$(PSSRCDIR)$(_I) $(I_)$(PLSRCDIR)$(_I) \
$(I_)$(GLSRCDIR)$(_I) $(I_)$(DEVSRCDIR)$(_I) $(I_)$(GLGENDIR)$(_I) $(CCFLAGS) $(C_)
@@ -111,10 +113,15 @@ $(GPDLOBJ)/$(GPDL_URF_TOP_OBJ_FILE): $(GPDLURFSRC)urftop.c $(AK)\
# Note that we don't use $(GPDL_SO_TOP_OBJ) as the target of the
# next make rule, as this expands to "" in builds that don't use
# SO.
+# sotop.c uses windows.h on windows. This requires that /Za not be
+# used (as this disables Microsoft extensions, which breaks windows.h).
+# GLCC has the /Za pickled into it on windows, so we can't use GLCC.
+# Therefore use our own compiler invocation.
+SOTOP_CC=$(CC) $(GENOPT) $(GLINCLUDES) $(CFLAGS) $(GPDL_CFLAGS)
$(GPDLOBJ)/$(GPDL_SO_TOP_OBJ_FILE): $(GPDLSOSRC)sotop.c $(AK)\
$(gxdevice_h) $(gserrors_h) $(gsstate_h) $(strimpl_h)\
$(gscoord_h) $(pltop_h) $(gsicc_manage_h) $(gspaint_h) $(plmain_h)
- $(GPDLCC) $(GPDLSOSRC)sotop.c $(GPDLO_)$(GPDL_SO_TOP_OBJ_FILE)
+ $(SOTOP_CC) $(GPDLSOSRC)sotop.c $(GPDLO_)$(GPDL_SO_TOP_OBJ_FILE)
$(GPDL_JPG_TOP_OBJ): $(GPDLSRC)jpgtop.c $(AK)\
$(gxdevice_h) $(gserrors_h) $(gsstate_h) $(strimpl_h) $(gscoord_h)\
diff --git a/psi/msvc.mak b/psi/msvc.mak
index f6f186f2b..c9c22baf6 100644
--- a/psi/msvc.mak
+++ b/psi/msvc.mak
@@ -708,6 +708,11 @@ WITH_SO=0
ENABLE_SO=$(D_)SO_INCLUDED$(_D)
GPDL_SO_TOP_OBJ=$(GPDLOBJ)/$(GPDL_SO_TOP_OBJ_FILE)
SO_INCLUDE=$(I_)$(SOSRCDIR)$(_I)
+!ifdef WIN64
+SO_PDFEXPORT_LIB=$(SOSRCDIR)/lib/win/x64/smart-office-lib.lib winmm.lib
+!else
+SO_PDFEXPORT_LIB=$(SOSRCDIR)/lib/win/x86/smart-office-lib.lib winmm.lib
+!endif
!endif
@@ -2136,6 +2141,7 @@ $(GPDLDLL_DLL): $(ECHOGS_XE) $(GSDLL_OBJ).res $(LIBCTR) $(LIB_ALL) $(PCL_DEVS_AL
echo Linking $(GPDLDLL) $(GPDLDLL_DLL) $(METRO)
copy $(gpdlld_tr) $(GPDLGEN)gpdlwin.tr
echo $(MAIN_OBJ) $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(XOBJS) >> $(GPDLGEN)gpdlwin.tr
+ echo $(SO_PDFEXPORT_LIB) >> $(GPDLGEN)gpdlwin.tr
echo $(PCLOBJ)pdlromfs$(COMPILE_INITS).$(OBJ) >> $(GPDLGEN)gpdlwin.tr
echo $(PCLOBJ)pdlromfs$(COMPILE_INITS)c0.$(OBJ) >> $(GPDLGEN)gpdlwin.tr
echo $(PCLOBJ)pdlromfs$(COMPILE_INITS)c1.$(OBJ) >> $(GPDLGEN)gpdlwin.tr
@@ -2161,7 +2167,7 @@ $(GPDL_XE): $(GPDLDLL_DLL) $(DWMAINOBJS) $(GS_OBJ).res $(TOP_MAKEFILES)
echo /wholearchive:clang_rt.asan_cxx-i386.lib >> $(GPDLGEN)gpdlwin.rsp
!endif
echo /OUT:$(GPDL_XE) >> $(GPDLGEN)gpdlwin.rsp
- $(LINK) $(LCT) @$(GPDLGEN)gpdlwin.rsp $(DWMAINOBJS) $(BINDIR)\$(GPDLDLL).lib $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res
+ $(LINK) $(LCT) @$(GPDLGEN)gpdlwin.rsp $(DWMAINOBJS) $(BINDIR)\$(GPDLDLL).lib $(SO_PDFEXPORT_LIB) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res
del $(GPDLGEN)gpdlwin.rsp
@@ -2275,6 +2281,7 @@ $(GPDL_XE): $(ECHOGS_XE) $(ld_tr) $(gpdl_tr) $(LIBCTR) $(LIB_ALL) $(WINMAINOBJS)
copy $(gpdlld_tr) $(GPDLGEN)gpdlwin.tr
echo $(WINMAINOBJS) $(MAIN_OBJ) $(GPDL_PSI_TOP_OBJS) $(PCL_PXL_TOP_OBJS) $(PSI_TOP_OBJ) $(XPS_TOP_OBJ) $(PDF_TOP_OBJ) $(XOBJS) >> $(GPDLGEN)gpdlwin.tr
echo $(PCLOBJ)pdlromfs$(COMPILE_INITS).$(OBJ) >> $(GPDLGEN)gpdlwin.tr
+ echo $(SO_PDFEXPORT_LIB) >> $(GPDLGEN)gpdlwin.tr
echo /SUBSYSTEM:CONSOLE$(SUBSUBSYS) > $(GPDLGEN)gpdlwin.rsp
!if "$(PROFILE)"=="1"
echo /Profile >> $(PSGEN)gpdlwin.rsp