f2ae86da0f47053750af4b1342dab4db2ec5c985
[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 SHLIB_SUFFIX="so"
7 CC="cc"
8 MT_CC="cc"
9 XLIBS="${LIB_AFSDB}"
10
11 dnl debugging and optimization flag defaults
12 dnl Note, these are all the defaults for if debug/optimize turned on, and
13 dnl the arch cases below do not override
14 KERN_DBG=-g
15 KERN_OPTMZ=-O
16 DBG=-g
17 OPTMZ=-O
18 LWP_DBG=-g
19 LWP_OPTMZ=-O
20
21 dnl standard programs
22 AC_PROG_RANLIB
23 AC_CHECK_PROGS(AS, as, [${am_missing_run}as])
24 AC_CHECK_PROGS(AR, ar, [${am_missing_run}ar])
25 AC_CHECK_PROGS(MV, mv, [${am_missing_run}mv])
26 AC_CHECK_PROGS(RM, rm, [${am_missing_run}rm])
27 AC_CHECK_PROGS(LD, ld, [${am_missing_run}ld])
28 AC_CHECK_PROGS(CP, cp, [${am_missing_run}cp])
29 AC_CHECK_PROGS(STRIP, strip, [${am_missing_run}strip])
30 AC_CHECK_PROGS(LORDER, lorder, [${am_missing_run}lorder])
31
32 dnl TODO - need to disable STRIP if we are doing debugging in any user space code
33
34 case $AFS_SYSNAME in
35         alpha_dux40)
36                 LEX="lex"
37                 CSTATIC="-non_shared"
38                 DBG="-g3"
39                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
40                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
41                 TXLIBS="-lcurses"
42                 XCFLAGS="-D_NO_PROTO -DOSF"
43                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
44                 ;;
45
46         alpha_dux50)
47                 LEX="flex -l"
48                 DBG="-g3"
49                 CSTATIC="-non_shared"
50                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
51                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
52                 TXLIBS="-lcurses"
53                 XCFLAGS="-D_NO_PROTO -DOSF"
54                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
55                 ;;
56
57         alpha_dux51)
58                 LEX="flex -l"
59                 DBG="-g3"
60                 CSTATIC="-non_shared"
61                 LWP_OPTMZ="-O2"
62                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
63                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
64                 TXLIBS="-lcurses"
65                 XCFLAGS="-D_NO_PROTO -DOSF"
66                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
67                 ;;
68
69         alpha_linux_22)
70                 KERN_OPTMZ=-O2
71                 LEX="flex -l"
72                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
73                 MT_LIBS="-lpthread"
74                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
75                 SHLIB_LDFLAGS="-shared -Xlinker -x"
76                 TXLIBS="/usr/lib/libncurses.so"
77                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
78                 YACC="bison -y"
79                 SHLIB_LINKER="${MT_CC} -shared"
80                 ;;
81
82         alpha_linux_24)
83                 KERN_OPTMZ=-O2
84                 LEX="flex -l"
85                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
86                 MT_LIBS="-lpthread"
87                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
88                 SHLIB_LDFLAGS="-shared -Xlinker -x"
89                 TXLIBS="/usr/lib/libncurses.so"
90                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
91                 YACC="bison -y"
92                 SHLIB_LINKER="${MT_CC} -shared"
93                 ;;
94
95         hp_ux102)
96                 AS="/usr/ccs/bin/as"
97                 CC="/opt/ansic/bin/cc -Ae"
98                 DBM="/lib/libndbm.a"
99                 LD="/bin/ld"
100                 LEX="/opt/langtools/bin/lex"
101                 LWP_OPTMZ="-O"
102                 MT_CC="/opt/ansic/bin/cc -Ae"
103                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
104                 MT_LIBS="-L/opt/dce/lib -ldce"
105                 MV="/bin/mv"
106                 OPTMZ="-O"
107                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
108                 PAM_LIBS="/usr/lib/libpam.1"
109                 RANLIB="/usr/bin/ranlib"
110                 RM="/bin/rm"
111                 SHLIB_LDFLAGS="-b -Bsymbolic"
112                 SHLIB_SUFFIX="sl"
113                 TXLIBS="/usr/lib/libHcurses.a"
114                 VFSCK_CFLAGS="-D_FILE64"
115                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
116                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
117                 XCFLAGS="${XCFLAGS0} +DA1.0"
118                 YACC="/opt/langtools/bin/yacc"
119                 SHLIB_LINKER="ld -b"
120                 ;;
121
122         hp_ux110)
123                 AR="/usr/bin/ar"
124                 AS="/usr/ccs/bin/as"
125                 CC="/opt/ansic/bin/cc"
126                 DBM="/lib/libndbm.a"
127                 LD="/bin/ld   "
128                 LEX="/opt/langtools/bin/lex"
129                 LWP_OPTMZ="-O"
130                 MT_CC="$CC"
131                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
132                 MT_LIBS="-lpthread"
133                 MV="/bin/mv"
134                 OPTMZ="-O"
135                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
136                 PAM_LIBS="/usr/lib/libpam.1"
137                 RANLIB="/usr/bin/ranlib"
138                 RM="/bin/rm"
139                 SHLIB_LDFLAGS="-b -Bsymbolic"
140                 SHLIB_SUFFIX="sl"
141                 TXLIBS="/usr/lib/libHcurses.a"
142                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
143                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
144                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
145                 XCFLAGS="${XCFLAGS0} +DA1.0"
146                 XLIBELFA="-lelf"
147                 #XLIBS="${LIB_AFSDB} -lnsl"
148                 XLIBS="${LIB_AFSDB}"
149                 YACC="/opt/langtools/bin/yacc"
150                 SHLIB_LINKER="ld -b"
151                 ;;
152
153         i386_fbsd_4*)
154                 LEX="flex -l"
155                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
156                 MT_LIBS="-pthread"
157                 #MT_CFLAGS='-DAFS_PTHREAD_ENV -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads ${XCFLAGS}'
158                 #MT_LIBS="-L/usr/local/lib -llthread -llgcc_r"
159                 PAM_CFLAGS="-O2 -pipe -fPIC"
160                 SHLIB_LDFLAGS="-shared -Xlinker -x"
161                 TXLIBS="/usr/lib/libncurses.so"
162                 XCFLAGS="-O2 -pipe"
163                 XLIBS="${LIB_AFSDB} -lcompat"
164                 YACC="byacc"
165                 ;;
166
167         *nbsd20)
168                 LEX="flex -l"
169                 MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
170                 MT_LIBS="-lpthread" # XXX -pthread soon
171                 PAM_CFLAGS="-O2 -pipe -fPIC"
172                 SHLIB_LDFLAGS="-shared -Xlinker -x"
173                 TXLIBS="/usr/lib/libcurses.so"
174                 XCFLAGS="-O2 -pipe"
175                 XLIBS="${LIB_AFSDB} -lcompat"
176                 YACC="yacc"
177                 ;;
178
179         *nbsd15|*nbsd16)
180                 LEX="flex -l"
181                 MT_CFLAGS='${XCFLAGS}'
182                 MT_LIBS=""
183                 PAM_CFLAGS="-O2 -pipe -fPIC"
184                 SHLIB_LDFLAGS="-shared -Xlinker -x"
185                 TXLIBS="/usr/lib/libcurses.so"
186                 XCFLAGS="-O2 -pipe"
187                 XLIBS="${LIB_AFSDB} -lcompat"
188                 YACC="bison -y"
189                 ;;
190
191         ia64_linux24)
192                 KERN_OPTMZ=-O2
193                 LEX="flex -l"
194                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
195                 MT_LIBS="-lpthread"
196                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
197                 SHLIB_LDFLAGS="-shared -Xlinker -x"
198                 TXLIBS="/usr/lib/libncurses.so"
199                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
200                 SHLIB_LINKER="${MT_CC} -shared"
201                 ;;
202
203         i386_linux22)
204                 CC="gcc -pipe"
205                 MT_CC="gcc -pipe"
206                 KERN_OPTMZ=-O2
207                 LEX="flex -l"
208                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
209                 MT_LIBS="-lpthread"
210                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
211                 SHLIB_LDFLAGS="-shared -Xlinker -x"
212                 TXLIBS="/usr/lib/libncurses.so"
213                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
214                 YACC="bison -y"
215                 SHLIB_LINKER="${MT_CC} -shared"
216                 ;;
217
218         i386_linux24)
219                 CC="gcc -pipe"
220                 MT_CC="gcc -pipe"
221                 KERN_OPTMZ=-O2
222                 LEX="flex -l"
223                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
224                 MT_LIBS="-lpthread"
225                 DBG=-g
226                 KERN_DBG=-g
227                 LWP_DBG=-g
228                 LWP_OPTMZ=-O2
229                 OPTMZ=-O2
230                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
231                 SHLIB_LDFLAGS="-shared -Xlinker -x"
232                 TXLIBS="/usr/lib/libncurses.so"
233                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
234                 SHLIB_LINKER="${MT_CC} -shared"
235                 ;;
236
237         *_obsd*)
238                 LEX="flex -l"
239                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
240                 MT_LIBS="-pthread"
241                 PAM_CFLAGS="-O2 -pipe -fpic"
242                 SHLIB_CFLAGS="-fpic"
243                 SHLIB_LDFLAGS="-shared -Xlinker -x"
244                 TXLIBS="/usr/lib/libcurses.a"
245                 XCFLAGS="-O2"
246                 XLIBS="${LIB_AFSDB} -lcompat"
247                 YACC="yacc"
248                 ;;
249
250         parisc_linux24)
251                 KERN_OPTMZ=-O2
252                 LEX="flex -l"
253                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
254                 MT_LIBS="-lpthread"
255                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
256                 SHLIB_LDFLAGS="-shared -Xlinker -x"
257                 TXLIBS="/usr/lib/libncurses.so"
258                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
259                 YACC="bison -y"
260                 SHLIB_LINKER="${MT_CC} -shared"
261                 ;;
262
263         ppc_darwin_12)
264                 LEX="lex -l"
265                 REGEX_OBJ="regex.o"
266                 XCFLAGS="-traditional-cpp"
267                 ;;
268
269         ppc_darwin_13)
270                 LEX="lex -l"
271                 LWP_OPTMZ="-O2"
272                 REGEX_OBJ="regex.o"
273                 XCFLAGS="-no-cpp-precomp"
274                 ;;
275
276         ppc_darwin_14)
277                 LEX="lex -l"
278                 LWP_OPTMZ="-O2"
279                 REGEX_OBJ="regex.o"
280                 XCFLAGS="-no-cpp-precomp"
281                 ;;
282
283         ppc_darwin_60)
284                 LEX="lex -l"
285                 LWP_OPTMZ="-O2"
286                 REGEX_OBJ="regex.o"
287                 XCFLAGS="-no-cpp-precomp"
288                 TXLIBS="-lncurses"
289                 ;;
290
291         ppc_linux22)
292                 INSTALL="install"
293                 KERN_OPTMZ=-O2
294                 LEX="flex -l"
295                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
296                 MT_LIBS="-lpthread"
297                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
298                 SHLIB_LDFLAGS="-shared -Xlinker -x"
299                 TXLIBS="/usr/lib/libncurses.so"
300                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
301                 YACC="bison -y"
302                 SHLIB_LINKER="${MT_CC} -shared"
303                 ;;
304
305         ppc_linux24)
306                 KERN_OPTMZ=-O2
307                 LEX="flex -l"
308                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
309                 MT_LIBS="-lpthread"
310                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
311                 SHLIB_LDFLAGS="-shared -Xlinker -x"
312                 TXLIBS="/usr/lib/libncurses.so"
313                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
314                 YACC="bison -y"
315                 SHLIB_LINKER="${MT_CC} -shared"
316                 ;;
317
318         rs_aix42)
319                 DBG=""
320                 LEX="lex"
321                 LIBSYS_AIX_EXP="afsl.exp"
322                 MT_CC="xlc_r"
323                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
324                 MT_LIBS="-lpthreads"
325                 SHLIB_SUFFIX="o"
326                 TXLIBS="-lcurses"
327                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
328                 XLIBS="${LIB_AFSDB} -ldl"
329                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
330                 ;;
331
332         rs_aix51)
333                 DBG=""
334                 LEX="lex"
335                 LIBSYS_AIX_EXP="afsl.exp"
336                 MT_CC="xlc_r"
337                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
338                 MT_LIBS="-lpthreads"
339                 SHLIB_SUFFIX="o"
340                 TXLIBS="-lcurses"
341                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
342                 XLIBS="${LIB_AFSDB} -ldl"
343                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
344                 ;;
345
346         s390_linux22)
347                 CC="gcc"
348                 LD="gcc"
349                 KERN_OPTMZ=-O2
350                 LEX="flex -l"
351                 MT_CC="$CC"
352                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
353                 MT_LIBS="-lpthread"
354                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
355                 SHLIB_LDFLAGS="-shared -Xlinker -x"
356                 TXLIBS="/usr/lib/libncurses.so"
357                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
358                 YACC="bison -y"
359                 SHLIB_LINKER="${MT_CC} -shared"
360                 ;;
361
362         s390_linux24)
363                 CC="gcc"
364                 LD="gcc"
365                 KERN_OPTMZ=-O2
366                 LEX="flex -l"
367                 MT_CC="$CC"
368                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
369                 MT_LIBS="-lpthread"
370                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
371                 SHLIB_LDFLAGS="-shared -Xlinker -x"
372                 TXLIBS="/usr/lib/libncurses.so"
373                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
374                 YACC="bison -y"
375                 SHLIB_LINKER="${MT_CC} -shared"
376                 ;;
377
378         sgi_62)
379                 PINSTALL_LIBS=-lmld
380                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
381                 FSINCLUDES="-I/usr/include/sys/fs"
382                 LEX="lex"
383                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
384                 MT_LIBS="-lpthread"
385                 TXLIBS="-lcurses"
386                 XCFLAGS64="-64 -mips3"
387                 XCFLAGS="-o32"
388                 XLDFLAGS64="-64"
389                 XLDFLAGS="-o32"
390                 SHLIB_LINKER="${CC} -shared"
391                 ;;
392
393         sgi_63)
394                 PINSTALL_LIBS=-lmld
395                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
396                 FSINCLUDES="-I/usr/include/sys/fs"
397                 LEX="lex"
398                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
399                 MT_LIBS="-lpthread"
400                 TXLIBS="-lcurses"
401                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
402                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
403                 XLDFLAGS64="-64"
404                 XLDFLAGS="-o32"
405                 SHLIB_LINKER="${CC} -shared"
406                 ;;
407
408         sgi_64)
409                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
410                 FSINCLUDES="-I/usr/include/sys/fs"
411                 LEX="lex"
412                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
413                 MT_LIBS="-lpthread"
414                 TXLIBS="-lcurses"
415                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
416                 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"
417                 XLDFLAGS64="-64"
418                 XLDFLAGS="-n32"
419                 SHLIB_LINKER="${CC} -shared"
420                 ;;
421
422         sgi_65)
423                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
424                 CC="/usr/bin/cc"
425                 FSINCLUDES="-I/usr/include/sys/fs"
426                 LD="/usr/bin/ld"
427                 LEX="lex"
428                 MT_CC="/usr/bin/cc"
429                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
430                 MT_LIBS="-lpthread"
431                 TXLIBS="-lcurses"
432                 XCFLAGS64="-64 -mips3"
433                 XCFLAGS="-n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
434                 XLDFLAGS64="-64 -mips3"
435                 XLDFLAGS="-n32 -mips3"
436                 SHLIB_LINKER="${CC} -shared"
437                 ;;
438
439         sparc64_linux22)
440                 KERN_OPTMZ=-O2
441                 LEX="flex -l"
442                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
443                 MT_LIBS="-lpthread"
444                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
445                 SHLIB_LDFLAGS="-shared -Xlinker -x"
446                 TXLIBS="/usr/lib/libncurses.so"
447                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
448                 YACC="bison -y"
449                 SHLIB_LINKER="${MT_CC} -shared"
450                 ;;
451
452         sparc64_linux24)
453                 KERN_OPTMZ=-O2
454                 LEX="flex -l"
455                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
456                 MT_LIBS="-lpthread"
457                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
458                 SHLIB_LDFLAGS="-shared -Xlinker -x"
459                 TXLIBS="/usr/lib/libncurses.so"
460                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
461                 YACC="bison -y"
462                 SHLIB_LINKER="${MT_CC} -shared"
463                 ;;
464
465         sparc_linux22)
466                 KERN_OPTMZ=-O2
467                 LEX="flex -l"
468                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
469                 MT_LIBS="-lpthread"
470                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
471                 SHLIB_LDFLAGS="-shared -Xlinker -x"
472                 TXLIBS="/usr/lib/libncurses.so"
473                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
474                 YACC="bison -y"
475                 SHLIB_LINKER="${MT_CC} -shared"
476                 ;;
477
478         sun4_413)
479                 CCXPG2="/usr/xpg2bin/cc"
480                 CC="gcc"
481                 LEX="lex"
482                 SHLIB_CFLAGS="-PIC"
483                 TXLIBS="-lcurses -ltermcap"
484                 XCFLAGS=""
485                 XLIBELFA="-lelf"
486                 XLIBKVM="-lkvm"
487                 XLIBS="${LIB_AFSDB}"
488                 LD="ld"
489                 ;;
490
491         sun4x_55)
492                 CC="/opt/SUNWspro/bin/cc"
493                 LEX="lex"
494                 MT_CC="/opt/SUNWspro/bin/cc"
495                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
496                 MT_LIBS="-lpthread -lsocket"
497                 SHLIB_CFLAGS="-KPIC"
498                 TXLIBS="-lcurses"
499                 XCFLAGS="-dy -Bdynamic"
500                 XLIBELFA="-lelf"
501                 XLIBKVM="-lkvm"
502                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
503                 LD="/usr/ccs/bin/ld"
504                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
505                 ;;
506
507         sun4x_56)
508                 CC="/opt/SUNWspro/bin/cc"
509                 LEX="lex"
510                 MT_CC="/opt/SUNWspro/bin/cc"
511                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
512                 MT_LIBS="-lpthread -lsocket"
513                 PAM_CFLAGS="-KPIC"
514                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
515                 SHLIB_CFLAGS="-KPIC"
516                 SHLIB_LDFLAGS="-G -Bsymbolic"
517                 TXLIBS="-L/usr/ccs/lib -lcurses"
518                 XCFLAGS="-dy -Bdynamic"
519                 XLIBELFA="-lelf"
520                 LD="/usr/ccs/bin/ld"
521                 XLIBKVM="-lkvm"
522                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
523                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
524                 ;;
525
526         sun4x_57)
527                 CC="/opt/SUNWspro/bin/cc"
528                 LEX="lex"
529                 LD="/usr/ccs/bin/ld"
530                 MT_CC="/opt/SUNWspro/bin/cc"
531                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
532                 MT_LIBS="-lpthread -lsocket"
533                 PAM_CFLAGS="-KPIC"
534                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
535                 SHLIB_CFLAGS="-KPIC"
536                 SHLIB_LDFLAGS="-G -Bsymbolic"
537                 TXLIBS="-lcurses"
538                 XCFLAGS64='${XCFLAGS} -xarch=v9'
539                 XCFLAGS="-dy -Bdynamic"
540                 XLIBELFA="-lelf"
541                 XLIBKVM="-lkvm"
542                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
543                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
544                 ;;
545
546         sun4x_58)
547                 CC="/opt/SUNWspro/bin/cc"
548                 LEX="lex"
549                 LD="/usr/ccs/bin/ld"
550                 MT_CC="/opt/SUNWspro/bin/cc"
551                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
552                 MT_LIBS="-lpthread -lsocket"
553                 PAM_CFLAGS="-KPIC"
554                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
555                 SHLIB_CFLAGS="-KPIC"
556                 SHLIB_LDFLAGS="-G -Bsymbolic"
557                 TXLIBS="-lcurses"
558                 XCFLAGS64='${XCFLAGS} -xarch=v9'
559                 XCFLAGS="-dy -Bdynamic"
560                 XLIBELFA="-lelf"
561                 XLIBKVM="-lkvm"
562                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
563                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
564                 ;;
565
566         sun4x_59)
567                 CC="/opt/SUNWspro/bin/cc"
568                 LEX="lex"
569                 LD="/usr/ccs/bin/ld"
570                 MT_CC="/opt/SUNWspro/bin/cc"
571                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
572                 MT_LIBS="-lpthread -lsocket"
573                 PAM_CFLAGS="-KPIC"
574                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
575                 SHLIB_CFLAGS="-KPIC"
576                 SHLIB_LDFLAGS="-G -Bsymbolic"
577                 TXLIBS="-lcurses"
578                 XCFLAGS64='${XCFLAGS} -xarch=v9'
579                 XCFLAGS="-dy -Bdynamic"
580                 XLIBELFA="-lelf"
581                 XLIBKVM="-lkvm"
582                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
583                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
584                 ;;
585
586         sunx86_57)
587                 CC="/opt/SUNWspro/bin/cc"
588                 LEX="lex"
589                 LD="/usr/ccs/bin/ld"
590                 MT_CC="/opt/SUNWspro/bin/cc"
591                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
592                 MT_LIBS="-lpthread -lsocket"
593                 PAM_CFLAGS="-KPIC"
594                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
595                 SHLIB_CFLAGS="-KPIC"
596                 SHLIB_LDFLAGS="-G -Bsymbolic"
597                 TXLIBS="-lcurses"
598                 XCFLAGS64='${XCFLAGS} -xarch=v9'
599                 XCFLAGS="-dy -Bdynamic"
600                 XLIBELFA="-lelf"
601                 XLIBKVM="-lkvm"
602                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
603                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
604                 ;;
605
606
607         sunx86_58)
608                 CC="/opt/SUNWspro/bin/cc"
609                 LEX="lex"
610                 LD="/usr/ccs/bin/ld"
611                 MT_CC="/opt/SUNWspro/bin/cc"
612                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
613                 MT_LIBS="-lpthread -lsocket"
614                 PAM_CFLAGS="-KPIC"
615                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
616                 SHLIB_CFLAGS="-KPIC"
617                 SHLIB_LDFLAGS="-G -Bsymbolic"
618                 TXLIBS="-lcurses"
619                 XCFLAGS64='${XCFLAGS} -xarch=v9'
620                 XCFLAGS="-dy -Bdynamic"
621                 XLIBELFA="-lelf"
622                 XLIBKVM="-lkvm"
623                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
624                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
625                 ;;
626
627
628 esac
629
630 #
631 # Special build targets
632 #
633 case $AFS_SYSNAME in
634         sgi_6*)
635                 XFS_SIZE_CHECK="xfs_size_check"
636                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
637                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
638         
639                 AC_SUBST(XFS_SIZE_CHECK)
640                 AC_SUBST(install_XFS_SIZE_CHECK)
641                 AC_SUBST(dest_XFS_SIZE_CHECK)
642         ;;
643         
644         sun4x_*|sunx86_*)
645                 FS_CONV_SOL26="fs_conv_sol26"
646                 install_FS_CONV_SOL26='$(DESTDIR)${afssrvsbindir}/fs_conv_sol26'
647                 dest_FS_CONV_SOL26='$(DEST)/root.server/usr/afs/bin/fs_conv_sol26'
648
649                 AC_SUBST(FS_CONV_SOL26)
650                 AC_SUBST(install_FS_CONV_SOL26)
651                 AC_SUBST(dest_FS_CONV_SOL26)
652         ;;
653
654         alpha_dux*)
655                 FS_CONV_OSF40D="fs_conv_dux40D"
656                 install_FS_CONV_OSF40D='$(DESTDIR)${afssrvsbindir}/fs_conv_dux40D'
657                 dest_FS_CONV_OSF40D='$(DEST)/root.server/usr/afs/bin/fs_conv_dux40D'
658
659                 AC_SUBST(FS_CONV_OSF40D)
660                 AC_SUBST(install_FS_CONV_OSF40D)
661                 AC_SUBST(dest_FS_CONV_OSF40D)
662         ;;
663 esac
664
665 dnl Disable the default for debugging/optimization if not enabled
666 if test "x$enable_debug_kernel" = "xno"; then
667   KERN_DBG=
668 fi
669
670 if test "x$enable_optimize_kernel" = "xno"; then
671   KERN_OPTMZ=
672 fi
673
674 if test "x$enable_debug" = "xno"; then
675   DBG=
676 fi
677
678 if test "x$enable_optimize" = "xno"; then
679   OPTMZ=
680 fi
681
682 if test "x$enable_debug_lwp" = "xno"; then
683   LWP_DBG=
684 fi
685
686 if test "x$enable_optimize_lwp" = "xno"; then
687   LWP_OPTMZ=
688 fi
689
690 AC_SUBST(CCXPG2)
691 AC_SUBST(AFSD_LIBS)
692 AC_SUBST(AR)
693 AC_SUBST(AS)
694 AC_SUBST(CP)
695 AC_SUBST(DBG)
696 AC_SUBST(FSINCLUDES)
697 AC_SUBST(KERN_DBG)
698 AC_SUBST(KERN_OPTMZ)
699 AC_SUBST(LD)
700 AC_SUBST(LEX)
701 AC_SUBST(LWP_DBG)
702 AC_SUBST(LWP_OPTMZ)
703 AC_SUBST(MT_CC)
704 AC_SUBST(MT_CFLAGS)
705 AC_SUBST(MT_LIBS)
706 AC_SUBST(MV)
707 AC_SUBST(OPTMZ)
708 AC_SUBST(PAM_CFLAGS)
709 AC_SUBST(PAM_LIBS)
710 AC_SUBST(PINSTALL_LIBS)
711 AC_SUBST(RANLIB)
712 AC_SUBST(REGEX_OBJ)
713 AC_SUBST(RM)
714 AC_SUBST(SHLIB_CFLAGS)
715 AC_SUBST(SHLIB_LDFLAGS)
716 AC_SUBST(SHLIB_LINKER)
717 AC_SUBST(SHLIB_SUFFIX)
718 AC_SUBST(TXLIBS)
719 AC_SUBST(VFSCK_CFLAGS)
720 AC_SUBST(XCFLAGS)
721 AC_SUBST(XCFLAGS64)
722 AC_SUBST(XLDFLAGS)
723 AC_SUBST(XLDFLAGS64)
724 AC_SUBST(XLIBELFA)
725 AC_SUBST(XLIBKVM)
726 AC_SUBST(XLIBS)
727 AC_SUBST(YACC)
728
729
730 ])