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