1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
#
# Set up some defaults.
#
LIB_LINK_OPT=libopt
STLIBEXT=.a
# Default to being unable to build shared libraries.
SHLIBEXT=.so-nobuild
SHLIBVEXT=.so.v-nobuild
SHLIBSEXT=.so.s-nobuild
# Most systems support profiled libraries.
PFLIBEXT=_p.a
# Most systems install shared libs as mode 644, etc. while hpux wants 755
INSTALL_SHLIB='$(INSTALL_DATA)'
STOBJEXT=.o
SHOBJEXT=.so
PFOBJEXT=.po
# Default for systems w/o shared libraries
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
# Set up architecture-specific variables.
case $krb5_cv_host in
alpha*-dec-osf*)
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
# Alpha OSF/1 doesn't need separate PIC objects
SHOBJEXT=.o
LDCOMBINE='ld -shared -expect_unresolved \* -update_registry $(BUILDTOP)/so_locations -soname lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
# Need -oldstyle_liblookup to avoid picking up shared libs from
# other builds. OSF/1 / Tru64 ld programs look through the entire
# library path for shared libs prior to looking through the
# entire library path for static libs.
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH; _RLD_ROOT=/dev/dummy/d; export _RLD_ROOT;'
;;
# HPUX *seems* to work under 10.20.
#
# Note: "-Wl,+s" when building executables enables the use of the
# SHLIB_PATH environment variable for finding shared libraries
# in non-standard directories. If a non-standard search-path for
# shared libraries is compiled into the executable (using
# -Wl,+b,$KRB5_SHLIBDIR), then the order of "-Wl,+b,..." and "-Wl,+s"
# on the commandline of the linker will determine which path
# (compiled-in or SHLIB_PATH) will be searched first.
#
*-*-hpux*)
PICFLAGS=+z
INSTALL_SHLIB='$(INSTALL)'
SHLIBEXT=.sl
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.$(LIBMAJOR)'
SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
LDCOMBINE='ld -b +h lib$(LIB)$(SHLIBSEXT)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s -Wl,+b,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
;;
mips-sgi-irix6.3) # This is a Kludge; see below
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
SHOBJEXT=.o
# Kludge follows: (gcc makes n32 object files but ld expects o32, so we reeducate ld)
if test "$krb5_cv_prog_gcc" = yes; then
LDCOMBINE='ld -n32 -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIB)$(SHLIBSEXT)'
else
LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIB)$(SHLIBSEXT)'
fi
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
# This grossness is necessary due to the presence of *three*
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
dummy=/dev/dummmy/d
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
;;
mips-sgi-irix*)
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
SHOBJEXT=.o
LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
# This grossness is necessary due to the presence of *three*
# supported ABIs on Irix, and the precedence of the rpath over
# LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
# work around this lossage.
add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
dummy=/dev/dummmy/d
# Set the N32 and 64 variables first because the unqualified
# variables affect all three and can cause the sed command to fail.
RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
;;
# untested...
mips-sni-sysv4)
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fpic
LDCOMBINE='$(CC) -G -Wl,-h -Wl,lib$(LIB)$(SHLIBSEXT)'
else
PICFLAGS=-Kpic
LDCOMBINE='$(CC) -G -h lib$(LIB)$(SHLIBSEXT)'
fi
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
SHLIBEXT=.so
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
mips-*-netbsd*)
PICFLAGS=-fPIC
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
LDCOMBINE='ld -shared -soname lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
*-*-netbsd*)
PICFLAGS=-fpic
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
*-*-freebsd*)
if test -x /usr/bin/objformat ; then
objformat=`/usr/bin/objformat`
else
objformat="aout"
fi
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
fi
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
*-*-openbsd*)
PICFLAGS=-fpic
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBEXT=.so
LDCOMBINE='ld -Bshareable'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
PROFFLAGS=-pg
;;
*-*-darwin* | *-*-rhapsody*)
PICFLAGS=-fno-common
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR).dylib'
SHLIBSEXT='.$(LIBMAJOR).dylib'
SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
SHLIBEXT=.dylib
LDCOMBINE='$(CC) $(LDFLAGS) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/lib$(LIB)$(SHLIBVEXT)"'
CC_LINK_SHARED='$(CC) $(LDFLAGS) $(PROG_LIBPATH) -dynamic'
CC_LINK_STATIC='$(CC) $(LDFLAGS) $(PROG_LIBPATH)'
RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;'
LIB_LINK_OPT=frameworkopt
EXTRA_LIB_TARGETS=all-framework
EXTRA_LIBLINK_TARGETS=link-framework
EXTRA_LIBINST_TARGETS=install-framework
EXTRA_CLEAN_TARGETS=clean-framework
EXTRA_CLEAN_LINKS=clean-framework-link
;;
*-*-solaris*)
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fpic
LDCOMBINE='$(CC) -shared -h lib$(LIB)$(SHLIBSEXT)'
else
PICFLAGS=-Kpic
# Solaris cc doesn't default to stuffing the SONAME field...
LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIB)$(SHLIBSEXT)'
fi
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
*-*-sunos*)
PICFLAGS=-fpic
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBEXT=.so
# The following grossness is to prevent relative paths from
# creeping into the RPATH of an executable or library built
# under SunOS; the explicit setting of LD_LIBRARY_PATH does
# does not make it into the output file, while directories
# passed by "-Ldirname" do.
LDCOMBINE='LD_LIBRARY_PATH=`echo $(SHLIB_DIRS) | sed -e "s/-L//g" -e "s/ /:/g"` ld -dp -assert pure-text'
SHLIB_EXPFLAGS='-L$(SHLIB_RDIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
CC_LINK_SHARED='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"` $(PURE) $(CC) -L$(PROG_RPATH)'
CC_LINK_STATIC='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g` $(PURE) $(CC)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
*-*-linux*)
PICFLAGS=-fPIC
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
;;
*-*-aix*)
SHLIBVEXT='.a.$(LIBMAJOR).$(LIBMINOR)'
SHLIBEXT=.a
# AIX doesn't need separate PIC objects
SHOBJEXT=.o
LDCOMBINE='$(BUILDTOP)/util/makeshlib $(LIBMAJOR).$(LIBMINOR)'
SHLIB_EXPFLAGS=' $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
if test "$krb5_cv_prog_gcc" = "yes" ; then
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-blibpath:$(PROG_RPATH):/usr/lib:/lib'
else
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -blibpath:$(PROG_RPATH):/usr/lib:/lib'
fi
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LIBPATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/lib:/usr/local/lib; export LIBPATH; '
esac
|