402050880b6916fa4404b4063807a8036f052a7f
[openafs.git] / src / cf / osconf.m4
1
2 AC_DEFUN([OPENAFS_OSCONF], [
3
4 dnl defaults, override in case below as needed
5 CFLAGS=
6 XCFLAGS='${DBG} ${OPTMZ}'
7 RXDEBUG="-DRXDEBUG"
8 SHLIB_SUFFIX="so"
9 CCOBJ="$CC"
10 MT_CC="$CC"
11 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} ${LIB_libintl}"
12
13 dnl debugging and optimization flag defaults
14 dnl Note, these are all the defaults for if debug/optimize turned on, and
15 dnl the arch cases below do override as needed
16 KERN_DBG=-g
17 KERN_OPTMZ=-O
18 DBG=-g
19 OPTMZ=-O
20 LWP_DBG=-g
21 NO_STRIP_BIN=
22 LWP_OPTMZ=-O
23 PAM_DBG=-g
24 PAM_OPTMZ=
25
26 dnl standard programs
27 AC_PROG_RANLIB
28 AC_CHECK_PROGS(AS, as, [${am_missing_run}as])
29 AC_CHECK_PROGS(AR, ar, [${am_missing_run}ar])
30 AC_CHECK_PROGS(MV, mv, [${am_missing_run}mv])
31 AC_CHECK_PROGS(RM, rm, [${am_missing_run}rm])
32 AC_CHECK_PROGS(LD, ld, [${am_missing_run}ld])
33 AC_CHECK_PROGS(CP, cp, [${am_missing_run}cp])
34 AC_CHECK_PROGS(STRIP, strip, [${am_missing_run}strip])
35 AC_CHECK_PROGS(LORDER, lorder, [${am_missing_run}lorder])
36
37 dnl TODO - need to disable STRIP if we are doing debugging in any user space code
38
39 case $AFS_SYSNAME in
40         alpha_dux40)
41                 CC="cc"
42                 CCOBJ="cc"
43                 MT_CC="cc"
44                 CSTATIC="-non_shared"
45                 DBG="-g3"
46                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
47                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
48                 TXLIBS="-lcurses"
49                 XCFLAGS="-D_NO_PROTO -DOSF"
50                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
51                 ;;
52
53         alpha_dux50)
54                 CC="cc"
55                 CCOBJ="cc"
56                 MT_CC="cc"
57                 LEX="flex -l"
58                 DBG="-g3"
59                 CSTATIC="-non_shared"
60                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
61                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
62                 TXLIBS="-lcurses"
63                 XCFLAGS="-D_NO_PROTO -DOSF"
64                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
65                 ;;
66
67         alpha_dux51)
68                 CC="cc"
69                 CCOBJ="cc"
70                 MT_CC="cc"
71                 DBG="-g3"
72                 CSTATIC="-non_shared"
73                 LWP_OPTMZ="-O2"
74                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
75                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
76                 TXLIBS="-lcurses"
77                 XCFLAGS="-D_NO_PROTO -DOSF"
78                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
79                 ;;
80
81         alpha_linux_22)
82                 KERN_OPTMZ=-O2
83                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
84                 MT_LIBS="-lpthread"
85                 PAM_OPTMZ=-O2
86                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
87                 SHLIB_CFLAGS="-fPIC"
88                 SHLIB_LDFLAGS="-shared -Xlinker -x"
89                 TXLIBS="-lncurses"
90                 XCFLAGS="-D_LARGEFILE64_SOURCE"
91                 SHLIB_LINKER="${MT_CC} -shared"
92                 ;;
93
94         alpha_linux_24)
95                 CCOBJ="${CC} -fPIC"
96                 KERN_OPTMZ=-O2
97                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
98                 MT_LIBS="-lpthread"
99                 PAM_OPTMZ=-O2
100                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
101                 SHLIB_CFLAGS="-fPIC"
102                 SHLIB_LDFLAGS="-shared -Xlinker -x"
103                 TXLIBS="-lncurses"
104                 XCFLAGS="-D_LARGEFILE64_SOURCE"
105                 SHLIB_LINKER="${MT_CC} -shared"
106                 ;;
107
108         alpha_linux_26)
109                 CCOBJ="${CC} -fPIC"
110                 KERN_OPTMZ=-O2
111                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
112                 MT_LIBS="-lpthread"
113                 PAM_OPTMZ=-O2
114                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
115                 SHLIB_CFLAGS="-fPIC"
116                 SHLIB_LDFLAGS="-shared -Xlinker -x"
117                 TXLIBS="-lncurses"
118                 XCFLAGS="-D_LARGEFILE64_SOURCE"
119                 SHLIB_LINKER="${MT_CC} -shared"
120                 ;;
121
122         arm_linux24)
123                 CCOBJ="${CC} -fPIC"
124                 KERN_OPTMZ=-O2
125                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
126                 MT_LIBS="-lpthread"
127                 PAM_OPTMZ=-O2
128                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
129                 SHLIB_CFLAGS="-fPIC"
130                 SHLIB_LDFLAGS="-shared -Xlinker -x"
131                 TXLIBS="-lncurses"
132                 XCFLAGS="-D_LARGEFILE64_SOURCE"
133                 SHLIB_LINKER="${MT_CC} -shared"
134                 ;;
135
136         arm_linux26)
137                 CCOBJ="${CC} -fPIC"
138                 KERN_OPTMZ=-O2
139                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
140                 MT_LIBS="-lpthread"
141                 PAM_OPTMZ=-O2
142                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
143                 SHLIB_CFLAGS="-fPIC"
144                 SHLIB_LDFLAGS="-shared -Xlinker -x"
145                 TXLIBS="-lncurses"
146                 XCFLAGS="-D_LARGEFILE64_SOURCE"
147                 SHLIB_LINKER="${MT_CC} -shared"
148                 ;;
149
150         hp_ux102)
151                 AS="/usr/ccs/bin/as"
152                 CC="/opt/ansic/bin/cc -Ae"
153                 CCOBJ="/opt/ansic/bin/cc -Ae"
154                 DBM="/lib/libndbm.a"
155                 LD="/bin/ld"
156                 LEX="/opt/langtools/bin/lex"
157                 LWP_OPTMZ="-O"
158                 MT_CC="/opt/ansic/bin/cc -Ae"
159                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
160                 MT_LIBS="-L/opt/dce/lib -ldce"
161                 MV="/bin/mv"
162                 OPTMZ="-O"
163                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
164                 PAM_LIBS="/usr/lib/libpam.1"
165                 RANLIB="/usr/bin/ranlib"
166                 RM="/bin/rm"
167                 SHLIB_LDFLAGS="-b -Bsymbolic"
168                 SHLIB_SUFFIX="sl"
169                 TXLIBS="/usr/lib/libHcurses.a"
170                 VFSCK_CFLAGS="-D_FILE64"
171                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
172                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
173                 XCFLAGS="${XCFLAGS0} +DA1.0"
174                 YACC="/opt/langtools/bin/yacc"
175                 SHLIB_LINKER="ld -b"
176                 ;;
177
178         hp_ux11*)
179                 AR="/usr/bin/ar"
180                 AS="/usr/ccs/bin/as"
181                 CC="/opt/ansic/bin/cc"
182                 CCOBJ="/opt/ansic/bin/cc"
183                 DBM="/lib/libndbm.a"
184                 LD="/bin/ld   "
185                 LEX="/opt/langtools/bin/lex"
186                 LWP_OPTMZ="-O"
187                 MT_CC="$CC"
188                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
189                 MT_LIBS="-lpthread"
190                 MV="/bin/mv"
191                 OPTMZ="-O"
192                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
193                 PAM_LIBS="/usr/lib/libpam.1"
194                 RANLIB="/usr/bin/ranlib"
195                 RM="/bin/rm"
196                 SHLIB_LDFLAGS="-b -Bsymbolic"
197                 SHLIB_SUFFIX="sl"
198                 TXLIBS="/usr/lib/libHcurses.a"
199                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
200                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
201                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
202                 XCFLAGS="${XCFLAGS0} +DA1.0"
203                 XLIBELFA="-lelf"
204                 #XLIBS="${LIB_AFSDB} -lnsl"
205                 YACC="/opt/langtools/bin/yacc"
206                 SHLIB_LINKER="ld -b"
207                 ;;
208
209         ia64_hpux*)
210                 AR="/usr/bin/ar"
211                 AS="/usr/ccs/bin/as"
212                 CC="/opt/ansic/bin/cc"
213                 CCOBJ="/opt/ansic/bin/cc"
214                 DBM="/lib/hpux32/libndbm.so"
215                 LD="/bin/ld   "
216                 LEX="/opt/langtools/bin/lex"
217                 LWP_OPTMZ=""
218                 MT_CC="$CC"
219                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
220                 MT_LIBS="-lpthread"
221                 MV="/bin/mv"
222                 OPTMZ="-O"
223                 PAM_CFLAGS="-b +z -Wl,+k"
224                 PAM_LIBS="/usr/lib/hpux32/libpam.so"
225                 RANLIB="/usr/bin/ranlib"
226                 RM="/bin/rm"
227                 SHLIB_LDFLAGS="-b -Bsymbolic"
228                 SHLIB_SUFFIX="sl"
229                 TXLIBS="/usr/lib/hpux32/libcurses.so"
230                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
231                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive_shared -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
232                 XCFLAGS64="${XCFLAGS0} +DD64"
233                 XCFLAGS="${XCFLAGS0}"
234                 XLIBELFA="-lelf"
235                 #XLIBS="${LIB_AFSDB} -lnsl"
236                 YACC="/opt/langtools/bin/yacc"
237                 SHLIB_LINKER="ld -b"
238                 ;;
239
240         i386_fbsd_*)
241                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
242                 MT_LIBS="-pthread"
243                 PAM_OPTMZ=-O2
244                 PAM_CFLAGS="-pipe -fPIC"
245                 SHLIB_LDFLAGS="-shared -Xlinker -x"
246                 SHLIB_LINKER="${MT_CC} -shared"
247                 TXLIBS="-lncurses"
248                 XCFLAGS="-pipe"
249                 ;;
250
251         i386_dfbsd_*)
252                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
253                 MT_LIBS="-pthread"
254                 PAM_OPTMZ=-O2
255                 PAM_CFLAGS="-pipe -fPIC"
256                 SHLIB_LDFLAGS="-shared -Xlinker -x"
257                 SHLIB_LINKER="${MT_CC} -shared"
258                 TXLIBS="-lncurses"
259                 XCFLAGS="-pipe"
260                 ;;
261
262         amd64_fbsd_*)
263                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
264                 MT_LIBS="-pthread"
265                 PAM_CFLAGS="-O2 -pipe -fPIC"
266                 SHLIB_LDFLAGS="-shared -Xlinker -x"
267                 SHLIB_LINKER="${MT_CC} -shared"
268                 TXLIBS="-lncurses"
269                 XCFLAGS="-O2 -pipe -fPIC"
270                 ;;
271
272         *nbsd2*|*nbsd3*|*nbsd4*|*nbsd5*)
273                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
274                 MT_LIBS="-pthread"
275                 PAM_OPTMZ=-O2
276                 PAM_CFLAGS="-pipe -fPIC"
277                 SHLIB_CFLAGS="-fPIC"
278                 SHLIB_LDFLAGS="-shared -Xlinker -x"
279                 SHLIB_LINKER="${MT_CC} -shared"
280                 TXLIBS="-lcurses"
281                 XCFLAGS="-pipe"
282                 ;;
283
284         *nbsd15|*nbsd16)
285                 MT_CFLAGS='${XCFLAGS}'
286                 MT_LIBS=""
287                 PAM_OPTMZ=-O2
288                 PAM_CFLAGS="-pipe -fPIC"
289                 SHLIB_LDFLAGS="-shared -Xlinker -x"
290                 SHLIB_LINKER="${MT_CC} -shared"
291                 TXLIBS="/usr/lib/libcurses.so"
292                 XCFLAGS="-pipe"
293                 ;;
294
295         ia64_linux24|ia64_linux26)
296                 KERN_OPTMZ=-O2
297                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
298                 MT_LIBS="-lpthread"
299                 PAM_OPTMZ=-O2
300                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
301                 SHLIB_CFLAGS="-fPIC"
302                 SHLIB_LDFLAGS="-shared -Xlinker -x"
303                 TXLIBS="-lncurses"
304                 XCFLAGS="-D_LARGEFILE64_SOURCE -G0"
305                 SHLIB_LINKER="${MT_CC} -shared"
306                 ;;
307
308         amd64_linux*)
309                 CCOBJ="${CC} -fPIC"
310                 KERN_OPTMZ=-O2
311                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
312                 MT_LIBS="-lpthread"
313                 PAM_OPTMZ=-O2
314                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
315                 SHLIB_CFLAGS="-fPIC"
316                 SHLIB_LDFLAGS="-shared -Xlinker -x"
317                 TXLIBS="-lncurses"
318                 XCFLAGS="-D_LARGEFILE64_SOURCE"
319                 SHLIB_LINKER="${MT_CC} -shared"
320                 ;;
321
322         ppc64_linux24)
323                 KERN_OPTMZ=-O2
324                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
325                 MT_LIBS="-lpthread"
326                 PAM_OPTMZ=-O2
327                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
328                 SHLIB_LDFLAGS="-shared -Xlinker -x"
329                 SHLIB_CFLAGS="-fPIC"
330                 TXLIBS="/usr/lib64/libncurses.so"
331                 XCFLAGS="-D_LARGEFILE64_SOURCE"
332                 SHLIB_LINKER="${MT_CC} -shared"
333                 ;;
334
335         ppc64_linux26)
336                 KERN_OPTMZ=-O2
337                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
338                 MT_LIBS="-lpthread"
339                 PAM_OPTMZ=-O2
340                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
341                 SHLIB_LDFLAGS="-shared -Xlinker -x"
342                 SHLIB_CFLAGS="-fPIC"
343                 TXLIBS="-lncurses"
344                 XCFLAGS="-D_LARGEFILE64_SOURCE -fPIC"
345                 SHLIB_LINKER="${MT_CC} -shared"
346                 ;;
347
348         i386_umlinux22)
349                 KERN_OPTMZ=-O2
350                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
351                 MT_LIBS="-lpthread"
352                 PAM_OPTMZ=-O2
353                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
354                 SHLIB_CFLAGS="-fPIC"
355                 SHLIB_LDFLAGS="-shared -Xlinker -x"
356                 TXLIBS="-lncurses"
357                 XCFLAGS="-D_LARGEFILE64_SOURCE"
358                 SHLIB_LINKER="${MT_CC} -shared"
359                 ;;
360
361         i386_linux*)
362                 KERN_OPTMZ=-O2
363                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
364                 MT_LIBS="-lpthread"
365                 DBG=-g
366                 KERN_DBG=-g
367                 LWP_DBG=-g
368                 LWP_OPTMZ=-O2
369                 OPTMZ=-O2
370                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
371                 SHLIB_CFLAGS="-fPIC"
372                 SHLIB_LDFLAGS="-shared -Xlinker -x"
373                 TXLIBS="-lncurses"
374                 XCFLAGS="-D_LARGEFILE64_SOURCE"
375                 SHLIB_LINKER="${MT_CC} -shared"
376                 ;;
377
378         i386_umlinux24)
379                 KERN_OPTMZ=-O2
380                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
381                 MT_LIBS="-lpthread"
382                 DBG=-g
383                 KERN_DBG=-g
384                 LWP_DBG=-g
385                 LWP_OPTMZ=-O2
386                 OPTMZ=-O2
387                 PAM_OPTMZ=-O2
388                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
389                 SHLIB_CFLAGS="-fPIC"
390                 SHLIB_LDFLAGS="-shared -Xlinker -x"
391                 TXLIBS="-lncurses"
392                 XCFLAGS="-D_LARGEFILE64_SOURCE"
393                 SHLIB_LINKER="${MT_CC} -shared"
394                 ;;
395
396         i386_umlinux26)
397                 KERN_OPTMZ=-O2
398                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
399                 MT_LIBS="-lpthread"
400                 DBG=-g
401                 KERN_DBG=-g
402                 LWP_DBG=-g
403                 LWP_OPTMZ=-O2
404                 OPTMZ=-O2
405                 PAM_OPTMZ=-O2
406                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
407                 SHLIB_CFLAGS="-fPIC"
408                 SHLIB_LDFLAGS="-shared -Xlinker -x"
409                 TXLIBS="-lncurses"
410                 XCFLAGS="-D_LARGEFILE64_SOURCE"
411                 SHLIB_LINKER="${MT_CC} -shared"
412                 ;;
413
414         *_obsd*)
415                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
416                 MT_LIBS="-pthread"
417                 PAM_OPTMZ=-O2
418                 PAM_CFLAGS="-pipe -fpic"
419                 SHLIB_CFLAGS="-fpic"
420                 SHLIB_LDFLAGS="-shared -Xlinker -x"
421                 SHLIB_LINKER="${MT_CC} -shared"
422                 TXLIBS="/usr/lib/libcurses.a"
423                 XCFLAGS=
424                 ;;
425
426         parisc_linux24)
427                 KERN_OPTMZ=-O2
428                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
429                 MT_LIBS="-lpthread"
430                 PAM_OPTMZ=-O2
431                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
432                 SHLIB_CFLAGS="-fPIC"
433                 SHLIB_LDFLAGS="-shared -Xlinker -x"
434                 TXLIBS="-lncurses"
435                 XCFLAGS="-D_LARGEFILE64_SOURCE"
436                 SHLIB_LINKER="${MT_CC} -shared"
437                 ;;
438
439         ppc_darwin_70)
440                 CC="cc"
441                 CCOBJ="cc"
442                 MT_CC="cc"
443                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
444                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
445                 KROOT=
446                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
447                 LWP_OPTMZ="-O2"
448                 REGEX_OBJ="regex.o"
449                 XCFLAGS="-no-cpp-precomp"
450                 TXLIBS="-lncurses"
451                 EXTRA_VLIBOBJS="fstab.o"
452                 SHLIB_LINKER="${MT_CC} -dynamiclib"
453                 SHLIB_SUFFIX="dylib"
454                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
455                 ;;
456
457         *_darwin_80)
458                 CC="cc"
459                 CCOBJ="cc"
460                 MT_CC="cc"
461                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
462                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
463                 KROOT=
464                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
465                 KERN_OPTMZ="-Os"
466                 LWP_OPTMZ="-Os"
467                 OPTMZ="-Os"
468                 REGEX_OBJ="regex.o"
469                 TXLIBS="-lncurses"
470                 EXTRA_VLIBOBJS="fstab.o"
471                 SHLIB_LINKER="${MT_CC} -dynamiclib"
472                 SHLIB_SUFFIX="dylib"
473                 RANLIB="ranlib -c"
474                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
475                 ;;
476
477         *_darwin_90)
478                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
479                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
480                 KROOT=
481                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
482                 LD="cc"
483                 KERN_OPTMZ="-Os"
484                 LWP_OPTMZ="-Os"
485                 OPTMZ="-Os"
486                 REGEX_OBJ="regex.o"
487                 TXLIBS="-lncurses"
488                 EXTRA_VLIBOBJS="fstab.o"
489                 SHLIB_LINKER="${MT_CC} -dynamiclib"
490                 SHLIB_SUFFIX="dylib"
491                 RANLIB="ranlib -c"
492                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
493                 ;;
494
495         *_darwin_100)
496                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
497                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
498                 MT_LIBS="${LIB_AFSDB} -framework CoreFoundation"
499                 KROOT=
500                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
501                 LD="cc"
502                 KERN_OPTMZ="-Os"
503                 LWP_OPTMZ="-Os"
504                 OPTMZ="-Os"
505                 PAM_LIBS="-lpam"
506                 REGEX_OBJ="regex.o"
507                 TXLIBS="-lncurses"
508                 EXTRA_VLIBOBJS="fstab.o"
509                 SHLIB_LINKER="${MT_CC} -dynamiclib"
510                 SHLIB_SUFFIX="dylib"
511                 RANLIB="ranlib"
512                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
513                 ;;
514
515         ppc_linux*)
516                 KERN_OPTMZ=-O2
517                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
518                 MT_LIBS="-lpthread"
519                 PAM_OPTMZ=-O2
520                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
521                 SHLIB_CFLAGS="-fPIC"
522                 SHLIB_LDFLAGS="-shared -Xlinker -x"
523                 TXLIBS="-lncurses"
524                 XCFLAGS="-D_LARGEFILE64_SOURCE"
525                 SHLIB_LINKER="${MT_CC} -shared"
526                 ;;
527
528         rs_aix42)
529                 CC="cc"
530                 CCOBJ="cc"
531                 DBG=""
532                 LIBSYS_AIX_EXP="afsl.exp"
533                 MT_CC="xlc_r"
534                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
535                 MT_LIBS="-lpthreads"
536                 SHLIB_SUFFIX="o"
537                 TXLIBS="-lcurses"
538                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
539                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
540                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
541                 AIX32=""
542                 AIX64="#"
543                 ;;
544
545
546         rs_aix51)
547                 CC="cc"
548                 CCOBJ="cc"
549                 DBG=""
550                 LIBSYS_AIX_EXP="afsl.exp"
551                 MT_CC="xlc_r"
552                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
553                 MT_LIBS="-lpthreads"
554                 SHLIB_SUFFIX="o"
555                 TXLIBS="-lcurses"
556                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
557                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
558                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
559                 AIX32=""
560                 AIX64=""
561                 ;;
562
563         rs_aix52)       
564                 CC="cc"
565                 CCOBJ="cc"
566                 DBG=""
567                 LIBSYS_AIX_EXP="afsl.exp"
568                 MT_CC="xlc_r"
569                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
570                 MT_LIBS="-lpthreads"
571                 SHLIB_SUFFIX="o"
572                 TXLIBS="-lcurses"
573                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
574                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
575                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
576                 AIX32=""
577                 AIX64=""
578                 ;;
579
580         rs_aix53)       
581                 CC="cc"
582                 CCOBJ="cc"
583                 DBG="-g"
584                 LIBSYS_AIX_EXP="afsl.exp"
585                 MT_CC="xlc_r"
586                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
587                 MT_LIBS="-lpthreads"
588                 SHLIB_SUFFIX="o"
589                 TXLIBS="-lcurses"
590                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
591                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
592                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
593                 AIX32=""
594                 AIX64=""
595                 ;;
596
597         rs_aix61)       
598                 CC="cc"
599                 CCOBJ="cc"
600                 DBG="-g"
601                 LIBSYS_AIX_EXP="afsl.exp"
602                 MT_CC="xlc_r"
603                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
604                 MT_LIBS="-lpthreads"
605                 SHLIB_SUFFIX="o"
606                 TXLIBS="-lcurses"
607                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
608                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
609                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
610                 AIX32="#"
611                 AIX64=""
612                 ;;
613
614         s390_linux22)
615                 LD="ld"
616                 KERN_OPTMZ=-O2
617                 MT_CC="$CC"
618                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
619                 MT_LIBS="-lpthread"
620                 PAM_OPTMZ=-O
621                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
622                 SHLIB_CFLAGS="-fPIC"
623                 SHLIB_LDFLAGS="-shared -Xlinker -x"
624                 TXLIBS="-lncurses"
625                 OPTMZ=-O
626                 XCFLAGS="-D_LARGEFILE64_SOURCE"
627                 SHLIB_LINKER="${MT_CC} -shared"
628                 ;;
629
630         s390_linux24|s390_linux26)
631                 LD="ld"
632                 KERN_OPTMZ=-O2
633                 MT_CC="$CC"
634                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
635                 MT_LIBS="-lpthread"
636                 PAM_OPTMZ=-O2
637                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
638                 SHLIB_CFLAGS="-fPIC"
639                 SHLIB_LDFLAGS="-shared -Xlinker -x"
640                 TXLIBS="-lncurses"
641                 XCFLAGS="-D_LARGEFILE64_SOURCE"
642                 SHLIB_LINKER="${MT_CC} -shared"
643                 ;;
644
645         s390x_linux24|s390x_linux26)
646                 CCOBJ="${CC} -fPIC"
647                 LD="ld"
648                 KERN_OPTMZ=-O2
649                 MT_CC="$CC"
650                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
651                 MT_LIBS="-lpthread"
652                 PAM_OPTMZ=-O
653                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
654                 SHLIB_CFLAGS="-fPIC"
655                 SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
656                 TXLIBS="-lncurses"
657                 OPTMZ=-O
658                 XCFLAGS="-D_LARGEFILE64_SOURCE -D__s390x__"
659                 SHLIB_LINKER="${MT_CC} -shared"
660                 ;;
661
662         sgi_62)
663                 CC="cc"
664                 CCOBJ="cc"
665                 MT_CC="cc"
666                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
667                 FSINCLUDES="-I/usr/include/sys/fs"
668                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
669                 MT_LIBS="-lpthread"
670                 TXLIBS="-lcurses"
671                 XCFLAGS64="-64 -mips3"
672                 XCFLAGS="-o32"
673                 XLDFLAGS64="-64"
674                 XLDFLAGS="-o32"
675                 SHLIB_LINKER="${CC} -shared"
676                 ;;
677
678         sgi_63)
679                 CC="cc"
680                 CCOBJ="cc"
681                 MT_CC="cc"
682                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
683                 FSINCLUDES="-I/usr/include/sys/fs"
684                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
685                 MT_LIBS="-lpthread"
686                 TXLIBS="-lcurses"
687                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
688                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
689                 XLDFLAGS64="-64"
690                 XLDFLAGS="-o32"
691                 SHLIB_LINKER="${CC} -shared"
692                 ;;
693
694         sgi_64)
695                 CC="cc"
696                 CCOBJ="cc"
697                 MT_CC="cc"
698                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
699                 FSINCLUDES="-I/usr/include/sys/fs"
700                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
701                 MT_LIBS="-lpthread"
702                 TXLIBS="-lcurses"
703                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
704                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -n32 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
705                 XLDFLAGS64="-64"
706                 XLDFLAGS="-n32"
707                 SHLIB_LINKER="${CC} -shared"
708                 ;;
709
710         sgi_65)
711                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
712                 CC="/usr/bin/cc"
713                 CCOBJ="/usr/bin/cc"
714                 FSINCLUDES="-I/usr/include/sys/fs"
715                 LD="/usr/bin/ld"
716                 MT_CC="/usr/bin/cc"
717                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
718                 MT_LIBS="-lpthread"
719                 TXLIBS="-lcurses"
720                 XCFLAGS64="-64 -mips3"
721                 XCFLAGS="-n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
722                 XLDFLAGS64="-64 -mips3"
723                 XLDFLAGS="-n32 -mips3"
724                 SHLIB_LINKER="${CC} -shared"
725                 ;;
726
727         sparc*_linux*)
728                 KERN_OPTMZ=-O2
729                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
730                 MT_LIBS="-lpthread"
731                 PAM_OPTMZ=-O2
732                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
733                 SHLIB_CFLAGS="-fPIC"
734                 SHLIB_LDFLAGS="-shared -Xlinker -x"
735                 TXLIBS="-lncurses"
736                 XCFLAGS="-D_LARGEFILE64_SOURCE"
737                 XCFLAGS64="-D_LARGEFILE64_SOURCE -m64"
738                 XLDFLAGS64="-m64"
739                 SHLIB_LINKER="${MT_CC} -shared"
740                 ;;
741
742         sun4_413)
743                 CCXPG2="/usr/xpg2bin/cc"
744                 CC="gcc"
745                 CCOBJ="gcc"
746                 SHLIB_CFLAGS="-PIC"
747                 TXLIBS="-lcurses -ltermcap"
748                 XCFLAGS=""
749                 XLIBELFA="-lelf"
750                 XLIBKVM="-lkvm"
751                 XLIBS="${LIB_AFSDB}"
752                 LD="ld"
753                 ;;
754
755         sun4x_55)
756                 CC=$SOLARISCC
757                 CCOBJ=$SOLARISCC
758                 MT_CC=$SOLARISCC
759                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
760                 MT_LIBS="-lpthread -lsocket"
761                 SHLIB_CFLAGS="-KPIC"
762                 TXLIBS="-lcurses"
763                 XCFLAGS="-dy -Bdynamic"
764                 XLIBELFA="-lelf"
765                 XLIBKVM="-lkvm"
766                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
767                 LD="/usr/ccs/bin/ld"
768                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
769                 LWP_OPTMZ="-g"
770                 ;;
771
772         sun4x_56)
773                 CC=$SOLARISCC
774                 CCOBJ=$SOLARISCC
775                 MT_CC=$SOLARISCC
776                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
777                 MT_LIBS="-lpthread -lsocket"
778                 PAM_CFLAGS="-KPIC"
779                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
780                 SHLIB_CFLAGS="-KPIC"
781                 SHLIB_LDFLAGS="-G -Bsymbolic"
782                 TXLIBS="-L/usr/ccs/lib -lcurses"
783                 XCFLAGS="-dy -Bdynamic"
784                 XLIBELFA="-lelf"
785                 LD="/usr/ccs/bin/ld"
786                 XLIBKVM="-lkvm"
787                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
788                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
789                 LWP_OPTMZ="-g"
790                 ;;
791
792         sun4x_57)
793                 CC=$SOLARISCC
794                 CCOBJ=$SOLARISCC
795                 LD="/usr/ccs/bin/ld"
796                 MT_CC=$SOLARISCC
797                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
798                 MT_LIBS="-lpthread -lsocket"
799                 PAM_CFLAGS="-KPIC"
800                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
801                 SHLIB_CFLAGS="-KPIC"
802                 SHLIB_LDFLAGS="-G -Bsymbolic"
803                 TXLIBS="-lcurses"
804                 XCFLAGS64='${XCFLAGS} -xarch=v9'
805                 XCFLAGS="-dy -Bdynamic"
806                 XLIBELFA="-lelf"
807                 XLIBKVM="-lkvm"
808                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
809                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
810                 LWP_OPTMZ="-g"
811                 ;;
812
813         sun4x_58)
814                 CC=$SOLARISCC
815                 CCOBJ=$SOLARISCC
816                 LD="/usr/ccs/bin/ld"
817                 MT_CC=$SOLARISCC
818                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
819                 MT_LIBS="-lpthread -lsocket"
820                 PAM_CFLAGS="-KPIC"
821                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
822                 SHLIB_CFLAGS="-KPIC"
823                 SHLIB_LDFLAGS="-G -Bsymbolic"
824                 TXLIBS="-lcurses"
825                 XCFLAGS64='${XCFLAGS} -xarch=v9'
826                 XCFLAGS="-dy -Bdynamic"
827                 XLIBELFA="-lelf"
828                 XLIBKVM="-lkvm"
829                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
830                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
831                 LWP_OPTMZ="-g"
832                 ;;
833
834         sun4x_59)
835                 CC=$SOLARISCC
836                 CCOBJ=$SOLARISCC
837                 LD="/usr/ccs/bin/ld"
838                 MT_CC=$SOLARISCC
839                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
840                 MT_LIBS="-lpthread -lsocket"
841                 PAM_CFLAGS="-KPIC"
842                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
843                 SHLIB_CFLAGS="-KPIC"
844                 SHLIB_LDFLAGS="-G -Bsymbolic"
845                 TXLIBS="-lcurses"
846                 XCFLAGS64='${XCFLAGS} -xarch=v9'
847                 XCFLAGS="-dy -Bdynamic"
848                 XLIBELFA="-lelf"
849                 XLIBKVM="-lkvm"
850                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
851                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
852                 LWP_OPTMZ="-g"
853                 ;;
854
855         sun4x_510)
856                 CC=$SOLARISCC
857                 CCOBJ=$SOLARISCC
858                 LD="/usr/ccs/bin/ld"
859                 MT_CC=$SOLARISCC
860                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
861                 MT_LIBS="-lpthread -lsocket"
862                 PAM_CFLAGS="-KPIC"
863                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
864                 SHLIB_CFLAGS="-KPIC"
865                 SHLIB_LDFLAGS="-G -Bsymbolic"
866                 TXLIBS="-lcurses"
867                 XCFLAGS64='${XCFLAGS} -m64'
868                 XCFLAGS="-dy -Bdynamic"
869                 XLIBELFA="-lelf"
870                 XLIBKVM="-lkvm"
871                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
872                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
873                 LWP_OPTMZ="-g"
874                 ;;
875
876         sun4x_511)
877                 CC=$SOLARISCC
878                 CCOBJ=$SOLARISCC
879                 LD="/usr/ccs/bin/ld"
880                 MT_CC=$SOLARISCC
881                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
882                 MT_LIBS="-lpthread -lsocket"
883                 PAM_CFLAGS="-KPIC"
884                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
885                 SHLIB_CFLAGS="-KPIC"
886                 SHLIB_LDFLAGS="-G -Bsymbolic"
887                 TXLIBS="-lcurses"
888                 XCFLAGS64='${XCFLAGS} -xarch=v9'
889                 XCFLAGS="-dy -Bdynamic"
890                 XLIBELFA="-lelf"
891                 XLIBKVM="-lkvm"
892                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
893                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
894                 LWP_OPTMZ="-g"
895                 ;;
896
897         sunx86_57)
898                 CC=$SOLARISCC
899                 CCOBJ=$SOLARISCC
900                 LD="/usr/ccs/bin/ld"
901                 MT_CC=$SOLARISCC
902                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
903                 MT_LIBS="-lpthread -lsocket"
904                 PAM_CFLAGS="-KPIC"
905                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
906                 SHLIB_CFLAGS="-KPIC"
907                 SHLIB_LDFLAGS="-G -Bsymbolic"
908                 TXLIBS="-lcurses"
909                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
910                 XCFLAGS="-dy -Bdynamic"
911                 XLIBELFA="-lelf"
912                 XLIBKVM="-lkvm"
913                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
914                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
915                 ;;
916
917         sunx86_58)
918                 CC=$SOLARISCC
919                 CCOBJ=$SOLARISCC
920                 LD="/usr/ccs/bin/ld"
921                 MT_CC=$SOLARISCC
922                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
923                 MT_LIBS="-lpthread -lsocket"
924                 PAM_CFLAGS="-KPIC"
925                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
926                 SHLIB_CFLAGS="-KPIC"
927                 SHLIB_LDFLAGS="-G -Bsymbolic"
928                 TXLIBS="-lcurses"
929                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
930                 XCFLAGS="-dy -Bdynamic"
931                 XLIBELFA="-lelf"
932                 XLIBKVM="-lkvm"
933                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
934                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
935                 ;;
936
937         sunx86_59)
938                 CC=$SOLARISCC
939                 CCOBJ=$SOLARISCC
940                 LD="/usr/ccs/bin/ld"
941                 MT_CC=$SOLARISCC
942                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
943                 MT_LIBS="-lpthread -lsocket"
944                 PAM_CFLAGS="-KPIC"
945                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
946                 SHLIB_CFLAGS="-KPIC"
947                 SHLIB_LDFLAGS="-G -Bsymbolic"
948                 TXLIBS="-lcurses"
949                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
950                 XCFLAGS="-dy -Bdynamic"
951                 XLIBELFA="-lelf"
952                 XLIBKVM="-lkvm"
953                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
954                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
955                 ;;
956
957         sunx86_510)
958                 CC=$SOLARISCC
959                 CCOBJ=$SOLARISCC
960                 LD="/usr/ccs/bin/ld"
961                 MT_CC=$SOLARISCC
962                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
963                 MT_LIBS="-lpthread -lsocket"
964                 PAM_CFLAGS="-KPIC"
965                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
966                 SHLIB_CFLAGS="-KPIC"
967                 SHLIB_LDFLAGS="-G -Bsymbolic"
968                 TXLIBS="-lcurses"
969                 XCFLAGS64='${XCFLAGS} -m64'
970                 XCFLAGS="-dy -Bdynamic"
971                 XLIBELFA="-lelf"
972                 XLIBKVM="-lkvm"
973                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
974                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
975                 ;;
976
977         sunx86_511)
978                 CC=$SOLARISCC
979                 CCOBJ=$SOLARISCC
980                 LD="/usr/ccs/bin/ld"
981                 MT_CC=$SOLARISCC
982                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
983                 MT_LIBS="-lpthread -lsocket"
984                 PAM_CFLAGS="-KPIC"
985                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
986                 SHLIB_CFLAGS="-KPIC"
987                 SHLIB_LDFLAGS="-G -Bsymbolic"
988                 TXLIBS="-lcurses"
989                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
990                 XCFLAGS="-dy -Bdynamic"
991                 XLIBELFA="-lelf"
992                 XLIBKVM="-lkvm"
993                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
994                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
995                 ;;
996 esac
997
998 #
999 # Special build targets
1000 #
1001 case $AFS_SYSNAME in
1002         sgi_6*)
1003                 IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
1004                 XFS_SIZE_CHECK="xfs_size_check"
1005                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
1006                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
1007         
1008                 AC_SUBST(XFS_SIZE_CHECK)
1009                 AC_SUBST(install_XFS_SIZE_CHECK)
1010                 AC_SUBST(dest_XFS_SIZE_CHECK)
1011         ;;
1012 esac
1013
1014 dnl Disable the default for debugging/optimization if not enabled
1015 if test "x$enable_debug_kernel" = "xno"; then
1016   KERN_DBG=
1017 fi
1018
1019 if test "x$enable_optimize_kernel" = "xno"; then
1020   KERN_OPTMZ=
1021 fi
1022
1023 if test "x$enable_debug" = "xno"; then
1024   DBG=
1025   NO_STRIP_BIN=-s
1026 fi
1027
1028 if test "x$enable_optimize" = "xno"; then
1029   OPTMZ=
1030 fi
1031
1032 if test "x$enable_debug_lwp" = "xno"; then
1033   LWP_DBG=
1034 fi
1035
1036 if test "x$enable_optimize_lwp" = "xno"; then
1037   LWP_OPTMZ=
1038 fi
1039
1040 if test "x$enable_strip_binaries" != "xno"; then
1041   if test "x$enable_strip_binaries" = "xmaybe" -a "x$enable_debug" = "xyes"; then
1042     NO_STRIP_BIN=
1043   else
1044     NO_STRIP_BIN=-s
1045   fi
1046 else
1047   NO_STRIP_BIN=
1048 fi
1049
1050 CFLAGS_NOERROR=
1051
1052 if test "x$GCC" = "xyes"; then
1053   if test "x$enable_warnings" = "xyes"; then
1054     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith"
1055   fi
1056   if test "x$enable_checking" != "xno"; then
1057     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith"
1058     if test "x$enable_checking" != "xall"; then
1059       CFLAGS_NOERROR="-Wno-error"
1060       AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
1061     fi
1062   fi
1063 fi
1064
1065 CFLAGS_NOSTRICT=
1066
1067 if test "x$GCC" = "xyes"; then
1068   CFLAGS_NOSTRICT="-fno-strict-aliasing"
1069 fi
1070
1071 if test "x$GCC" = "xyes"; then
1072   CFLAGS_NOUNUSED="-Wno-unused"
1073 else
1074   CFLAGS_NOUNUSED=
1075 fi
1076
1077 if test "x$GCC" = "xyes"; then
1078   CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
1079 else
1080   CFLAGS_NOOLDSTYLE=
1081 fi
1082
1083 dnl horribly cheating, assuming double / is ok.
1084 case $INSTALL in
1085   ./* ) 
1086     INSTALL="/@abs_top_srcdir@/install-sh -c"
1087   ;;
1088   *) 
1089   ;;
1090 esac
1091
1092 INSTALL_PROGRAM="${INSTALL_PROGRAM} ${NO_STRIP_BIN}"
1093
1094 AC_SUBST(CCXPG2)
1095 AC_SUBST(CCOBJ)
1096 AC_SUBST(AFSD_LIBS)
1097 AC_SUBST(AFSD_LDFLAGS)
1098 AC_SUBST(AIX32)
1099 AC_SUBST(AIX64)
1100 AC_SUBST(AR)
1101 AC_SUBST(AS)
1102 AC_SUBST(CP)
1103 AC_SUBST(DBG)
1104 AC_SUBST(FSINCLUDES)
1105 AC_SUBST(KERN_DBG)
1106 AC_SUBST(KERN_OPTMZ)
1107 AC_SUBST(LD)
1108 AC_SUBST(LEX)
1109 AC_SUBST(LWP_DBG)
1110 AC_SUBST(LWP_OPTMZ)
1111 AC_SUBST(MT_CC)
1112 AC_SUBST(MT_CFLAGS)
1113 AC_SUBST(MT_LIBS)
1114 AC_SUBST(MV)
1115 AC_SUBST(NO_STRIP_BIN)
1116 AC_SUBST(OPTMZ)
1117 AC_SUBST(PAM_CFLAGS)
1118 AC_SUBST(PAM_LIBS)
1119 AC_SUBST(PAM_DBG)
1120 AC_SUBST(PAM_OPTMZ)
1121 AC_SUBST(RANLIB)
1122 AC_SUBST(REGEX_OBJ)
1123 AC_SUBST(RM)
1124 AC_SUBST(RXDEBUG)
1125 AC_SUBST(SHLIB_CFLAGS)
1126 AC_SUBST(SHLIB_LDFLAGS)
1127 AC_SUBST(SHLIB_LINKER)
1128 AC_SUBST(SHLIB_SUFFIX)
1129 AC_SUBST(TXLIBS)
1130 AC_SUBST(VFSCK_CFLAGS)
1131 AC_SUBST(XCFLAGS)
1132 AC_SUBST(CFLAGS_NOERROR)
1133 AC_SUBST(CFLAGS_NOSTRICT)
1134 AC_SUBST(CFLAGS_NOUNUSED)
1135 AC_SUBST(CFLAGS_NOOLDSTYLE)
1136 AC_SUBST(XCFLAGS64)
1137 AC_SUBST(XLDFLAGS)
1138 AC_SUBST(XLDFLAGS64)
1139 AC_SUBST(XLIBELFA)
1140 AC_SUBST(XLIBKVM)
1141 AC_SUBST(XLIBS)
1142 AC_SUBST(YACC)
1143
1144
1145 ])