dtsession: make it build, add check for the full path to xrdb
authorJon Trulson <jon@radscan.com>
Wed, 20 Nov 2019 00:18:04 +0000 (17:18 -0700)
committerJon Trulson <jon@radscan.com>
Wed, 20 Nov 2019 00:19:14 +0000 (17:19 -0700)
cde/configure.ac
cde/programs/dtsession/Makefile.am [new file with mode: 0644]
cde/programs/dtsession/dtloadresources.src

index 16a59358960a32921529c2aa2676c321dd6b0b48..8db888b7837a7d02d3e1799abfab4348ee6c3ddc 100644 (file)
@@ -153,7 +153,7 @@ AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
 
 dnl our main libraries
-dnl we use single quotes so that $top_builder is evaluated in the makefiles,
+dnl we use single quotes so that $top_buildir is evaluated in the makefiles,
 dnl not here.
 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.la')
@@ -196,10 +196,13 @@ AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
 RM="rm -f"
 AC_SUBST(RM)
 
+dnl these should be configurable someday...
+CDE_INSTALLATION_TOP="$ac_default_prefix"
 CDE_LOGFILES_TOP=/var/dt
 CDE_CONFIGURATION_TOP=/etc/dt
 CDE_USER_TOP=.dt
 
+AC_SUBST(CDE_INSTALLATION_TOP)
 AC_SUBST(CDE_CONFIGURATION_TOP)
 AC_SUBST(CDE_LOGFILES_TOP)
 AC_SUBST(CDE_USER_TOP)
@@ -243,10 +246,12 @@ AC_PATH_XTRA
 
 AC_FUNC_FORK
 
-dnl programs
+dnl programs with full paths
 
 AC_PATH_PROG(KSH, ksh)
+AC_PATH_PROG(XRDB, xrdb)
 
+dnl programs
 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
 AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
 AC_CHECK_PROGS(GZIP, gzip)
@@ -381,6 +386,8 @@ programs/dtwm/Makefile
 programs/dtlogin/Makefile
 programs/dtlogin/config/Makefile
 
+programs/dtsession/Makefile
+
 ])
 
 AC_OUTPUT
diff --git a/cde/programs/dtsession/Makefile.am b/cde/programs/dtsession/Makefile.am
new file mode 100644 (file)
index 0000000..72cbeff
--- /dev/null
@@ -0,0 +1,87 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+bin_PROGRAMS = dtsession
+
+dtsession_CFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
+          -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
+         -Ddtsession $(TIRPCINC)
+
+dtsession_SOURCES = SmMain.c SmHelp.c SmGlobals.c SmCommun.c           \
+       SmError.c SmProperty.c SmProtocol.c SmSave.c SmScreen.c         \
+       SmRestore.c SmUI.c SmWindow.c SmLock.c SrvPalette.c             \
+       SrvFile_io.c SmStrDefs.c SmConMgmt.c SmXSMP.c SmAuth.c          \
+       SmWatch.c SmProp.c SmDB.c OWsync.h SmGlobals.h SmProperty.h     \
+       SmScreen.h SmXSMP.h SmAuth.h Sm.h SmProp.h SmUI.h               \
+       SrvFile_io.h SmCommun.h SmHelp.h SmProtocol.h SmWatch.h Srv.h   \
+       SmConMgmt.h SmHftRing.h SmResource.h SmWindow.h SrvPalette.h    \
+       SmDB.h SmLock.h SmRestore.h SmXdef.h SmError.h                  \
+       SmMigResources.h SmSave.h SmXrm.h
+
+
+dtsession_LDADD = @DTCLIENTLIBS@ -lXm $(TIRPCLIB) $(XTOOLLIB)
+
+if SOLARIS
+dtsession_SOURCES += OWsync.c
+dtsession_LDADD += -lelf -ldl
+endif
+
+if LINUX
+dtsession_CFLAGS += -DUSE_X11SSEXT
+dtsession_LDADD += $(TIRPCLIB) -lXss -ldl -lcrypt
+endif
+
+if BSD
+dtsession_CFLAGS += -DUSE_X11SSEXT
+dtsession_LDADD +=  -lXss -lcrypt
+endif
+
+DTSM_CMD1 = $(CDE_INSTALLATION_TOP)/bin/dtaction OpenHomeDir
+DTSM_CMD2 = $(CDE_INSTALLATION_TOP)/bin/dtfile -dir ~ -geometry +700+0
+DTSM_CMD4 = $(CDE_INSTALLATION_TOP)/bin/dthelpview -helpVolume Intromgr
+DTSM_CMD5 = $(CDE_INSTALLATION_TOP)/bin/dtaction Dthelpgen_delay
+
+LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
+                   -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
+                   -DXRDB=$(XRDB) \
+                   -DKORNSHELL=$(KSH) \
+                   -DDTSM_CMD1="\"$(DTSM_CMD1)\"" \
+                   -DDTSM_CMD2="\"$(DTSM_CMD2)\"" \
+                   -DDTSM_CMD4="\"$(DTSM_CMD4)\"" \
+                   -DDTSM_CMD5="\"$(DTSM_CMD5)\""
+
+BUILT_SOURCES = Dtsession dtloadresources dtsession.msg sys.font       \
+       sys.resources sys.resources.ive sys.session sys.session.ive
+CLEANFILES = $(BUILT_SOURCES)
+
+Dtsession: Dtsession.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+
+dtloadresources: dtloadresources.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+       chmod 755 $@
+
+dtsession.msg: dtsession.msg.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+
+sys.font: sys.font.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+
+sys.resources: sys.resources.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+
+sys.resources.ive: sys.resources.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) -DIVE $< > $@
+
+sys.session: sys.session.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+
+sys.session.ive: sys.session.src
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) -DIVE $< > $@
index 69c05188c5b23edb5ec895c1e2faddf27462a8ed..bd033e40ed4d9c46a5ea03fa601743dc45b34858 100644 (file)
@@ -166,4 +166,4 @@ display=$(echo ${display%.*} | /usr/bin/tr ".:" "__")
   if [ ! -z "$resourceFiles" ]; then
     cat $resourceFiles
   fi
-) | XBINDIR/xrdb -quiet $xrdbOption -DDISPLAY_$display
+) | XRDB -quiet $xrdbOption -DDISPLAY_$display