7b798445bbcd941e3fe2c4abaf8571c2400eaa45
[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*)
291                 LEX="flex -l"
292                 MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
293                 MT_LIBS="-lpthread" # XXX -pthread soon
294                 PAM_OPTMZ=-O2
295                 PAM_CFLAGS="-pipe -fPIC"
296                 SHLIB_LDFLAGS="-shared -Xlinker -x"
297                 SHLIB_LINKER="${MT_CC} -shared"
298                 TXLIBS="/usr/lib/libcurses.so"
299                 XCFLAGS="-pipe"
300                 YACC="yacc"
301                 ;;
302
303         *nbsd15|*nbsd16)
304                 LEX="flex -l"
305                 MT_CFLAGS='${XCFLAGS}'
306                 MT_LIBS=""
307                 PAM_OPTMZ=-O2
308                 PAM_CFLAGS="-pipe -fPIC"
309                 SHLIB_LDFLAGS="-shared -Xlinker -x"
310                 SHLIB_LINKER="${MT_CC} -shared"
311                 TXLIBS="/usr/lib/libcurses.so"
312                 XCFLAGS="-pipe"
313                 YACC="bison -y"
314                 ;;
315
316         ia64_linux24|ia64_linux26)
317                 KERN_OPTMZ=-O2
318                 LEX="flex -l"
319                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
320                 MT_LIBS="-lpthread"
321                 PAM_OPTMZ=-O2
322                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
323                 SHLIB_CFLAGS="-fPIC"
324                 SHLIB_LDFLAGS="-shared -Xlinker -x"
325                 TXLIBS="-lncurses"
326                 XCFLAGS="-D_LARGEFILE64_SOURCE -G0"
327                 SHLIB_LINKER="${MT_CC} -shared"
328                 ;;
329
330         amd64_linux*)
331                 CCOBJ="${CC} -fPIC"
332                 KERN_OPTMZ=-O2
333                 LEX="flex -l"
334                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
335                 MT_LIBS="-lpthread"
336                 PAM_OPTMZ=-O2
337                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
338                 SHLIB_CFLAGS="-fPIC"
339                 SHLIB_LDFLAGS="-shared -Xlinker -x"
340                 TXLIBS="-lncurses"
341                 XCFLAGS="-D_LARGEFILE64_SOURCE"
342                 SHLIB_LINKER="${MT_CC} -shared"
343                 ;;
344
345         ppc64_linux24)
346                 KERN_OPTMZ=-O2
347                 LEX="flex -l"
348                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
349                 MT_LIBS="-lpthread"
350                 PAM_OPTMZ=-O2
351                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
352                 SHLIB_LDFLAGS="-shared -Xlinker -x"
353                 SHLIB_CFLAGS="-fPIC"
354                 TXLIBS="/usr/lib64/libncurses.so"
355                 XCFLAGS="-D_LARGEFILE64_SOURCE"
356                 SHLIB_LINKER="${MT_CC} -shared"
357                 ;;
358
359         ppc64_linux26)
360                 KERN_OPTMZ=-O2
361                 LEX="flex -l"
362                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
363                 MT_LIBS="-lpthread"
364                 PAM_OPTMZ=-O2
365                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
366                 SHLIB_LDFLAGS="-shared -Xlinker -x"
367                 SHLIB_CFLAGS="-fPIC"
368                 TXLIBS="-lncurses"
369                 XCFLAGS="-D_LARGEFILE64_SOURCE -fPIC"
370                 YACC="bison -y"
371                 SHLIB_LINKER="${MT_CC} -shared"
372                 ;;
373
374         i386_umlinux22)
375                 KERN_OPTMZ=-O2
376                 LEX="flex -l"
377                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
378                 MT_LIBS="-lpthread"
379                 PAM_OPTMZ=-O2
380                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
381                 SHLIB_CFLAGS="-fPIC"
382                 SHLIB_LDFLAGS="-shared -Xlinker -x"
383                 TXLIBS="-lncurses"
384                 XCFLAGS="-D_LARGEFILE64_SOURCE"
385                 YACC="bison -y"
386                 SHLIB_LINKER="${MT_CC} -shared"
387                 ;;
388
389         i386_linux*)
390                 KERN_OPTMZ=-O2
391                 LEX="flex -l"
392                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
393                 MT_LIBS="-lpthread"
394                 DBG=-g
395                 KERN_DBG=-g
396                 LWP_DBG=-g
397                 LWP_OPTMZ=-O2
398                 OPTMZ=-O2
399                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
400                 SHLIB_CFLAGS="-fPIC"
401                 SHLIB_LDFLAGS="-shared -Xlinker -x"
402                 TXLIBS="-lncurses"
403                 XCFLAGS="-D_LARGEFILE64_SOURCE"
404                 SHLIB_LINKER="${MT_CC} -shared"
405                 ;;
406
407         i386_umlinux24)
408                 KERN_OPTMZ=-O2
409                 LEX="flex -l"
410                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
411                 MT_LIBS="-lpthread"
412                 DBG=-g
413                 KERN_DBG=-g
414                 LWP_DBG=-g
415                 LWP_OPTMZ=-O2
416                 OPTMZ=-O2
417                 PAM_OPTMZ=-O2
418                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
419                 SHLIB_CFLAGS="-fPIC"
420                 SHLIB_LDFLAGS="-shared -Xlinker -x"
421                 TXLIBS="-lncurses"
422                 XCFLAGS="-D_LARGEFILE64_SOURCE"
423                 SHLIB_LINKER="${MT_CC} -shared"
424                 ;;
425
426         i386_umlinux26)
427                 KERN_OPTMZ=-O2
428                 LEX="flex -l"
429                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
430                 MT_LIBS="-lpthread"
431                 DBG=-g
432                 KERN_DBG=-g
433                 LWP_DBG=-g
434                 LWP_OPTMZ=-O2
435                 OPTMZ=-O2
436                 PAM_OPTMZ=-O2
437                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
438                 SHLIB_CFLAGS="-fPIC"
439                 SHLIB_LDFLAGS="-shared -Xlinker -x"
440                 TXLIBS="-lncurses"
441                 XCFLAGS="-D_LARGEFILE64_SOURCE"
442                 SHLIB_LINKER="${MT_CC} -shared"
443                 ;;
444
445         *_obsd*)
446                 KRB5CFLAGS="-I/usr/include/kerberosV"
447                 KRB5LIBS="-lkrb5 -lcrypto"
448                 LEX="flex -l"
449                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
450                 MT_LIBS="-pthread"
451                 PAM_OPTMZ=-O2
452                 PAM_CFLAGS="-pipe -fpic"
453                 SHLIB_CFLAGS="-fpic"
454                 SHLIB_LDFLAGS="-shared -Xlinker -x"
455                 SHLIB_LINKER="${MT_CC} -shared"
456                 TXLIBS="/usr/lib/libcurses.a"
457                 XCFLAGS=
458                 YACC="yacc"
459                 ;;
460
461         parisc_linux24)
462                 KERN_OPTMZ=-O2
463                 LEX="flex -l"
464                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
465                 MT_LIBS="-lpthread"
466                 PAM_OPTMZ=-O2
467                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
468                 SHLIB_CFLAGS="-fPIC"
469                 SHLIB_LDFLAGS="-shared -Xlinker -x"
470                 TXLIBS="-lncurses"
471                 XCFLAGS="-D_LARGEFILE64_SOURCE"
472                 YACC="bison -y"
473                 SHLIB_LINKER="${MT_CC} -shared"
474                 ;;
475
476         ppc_darwin_70)
477                 CC="cc"
478                 CCOBJ="cc"
479                 MT_CC="cc"
480                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
481                 LEX="lex -l"
482                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
483                 KROOT=
484                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
485                 LWP_OPTMZ="-O2"
486                 REGEX_OBJ="regex.o"
487                 XCFLAGS="-no-cpp-precomp"
488                 TXLIBS="-lncurses"
489                 EXTRA_VLIBOBJS="fstab.o"
490                 SHLIB_LINKER="${MT_CC} -dynamiclib"
491                 SHLIB_SUFFIX="dylib"
492                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
493                 ;;
494
495         *_darwin_80)
496                 CC="cc"
497                 CCOBJ="cc"
498                 MT_CC="cc"
499                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
500                 LEX="lex -l"
501                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
502                 KROOT=
503                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
504                 KERN_OPTMZ="-Os"
505                 LWP_OPTMZ="-Os"
506                 OPTMZ="-Os"
507                 REGEX_OBJ="regex.o"
508                 TXLIBS="-lncurses"
509                 EXTRA_VLIBOBJS="fstab.o"
510                 SHLIB_LINKER="${MT_CC} -dynamiclib"
511                 SHLIB_SUFFIX="dylib"
512                 RANLIB="ranlib -c"
513                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
514                 ;;
515
516         *_darwin_90)
517                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
518                 LEX="lex -l"
519                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
520                 KROOT=
521                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
522                 LD="cc"
523                 KERN_OPTMZ="-Os"
524                 LWP_OPTMZ="-Os"
525                 OPTMZ="-Os"
526                 REGEX_OBJ="regex.o"
527                 TXLIBS="-lncurses"
528                 EXTRA_VLIBOBJS="fstab.o"
529                 SHLIB_LINKER="${MT_CC} -dynamiclib"
530                 SHLIB_SUFFIX="dylib"
531                 RANLIB="ranlib -c"
532                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
533                 ;;
534
535         *_darwin_100)
536                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
537                 LEX="lex -l"
538                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
539                 MT_LIBS="${LIB_AFSDB} -framework CoreFoundation"
540                 KROOT=
541                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
542                 LD="cc"
543                 KERN_OPTMZ="-Os"
544                 LWP_OPTMZ="-Os"
545                 OPTMZ="-Os"
546                 PAM_LIBS="-lpam"
547                 REGEX_OBJ="regex.o"
548                 TXLIBS="-lncurses"
549                 EXTRA_VLIBOBJS="fstab.o"
550                 SHLIB_LINKER="${MT_CC} -dynamiclib"
551                 SHLIB_SUFFIX="dylib"
552                 RANLIB="ranlib"
553                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
554                 ;;
555
556         ppc_linux*)
557                 KERN_OPTMZ=-O2
558                 LEX="flex -l"
559                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
560                 MT_LIBS="-lpthread"
561                 PAM_OPTMZ=-O2
562                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
563                 SHLIB_CFLAGS="-fPIC"
564                 SHLIB_LDFLAGS="-shared -Xlinker -x"
565                 TXLIBS="-lncurses"
566                 XCFLAGS="-D_LARGEFILE64_SOURCE"
567                 YACC="bison -y"
568                 SHLIB_LINKER="${MT_CC} -shared"
569                 ;;
570
571         rs_aix42)
572                 CC="cc"
573                 CCOBJ="cc"
574                 DBG=""
575                 LEX="lex"
576                 LIBSYS_AIX_EXP="afsl.exp"
577                 MT_CC="xlc_r"
578                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
579                 MT_LIBS="-lpthreads"
580                 SHLIB_SUFFIX="o"
581                 TXLIBS="-lcurses"
582                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
583                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
584                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
585                 AIX32=""
586                 AIX64="#"
587                 ;;
588
589
590         rs_aix51)
591                 CC="cc"
592                 CCOBJ="cc"
593                 DBG=""
594                 LEX="lex"
595                 LIBSYS_AIX_EXP="afsl.exp"
596                 MT_CC="xlc_r"
597                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
598                 MT_LIBS="-lpthreads"
599                 SHLIB_SUFFIX="o"
600                 TXLIBS="-lcurses"
601                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
602                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
603                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
604                 AIX32=""
605                 AIX64=""
606                 ;;
607
608         rs_aix52)       
609                 CC="cc"
610                 CCOBJ="cc"
611                 DBG=""
612                 LEX="lex"
613                 LIBSYS_AIX_EXP="afsl.exp"
614                 MT_CC="xlc_r"
615                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
616                 MT_LIBS="-lpthreads"
617                 SHLIB_SUFFIX="o"
618                 TXLIBS="-lcurses"
619                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
620                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
621                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
622                 AIX32=""
623                 AIX64=""
624                 ;;
625
626         rs_aix53)       
627                 CC="cc"
628                 CCOBJ="cc"
629                 DBG="-g"
630                 LEX="lex"
631                 LIBSYS_AIX_EXP="afsl.exp"
632                 MT_CC="xlc_r"
633                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
634                 MT_LIBS="-lpthreads"
635                 SHLIB_SUFFIX="o"
636                 TXLIBS="-lcurses"
637                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
638                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
639                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
640                 AIX32=""
641                 AIX64=""
642                 ;;
643
644         rs_aix61)       
645                 CC="cc"
646                 CCOBJ="cc"
647                 DBG="-g"
648                 LEX="lex"
649                 LIBSYS_AIX_EXP="afsl.exp"
650                 MT_CC="xlc_r"
651                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
652                 MT_LIBS="-lpthreads"
653                 SHLIB_SUFFIX="o"
654                 TXLIBS="-lcurses"
655                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
656                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
657                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
658                 AIX32="#"
659                 AIX64=""
660                 ;;
661
662         s390_linux22)
663                 LD="ld"
664                 KERN_OPTMZ=-O2
665                 LEX="flex -l"
666                 MT_CC="$CC"
667                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
668                 MT_LIBS="-lpthread"
669                 PAM_OPTMZ=-O
670                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
671                 SHLIB_CFLAGS="-fPIC"
672                 SHLIB_LDFLAGS="-shared -Xlinker -x"
673                 TXLIBS="-lncurses"
674                 OPTMZ=-O
675                 XCFLAGS="-D_LARGEFILE64_SOURCE"
676                 YACC="bison -y"
677                 SHLIB_LINKER="${MT_CC} -shared"
678                 ;;
679
680         s390_linux24|s390_linux26)
681                 LD="ld"
682                 KERN_OPTMZ=-O2
683                 LEX="flex -l"
684                 MT_CC="$CC"
685                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
686                 MT_LIBS="-lpthread"
687                 PAM_OPTMZ=-O2
688                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
689                 SHLIB_CFLAGS="-fPIC"
690                 SHLIB_LDFLAGS="-shared -Xlinker -x"
691                 TXLIBS="-lncurses"
692                 XCFLAGS="-D_LARGEFILE64_SOURCE"
693                 YACC="bison -y"
694                 SHLIB_LINKER="${MT_CC} -shared"
695                 ;;
696
697         s390x_linux24|s390x_linux26)
698                 CCOBJ="${CC} -fPIC"
699                 LD="ld"
700                 KERN_OPTMZ=-O2
701                 LEX="flex -l"
702                 MT_CC="$CC"
703                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
704                 MT_LIBS="-lpthread"
705                 PAM_OPTMZ=-O
706                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
707                 SHLIB_CFLAGS="-fPIC"
708                 SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
709                 TXLIBS="-lncurses"
710                 OPTMZ=-O
711                 XCFLAGS="-D_LARGEFILE64_SOURCE -D__s390x__"
712                 YACC="bison -y"
713                 SHLIB_LINKER="${MT_CC} -shared"
714                 ;;
715
716         sgi_62)
717                 CC="cc"
718                 CCOBJ="cc"
719                 MT_CC="cc"
720                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
721                 FSINCLUDES="-I/usr/include/sys/fs"
722                 LEX="lex"
723                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
724                 MT_LIBS="-lpthread"
725                 TXLIBS="-lcurses"
726                 XCFLAGS64="-64 -mips3"
727                 XCFLAGS="-o32"
728                 XLDFLAGS64="-64"
729                 XLDFLAGS="-o32"
730                 SHLIB_LINKER="${CC} -shared"
731                 ;;
732
733         sgi_63)
734                 CC="cc"
735                 CCOBJ="cc"
736                 MT_CC="cc"
737                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
738                 FSINCLUDES="-I/usr/include/sys/fs"
739                 LEX="lex"
740                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
741                 MT_LIBS="-lpthread"
742                 TXLIBS="-lcurses"
743                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
744                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
745                 XLDFLAGS64="-64"
746                 XLDFLAGS="-o32"
747                 SHLIB_LINKER="${CC} -shared"
748                 ;;
749
750         sgi_64)
751                 CC="cc"
752                 CCOBJ="cc"
753                 MT_CC="cc"
754                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
755                 FSINCLUDES="-I/usr/include/sys/fs"
756                 LEX="lex"
757                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
758                 MT_LIBS="-lpthread"
759                 TXLIBS="-lcurses"
760                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
761                 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"
762                 XLDFLAGS64="-64"
763                 XLDFLAGS="-n32"
764                 SHLIB_LINKER="${CC} -shared"
765                 ;;
766
767         sgi_65)
768                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
769                 CC="/usr/bin/cc"
770                 CCOBJ="/usr/bin/cc"
771                 FSINCLUDES="-I/usr/include/sys/fs"
772                 LD="/usr/bin/ld"
773                 LEX="lex"
774                 MT_CC="/usr/bin/cc"
775                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
776                 MT_LIBS="-lpthread"
777                 TXLIBS="-lcurses"
778                 XCFLAGS64="-64 -mips3"
779                 XCFLAGS="-n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
780                 XLDFLAGS64="-64 -mips3"
781                 XLDFLAGS="-n32 -mips3"
782                 SHLIB_LINKER="${CC} -shared"
783                 ;;
784
785         sparc*_linux*)
786                 KERN_OPTMZ=-O2
787                 LEX="flex -l"
788                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
789                 MT_LIBS="-lpthread"
790                 PAM_OPTMZ=-O2
791                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
792                 SHLIB_CFLAGS="-fPIC"
793                 SHLIB_LDFLAGS="-shared -Xlinker -x"
794                 TXLIBS="-lncurses"
795                 XCFLAGS="-D_LARGEFILE64_SOURCE"
796                 XCFLAGS64="-D_LARGEFILE64_SOURCE -m64"
797                 XLDFLAGS64="-m64"
798                 YACC="bison -y"
799                 SHLIB_LINKER="${MT_CC} -shared"
800                 ;;
801
802         sun4_413)
803                 CCXPG2="/usr/xpg2bin/cc"
804                 CC="gcc"
805                 CCOBJ="gcc"
806                 LEX="lex"
807                 SHLIB_CFLAGS="-PIC"
808                 TXLIBS="-lcurses -ltermcap"
809                 XCFLAGS=""
810                 XLIBELFA="-lelf"
811                 XLIBKVM="-lkvm"
812                 XLIBS="${LIB_AFSDB}"
813                 LD="ld"
814                 ;;
815
816         sun4x_55)
817                 CC=$SOLARISCC
818                 CCOBJ=$SOLARISCC
819                 LEX="lex"
820                 MT_CC=$SOLARISCC
821                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
822                 MT_LIBS="-lpthread -lsocket"
823                 SHLIB_CFLAGS="-KPIC"
824                 TXLIBS="-lcurses"
825                 XCFLAGS="-dy -Bdynamic"
826                 XLIBELFA="-lelf"
827                 XLIBKVM="-lkvm"
828                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
829                 LD="/usr/ccs/bin/ld"
830                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
831                 LWP_OPTMZ="-g"
832                 ;;
833
834         sun4x_56)
835                 CC=$SOLARISCC
836                 CCOBJ=$SOLARISCC
837                 LEX="lex"
838                 MT_CC=$SOLARISCC
839                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
840                 MT_LIBS="-lpthread -lsocket"
841                 PAM_CFLAGS="-KPIC"
842                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
843                 SHLIB_CFLAGS="-KPIC"
844                 SHLIB_LDFLAGS="-G -Bsymbolic"
845                 TXLIBS="-L/usr/ccs/lib -lcurses"
846                 XCFLAGS="-dy -Bdynamic"
847                 XLIBELFA="-lelf"
848                 LD="/usr/ccs/bin/ld"
849                 XLIBKVM="-lkvm"
850                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
851                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
852                 LWP_OPTMZ="-g"
853                 ;;
854
855         sun4x_57)
856                 CC=$SOLARISCC
857                 CCOBJ=$SOLARISCC
858                 LEX="lex"
859                 LD="/usr/ccs/bin/ld"
860                 MT_CC=$SOLARISCC
861                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
862                 MT_LIBS="-lpthread -lsocket"
863                 PAM_CFLAGS="-KPIC"
864                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
865                 SHLIB_CFLAGS="-KPIC"
866                 SHLIB_LDFLAGS="-G -Bsymbolic"
867                 TXLIBS="-lcurses"
868                 XCFLAGS64='${XCFLAGS} -xarch=v9'
869                 XCFLAGS="-dy -Bdynamic"
870                 XLIBELFA="-lelf"
871                 XLIBKVM="-lkvm"
872                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
873                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
874                 LWP_OPTMZ="-g"
875                 ;;
876
877         sun4x_58)
878                 CC=$SOLARISCC
879                 CCOBJ=$SOLARISCC
880                 LEX="lex"
881                 LD="/usr/ccs/bin/ld"
882                 MT_CC=$SOLARISCC
883                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
884                 MT_LIBS="-lpthread -lsocket"
885                 PAM_CFLAGS="-KPIC"
886                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
887                 SHLIB_CFLAGS="-KPIC"
888                 SHLIB_LDFLAGS="-G -Bsymbolic"
889                 TXLIBS="-lcurses"
890                 XCFLAGS64='${XCFLAGS} -xarch=v9'
891                 XCFLAGS="-dy -Bdynamic"
892                 XLIBELFA="-lelf"
893                 XLIBKVM="-lkvm"
894                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
895                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
896                 LWP_OPTMZ="-g"
897                 ;;
898
899         sun4x_59)
900                 CC=$SOLARISCC
901                 CCOBJ=$SOLARISCC
902                 LEX="lex"
903                 LD="/usr/ccs/bin/ld"
904                 MT_CC=$SOLARISCC
905                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
906                 MT_LIBS="-lpthread -lsocket"
907                 PAM_CFLAGS="-KPIC"
908                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
909                 SHLIB_CFLAGS="-KPIC"
910                 SHLIB_LDFLAGS="-G -Bsymbolic"
911                 TXLIBS="-lcurses"
912                 XCFLAGS64='${XCFLAGS} -xarch=v9'
913                 XCFLAGS="-dy -Bdynamic"
914                 XLIBELFA="-lelf"
915                 XLIBKVM="-lkvm"
916                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
917                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
918                 LWP_OPTMZ="-g"
919                 ;;
920
921         sun4x_510)
922                 CC=$SOLARISCC
923                 CCOBJ=$SOLARISCC
924                 LEX="lex"
925                 LD="/usr/ccs/bin/ld"
926                 MT_CC=$SOLARISCC
927                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
928                 MT_LIBS="-lpthread -lsocket"
929                 PAM_CFLAGS="-KPIC"
930                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
931                 SHLIB_CFLAGS="-KPIC"
932                 SHLIB_LDFLAGS="-G -Bsymbolic"
933                 TXLIBS="-lcurses"
934                 XCFLAGS64='${XCFLAGS} -m64'
935                 XCFLAGS="-dy -Bdynamic"
936                 XLIBELFA="-lelf"
937                 XLIBKVM="-lkvm"
938                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
939                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
940                 LWP_OPTMZ="-g"
941                 ;;
942
943         sun4x_511)
944                 CC=$SOLARISCC
945                 CCOBJ=$SOLARISCC
946                 LEX="lex"
947                 LD="/usr/ccs/bin/ld"
948                 MT_CC=$SOLARISCC
949                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
950                 MT_LIBS="-lpthread -lsocket"
951                 PAM_CFLAGS="-KPIC"
952                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
953                 SHLIB_CFLAGS="-KPIC"
954                 SHLIB_LDFLAGS="-G -Bsymbolic"
955                 TXLIBS="-lcurses"
956                 XCFLAGS64='${XCFLAGS} -xarch=v9'
957                 XCFLAGS="-dy -Bdynamic"
958                 XLIBELFA="-lelf"
959                 XLIBKVM="-lkvm"
960                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
961                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
962                 LWP_OPTMZ="-g"
963                 ;;
964
965         sunx86_57)
966                 CC=$SOLARISCC
967                 CCOBJ=$SOLARISCC
968                 LEX="lex"
969                 LD="/usr/ccs/bin/ld"
970                 MT_CC=$SOLARISCC
971                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
972                 MT_LIBS="-lpthread -lsocket"
973                 PAM_CFLAGS="-KPIC"
974                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
975                 SHLIB_CFLAGS="-KPIC"
976                 SHLIB_LDFLAGS="-G -Bsymbolic"
977                 TXLIBS="-lcurses"
978                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
979                 XCFLAGS="-dy -Bdynamic"
980                 XLIBELFA="-lelf"
981                 XLIBKVM="-lkvm"
982                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
983                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
984                 ;;
985
986         sunx86_58)
987                 CC=$SOLARISCC
988                 CCOBJ=$SOLARISCC
989                 LEX="lex"
990                 LD="/usr/ccs/bin/ld"
991                 MT_CC=$SOLARISCC
992                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
993                 MT_LIBS="-lpthread -lsocket"
994                 PAM_CFLAGS="-KPIC"
995                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
996                 SHLIB_CFLAGS="-KPIC"
997                 SHLIB_LDFLAGS="-G -Bsymbolic"
998                 TXLIBS="-lcurses"
999                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
1000                 XCFLAGS="-dy -Bdynamic"
1001                 XLIBELFA="-lelf"
1002                 XLIBKVM="-lkvm"
1003                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
1004                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
1005                 ;;
1006
1007         sunx86_59)
1008                 CC=$SOLARISCC
1009                 CCOBJ=$SOLARISCC
1010                 LEX="lex"
1011                 LD="/usr/ccs/bin/ld"
1012                 MT_CC=$SOLARISCC
1013                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
1014                 MT_LIBS="-lpthread -lsocket"
1015                 PAM_CFLAGS="-KPIC"
1016                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
1017                 SHLIB_CFLAGS="-KPIC"
1018                 SHLIB_LDFLAGS="-G -Bsymbolic"
1019                 TXLIBS="-lcurses"
1020                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
1021                 XCFLAGS="-dy -Bdynamic"
1022                 XLIBELFA="-lelf"
1023                 XLIBKVM="-lkvm"
1024                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
1025                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
1026                 ;;
1027
1028         sunx86_510)
1029                 CC=$SOLARISCC
1030                 CCOBJ=$SOLARISCC
1031                 LEX="lex"
1032                 LD="/usr/ccs/bin/ld"
1033                 MT_CC=$SOLARISCC
1034                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
1035                 MT_LIBS="-lpthread -lsocket"
1036                 PAM_CFLAGS="-KPIC"
1037                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
1038                 SHLIB_CFLAGS="-KPIC"
1039                 SHLIB_LDFLAGS="-G -Bsymbolic"
1040                 TXLIBS="-lcurses"
1041                 XCFLAGS64='${XCFLAGS} -m64'
1042                 XCFLAGS="-dy -Bdynamic"
1043                 XLIBELFA="-lelf"
1044                 XLIBKVM="-lkvm"
1045                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
1046                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
1047                 ;;
1048
1049         sunx86_511)
1050                 CC=$SOLARISCC
1051                 CCOBJ=$SOLARISCC
1052                 LEX="lex"
1053                 LD="/usr/ccs/bin/ld"
1054                 MT_CC=$SOLARISCC
1055                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
1056                 MT_LIBS="-lpthread -lsocket"
1057                 PAM_CFLAGS="-KPIC"
1058                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
1059                 SHLIB_CFLAGS="-KPIC"
1060                 SHLIB_LDFLAGS="-G -Bsymbolic"
1061                 TXLIBS="-lcurses"
1062                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
1063                 XCFLAGS="-dy -Bdynamic"
1064                 XLIBELFA="-lelf"
1065                 XLIBKVM="-lkvm"
1066                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
1067                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
1068                 ;;
1069 esac
1070
1071 #
1072 # Special build targets
1073 #
1074 case $AFS_SYSNAME in
1075         sgi_6*)
1076                 IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
1077                 XFS_SIZE_CHECK="xfs_size_check"
1078                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
1079                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
1080         
1081                 AC_SUBST(XFS_SIZE_CHECK)
1082                 AC_SUBST(install_XFS_SIZE_CHECK)
1083                 AC_SUBST(dest_XFS_SIZE_CHECK)
1084         ;;
1085 esac
1086
1087
1088
1089 dnl pthreads fixes
1090 case $AFS_SYSNAME in
1091 dnl we'll go ahead and turn on XOPEN2K and ISO_C99
1092 dnl if this causes problems, we should scale back to _XOPEN_SOURCE=500
1093         *linux*)
1094                 MT_CFLAGS="${MT_CFLAGS} -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
1095         ;;
1096 esac
1097
1098
1099 dnl Disable the default for debugging/optimization if not enabled
1100 if test "x$enable_debug_kernel" = "xno"; then
1101   KERN_DBG=
1102 fi
1103
1104 if test "x$enable_optimize_kernel" = "xno"; then
1105   KERN_OPTMZ=
1106 fi
1107
1108 if test "x$enable_debug" = "xno"; then
1109   DBG=
1110   NO_STRIP_BIN=-s
1111 fi
1112
1113 if test "x$enable_optimize" = "xno"; then
1114   OPTMZ=
1115 fi
1116
1117 if test "x$enable_debug_lwp" = "xno"; then
1118   LWP_DBG=
1119 fi
1120
1121 if test "x$enable_optimize_lwp" = "xno"; then
1122   LWP_OPTMZ=
1123 fi
1124
1125 if test "x$enable_strip_binaries" != "xno"; then
1126   if test "x$enable_strip_binaries" = "xmaybe" -a "x$enable_debug" = "xyes"; then
1127     NO_STRIP_BIN=
1128   else
1129     NO_STRIP_BIN=-s
1130   fi
1131 else
1132   NO_STRIP_BIN=
1133 fi
1134
1135 CFLAGS_NOERROR=
1136
1137 if test "x$GCC" = "xyes"; then
1138   if test "x$enable_warnings" = "xyes"; then
1139     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith"
1140   fi
1141   if test "x$enable_checking" != "xno"; then
1142     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith"
1143     if test "x$enable_checking" != "xall"; then
1144       CFLAGS_NOERROR="-Wno-error"
1145       AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
1146     fi
1147   fi
1148 fi
1149
1150 if test "x$GCC" = "xyes"; then
1151   CFLAGS_NOUNUSED="-Wno-unused"
1152 else
1153   CFLAGS_NOUNUSED=
1154 fi
1155
1156 dnl horribly cheating, assuming double / is ok.
1157 case $INSTALL in
1158   ./* ) 
1159     INSTALL="/@abs_top_srcdir@/install-sh -c"
1160   ;;
1161   *) 
1162   ;;
1163 esac
1164
1165 INSTALL_PROGRAM="${INSTALL_PROGRAM} ${NO_STRIP_BIN}"
1166
1167 AC_SUBST(CCXPG2)
1168 AC_SUBST(CCOBJ)
1169 AC_SUBST(AFSD_LIBS)
1170 AC_SUBST(AFSD_LDFLAGS)
1171 AC_SUBST(AIX32)
1172 AC_SUBST(AIX64)
1173 AC_SUBST(AR)
1174 AC_SUBST(AS)
1175 AC_SUBST(CP)
1176 AC_SUBST(DBG)
1177 AC_SUBST(FSINCLUDES)
1178 AC_SUBST(KERN_DBG)
1179 AC_SUBST(KERN_OPTMZ)
1180 AC_SUBST(LD)
1181 AC_SUBST(LEX)
1182 AC_SUBST(LWP_DBG)
1183 AC_SUBST(LWP_OPTMZ)
1184 AC_SUBST(MT_CC)
1185 AC_SUBST(MT_CFLAGS)
1186 AC_SUBST(MT_LIBS)
1187 AC_SUBST(MV)
1188 AC_SUBST(NO_STRIP_BIN)
1189 AC_SUBST(OPTMZ)
1190 AC_SUBST(PAM_CFLAGS)
1191 AC_SUBST(PAM_LIBS)
1192 AC_SUBST(PAM_DBG)
1193 AC_SUBST(PAM_OPTMZ)
1194 AC_SUBST(RANLIB)
1195 AC_SUBST(REGEX_OBJ)
1196 AC_SUBST(RM)
1197 AC_SUBST(RXDEBUG)
1198 AC_SUBST(SHLIB_CFLAGS)
1199 AC_SUBST(SHLIB_LDFLAGS)
1200 AC_SUBST(SHLIB_LINKER)
1201 AC_SUBST(SHLIB_SUFFIX)
1202 AC_SUBST(TXLIBS)
1203 AC_SUBST(VFSCK_CFLAGS)
1204 AC_SUBST(XCFLAGS)
1205 AC_SUBST(CFLAGS_NOERROR)
1206 AC_SUBST(CFLAGS_NOUNUSED)
1207 AC_SUBST(XCFLAGS64)
1208 AC_SUBST(XLDFLAGS)
1209 AC_SUBST(XLDFLAGS64)
1210 AC_SUBST(XLIBELFA)
1211 AC_SUBST(XLIBKVM)
1212 AC_SUBST(XLIBS)
1213 AC_SUBST(YACC)
1214
1215
1216 ])