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