From 1bb40f1f0bfbf0da1400f1489c777511afb20ddd Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 9 Aug 2012 12:11:13 -0600 Subject: [PATCH] This adds the basic config bits needed for OpenBSD. Patch from Pascal Stumpf Most is just copied from the existing imake installation in /usr/X11R6. Additionally: * Allow overriding CDESharedRev, X11ProjectRoot and ProjectRoot * Add a new define to be able to override MINCLUDESRC too (this allows me to build CDE without symlinking any include directories) --- cde/config/cf/Imake.cf | 116 ++++++++++++++++++++++ cde/config/cf/Imake.tmpl | 4 - cde/config/cf/Motif.tmpl | 9 +- cde/config/cf/bsdLib.tmpl | 20 ++++ cde/config/cf/cde.tmpl | 2 + cde/config/cf/site.def | 4 + cde/programs/dtinfo/tools/config/Imake.cf | 116 ++++++++++++++++++++++ cde/programs/dtinfo/tools/config/cde.tmpl | 2 + cde/programs/dtinfo/tools/config/site.def | 4 + 9 files changed, 271 insertions(+), 6 deletions(-) diff --git a/cde/config/cf/Imake.cf b/cde/config/cf/Imake.cf index 3c57d219..923dfae2 100644 --- a/cde/config/cf/Imake.cf +++ b/cde/config/cf/Imake.cf @@ -51,6 +51,122 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ # undef i386 #endif /* bsdi */ +#ifdef __OpenBSD__ +# undef __OpenBSD__ +# undef __NetBSD__ +# define OpenBSDArchitecture +# define KOpenBSDArchitecture +# define MacroIncludeFile +# define MacroFile OpenBSD.cf +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc__) || defined(sparc) +# if !defined(__arch64__) +# define SparcArchitecture +# else +# define Sparc64Architecture +# endif +# undef sparc +# undef sparc64 +# endif +# if defined(__mips__) || defined(mips) +# define MipsArchitecture +# ifdef __LP64__ +# define Mips64Architecture +# endif +# ifdef arc +# define ArcArchitecture +# undef arc +# endif +# ifdef sgi +# define SGIArchitecture +# undef sgi +# endif +# ifdef pmax +# define PmaxArchitecture +# undef pmax +# endif +# undef mips +# undef __mips__ +# endif +# if defined(__alpha__) || defined(alpha) +# define AlphaArchitecture +# undef __alpha__ +# undef alpha +# endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif +# if defined(__arm__) +# define Arm32Architecture +# undef __arm__ +# if defined(zaurus) +# undef zaurus +# define ZaurusArchitecture +# endif +# endif +# if defined(__mc68020__) || defined(mc68020) +# define Mc68020Architecture +# if defined(amiga) +# define AmigaArchitecture +# undef amiga +# endif +# if defined(hp300) +# define Hp300Architecture +# undef hp300 +# endif +# if defined(mac68k) +# define Mac68kArchitecture +# undef mac68k +# endif +# if defined(mvme68k) +# define Mvme68kArchitecture +# undef mvme68k +# endif +# if defined(sun3) +# define Sun3Architecture +# undef sun3 +# endif +# undef mc68000 +# endif +# if defined(__m88k__) || defined(m88k) +# define Mc88000Architecture +# undef m88k +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# undef __macppc__ +# undef macppc +# endif +# ifdef __sh__ +# undef __sh__ +# define SuperHArchitecture +# endif +# ifdef __vax__ +# undef vax +# undef __vax__ +# define VaxArchitecture +# endif +# ifdef __hppa__ +# ifndef HPArchitecture +# define HPArchitecture +# endif +# undef __hppa__ +# endif /* __hppa__ */ +#endif /* OpenBSD */ + +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + #ifdef __NetBSD__ # define MacroIncludeFile # define MacroFile NetBSD.cf diff --git a/cde/config/cf/Imake.tmpl b/cde/config/cf/Imake.tmpl index 3338283f..080f4e96 100644 --- a/cde/config/cf/Imake.tmpl +++ b/cde/config/cf/Imake.tmpl @@ -241,11 +241,7 @@ XCOMM the platform-specific parameters - edit site.def to change #define HasFortran NO #endif #ifndef HasCplusplus -#if HasGcc2ForCplusplus #define HasCplusplus YES -#else -#define HasCplusplus NO -#endif #endif #ifndef HasNdbm #define HasNdbm NO diff --git a/cde/config/cf/Motif.tmpl b/cde/config/cf/Motif.tmpl index 6873de63..abde63c6 100644 --- a/cde/config/cf/Motif.tmpl +++ b/cde/config/cf/Motif.tmpl @@ -442,12 +442,17 @@ TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC) /* MTOOLKITSRC should be removed */ MTOOLKITSRC = $(TOOLKITSRC) #if ImportMotif || UseInstalledMotif - MINCLUDESRC = $(MTOP)/include MDOCSRC = $(MTOP)/doc MLOCSRC = $(MTOP)/localized #else - MINCLUDESRC = $(MTOP)/exports/include MLOCSRC = $(MTOP)/exports/localized +#endif +#if defined(TopMotifInclude) + MINCLUDESRC = TopMotifInclude +#elif ImportMotif || UseInstalledMotif + MINCLUDESRC = $(MTOP)/include +#else + MINCLUDESRC = $(MTOP)/exports/include #endif MLIBSRC = $(MTOP)/lib MCLIENTSRC = $(MTOP)/clients diff --git a/cde/config/cf/bsdLib.tmpl b/cde/config/cf/bsdLib.tmpl index 1c1d610b..29ff0d65 100644 --- a/cde/config/cf/bsdLib.tmpl +++ b/cde/config/cf/bsdLib.tmpl @@ -13,3 +13,23 @@ XCOMM $XConsortium: bsdLib.tmpl /main/3 1996/09/28 16:09:25 rws $ #ifndef SharedXmuReqs #define SharedXmuReqs $(LDPRELIBS) $(XTOOLONLYLIB) $(XONLYLIB) #endif + +#ifndef SharedXReqs +# define SharedXReqs $(XTOOLLIB) $(XLIB) $(LDPOSTLIBS) +#endif + +#ifndef SharedXmReqs +# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lc +#endif + +#ifndef SharedTtReqs +# define SharedTtReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) +#endif + +#ifndef SharedDtSvcReqs +# define SharedDtSvcReqs $(LDPRELIBS) SharedXReqs $(CXXLIB) +#endif + +#ifndef SharedCsaReqs +# define SharedCsaReqs -lXt $(LDPOSTLIBS) +#endif diff --git a/cde/config/cf/cde.tmpl b/cde/config/cf/cde.tmpl index 5dfa301b..a627226e 100644 --- a/cde/config/cf/cde.tmpl +++ b/cde/config/cf/cde.tmpl @@ -35,7 +35,9 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $ # endif #endif +#ifndef CDESharedRev #define CDESharedRev 2.1 +#endif #ifndef SharedLibPam # define SharedLibPam HasSharedLibraries diff --git a/cde/config/cf/site.def b/cde/config/cf/site.def index 2cdc401c..9404bd93 100644 --- a/cde/config/cf/site.def +++ b/cde/config/cf/site.def @@ -66,13 +66,17 @@ XCOMM site: $TOG: site.def /main/23 1998/03/19 18:43:26 mgreess $ #ifdef AfterVendorCF +#ifndef X11ProjectRoot # if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) # define X11ProjectRoot /usr # else # define X11ProjectRoot /X11 # endif +#endif +#ifndef ProjectRoot # define ProjectRoot /usr/dt +#endif #ifdef SunArchitecture # define DtLocalesToBuild de_DE.ISO8859-1 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-1 diff --git a/cde/programs/dtinfo/tools/config/Imake.cf b/cde/programs/dtinfo/tools/config/Imake.cf index b1c2ac65..42c021d4 100644 --- a/cde/programs/dtinfo/tools/config/Imake.cf +++ b/cde/programs/dtinfo/tools/config/Imake.cf @@ -51,6 +51,122 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $ # undef i386 #endif /* bsdi */ +#ifdef __OpenBSD__ +# undef __OpenBSD__ +# undef __NetBSD__ +# define OpenBSDArchitecture +# define KOpenBSDArchitecture +# define MacroIncludeFile +# define MacroFile OpenBSD.cf +# ifdef __i386__ +# define i386BsdArchitecture +# define i386Architecture +# undef i386 +# endif +# if defined(__sparc__) || defined(sparc) +# if !defined(__arch64__) +# define SparcArchitecture +# else +# define Sparc64Architecture +# endif +# undef sparc +# undef sparc64 +# endif +# if defined(__mips__) || defined(mips) +# define MipsArchitecture +# ifdef __LP64__ +# define Mips64Architecture +# endif +# ifdef arc +# define ArcArchitecture +# undef arc +# endif +# ifdef sgi +# define SGIArchitecture +# undef sgi +# endif +# ifdef pmax +# define PmaxArchitecture +# undef pmax +# endif +# undef mips +# undef __mips__ +# endif +# if defined(__alpha__) || defined(alpha) +# define AlphaArchitecture +# undef __alpha__ +# undef alpha +# endif +# if defined(__amd64__) || defined(__x86_64__) +# define AMD64Architecture +# undef __amd64__ +# undef __x86_64__ +# undef amd64 +# endif +# if defined(__arm__) +# define Arm32Architecture +# undef __arm__ +# if defined(zaurus) +# undef zaurus +# define ZaurusArchitecture +# endif +# endif +# if defined(__mc68020__) || defined(mc68020) +# define Mc68020Architecture +# if defined(amiga) +# define AmigaArchitecture +# undef amiga +# endif +# if defined(hp300) +# define Hp300Architecture +# undef hp300 +# endif +# if defined(mac68k) +# define Mac68kArchitecture +# undef mac68k +# endif +# if defined(mvme68k) +# define Mvme68kArchitecture +# undef mvme68k +# endif +# if defined(sun3) +# define Sun3Architecture +# undef sun3 +# endif +# undef mc68000 +# endif +# if defined(__m88k__) || defined(m88k) +# define Mc88000Architecture +# undef m88k +# endif +# ifdef __powerpc__ +# define PpcArchitecture +# undef __powerpc__ +# undef __macppc__ +# undef macppc +# endif +# ifdef __sh__ +# undef __sh__ +# define SuperHArchitecture +# endif +# ifdef __vax__ +# undef vax +# undef __vax__ +# define VaxArchitecture +# endif +# ifdef __hppa__ +# ifndef HPArchitecture +# define HPArchitecture +# endif +# undef __hppa__ +# endif /* __hppa__ */ +#endif /* OpenBSD */ + +/* Systems based on kernel of OpenBSD */ +#if defined(__OpenBSD_kernel__) +#define KOpenBSDArchitecture +#endif + #ifdef __NetBSD__ # define MacroIncludeFile # define MacroFile NetBSD.cf diff --git a/cde/programs/dtinfo/tools/config/cde.tmpl b/cde/programs/dtinfo/tools/config/cde.tmpl index 5dfa301b..a627226e 100644 --- a/cde/programs/dtinfo/tools/config/cde.tmpl +++ b/cde/programs/dtinfo/tools/config/cde.tmpl @@ -35,7 +35,9 @@ XCOMM $XConsortium: cde.tmpl /main/2 1996/12/04 10:13:09 swick $ # endif #endif +#ifndef CDESharedRev #define CDESharedRev 2.1 +#endif #ifndef SharedLibPam # define SharedLibPam HasSharedLibraries diff --git a/cde/programs/dtinfo/tools/config/site.def b/cde/programs/dtinfo/tools/config/site.def index 75ef9d1c..51a44d63 100644 --- a/cde/programs/dtinfo/tools/config/site.def +++ b/cde/programs/dtinfo/tools/config/site.def @@ -81,8 +81,12 @@ XCOMM site: $TOG: site.def /main/26 1997/09/05 11:31:50 samborn $ # endif # endif +#ifndef X11ProjectRoot # define X11ProjectRoot /X11 +#endif +#ifndef ProjectRoot # define ProjectRoot /usr/dt +#endif #endif /* AfterVendorCF */ -- 2.25.1