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