From 1d7ed3a17eb0ea5d498dc44d4fa2a18c45ba70a8 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Wed, 23 Oct 2019 17:34:55 -0600 Subject: [PATCH] autotools: many fixups, SUN->SOLARIS, typos, etc This should allow an autoregen and ./confiure to work. We only generate Makefiles for lib/* and ./Makefile for now. We'll ad more as we go along. Make still fails as we need to figure out TT - tirpc lib, rpcgen, etc. But it's a start! --- cde/configure.ac | 66 ++++++++++++++++++++++++- cde/lib/DtHelp/Makefile.am | 4 +- cde/lib/DtPrint/Makefile.am | 2 +- cde/lib/DtSearch/Makefile.am | 2 +- cde/lib/DtSearch/raima/Makefile.am | 2 +- cde/lib/DtSvc/DtCodelibs/Makefile.am | 2 +- cde/lib/DtSvc/DtEncap/Makefile.am | 2 +- cde/lib/DtSvc/DtUtil1/Makefile.am | 4 +- cde/lib/DtSvc/DtUtil2/Makefile.am | 20 ++++---- cde/lib/DtTerm/Makefile.am | 4 +- cde/lib/DtWidget/Makefile.am | 15 +++--- cde/lib/Makefile.am | 2 +- cde/lib/csa/Makefile.am | 8 +-- cde/lib/tt/bin/dbck/Makefile.am | 4 +- cde/lib/tt/bin/scripts/Makefile.am | 3 +- cde/lib/tt/bin/shell/Makefile.am | 2 +- cde/lib/tt/bin/tt_type_comp/Makefile.am | 2 +- cde/lib/tt/bin/ttauth/Makefile.am | 2 +- cde/lib/tt/bin/ttdbserverd/Makefile.am | 2 +- cde/lib/tt/bin/ttsession/Makefile.am | 2 +- cde/lib/tt/bin/tttar/Makefile.am | 2 +- cde/lib/tt/bin/tttrace/Makefile.am | 2 +- cde/lib/tt/lib/Makefile.am | 4 +- cde/lib/tt/lib/mp/Makefile.am | 2 +- cde/lib/tt/tooltalk.tmpl | 2 - 25 files changed, 115 insertions(+), 47 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index c90c32a2..e3d6f536 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -4,6 +4,8 @@ AC_CONFIG_HEADERS([include/config.h]) AM_INIT_AUTOMAKE([foreign]) AC_PREFIX_DEFAULT(/usr/dt) +ACLOCAL_AMFLAGS = -I m4 --install + dnl todo: determine what version of autoconf we depend on dnl AC_PREREQ() @@ -135,7 +137,7 @@ AC_SUBST(LIBXIN) AC_SUBST(LIBWIDGET) AC_SUBST(LIBTERM) AC_SUBST(LIBSVC) -AC_SUSBT(LIBSEARCH) +AC_SUBST(LIBSEARCH) AC_SUBST(LIBPRINT) AC_SUBST(LIBMRM) AC_SUBST(LIBMMDB) @@ -194,4 +196,66 @@ AC_C_CONST AC_PATH_X AC_PATH_XTRA +dnl All of the makefile we need to generate go here... +AC_CONFIG_FILES([ +Makefile + +lib/Makefile + +lib/DtXinerama/Makefile + +lib/tt/Makefile +lib/tt/mini_isam/Makefile +lib/tt/slib/Makefile +lib/tt/lib/Makefile +lib/tt/lib/api/Makefile +lib/tt/lib/api/dnd/Makefile +lib/tt/lib/api/c/Makefile +lib/tt/lib/tttk/Makefile +lib/tt/lib/db/Makefile +lib/tt/lib/mp/Makefile +lib/tt/bin/Makefile +lib/tt/bin/shell/Makefile +lib/tt/bin/ttauth/Makefile +lib/tt/bin/scripts/Makefile +lib/tt/bin/tttar/Makefile +lib/tt/bin/tt_type_comp/Makefile +lib/tt/bin/tttrace/Makefile +lib/tt/bin/dbck/Makefile +lib/tt/bin/ttdbserverd/Makefile +lib/tt/bin/ttsession/Makefile + +lib/DtSvc/Makefile +lib/DtSvc/DtUtil1/Makefile +lib/DtSvc/DtUtil2/Makefile +lib/DtSvc/DtEncap/Makefile +lib/DtSvc/DtCodelibs/Makefile +lib/DtSvc/DtXpm/Makefile + +lib/DtSearch/Makefile +lib/DtSearch/raima/Makefile + +lib/DtWidget/Makefile + +lib/DtHelp/Makefile +lib/DtHelp/il/Makefile + +lib/DtPrint/Makefile + +lib/DtTerm/Term/Makefile +lib/DtTerm/Makefile +lib/DtTerm/TermView/Makefile +lib/DtTerm/util/Makefile +lib/DtTerm/TermPrim/Makefile + +lib/DtMrm/Makefile + +lib/csa/Makefile + +logs/Makefile + +programs/Makefile +]) + AC_OUTPUT + diff --git a/cde/lib/DtHelp/Makefile.am b/cde/lib/DtHelp/Makefile.am index 512ff50e..ebcc3263 100644 --- a/cde/lib/DtHelp/Makefile.am +++ b/cde/lib/DtHelp/Makefile.am @@ -10,7 +10,7 @@ libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \ libDtHelp_la_LIBADD = -ljpeg il/libil.la -if SUN +if SOLARIS libDtHelp_la_CFLAGS += -DICONV_INBUF_CONST=const -DLSB_BIT_ORDER libDtHelp_la_LIBADD += -lw -lgen -lm -lc $(XTOOLLIB) ${X_LIBS} endif @@ -53,4 +53,4 @@ libDtHelp_la_SOURCES = Actions.c AsciiSpc.c Callbacks.c \ Layout.c LayoutUtil.c LinkMgr.c \ Selection.c VirtFuncs.c -libDtMrm_la_LDFLAGS = -version-info 2:1:0 +libDtHelp_la_LDFLAGS = -version-info 2:1:0 diff --git a/cde/lib/DtPrint/Makefile.am b/cde/lib/DtPrint/Makefile.am index edb92b4d..64034965 100644 --- a/cde/lib/DtPrint/Makefile.am +++ b/cde/lib/DtPrint/Makefile.am @@ -4,7 +4,7 @@ lib_LTLIBRARIES = libDtPrint.la libDtPrint_la_CFLAGS = -DMULTIBYTE -DI18N_MSG -if SUN +if SOLARIS libDtPrint_la_CFLAGS += -DNO_REGCOMP endif diff --git a/cde/lib/DtSearch/Makefile.am b/cde/lib/DtSearch/Makefile.am index 23e2618e..5627d8b6 100644 --- a/cde/lib/DtSearch/Makefile.am +++ b/cde/lib/DtSearch/Makefile.am @@ -21,7 +21,7 @@ if BSD libDtSearch_la_CFLAGS += -DBYTE_SWAP endif -if SUN +if SOLARIS libDtSearch_la_CFLAGS += -DBYTE_SWAP libDtSearch_la_LIBADD += -lm -lc endif diff --git a/cde/lib/DtSearch/raima/Makefile.am b/cde/lib/DtSearch/raima/Makefile.am index 37490bd0..867c7f0d 100644 --- a/cde/lib/DtSearch/raima/Makefile.am +++ b/cde/lib/DtSearch/raima/Makefile.am @@ -16,7 +16,7 @@ if BSD libraima_la_CFLAGS += DBYTE_SWAP -D_XOPEN_SOURCE=700 endif -if SUN +if SOLARIS libraima_la_CFLAGS += -DBYTE_SWAP -D_XOPEN_SOURCE=500 -DNO_REGCOMP endif diff --git a/cde/lib/DtSvc/DtCodelibs/Makefile.am b/cde/lib/DtSvc/DtCodelibs/Makefile.am index 1aff5a18..b011260e 100644 --- a/cde/lib/DtSvc/DtCodelibs/Makefile.am +++ b/cde/lib/DtSvc/DtCodelibs/Makefile.am @@ -8,7 +8,7 @@ if AIX libDtCodelibs_la_CXXFLAGS = -qlanglvl=compat endif -if SUN +if SOLARIS libDtCodelibs_la_CXXFLAGS = -DNO_REGCOMP endif diff --git a/cde/lib/DtSvc/DtEncap/Makefile.am b/cde/lib/DtSvc/DtEncap/Makefile.am index c267b1bd..a28d96f9 100644 --- a/cde/lib/DtSvc/DtEncap/Makefile.am +++ b/cde/lib/DtSvc/DtEncap/Makefile.am @@ -7,7 +7,7 @@ libDtEncap_la_CFLAGS = -DMULTIBYTE -I../include -I../DtUtil2 $(TIRPCINC) \ -DCDE_INSTALLATION_TOP=\"${prefix}\" \ -DCDE_LOGFILES_TOP=\"$(CDE_LOGFILES_TOP)/tmp\" -if SUN +if SOLARIS libDtEncap_la_CFLAGS += -DNO_REGCOMP endif diff --git a/cde/lib/DtSvc/DtUtil1/Makefile.am b/cde/lib/DtSvc/DtUtil1/Makefile.am index 7324f2d6..726d09d1 100644 --- a/cde/lib/DtSvc/DtUtil1/Makefile.am +++ b/cde/lib/DtSvc/DtUtil1/Makefile.am @@ -6,12 +6,12 @@ libDtUtil1_la_CFLAGS = -I../include $(TIRPCINC) -DMULTIBYTE \ -DCDE_INSTALLATION_TOP=\"${prefix}\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -if SUN +if SOLARIS libDtUtil1_la_CFLAGS += -DNO_REGCOMP endif if HPUX -libDtUtil2_la_CFLAGS += -DMESSAGE_CAT +libDtUtil1_la_CFLAGS += -DMESSAGE_CAT endif libDtUtil1_la_SOURCES = Action.c ActionTt.c ActionDb.c ActionFind.c \ diff --git a/cde/lib/DtSvc/DtUtil2/Makefile.am b/cde/lib/DtSvc/DtUtil2/Makefile.am index 2b3c2554..27d962a7 100644 --- a/cde/lib/DtSvc/DtUtil2/Makefile.am +++ b/cde/lib/DtSvc/DtUtil2/Makefile.am @@ -6,15 +6,6 @@ libDtUtil2_la_CFLAGS = -DCDE_INSTALLATION_TOP=\"${prefix}\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \ -DMULTIBYTE -DUSE_XINERAMA $(TIRPCINC) -if SUN -libDtUtil2_la_SOURCES += SunDtHelp.c -libDtUtil2_la_CFLAGS += -I../../DtHelp -DNO_REGCOMP -endif - -if HPUX -libDtUtil2_la_CFLAGS += -DMESSAGE_CAT -endif - libDtUtil2_la_SOURCES = ChkpntClient.c ChkpntListen.c DtEnvMap.c \ DtNlUtils.c EnvControl.c FileUtil.c \ @@ -26,3 +17,14 @@ libDtUtil2_la_SOURCES = ChkpntClient.c ChkpntListen.c DtEnvMap.c \ XmWrap.c addToRes.c lock.c \ SvcTT.c MsgCat.c MsgLog.c \ LocaleXlate.c XlationSvc.c + +if SOLARIS +libDtUtil2_la_SOURCES += SunDtHelp.c +libDtUtil2_la_CFLAGS += -I../../DtHelp -DNO_REGCOMP +endif + +if HPUX +libDtUtil2_la_CFLAGS += -DMESSAGE_CAT +endif + + diff --git a/cde/lib/DtTerm/Makefile.am b/cde/lib/DtTerm/Makefile.am index 473a450c..1e99500d 100644 --- a/cde/lib/DtTerm/Makefile.am +++ b/cde/lib/DtTerm/Makefile.am @@ -6,14 +6,14 @@ lib_LTLIBRARIES = libDtTerm.la libDtTerm_la_SOURCES = -libDtTerm_la_LIBADD += Term/libTerm.la TermPrim/libTermPrim.la \ +libDtTerm_la_LIBADD = Term/libTerm.la TermPrim/libTermPrim.la \ TermView/libTermView.la if OPENBSD libDtTerm_la_LIBADD += -lutil endif -if SUN +if SOLARIS libDtTerm_la_LIBADD += -ldl -lgen endif diff --git a/cde/lib/DtWidget/Makefile.am b/cde/lib/DtWidget/Makefile.am index 82828d6a..ac099ec2 100644 --- a/cde/lib/DtWidget/Makefile.am +++ b/cde/lib/DtWidget/Makefile.am @@ -12,27 +12,29 @@ AM_CPPFLAGS = -DCDE_INSTALLATION_TOP=${prefix} libDtWidget_la_CFLAGS = -DI18N_MSG -DMULTIBYTE +libDtWidget_la_LDFLAGS = -version-info 2:1:0 + if LINUX libDtWidget_la_CFLAGS += -I/usr/include/freetype2 endif -if CSRG +if BSD libDtWidget_la_CFLAGS += -I$(x_includes)/freetype2 +endif + if NETBSD libDtWidget_la_CFLAGS += -I$(x_includes) endif -endif -if SUN +if SOLARIS libDtWidget_la_CFLAGS += -DNO_REGCOMP -libDtWidget_la_LIBADD += -lXm -lc -lw -lm -lintl +libDtWidget_la_LIBADD = -lXm -lc -lw -lm -lintl endif if HPUX libDtWidget_la_CFLAGS += -DMESSAGE_CAT endif -libDtWidget_la_LIBADD += -version-info 2:1:0 libDtWidget_la_SOURCES = ComboBox.c Control.c DialogBox.c \ DtMsgs.c DtStrDefs.c EditAreaData.c \ @@ -43,4 +45,5 @@ libDtWidget_la_SOURCES = ComboBox.c Control.c DialogBox.c \ CPPTARGET = UNIXbindings CPPSRC = UNIXbindings.cpp -include $(srcdir)/include/cppfile.tmpl +# FIXME +#include $(srcdir)/include/cppfile.tmpl diff --git a/cde/lib/Makefile.am b/cde/lib/Makefile.am index 8cc11cd2..e0a6ffe8 100644 --- a/cde/lib/Makefile.am +++ b/cde/lib/Makefile.am @@ -1,4 +1,4 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = DtXinerama tt DtSvc DtSearch DtWidget DtHelp DtPrint DtTerm \ - DtMrm DtMmdb csa + DtMrm csa diff --git a/cde/lib/csa/Makefile.am b/cde/lib/csa/Makefile.am index 7f8c33e2..7f69cdf3 100644 --- a/cde/lib/csa/Makefile.am +++ b/cde/lib/csa/Makefile.am @@ -12,9 +12,9 @@ libcsa_la_CFLAGS = -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N $(TIRPCINC) libcsa_la_LIBADD = -lXt $(TIRPCLIB) -libDtMrm_la_LDFLAGS = -version-info 2:1:0 +libcsa_la_LDFLAGS = -version-info 2:1:0 -if SUN +if SOLARIS libcsa_la_LDFLAGS += -G -z text -z defs libcsa_la_CFLAGS += -v endif @@ -51,7 +51,7 @@ libcsa_la_SOURCES = agent.c agent_xdr.c api.c \ table.c updateattrs.c xtclient.c \ ansi_c.c -.SUFFIXES: .y +SUFFIXES = .y .y.c: $(YACC) -d $(YFLAGS) $< @@ -82,4 +82,4 @@ agent.h: rpcgen -h agent.x | $(SED) -f namechange1.sed | $(SED) -f namechange2.sed >> agent.h cat agent.wrapend >> agent.h -.SUFFIXES: .x +SUFFIXES = .x diff --git a/cde/lib/tt/bin/dbck/Makefile.am b/cde/lib/tt/bin/dbck/Makefile.am index 8af3b994..f5aa4956 100644 --- a/cde/lib/tt/bin/dbck/Makefile.am +++ b/cde/lib/tt/bin/dbck/Makefile.am @@ -10,7 +10,7 @@ if LINUX ttdbck_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS ttdbck_LDADD += $(XTOOLLIB) endif @@ -18,7 +18,7 @@ if OPENBSD ttdbck_LDADD += $(XTOOLLIB) endif -ttdbck_CXXFLAGS += $(TIRPCINC) -I../../slib -I../../lib -I../../mini_isam \ +ttdbck_CXXFLAGS = $(TIRPCINC) -I../../slib -I../../lib -I../../mini_isam \ $(TT_VERSION_DEFINE) ttdbck_SOURCES = binkey.C binkey_utils.C common.C \ diff --git a/cde/lib/tt/bin/scripts/Makefile.am b/cde/lib/tt/bin/scripts/Makefile.am index 848b390e..71c23e59 100644 --- a/cde/lib/tt/bin/scripts/Makefile.am +++ b/cde/lib/tt/bin/scripts/Makefile.am @@ -11,4 +11,5 @@ all:: ttce2xdr CPPTARGET = ttce2xdr CPPSRC = ttce2xdr.cpp -include $(srcdir)/include/cppfile.tmpl +# FIXME - need solution here +# include $(srcdir)/include/cppfile.tmpl diff --git a/cde/lib/tt/bin/shell/Makefile.am b/cde/lib/tt/bin/shell/Makefile.am index 6986d072..f8297423 100644 --- a/cde/lib/tt/bin/shell/Makefile.am +++ b/cde/lib/tt/bin/shell/Makefile.am @@ -12,7 +12,7 @@ if LINUX AM_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS AM_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/tt_type_comp/Makefile.am b/cde/lib/tt/bin/tt_type_comp/Makefile.am index 6b3b312a..9e1ac539 100644 --- a/cde/lib/tt/bin/tt_type_comp/Makefile.am +++ b/cde/lib/tt/bin/tt_type_comp/Makefile.am @@ -13,7 +13,7 @@ if LINUX tt_type_comp_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS tt_type_comp_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/ttauth/Makefile.am b/cde/lib/tt/bin/ttauth/Makefile.am index 52e661a4..9a40adc1 100644 --- a/cde/lib/tt/bin/ttauth/Makefile.am +++ b/cde/lib/tt/bin/ttauth/Makefile.am @@ -10,7 +10,7 @@ if LINUX ttauth_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS ttauth_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/ttdbserverd/Makefile.am b/cde/lib/tt/bin/ttdbserverd/Makefile.am index 8df2dcdf..5b6507b0 100644 --- a/cde/lib/tt/bin/ttdbserverd/Makefile.am +++ b/cde/lib/tt/bin/ttdbserverd/Makefile.am @@ -12,7 +12,7 @@ if LINUX rpc_ttdbserver_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS rpc_ttdbserver_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/ttsession/Makefile.am b/cde/lib/tt/bin/ttsession/Makefile.am index d79c2fee..d936bafc 100644 --- a/cde/lib/tt/bin/ttsession/Makefile.am +++ b/cde/lib/tt/bin/ttsession/Makefile.am @@ -12,7 +12,7 @@ if LINUX ttsession_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS ttsession_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/tttar/Makefile.am b/cde/lib/tt/bin/tttar/Makefile.am index 39d3c976..40304e67 100644 --- a/cde/lib/tt/bin/tttar/Makefile.am +++ b/cde/lib/tt/bin/tttar/Makefile.am @@ -10,7 +10,7 @@ if LINUX tttar_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS tttar_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/bin/tttrace/Makefile.am b/cde/lib/tt/bin/tttrace/Makefile.am index df5d4a7d..3803998b 100644 --- a/cde/lib/tt/bin/tttrace/Makefile.am +++ b/cde/lib/tt/bin/tttrace/Makefile.am @@ -12,7 +12,7 @@ if LINUX tttrace_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif -if SUN +if SOLARIS tttrace_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl endif diff --git a/cde/lib/tt/lib/Makefile.am b/cde/lib/tt/lib/Makefile.am index f90073a0..9dd0b7f8 100644 --- a/cde/lib/tt/lib/Makefile.am +++ b/cde/lib/tt/lib/Makefile.am @@ -17,8 +17,8 @@ endif libtt_la_LIBADD = api/c/libapi.la api/dnd/libdnd.la db/libdb.la mp/libmp.la \ tttk/libtttk.la -if SUN +if SOLARIS libtt_la_LIBADD += -lnsl -lsocket -lintl -ldl -lc -lw endif -libDtMrm_la_LDFLAGS = -version-info 2:1:0 +libtt_la_LDFLAGS = -version-info 2:1:0 diff --git a/cde/lib/tt/lib/mp/Makefile.am b/cde/lib/tt/lib/mp/Makefile.am index 4c5a07fd..68187735 100644 --- a/cde/lib/tt/lib/mp/Makefile.am +++ b/cde/lib/tt/lib/mp/Makefile.am @@ -6,7 +6,7 @@ noinst_LTLIBRARIES = libmp.la libmp_la_CXXFLAGS = $(TIRPCINC) -I../../lib -I../../mini_isam -libmpa_la_SOURCES = mp_arg.C mp_arg_utils.C mp_auth.C \ +libmp_la_SOURCES = mp_arg.C mp_arg_utils.C mp_auth.C \ mp_auth_functions.C mp_c_file.C \ mp_c_file_utils.C mp_c_message.C mp_c_message_utils.C \ mp_c_mp.C mp_c_msg_context.C mp_c_msg_context_utils.C \ diff --git a/cde/lib/tt/tooltalk.tmpl b/cde/lib/tt/tooltalk.tmpl index b23edbbc..698a4b06 100644 --- a/cde/lib/tt/tooltalk.tmpl +++ b/cde/lib/tt/tooltalk.tmpl @@ -25,8 +25,6 @@ XCOMM Enable TIRPC for linux hosts with the option enabled #ifdef LinuxArchitecture # if HasTIRPCLib TIRPC_DEFINES = -DOPT_TIRPC -# else -TIRPC_DEFINES = # endif #endif -- 2.25.1