redhat-81-support-again-20030319
[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_ux11*)
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         ia64_hpux*)
154                 AR="/usr/bin/ar"
155                 AS="/usr/ccs/bin/as"
156                 CC="/opt/ansic/bin/cc"
157                 DBM="/lib/hpux32/libndbm.so"
158                 LD="/bin/ld   "
159                 LEX="/opt/langtools/bin/lex"
160                 LWP_OPTMZ="-O"
161                 MT_CC="$CC"
162                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
163                 MT_LIBS="-lpthread"
164                 MV="/bin/mv"
165                 OPTMZ="-O"
166                 PAM_CFLAGS="-b +z -Wl,+k"
167                 PAM_LIBS="/usr/lib/hpux32/libpam.so"
168                 RANLIB="/usr/bin/ranlib"
169                 RM="/bin/rm"
170                 SHLIB_LDFLAGS="-b -Bsymbolic"
171                 SHLIB_SUFFIX="sl"
172                 TXLIBS="/usr/lib/hpux32/libcurses.so"
173                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
174                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive_shared -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
175                 XCFLAGS64="${XCFLAGS0} +DD64"
176                 XCFLAGS="${XCFLAGS0}"
177                 XLIBELFA="-lelf"
178                 #XLIBS="${LIB_AFSDB} -lnsl"
179                 XLIBS="${LIB_AFSDB}"
180                 YACC="/opt/langtools/bin/yacc"
181                 SHLIB_LINKER="ld -b"
182                 ;;
183
184         i386_fbsd_4*)
185                 LEX="flex -l"
186                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
187                 MT_LIBS="-pthread"
188                 #MT_CFLAGS='-DAFS_PTHREAD_ENV -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads ${XCFLAGS}'
189                 #MT_LIBS="-L/usr/local/lib -llthread -llgcc_r"
190                 PAM_CFLAGS="-O2 -pipe -fPIC"
191                 SHLIB_LDFLAGS="-shared -Xlinker -x"
192                 TXLIBS="/usr/lib/libncurses.so"
193                 XCFLAGS="-O2 -pipe"
194                 XLIBS="${LIB_AFSDB} -lcompat"
195                 YACC="byacc"
196                 ;;
197
198         *fbsd_5*)
199                 LEX="flex -l"
200                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
201                 MT_LIBS="-pthread"
202                 PAM_CFLAGS="-O2 -pipe -fPIC"
203                 SHLIB_LDFLAGS="-shared -Xlinker -x"
204                 TXLIBS="/usr/lib/libncurses.so"
205                 XCFLAGS="-O2 -pipe"
206                 XLIBS="${LIB_AFSDB} -lcompat"
207                 YACC="byacc"
208                 ;;
209
210         *nbsd20)
211                 LEX="flex -l"
212                 MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
213                 MT_LIBS="-lpthread" # XXX -pthread soon
214                 PAM_CFLAGS="-O2 -pipe -fPIC"
215                 SHLIB_LDFLAGS="-shared -Xlinker -x"
216                 TXLIBS="/usr/lib/libcurses.so"
217                 XCFLAGS="-O2 -pipe"
218                 XLIBS="${LIB_AFSDB} -lcompat"
219                 YACC="yacc"
220                 ;;
221
222         *nbsd15|*nbsd16)
223                 LEX="flex -l"
224                 MT_CFLAGS='${XCFLAGS}'
225                 MT_LIBS=""
226                 PAM_CFLAGS="-O2 -pipe -fPIC"
227                 SHLIB_LDFLAGS="-shared -Xlinker -x"
228                 TXLIBS="/usr/lib/libcurses.so"
229                 XCFLAGS="-O2 -pipe"
230                 XLIBS="${LIB_AFSDB} -lcompat"
231                 YACC="bison -y"
232                 ;;
233
234         ia64_linux24)
235                 KERN_OPTMZ=-O2
236                 LEX="flex -l"
237                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
238                 MT_LIBS="-lpthread"
239                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
240                 SHLIB_LDFLAGS="-shared -Xlinker -x"
241                 TXLIBS="/usr/lib/libncurses.so"
242                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE -G0"
243                 SHLIB_LINKER="${MT_CC} -shared"
244                 ;;
245
246         i386_linux22)
247                 CC="gcc -pipe"
248                 MT_CC="gcc -pipe"
249                 KERN_OPTMZ=-O2
250                 LEX="flex -l"
251                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
252                 MT_LIBS="-lpthread"
253                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
254                 SHLIB_LDFLAGS="-shared -Xlinker -x"
255                 TXLIBS="/usr/lib/libncurses.so"
256                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
257                 YACC="bison -y"
258                 SHLIB_LINKER="${MT_CC} -shared"
259                 ;;
260
261         i386_linux24)
262                 CC="gcc -pipe"
263                 MT_CC="gcc -pipe"
264                 KERN_OPTMZ=-O2
265                 LEX="flex -l"
266                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
267                 MT_LIBS="-lpthread"
268                 DBG=-g
269                 KERN_DBG=-g
270                 LWP_DBG=-g
271                 LWP_OPTMZ=-O2
272                 OPTMZ=-O2
273                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
274                 SHLIB_LDFLAGS="-shared -Xlinker -x"
275                 TXLIBS="/usr/lib/libncurses.so"
276                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
277                 SHLIB_LINKER="${MT_CC} -shared"
278                 ;;
279
280         *_obsd*)
281                 LEX="flex -l"
282                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
283                 MT_LIBS="-pthread"
284                 PAM_CFLAGS="-O2 -pipe -fpic"
285                 SHLIB_CFLAGS="-fpic"
286                 SHLIB_LDFLAGS="-shared -Xlinker -x"
287                 TXLIBS="/usr/lib/libcurses.a"
288                 XCFLAGS="-O2"
289                 XLIBS="${LIB_AFSDB} -lcompat"
290                 YACC="yacc"
291                 ;;
292
293         parisc_linux24)
294                 KERN_OPTMZ=-O2
295                 LEX="flex -l"
296                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
297                 MT_LIBS="-lpthread"
298                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
299                 SHLIB_LDFLAGS="-shared -Xlinker -x"
300                 TXLIBS="/usr/lib/libncurses.so"
301                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
302                 YACC="bison -y"
303                 SHLIB_LINKER="${MT_CC} -shared"
304                 ;;
305
306         ppc_darwin_12)
307                 LEX="lex -l"
308                 REGEX_OBJ="regex.o"
309                 XCFLAGS="-traditional-cpp"
310                 ;;
311
312         ppc_darwin_13)
313                 LEX="lex -l"
314                 LWP_OPTMZ="-O2"
315                 REGEX_OBJ="regex.o"
316                 XCFLAGS="-no-cpp-precomp"
317                 ;;
318
319         ppc_darwin_14)
320                 LEX="lex -l"
321                 LWP_OPTMZ="-O2"
322                 REGEX_OBJ="regex.o"
323                 XCFLAGS="-no-cpp-precomp"
324                 ;;
325
326         ppc_darwin_60)
327                 LEX="lex -l"
328                 LWP_OPTMZ="-O2"
329                 REGEX_OBJ="regex.o"
330                 XCFLAGS="-no-cpp-precomp"
331                 TXLIBS="-lncurses"
332                 ;;
333
334         ppc_linux22)
335                 INSTALL="install"
336                 KERN_OPTMZ=-O2
337                 LEX="flex -l"
338                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
339                 MT_LIBS="-lpthread"
340                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
341                 SHLIB_LDFLAGS="-shared -Xlinker -x"
342                 TXLIBS="/usr/lib/libncurses.so"
343                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
344                 YACC="bison -y"
345                 SHLIB_LINKER="${MT_CC} -shared"
346                 ;;
347
348         ppc_linux24)
349                 KERN_OPTMZ=-O2
350                 LEX="flex -l"
351                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
352                 MT_LIBS="-lpthread"
353                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
354                 SHLIB_LDFLAGS="-shared -Xlinker -x"
355                 TXLIBS="/usr/lib/libncurses.so"
356                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
357                 YACC="bison -y"
358                 SHLIB_LINKER="${MT_CC} -shared"
359                 ;;
360
361         rs_aix42)
362                 DBG=""
363                 LEX="lex"
364                 LIBSYS_AIX_EXP="afsl.exp"
365                 MT_CC="xlc_r"
366                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
367                 MT_LIBS="-lpthreads"
368                 SHLIB_SUFFIX="o"
369                 TXLIBS="-lcurses"
370                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
371                 XLIBS="${LIB_AFSDB} -ldl"
372                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
373                 ;;
374
375         rs_aix51)
376                 DBG=""
377                 LEX="lex"
378                 LIBSYS_AIX_EXP="afsl.exp"
379                 MT_CC="xlc_r"
380                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
381                 MT_LIBS="-lpthreads"
382                 SHLIB_SUFFIX="o"
383                 TXLIBS="-lcurses"
384                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
385                 XLIBS="${LIB_AFSDB} -ldl"
386                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
387                 ;;
388
389         s390_linux22)
390                 CC="gcc"
391                 LD="gcc"
392                 KERN_OPTMZ=-O2
393                 LEX="flex -l"
394                 MT_CC="$CC"
395                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
396                 MT_LIBS="-lpthread"
397                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
398                 SHLIB_LDFLAGS="-shared -Xlinker -x"
399                 TXLIBS="/usr/lib/libncurses.so"
400                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
401                 YACC="bison -y"
402                 SHLIB_LINKER="${MT_CC} -shared"
403                 ;;
404
405         s390_linux24)
406                 CC="gcc"
407                 LD="gcc"
408                 KERN_OPTMZ=-O2
409                 LEX="flex -l"
410                 MT_CC="$CC"
411                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
412                 MT_LIBS="-lpthread"
413                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
414                 SHLIB_LDFLAGS="-shared -Xlinker -x"
415                 TXLIBS="/usr/lib/libncurses.so"
416                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
417                 YACC="bison -y"
418                 SHLIB_LINKER="${MT_CC} -shared"
419                 ;;
420
421         sgi_62)
422                 PINSTALL_LIBS=-lmld
423                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
424                 FSINCLUDES="-I/usr/include/sys/fs"
425                 LEX="lex"
426                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
427                 MT_LIBS="-lpthread"
428                 TXLIBS="-lcurses"
429                 XCFLAGS64="-64 -mips3"
430                 XCFLAGS="-o32"
431                 XLDFLAGS64="-64"
432                 XLDFLAGS="-o32"
433                 SHLIB_LINKER="${CC} -shared"
434                 ;;
435
436         sgi_63)
437                 PINSTALL_LIBS=-lmld
438                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
439                 FSINCLUDES="-I/usr/include/sys/fs"
440                 LEX="lex"
441                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
442                 MT_LIBS="-lpthread"
443                 TXLIBS="-lcurses"
444                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
445                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
446                 XLDFLAGS64="-64"
447                 XLDFLAGS="-o32"
448                 SHLIB_LINKER="${CC} -shared"
449                 ;;
450
451         sgi_64)
452                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
453                 FSINCLUDES="-I/usr/include/sys/fs"
454                 LEX="lex"
455                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
456                 MT_LIBS="-lpthread"
457                 TXLIBS="-lcurses"
458                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
459                 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"
460                 XLDFLAGS64="-64"
461                 XLDFLAGS="-n32"
462                 SHLIB_LINKER="${CC} -shared"
463                 ;;
464
465         sgi_65)
466                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
467                 CC="/usr/bin/cc"
468                 FSINCLUDES="-I/usr/include/sys/fs"
469                 LD="/usr/bin/ld"
470                 LEX="lex"
471                 MT_CC="/usr/bin/cc"
472                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
473                 MT_LIBS="-lpthread"
474                 TXLIBS="-lcurses"
475                 XCFLAGS64="-64 -mips3"
476                 XCFLAGS="-n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
477                 XLDFLAGS64="-64 -mips3"
478                 XLDFLAGS="-n32 -mips3"
479                 SHLIB_LINKER="${CC} -shared"
480                 ;;
481
482         sparc64_linux22)
483                 KERN_OPTMZ=-O2
484                 LEX="flex -l"
485                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
486                 MT_LIBS="-lpthread"
487                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
488                 SHLIB_LDFLAGS="-shared -Xlinker -x"
489                 TXLIBS="/usr/lib/libncurses.so"
490                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
491                 YACC="bison -y"
492                 SHLIB_LINKER="${MT_CC} -shared"
493                 ;;
494
495         sparc64_linux24)
496                 KERN_OPTMZ=-O2
497                 LEX="flex -l"
498                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
499                 MT_LIBS="-lpthread"
500                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
501                 SHLIB_LDFLAGS="-shared -Xlinker -x"
502                 TXLIBS="/usr/lib/libncurses.so"
503                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
504                 YACC="bison -y"
505                 SHLIB_LINKER="${MT_CC} -shared"
506                 ;;
507
508         sparc_linux22)
509                 KERN_OPTMZ=-O2
510                 LEX="flex -l"
511                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
512                 MT_LIBS="-lpthread"
513                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
514                 SHLIB_LDFLAGS="-shared -Xlinker -x"
515                 TXLIBS="/usr/lib/libncurses.so"
516                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
517                 YACC="bison -y"
518                 SHLIB_LINKER="${MT_CC} -shared"
519                 ;;
520
521         sun4_413)
522                 CCXPG2="/usr/xpg2bin/cc"
523                 CC="gcc"
524                 LEX="lex"
525                 SHLIB_CFLAGS="-PIC"
526                 TXLIBS="-lcurses -ltermcap"
527                 XCFLAGS=""
528                 XLIBELFA="-lelf"
529                 XLIBKVM="-lkvm"
530                 XLIBS="${LIB_AFSDB}"
531                 LD="ld"
532                 ;;
533
534         sun4x_55)
535                 CC="/opt/SUNWspro/bin/cc"
536                 LEX="lex"
537                 MT_CC="/opt/SUNWspro/bin/cc"
538                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
539                 MT_LIBS="-lpthread -lsocket"
540                 SHLIB_CFLAGS="-KPIC"
541                 TXLIBS="-lcurses"
542                 XCFLAGS="-dy -Bdynamic"
543                 XLIBELFA="-lelf"
544                 XLIBKVM="-lkvm"
545                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
546                 LD="/usr/ccs/bin/ld"
547                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
548                 ;;
549
550         sun4x_56)
551                 CC="/opt/SUNWspro/bin/cc"
552                 LEX="lex"
553                 MT_CC="/opt/SUNWspro/bin/cc"
554                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
555                 MT_LIBS="-lpthread -lsocket"
556                 PAM_CFLAGS="-KPIC"
557                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
558                 SHLIB_CFLAGS="-KPIC"
559                 SHLIB_LDFLAGS="-G -Bsymbolic"
560                 TXLIBS="-L/usr/ccs/lib -lcurses"
561                 XCFLAGS="-dy -Bdynamic"
562                 XLIBELFA="-lelf"
563                 LD="/usr/ccs/bin/ld"
564                 XLIBKVM="-lkvm"
565                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
566                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
567                 ;;
568
569         sun4x_57)
570                 CC="/opt/SUNWspro/bin/cc"
571                 LEX="lex"
572                 LD="/usr/ccs/bin/ld"
573                 MT_CC="/opt/SUNWspro/bin/cc"
574                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
575                 MT_LIBS="-lpthread -lsocket"
576                 PAM_CFLAGS="-KPIC"
577                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
578                 SHLIB_CFLAGS="-KPIC"
579                 SHLIB_LDFLAGS="-G -Bsymbolic"
580                 TXLIBS="-lcurses"
581                 XCFLAGS64='${XCFLAGS} -xarch=v9'
582                 XCFLAGS="-dy -Bdynamic"
583                 XLIBELFA="-lelf"
584                 XLIBKVM="-lkvm"
585                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
586                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
587                 ;;
588
589         sun4x_58)
590                 CC="/opt/SUNWspro/bin/cc"
591                 LEX="lex"
592                 LD="/usr/ccs/bin/ld"
593                 MT_CC="/opt/SUNWspro/bin/cc"
594                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
595                 MT_LIBS="-lpthread -lsocket"
596                 PAM_CFLAGS="-KPIC"
597                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
598                 SHLIB_CFLAGS="-KPIC"
599                 SHLIB_LDFLAGS="-G -Bsymbolic"
600                 TXLIBS="-lcurses"
601                 XCFLAGS64='${XCFLAGS} -xarch=v9'
602                 XCFLAGS="-dy -Bdynamic"
603                 XLIBELFA="-lelf"
604                 XLIBKVM="-lkvm"
605                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
606                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
607                 ;;
608
609         sun4x_59)
610                 CC="/opt/SUNWspro/bin/cc"
611                 LEX="lex"
612                 LD="/usr/ccs/bin/ld"
613                 MT_CC="/opt/SUNWspro/bin/cc"
614                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
615                 MT_LIBS="-lpthread -lsocket"
616                 PAM_CFLAGS="-KPIC"
617                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
618                 SHLIB_CFLAGS="-KPIC"
619                 SHLIB_LDFLAGS="-G -Bsymbolic"
620                 TXLIBS="-lcurses"
621                 XCFLAGS64='${XCFLAGS} -xarch=v9'
622                 XCFLAGS="-dy -Bdynamic"
623                 XLIBELFA="-lelf"
624                 XLIBKVM="-lkvm"
625                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
626                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
627                 ;;
628
629         sunx86_57)
630                 CC="/opt/SUNWspro/bin/cc"
631                 LEX="lex"
632                 LD="/usr/ccs/bin/ld"
633                 MT_CC="/opt/SUNWspro/bin/cc"
634                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
635                 MT_LIBS="-lpthread -lsocket"
636                 PAM_CFLAGS="-KPIC"
637                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
638                 SHLIB_CFLAGS="-KPIC"
639                 SHLIB_LDFLAGS="-G -Bsymbolic"
640                 TXLIBS="-lcurses"
641                 XCFLAGS64='${XCFLAGS} -xarch=v9'
642                 XCFLAGS="-dy -Bdynamic"
643                 XLIBELFA="-lelf"
644                 XLIBKVM="-lkvm"
645                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
646                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
647                 ;;
648
649
650         sunx86_58)
651                 CC="/opt/SUNWspro/bin/cc"
652                 LEX="lex"
653                 LD="/usr/ccs/bin/ld"
654                 MT_CC="/opt/SUNWspro/bin/cc"
655                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
656                 MT_LIBS="-lpthread -lsocket"
657                 PAM_CFLAGS="-KPIC"
658                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
659                 SHLIB_CFLAGS="-KPIC"
660                 SHLIB_LDFLAGS="-G -Bsymbolic"
661                 TXLIBS="-lcurses"
662                 XCFLAGS64='${XCFLAGS} -xarch=v9'
663                 XCFLAGS="-dy -Bdynamic"
664                 XLIBELFA="-lelf"
665                 XLIBKVM="-lkvm"
666                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
667                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
668                 ;;
669
670
671 esac
672
673 #
674 # Special build targets
675 #
676 case $AFS_SYSNAME in
677         sgi_6*)
678                 XFS_SIZE_CHECK="xfs_size_check"
679                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
680                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
681         
682                 AC_SUBST(XFS_SIZE_CHECK)
683                 AC_SUBST(install_XFS_SIZE_CHECK)
684                 AC_SUBST(dest_XFS_SIZE_CHECK)
685         ;;
686         
687         sun4x_*|sunx86_*)
688                 FS_CONV_SOL26="fs_conv_sol26"
689                 install_FS_CONV_SOL26='$(DESTDIR)${afssrvsbindir}/fs_conv_sol26'
690                 dest_FS_CONV_SOL26='$(DEST)/root.server/usr/afs/bin/fs_conv_sol26'
691
692                 AC_SUBST(FS_CONV_SOL26)
693                 AC_SUBST(install_FS_CONV_SOL26)
694                 AC_SUBST(dest_FS_CONV_SOL26)
695         ;;
696
697         alpha_dux*)
698                 FS_CONV_OSF40D="fs_conv_dux40D"
699                 install_FS_CONV_OSF40D='$(DESTDIR)${afssrvsbindir}/fs_conv_dux40D'
700                 dest_FS_CONV_OSF40D='$(DEST)/root.server/usr/afs/bin/fs_conv_dux40D'
701
702                 AC_SUBST(FS_CONV_OSF40D)
703                 AC_SUBST(install_FS_CONV_OSF40D)
704                 AC_SUBST(dest_FS_CONV_OSF40D)
705         ;;
706 esac
707
708 dnl Disable the default for debugging/optimization if not enabled
709 if test "x$enable_debug_kernel" = "xno"; then
710   KERN_DBG=
711 fi
712
713 if test "x$enable_optimize_kernel" = "xno"; then
714   KERN_OPTMZ=
715 fi
716
717 if test "x$enable_debug" = "xno"; then
718   DBG=
719 fi
720
721 if test "x$enable_optimize" = "xno"; then
722   OPTMZ=
723 fi
724
725 if test "x$enable_debug_lwp" = "xno"; then
726   LWP_DBG=
727 fi
728
729 if test "x$enable_optimize_lwp" = "xno"; then
730   LWP_OPTMZ=
731 fi
732
733 AC_SUBST(CCXPG2)
734 AC_SUBST(AFSD_LIBS)
735 AC_SUBST(AR)
736 AC_SUBST(AS)
737 AC_SUBST(CP)
738 AC_SUBST(DBG)
739 AC_SUBST(FSINCLUDES)
740 AC_SUBST(KERN_DBG)
741 AC_SUBST(KERN_OPTMZ)
742 AC_SUBST(LD)
743 AC_SUBST(LEX)
744 AC_SUBST(LWP_DBG)
745 AC_SUBST(LWP_OPTMZ)
746 AC_SUBST(MT_CC)
747 AC_SUBST(MT_CFLAGS)
748 AC_SUBST(MT_LIBS)
749 AC_SUBST(MV)
750 AC_SUBST(OPTMZ)
751 AC_SUBST(PAM_CFLAGS)
752 AC_SUBST(PAM_LIBS)
753 AC_SUBST(PINSTALL_LIBS)
754 AC_SUBST(RANLIB)
755 AC_SUBST(REGEX_OBJ)
756 AC_SUBST(RM)
757 AC_SUBST(SHLIB_CFLAGS)
758 AC_SUBST(SHLIB_LDFLAGS)
759 AC_SUBST(SHLIB_LINKER)
760 AC_SUBST(SHLIB_SUFFIX)
761 AC_SUBST(TXLIBS)
762 AC_SUBST(VFSCK_CFLAGS)
763 AC_SUBST(XCFLAGS)
764 AC_SUBST(XCFLAGS64)
765 AC_SUBST(XLDFLAGS)
766 AC_SUBST(XLDFLAGS64)
767 AC_SUBST(XLIBELFA)
768 AC_SUBST(XLIBKVM)
769 AC_SUBST(XLIBS)
770 AC_SUBST(YACC)
771
772
773 ])