Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / contrib / sendmail-8.14 / devtools / M4 / UNIX / defines.m4
1 divert(-1)
2 #
3 # Copyright (c) 1999-2001, 2006 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
5 #
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
9 #
10 #
11 #  Definitions for Makefile construction for sendmail
12 #
13 #       $Id: defines.m4,v 8.47 2006/10/06 05:44:44 ca Exp $
14 #
15 # temporary hack: if confREQUIRE_LIBSM is set then also set confREQUIRE_SM_OS_H
16 ifdef(`confREQUIRE_LIBSM',`
17 ifdef(`confREQUIRE_SM_OS_H',`', `define(`confREQUIRE_SM_OS_H', `1')')')
18 #
19 divert(0)dnl
20
21 # C compiler
22 CC=     confCC
23 CCOPTS= ifdef(`confCCOPTS', `confCCOPTS', ` ') ifdef(`confMT', ifdef(`confMTCCOPTS', `confMTCCOPTS', `'), `')
24
25 # Linker for executables
26 CCLINK = ifdef(`confCCLINK', `confCCLINK', `confCC')
27 # Linker for libraries
28 LD=     ifdef(`confLD', `confLD', `confCC')
29 LDOPTS= ifdef(`confLDOPTS', `confLDOPTS') ifdef(`confMT', ifdef(`confMTLDOPTS', `confMTLDOPTS', `'), `')
30 LDOPTS_SO= ${LDOPTS} ifdef(`confLDOPTS_SO', `confLDOPTS_SO', `-shared')
31
32 # Shell
33 SHELL=  confSHELL
34
35 # use O=-O (usual) or O=-g (debugging)
36 O=      ifdef(`confOPTIMIZE', `confOPTIMIZE', `-O')
37
38 # Object archiver
39 AR=     ifdef(`confAR', `confAR', `ar')
40 AROPTS= ifdef(`confAROPTS', `confAROPTS', `crv')
41
42 # Remove command
43 RM=     ifdef(`confRM', `confRM', `rm')
44 RMOPTS= ifdef(`confRMOPTS', `confRMOPTS', `-f')
45
46 # Link command
47 LN=     ifdef(`confLN', `confLN', `ln')
48 LNOPTS= ifdef(`confLNOPTS', `confLNOPTS', `-f -s')
49
50 # Ranlib (or echo)
51 RANLIB= ifdef(`confRANLIB', `confRANLIB', `ranlib')
52 RANLIBOPTS=     ifdef(`confRANLIBOPTS', `confRANLIBOPTS', `')
53
54 # Object stripper
55 STRIP=  ifdef(`confSTRIP', `confSTRIP', `strip')
56 STRIPOPTS=      ifdef(`confSTRIPOPTS', `confSTRIPOPTS', `')
57
58 # environment definitions (e.g., -D_AIX3)
59 ENVDEF= ifdef(`confENVDEF', `confENVDEF') ifdef(`conf_'bldCURRENT_PRD`_ENVDEF', `conf_'bldCURRENT_PRD`_ENVDEF')
60
61 # location of the source directory
62 SRCDIR= ifdef(`confSRCDIR', `confSRCDIR', `_SRC_PATH_')
63
64 # inc`'lude directories
65 INCDIRS= confINCDIRS
66
67 # library directories
68 LIBDIRS=confLIBDIRS
69
70 # Additional libs needed
71 LIBADD= ifdef(`conf_'bldCURRENT_PRD`_LIBS', `conf_'bldCURRENT_PRD`_LIBS') 
72
73 # libraries required on your system
74 LIBS= ${LIBADD} ifdef(`confLIBS', `confLIBS') ifdef(`conf_'bldCURRENT_PRD`_LIB_POST', `conf_'bldCURRENT_PRD`_LIB_POST') 
75
76 # location of sendmail binary (usually /usr/sbin or /usr/lib)
77 BINDIR= ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
78
79 # location of "user" binaries (usually /usr/bin or /usr/ucb)
80 UBINDIR=ifdef(`confUBINDIR', `confUBINDIR', `/usr/bin')
81
82 # location of "root" binaries (usually /usr/sbin or /usr/etc)
83 SBINDIR=ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
84
85 # location of "root" binaries (usually /usr/sbin or /usr/etc)
86 MBINDIR=ifdef(`confMBINDIR', `confMBINDIR', `/usr/sbin')
87
88 # location of "libexec" binaries (usually /usr/libexec or /usr/etc)
89 EBINDIR=ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
90
91 # where to install inc`'lude files (usually /usr/inc`'lude)
92 INCLUDEDIR=ifdef(`confINCLUDEDIR', `confINCLUDEDIR', `/usr/inc`'lude')
93
94 # where to install library files (usually /usr/lib)
95 LIBDIR=ifdef(`confLIBDIR', `confLIBDIR', `/usr/lib')
96
97 # additional .c files needed
98 SRCADD= ifdef(`confSRCADD', `confSRCADD')
99
100 ifdef(`conf_'bldCURRENT_PRD`_SRCADD', `bldLIST_PUSH_ITEM(`bldSOURCES', `conf_'bldCURRENT_PRD`_SRCADD')')
101
102 # additional .o files needed
103 OBJADD= ifdef(`confOBJADD', `confOBJADD')
104 bldCURRENT_PRODUCT`OBJADD'= ifdef(`conf_'bldCURRENT_PRD`_OBJADD', `conf_'bldCURRENT_PRD`_OBJADD') ifdef(`confLIBADD', `bldADD_EXTENSIONS(`a', confLIBADD)', `') 
105
106 # copy files
107 CP= ifdef(`confCOPY', `confCOPY', `cp')
108
109 # In some places windows wants nmake where unix would just want make
110 NMAKE=ifdef(`confNMAKE', `confNMAKE', `${MAKE}')
111
112 ###################  end of user configuration flags  ######################
113
114 BUILDBIN=confBUILDBIN
115 COPTS=  -I. ${INCDIRS} ${ENVDEF} ${CCOPTS}
116 CFLAGS= $O ${COPTS} ifdef(`confMT', ifdef(`confMTCFLAGS', `confMTCFLAGS -DXP_MT', `-DXP_MT'), `')
117
118
119 BEFORE= confBEFORE ifdef(`confREQUIRE_SM_OS_H',`sm_os.h')
120
121 LINKS=ifdef(`bldLINK_SOURCES', `bldLINK_SOURCES', `')
122
123 bldCURRENT_PRODUCT`SRCS'= bldSOURCES ${SRCADD}
124 bldCURRENT_PRODUCT`OBJS'= bldSUBST_EXTENSIONS(`o', bldSOURCES) ifdef(`bldLINK_SOURCES', `bldSUBST_EXTENSIONS(`o', bldLINK_SOURCES)') ${OBJADD} ${bldCURRENT_PRODUCT`OBJADD'}
125 bldCURRENT_PRODUCT`SMDEPLIBS'= ifdef(`bldSMDEPLIBS', `bldSMDEPLIBS', `')
126 bldCURRENT_PRODUCT`TARGET_LINKS'= ifdef(`bldTARGET_LINKS', `bldTARGET_LINKS', `')
127
128 bldPUSH_ALL_SRCS(bldCURRENT_PRODUCT`SRCS')dnl
129
130 ifdef(`bldBIN_TYPE', , `define(`bldBIN_TYPE', `U')')dnl
131 ifdef(`bldINSTALL_DIR', , `define(`bldINSTALL_DIR', `U')')dnl
132
133 NROFF=  ifdef(`confNROFF', `confNROFF', `groff -Tascii')
134 MANDOC= ifdef(`confMANDOC', `confMANDOC', `-man')
135
136 INSTALL=ifdef(`confINSTALL', `confINSTALL', `install')
137
138 # User binary ownership/permissions
139 UBINOWN=ifdef(`confUBINOWN', `confUBINOWN', `bin')
140 UBINGRP=ifdef(`confUBINGRP', `confUBINGRP', `bin')
141 UBINMODE=ifdef(`confUBINMODE', `confUBINMODE', `555')
142
143 # Setuid binary ownership/permissions
144 SBINOWN=ifdef(`confSBINOWN', `confSBINOWN', `root')
145 SBINGRP=ifdef(`confSBINGRP', `confSBINGRP', `bin')
146 SBINMODE=ifdef(`confSBINMODE', `confSBINMODE', `4555')
147
148 # Setgid binary ownership/permissions
149 GBINOWN=ifdef(`confGBINOWN', `confGBINOWN', `root')
150 GBINGRP=ifdef(`confGBINGRP', `confGBINGRP', `smmsp')
151 GBINMODE=ifdef(`confGBINMODE', `confGBINMODE', `2555')
152
153 # owner of MSP queue
154 MSPQOWN=ifdef(`confMSPQOWN', `confMSPQOWN', `smmsp')
155
156 # MTA binary ownership/permissions
157 MBINOWN=ifdef(`confMBINOWN', `confMBINOWN', `root')
158 MBINGRP=ifdef(`confMBINGRP', `confMBINGRP', `bin')
159 MBINMODE=ifdef(`confMBINMODE', `confMBINMODE', `550')
160
161 # Library ownership/permissions
162 LIBOWN=ifdef(`confLIBOWN', `confLIBOWN', `root')
163 LIBGRP=ifdef(`confLIBGRP', `confLIBGRP', `bin')
164 LIBMODE=ifdef(`confLIBMODE', `confLIBMODE', `0444')
165
166 # Include file ownership/permissions
167 INCOWN=ifdef(`confINCOWN', `confINCOWN', `root')
168 INCGRP=ifdef(`confINCGRP', `confINCGRP', `bin')
169 INCMODE=ifdef(`confINCMODE', `confINCMODE', `0444')