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