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