1 XCOMM platform: $TOG: FreeBSD.cf /main/18 1997/06/12 07:40:35 kaleb $
2 XCOMM platform: $XFree86: xc/config/cf/FreeBSD.cf,v 3.58.2.11 1998/03/01 01:08:59 dawes Exp $
5 #define OSName DefaultOSName
10 #ifndef OSMajorVersion
11 #define OSMajorVersion DefaultOSMajorVersion
13 #ifndef OSMinorVersion
14 #define OSMinorVersion DefaultOSMinorVersion
16 #ifndef OSTeenyVersion
17 #define OSTeenyVersion DefaultOSTeenyVersion
19 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
23 #define HasCplusplus YES
24 #define HasGcc2ForCplusplus YES
25 #define GccUsesGas YES
30 #define HasSnprintf YES
31 #define HasBSD44Sockets YES
33 # define HasLibCrypt YES
38 #define HasWChar32 YES
40 #define AvoidNullMakeCommand YES
41 #define StripInstalledPrograms YES
42 #define CompressAllFonts YES
43 #define Malloc0ReturnsNull YES
44 #define NeedConstPrototypes YES
45 #define NeedFunctionPrototypes YES
46 #define NeedNestedPrototypes YES
47 #define NeedVarargsPrototypes YES
48 #define NeedWidePrototypes NO
50 #define MkdirHierCmd mkdir -p
53 #define CppCmd /usr/libexec/cpp
54 #define PreProcessCmd CppCmd
55 #define StandardCppDefines -traditional
56 #if defined(UseInstalled) && (!defined(XF86LinkKit) || !XF86LinkKit)
57 #define DefaultCCOptions /**/
59 #define DefaultCCOptions -ansi -pedantic -Dasm=__asm
61 #ifndef ExtraLibraries
62 #define ExtraLibraries /**/
65 /* 2.2 doesn't really have GnuMalloc */
66 #if OSMajorVersion < 2 || (OSMajorVersion == 2 && OSMinorVersion < 2)
67 #define UseGnuMalloc YES
69 #define UseGnuMalloc NO
73 /* 2.2.2 and later has setusercontext() */
74 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 2) || \
75 (OSMajorVersion == 2 && OSMinorVersion == 2 && OSTeenyVersion >= 2)
76 #define HasSetUserContext YES
80 * This doesn't work the way it does on every other system. On FreeBSD it's
81 * only a "hint, not a demand", whatever that means. Note that this is not
82 * what it says in the ld and ld.so man pages, which are rather vague on the
85 * But we do know that if a) you do what the X Project team does and set your
86 * ProjectRoot to something like "/X11", and b) you have other X libraries,
87 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
88 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
89 * find that ld.so ignores the "hint" at runtime and loads the libraries in
90 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
91 * the run-path is only used as a last resort to find the libraries, after
92 * the LD_LIBRARY_PATH and ld.so.cache.
94 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
95 * path on other systems. The run-path is akin to a per-program ld.so.cache.
96 * If a program is linked with a run-path, that run-path should take
97 * precedence over _everything_ else! In my opinion ldconfig and the
98 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
99 * paths. Any program that needs libraries that are outside the "well known"
100 * locations should be linked with a run-path.
102 * All of which begs the question: If this option doesn't work in any useful
103 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
104 * would fix ld.so so that run-paths are truly useful.
106 * Using run-paths is added with the intent that vendors who ship X for
107 * FreeBSD should use it too. Once everyone uses it then there will be no
108 * reason for FreeBSD to assume that it knows where X libraries are installed
109 * and they can remove it from the list of directories they add to ld.so.cache
110 * in their /etc/rc file.
112 #if OSMajorVersion > 2 || (OsMajorVersion == 2 && OSMinorVersion >= 2)
113 #ifndef ExtraLoadFlags
114 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
118 #ifndef GnuMallocLibrary
119 #define GnuMallocLibrary -lgnumalloc
122 #if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 2) \
123 || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 6)
124 /* 2.1.6 and 2.2 have libz */
130 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2) || \
131 (OSMajorVersion == 2 && OSMinorVersion == 2 && OSTeenyVersion > 2)
133 * FreeBSD 2.2.5 or later.
135 * Don't make any assumptions about the version of Tcl in the base OS.
136 * These settings assume that the tcl-7.6 and tk-4.2 packages have been
139 * Note the static libs in some versions of the FreeBSD packages are
140 * broken. The symptom of this is unresolved symbols when linking
141 * XF86Setup. If you run into this problem, either build your own
142 * static libs from the standard Tcl and Tk source, or change the
143 * definitions of XF86SetupUsesStatic{Tcl,Tk}. The latter is not
144 * recommended for binaries that are going to be redistributed.
147 #define TkLibName tk42
150 #define TkIncDir /usr/local/include/tk4.2
153 #define TclLibName tcl76
156 #define TclIncDir /usr/local/include/tcl7.6
159 #if OSMajorVersion == 2 && OSMinorVersion == 2
161 * FreeBSD 2.2 prior to 2.2.5
163 * Note: the tk-4.1 package for FreeBSD doesn't have the static lib, so
164 * you'll have to build it yourself, or change the definition of
165 * XF86SetupUsesStaticTk.
168 #define TkLibName tk41
171 #define TclLibName tcl
174 #define TclLibDir /usr/lib
177 #define TclIncDir /usr/include
179 /* FreeBSD 2.2 has libtcl in the base system */
180 #ifndef XF86SetupUsesStaticTcl
181 #define XF86SetupUsesStaticTcl NO
184 #else /* ! 2.2 or later */
186 #if OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 6
189 * 2.1.x with x >=6 has tk 4.1 and tcl 7.5 in the packages collection.
190 * Neither packages include the static libs, so you either need to build
191 * them yourself or set XF86SetupUsesStaticTcl and XF86SetupUsesStaticTk
192 * to NO. This isn't the default because we don't want the XFree86
193 * binaries to have these packages as a dependency.
197 #define TkLibName tk41
200 #define TclLibName tcl75
203 #else /* ! 2.1.6 or later */
206 #define TkLibName tk40
209 #define TclLibName tcl74
217 #define InstallCmd /usr/bin/install
220 # define GccGasOption -DGCCUSESGAS
221 # define AsmDefines -DUSE_GAS
223 # define GccGasOption /**/
226 #define ServerExtraDefines GccGasOption XFree86ServerDefines
228 #define StandardDefines -DCSRG_BASED
230 #if OSMajorVersion > 1
231 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
232 #define XawI18nDefines -DUSE_XWCHAR_STRING
233 #define HasMakefileSafeInclude YES
234 #define IncludeMakefile(file) @@# dependencies are in .depend
235 #define DependFileName .depend
236 #ifndef BuildDynamicLoading
237 #define BuildDynamicLoading YES
239 #ifndef ForceNormalLib
240 #define ForceNormalLib YES
242 #define HasMkstemp YES
244 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
245 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
248 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
249 #ifndef DefaultGcc2i386Opt
250 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
251 #define DefaultGcc2i386Opt -O2
255 #ifdef i386Architecture
256 # define OptimizedCDebugFlags DefaultGcc2i386Opt
258 # define OptimizedCDebugFlags -O2
262 # define PreIncDir /usr/include
265 #define TroffCmd groff -Tps
266 #define SetTtyGroup YES
268 #ifndef ExtraFilesToClean
269 # define ExtraFilesToClean *.core
272 #define DefaultUserPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/gnu/bin:/usr/local/bin
273 #define DefaultSystemPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR)
274 #ifndef SystemManDirectory
275 #define SystemManDirectory /usr/share/man
278 #define InstKmemFlags -g kmem -m 2755
281 * Compress manual pages
283 #ifndef CompressManPages
284 # define CompressManPages YES
289 #ifndef CompressManCmd
290 # define CompressManCmd gzip -n
292 COMPRESSMANCMD = CompressManCmd
294 #ifndef InstallManPageLong
295 #define InstallManPageLong(file,destdir,dest) @@\
296 install.man:: file.man @@\
297 MakeDir($(DESTDIR)destdir) @@\
298 $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\
299 $(INSTALL) -c $(INSTMANFLAGS) file.man \ @@\
300 $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
301 -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.$(MANSUFFIX)
304 #ifndef InstallGenManPageLong
305 #define InstallGenManPageLong(file,destdir,dest,suffix) @@\
306 install.man:: file.man @@\
307 MakeDir($(DESTDIR)destdir) @@\
308 $(RM) $(DESTDIR)destdir/dest.suffix* @@\
309 $(INSTALL) -c $(INSTMANFLAGS) file.man \ @@\
310 $(DESTDIR)destdir/dest.suffix @@\
311 -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.suffix
314 #ifndef InstallMultipleMan
315 #define InstallMultipleMan(list,dest) @@\
316 install.man:: list @@\
317 MakeDir($(DESTDIR)dest) @@\
318 @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
319 for i in list; do \ @@\
321 MNAME=`echo $$i | cut -f1 -d.`; \ @@\
322 $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\
323 $(INSTALL) -c $(INSTMANFLAGS) $$i \ @@\
324 $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\
325 $(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX)); \ @@\
330 * InstallManPageAliases - install soft links for aliases.
332 #ifndef InstallManPageAliases
333 #define InstallManPageAliases(file,destdir,aliases) @@\
335 @(SUFFIX=`echo $(DESTDIR)destdir/file.* | sed -e 's,.*/[^\.]*.,,'`; \ @@\
336 for i in aliases; do (set -x; \ @@\
337 $(RM) $(DESTDIR)destdir/$$i.*; \ @@\
338 (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\
339 $$i.$${SUFFIX})); \ @@\
344 * InstallGenManPageAliases - install soft links for aliases.
346 #ifndef InstallGenManPageAliases
347 #define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
348 InstallManPageAliases(file,destdir,aliases)
352 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 1)
353 #define HasBsdMake YES
356 #ifndef StaticLibrary
357 #define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
360 #include <bsdLib.rules>
362 #ifdef i386Architecture
363 #include <xfree86.cf>