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