netbsd21-20041124
[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         *nbsd2*)
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_linux*)
233                 CCOBJ="${CC} -fPIC"
234                 KERN_OPTMZ=-O2
235                 LEX="flex -l"
236                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
237                 MT_LIBS="-lpthread"
238                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
239                 SHLIB_CFLAGS="-fPIC"
240                 SHLIB_LDFLAGS="-shared -Xlinker -x"
241                 TXLIBS="-lncurses"
242                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
243                 SHLIB_LINKER="${MT_CC} -shared"
244                 ;;
245
246         ppc64_linux24)
247                 KERN_OPTMZ=-O2
248                 LEX="flex -l"
249                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
250                 MT_LIBS="-lpthread"
251                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
252                 SHLIB_LDFLAGS="-shared -Xlinker -x"
253                 TXLIBS="/usr/lib64/libncurses.so"
254                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
255                 SHLIB_LINKER="${MT_CC} -shared"
256                 ;;
257
258         ppc64_linux26)
259                 KERN_OPTMZ=-O2
260                 LEX="flex -l"
261                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
262                 MT_LIBS="-lpthread"
263                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
264                 SHLIB_LDFLAGS="-shared -Xlinker -x"
265                 TXLIBS="-lncurses"
266                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
267                 YACC="bison -y"
268                 SHLIB_LINKER="${MT_CC} -shared"
269                 ;;
270
271         i386_umlinux22)
272                 CC="gcc -pipe"
273                 CCOBJ="gcc -pipe"
274                 MT_CC="gcc -pipe"
275                 KERN_OPTMZ=-O2
276                 LEX="flex -l"
277                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
278                 MT_LIBS="-lpthread"
279                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
280                 SHLIB_LDFLAGS="-shared -Xlinker -x"
281                 TXLIBS="-lncurses"
282                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
283                 YACC="bison -y"
284                 SHLIB_LINKER="${MT_CC} -shared"
285                 ;;
286
287         i386_linux*)
288                 CC="gcc -pipe"
289                 CCOBJ="gcc -pipe"
290                 MT_CC="gcc -pipe"
291                 KERN_OPTMZ=-O2
292                 LEX="flex -l"
293                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
294                 MT_LIBS="-lpthread"
295                 DBG=-g
296                 KERN_DBG=-g
297                 LWP_DBG=-g
298                 LWP_OPTMZ=-O2
299                 OPTMZ=-O2
300                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
301                 SHLIB_LDFLAGS="-shared -Xlinker -x"
302                 TXLIBS="-lncurses"
303                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
304                 SHLIB_LINKER="${MT_CC} -shared"
305                 ;;
306
307         i386_umlinux24)
308                 CC="gcc -pipe"
309                 CCOBJ="gcc -pipe"
310                 MT_CC="gcc -pipe"
311                 KERN_OPTMZ=-O2
312                 LEX="flex -l"
313                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
314                 MT_LIBS="-lpthread"
315                 DBG=-g
316                 KERN_DBG=-g
317                 LWP_DBG=-g
318                 LWP_OPTMZ=-O2
319                 OPTMZ=-O2
320                 PAM_CFLAGS="-g -O2 -Dlinux -DLINUX_PAM -fPIC"
321                 SHLIB_LDFLAGS="-shared -Xlinker -x"
322                 TXLIBS="-lncurses"
323                 XCFLAGS="-g -O2 -D_LARGEFILE64_SOURCE"
324                 SHLIB_LINKER="${MT_CC} -shared"
325                 ;;
326
327         *_obsd*)
328                 LEX="flex -l"
329                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
330                 MT_LIBS="-pthread"
331                 PAM_CFLAGS="-O2 -pipe -fpic"
332                 SHLIB_CFLAGS="-fpic"
333                 SHLIB_LDFLAGS="-shared -Xlinker -x"
334                 TXLIBS="/usr/lib/libcurses.a"
335                 XCFLAGS="-O2"
336                 YACC="yacc"
337                 ;;
338
339         parisc_linux24)
340                 KERN_OPTMZ=-O2
341                 LEX="flex -l"
342                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
343                 MT_LIBS="-lpthread"
344                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
345                 SHLIB_LDFLAGS="-shared -Xlinker -x"
346                 TXLIBS="-lncurses"
347                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
348                 YACC="bison -y"
349                 SHLIB_LINKER="${MT_CC} -shared"
350                 ;;
351
352         ppc_darwin_12)
353                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
354                 LEX="lex -l"
355                 REGEX_OBJ="regex.o"
356                 XCFLAGS="-traditional-cpp"
357                 ;;
358
359         ppc_darwin_13)
360                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
361                 LEX="lex -l"
362                 LWP_OPTMZ="-O2"
363                 REGEX_OBJ="regex.o"
364                 XCFLAGS="-no-cpp-precomp"
365                 ;;
366
367         ppc_darwin_14)
368                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
369                 LEX="lex -l"
370                 LWP_OPTMZ="-O2"
371                 REGEX_OBJ="regex.o"
372                 XCFLAGS="-no-cpp-precomp"
373                 ;;
374
375         ppc_darwin_60)
376                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
377                 LEX="lex -l"
378                 LWP_OPTMZ="-O2"
379                 REGEX_OBJ="regex.o"
380                 XCFLAGS="-no-cpp-precomp"
381                 TXLIBS="-lncurses"
382                 ;;
383
384         ppc_darwin_70)
385                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
386                 LEX="lex -l"
387                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
388                 KROOT=
389                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
390                 LWP_OPTMZ="-O2"
391                 REGEX_OBJ="regex.o"
392                 XCFLAGS="-no-cpp-precomp"
393                 TXLIBS="-lncurses"
394                 EXTRA_VLIBOBJS="fstab.o"
395                 ;;
396
397         ppc_linux22)
398                 INSTALL="install"
399                 KERN_OPTMZ=-O2
400                 LEX="flex -l"
401                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
402                 MT_LIBS="-lpthread"
403                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
404                 SHLIB_LDFLAGS="-shared -Xlinker -x"
405                 TXLIBS="-lncurses"
406                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
407                 YACC="bison -y"
408                 SHLIB_LINKER="${MT_CC} -shared"
409                 ;;
410
411         ppc_linux24)
412                 KERN_OPTMZ=-O2
413                 LEX="flex -l"
414                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
415                 MT_LIBS="-lpthread"
416                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
417                 SHLIB_LDFLAGS="-shared -Xlinker -x"
418                 TXLIBS="-lncurses"
419                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
420                 YACC="bison -y"
421                 SHLIB_LINKER="${MT_CC} -shared"
422                 ;;
423
424         rs_aix42)
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
440         rs_aix51)
441                 DBG=""
442                 LEX="lex"
443                 LIBSYS_AIX_EXP="afsl.exp"
444                 MT_CC="xlc_r"
445                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
446                 MT_LIBS="-lpthreads"
447                 SHLIB_SUFFIX="o"
448                 TXLIBS="-lcurses"
449                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
450                 XLIBS="${LIB_AFSDB} -ldl"
451                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
452                 AIX64=""
453                 ;;
454
455         rs_aix52)       
456                 DBG=""
457                 LEX="lex"
458                 LIBSYS_AIX_EXP="afsl.exp"
459                 MT_CC="xlc_r"
460                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
461                 MT_LIBS="-lpthreads"
462                 SHLIB_SUFFIX="o"
463                 TXLIBS="-lcurses"
464                 XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
465                 XLIBS="${LIB_AFSDB} -ldl"
466                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
467                 AIX64=""
468                 ;;
469         s390_linux22)
470                 CC="gcc"
471                 CCOBJ="gcc"
472                 LD="ld"
473                 KERN_OPTMZ=-O2
474                 LEX="flex -l"
475                 MT_CC="$CC"
476                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
477                 MT_LIBS="-lpthread"
478                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
479                 SHLIB_LDFLAGS="-shared -Xlinker -x"
480                 TXLIBS="-lncurses"
481                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
482                 YACC="bison -y"
483                 SHLIB_LINKER="${MT_CC} -shared"
484                 ;;
485
486         s390_linux24)
487                 CC="gcc"
488                 CCOBJ="gcc"
489                 LD="ld"
490                 KERN_OPTMZ=-O2
491                 LEX="flex -l"
492                 MT_CC="$CC"
493                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
494                 MT_LIBS="-lpthread"
495                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
496                 SHLIB_LDFLAGS="-shared -Xlinker -x"
497                 TXLIBS="-lncurses"
498                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE"
499                 YACC="bison -y"
500                 SHLIB_LINKER="${MT_CC} -shared"
501                 ;;
502
503         s390x_linux24)
504                 CC="gcc"
505                 CCOBJ="gcc"
506                 LD="ld"
507                 KERN_OPTMZ=-O2
508                 LEX="flex -l"
509                 MT_CC="$CC"
510                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
511                 MT_LIBS="-lpthread"
512                 PAM_CFLAGS="-O -Dlinux -DLINUX_PAM -fPIC"
513                 SHLIB_LDFLAGS="-shared -Xlinker -x"
514                 TXLIBS="-lncurses"
515                 XCFLAGS="-O -g -D_LARGEFILE64_SOURCE -D__s390x__"
516                 YACC="bison -y"
517                 SHLIB_LINKER="${MT_CC} -shared"
518                 ;;
519
520         sgi_62)
521                 PINSTALL_LIBS=-lmld
522                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
523                 FSINCLUDES="-I/usr/include/sys/fs"
524                 LEX="lex"
525                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
526                 MT_LIBS="-lpthread"
527                 TXLIBS="-lcurses"
528                 XCFLAGS64="-64 -mips3"
529                 XCFLAGS="-o32"
530                 XLDFLAGS64="-64"
531                 XLDFLAGS="-o32"
532                 SHLIB_LINKER="${CC} -shared"
533                 ;;
534
535         sgi_63)
536                 PINSTALL_LIBS=-lmld
537                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
538                 FSINCLUDES="-I/usr/include/sys/fs"
539                 LEX="lex"
540                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
541                 MT_LIBS="-lpthread"
542                 TXLIBS="-lcurses"
543                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
544                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
545                 XLDFLAGS64="-64"
546                 XLDFLAGS="-o32"
547                 SHLIB_LINKER="${CC} -shared"
548                 ;;
549
550         sgi_64)
551                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
552                 FSINCLUDES="-I/usr/include/sys/fs"
553                 LEX="lex"
554                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
555                 MT_LIBS="-lpthread"
556                 TXLIBS="-lcurses"
557                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
558                 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"
559                 XLDFLAGS64="-64"
560                 XLDFLAGS="-n32"
561                 SHLIB_LINKER="${CC} -shared"
562                 ;;
563
564         sgi_65)
565                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
566                 CC="/usr/bin/cc"
567                 CCOBJ="/usr/bin/cc"
568                 FSINCLUDES="-I/usr/include/sys/fs"
569                 LD="/usr/bin/ld"
570                 LEX="lex"
571                 MT_CC="/usr/bin/cc"
572                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
573                 MT_LIBS="-lpthread"
574                 TXLIBS="-lcurses"
575                 XCFLAGS64="-64 -mips3"
576                 XCFLAGS="-n32 -mips3 -woff 1009,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552"
577                 XLDFLAGS64="-64 -mips3"
578                 XLDFLAGS="-n32 -mips3"
579                 SHLIB_LINKER="${CC} -shared"
580                 ;;
581
582         sparc64_linux22)
583                 KERN_OPTMZ=-O2
584                 LEX="flex -l"
585                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
586                 MT_LIBS="-lpthread"
587                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
588                 SHLIB_LDFLAGS="-shared -Xlinker -x"
589                 TXLIBS="-lncurses"
590                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
591                 YACC="bison -y"
592                 SHLIB_LINKER="${MT_CC} -shared"
593                 ;;
594
595         sparc64_linux24)
596                 KERN_OPTMZ=-O2
597                 LEX="flex -l"
598                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
599                 MT_LIBS="-lpthread"
600                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
601                 SHLIB_LDFLAGS="-shared -Xlinker -x"
602                 TXLIBS="-lncurses"
603                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
604                 YACC="bison -y"
605                 SHLIB_LINKER="${MT_CC} -shared"
606                 ;;
607
608         sparc_linux22)
609                 KERN_OPTMZ=-O2
610                 LEX="flex -l"
611                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
612                 MT_LIBS="-lpthread"
613                 PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
614                 SHLIB_LDFLAGS="-shared -Xlinker -x"
615                 TXLIBS="-lncurses"
616                 XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
617                 YACC="bison -y"
618                 SHLIB_LINKER="${MT_CC} -shared"
619                 ;;
620
621         sun4_413)
622                 CCXPG2="/usr/xpg2bin/cc"
623                 CC="gcc"
624                 CCOBJ="gcc"
625                 LEX="lex"
626                 SHLIB_CFLAGS="-PIC"
627                 TXLIBS="-lcurses -ltermcap"
628                 XCFLAGS=""
629                 XLIBELFA="-lelf"
630                 XLIBKVM="-lkvm"
631                 XLIBS="${LIB_AFSDB}"
632                 LD="ld"
633                 ;;
634
635         sun4x_55)
636                 CC="/opt/SUNWspro/bin/cc"
637                 CCOBJ="/opt/SUNWspro/bin/cc"
638                 LEX="lex"
639                 MT_CC="/opt/SUNWspro/bin/cc"
640                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
641                 MT_LIBS="-lpthread -lsocket"
642                 SHLIB_CFLAGS="-KPIC"
643                 TXLIBS="-lcurses"
644                 XCFLAGS="-dy -Bdynamic"
645                 XLIBELFA="-lelf"
646                 XLIBKVM="-lkvm"
647                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
648                 LD="/usr/ccs/bin/ld"
649                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
650                 ;;
651
652         sun4x_56)
653                 CC="/opt/SUNWspro/bin/cc"
654                 CCOBJ="/opt/SUNWspro/bin/cc"
655                 LEX="lex"
656                 MT_CC="/opt/SUNWspro/bin/cc"
657                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
658                 MT_LIBS="-lpthread -lsocket"
659                 PAM_CFLAGS="-KPIC"
660                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
661                 SHLIB_CFLAGS="-KPIC"
662                 SHLIB_LDFLAGS="-G -Bsymbolic"
663                 TXLIBS="-L/usr/ccs/lib -lcurses"
664                 XCFLAGS="-dy -Bdynamic"
665                 XLIBELFA="-lelf"
666                 LD="/usr/ccs/bin/ld"
667                 XLIBKVM="-lkvm"
668                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
669                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
670                 ;;
671
672         sun4x_57)
673                 CC="/opt/SUNWspro/bin/cc"
674                 CCOBJ="/opt/SUNWspro/bin/cc"
675                 LEX="lex"
676                 LD="/usr/ccs/bin/ld"
677                 MT_CC="/opt/SUNWspro/bin/cc"
678                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
679                 MT_LIBS="-lpthread -lsocket"
680                 PAM_CFLAGS="-KPIC"
681                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
682                 SHLIB_CFLAGS="-KPIC"
683                 SHLIB_LDFLAGS="-G -Bsymbolic"
684                 TXLIBS="-lcurses"
685                 XCFLAGS64='${XCFLAGS} -xarch=v9'
686                 XCFLAGS="-dy -Bdynamic"
687                 XLIBELFA="-lelf"
688                 XLIBKVM="-lkvm"
689                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
690                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
691                 ;;
692
693         sun4x_58)
694                 CC="/opt/SUNWspro/bin/cc"
695                 CCOBJ="/opt/SUNWspro/bin/cc"
696                 LEX="lex"
697                 LD="/usr/ccs/bin/ld"
698                 MT_CC="/opt/SUNWspro/bin/cc"
699                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
700                 MT_LIBS="-lpthread -lsocket"
701                 PAM_CFLAGS="-KPIC"
702                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
703                 SHLIB_CFLAGS="-KPIC"
704                 SHLIB_LDFLAGS="-G -Bsymbolic"
705                 TXLIBS="-lcurses"
706                 XCFLAGS64='${XCFLAGS} -xarch=v9'
707                 XCFLAGS="-dy -Bdynamic"
708                 XLIBELFA="-lelf"
709                 XLIBKVM="-lkvm"
710                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
711                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
712                 ;;
713
714         sun4x_59)
715                 CC="/opt/SUNWspro/bin/cc"
716                 CCOBJ="/opt/SUNWspro/bin/cc"
717                 LEX="lex"
718                 LD="/usr/ccs/bin/ld"
719                 MT_CC="/opt/SUNWspro/bin/cc"
720                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
721                 MT_LIBS="-lpthread -lsocket"
722                 PAM_CFLAGS="-KPIC"
723                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
724                 SHLIB_CFLAGS="-KPIC"
725                 SHLIB_LDFLAGS="-G -Bsymbolic"
726                 TXLIBS="-lcurses"
727                 XCFLAGS64='${XCFLAGS} -xarch=v9'
728                 XCFLAGS="-dy -Bdynamic"
729                 XLIBELFA="-lelf"
730                 XLIBKVM="-lkvm"
731                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
732                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
733                 ;;
734
735         sun4x_510)
736                 CC="/opt/SUNWspro/bin/cc"
737                 CCOBJ="/opt/SUNWspro/bin/cc"
738                 LEX="lex"
739                 LD="/usr/ccs/bin/ld"
740                 MT_CC="/opt/SUNWspro/bin/cc"
741                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
742                 MT_LIBS="-lpthread -lsocket"
743                 PAM_CFLAGS="-KPIC"
744                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
745                 SHLIB_CFLAGS="-KPIC"
746                 SHLIB_LDFLAGS="-G -Bsymbolic"
747                 TXLIBS="-lcurses"
748                 XCFLAGS64='${XCFLAGS} -xarch=v9'
749                 XCFLAGS="-dy -Bdynamic"
750                 XLIBELFA="-lelf"
751                 XLIBKVM="-lkvm"
752                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
753                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
754                 ;;
755
756         sunx86_57)
757                 CC="/opt/SUNWspro/bin/cc"
758                 CCOBJ="/opt/SUNWspro/bin/cc"
759                 LEX="lex"
760                 LD="/usr/ccs/bin/ld"
761                 MT_CC="/opt/SUNWspro/bin/cc"
762                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
763                 MT_LIBS="-lpthread -lsocket"
764                 PAM_CFLAGS="-KPIC"
765                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
766                 SHLIB_CFLAGS="-KPIC"
767                 SHLIB_LDFLAGS="-G -Bsymbolic"
768                 TXLIBS="-lcurses"
769                 XCFLAGS64='${XCFLAGS} -xarch=v9'
770                 XCFLAGS="-dy -Bdynamic"
771                 XLIBELFA="-lelf"
772                 XLIBKVM="-lkvm"
773                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
774                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
775                 ;;
776
777         sunx86_58)
778                 CC="/opt/SUNWspro/bin/cc"
779                 CCOBJ="/opt/SUNWspro/bin/cc"
780                 LEX="lex"
781                 LD="/usr/ccs/bin/ld"
782                 MT_CC="/opt/SUNWspro/bin/cc"
783                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
784                 MT_LIBS="-lpthread -lsocket"
785                 PAM_CFLAGS="-KPIC"
786                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
787                 SHLIB_CFLAGS="-KPIC"
788                 SHLIB_LDFLAGS="-G -Bsymbolic"
789                 TXLIBS="-lcurses"
790                 XCFLAGS64='${XCFLAGS} -xarch=v9'
791                 XCFLAGS="-dy -Bdynamic"
792                 XLIBELFA="-lelf"
793                 XLIBKVM="-lkvm"
794                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
795                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
796                 ;;
797
798         sunx86_59)
799                 CC="/opt/SUNWspro/bin/cc"
800                 CCOBJ="/opt/SUNWspro/bin/cc"
801                 LEX="lex"
802                 LD="/usr/ccs/bin/ld"
803                 MT_CC="/opt/SUNWspro/bin/cc"
804                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
805                 MT_LIBS="-lpthread -lsocket"
806                 PAM_CFLAGS="-KPIC"
807                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
808                 SHLIB_CFLAGS="-KPIC"
809                 SHLIB_LDFLAGS="-G -Bsymbolic"
810                 TXLIBS="-lcurses"
811                 XCFLAGS64='${XCFLAGS} -xarch=v9'
812                 XCFLAGS="-dy -Bdynamic"
813                 XLIBELFA="-lelf"
814                 XLIBKVM="-lkvm"
815                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
816                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
817                 ;;
818
819         sunx86_510)
820                 CC="/opt/SUNWspro/bin/cc"
821                 CCOBJ="/opt/SUNWspro/bin/cc"
822                 LEX="lex"
823                 LD="/usr/ccs/bin/ld"
824                 MT_CC="/opt/SUNWspro/bin/cc"
825                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
826                 MT_LIBS="-lpthread -lsocket"
827                 PAM_CFLAGS="-KPIC"
828                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
829                 SHLIB_CFLAGS="-KPIC"
830                 SHLIB_LDFLAGS="-G -Bsymbolic"
831                 TXLIBS="-lcurses"
832                 XCFLAGS64='${XCFLAGS} -xarch=v9'
833                 XCFLAGS="-dy -Bdynamic"
834                 XLIBELFA="-lelf"
835                 XLIBKVM="-lkvm"
836                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
837                 SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
838                 ;;
839 esac
840
841 #
842 # Special build targets
843 #
844 case $AFS_SYSNAME in
845         sgi_6*)
846                 IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
847                 XFS_SIZE_CHECK="xfs_size_check"
848                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
849                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
850         
851                 AC_SUBST(XFS_SIZE_CHECK)
852                 AC_SUBST(install_XFS_SIZE_CHECK)
853                 AC_SUBST(dest_XFS_SIZE_CHECK)
854         ;;
855         
856         sun4x_*|sunx86_*)
857                 FS_CONV_SOL26="fs_conv_sol26"
858                 install_FS_CONV_SOL26='$(DESTDIR)${afssrvsbindir}/fs_conv_sol26'
859                 dest_FS_CONV_SOL26='$(DEST)/root.server/usr/afs/bin/fs_conv_sol26'
860
861                 AC_SUBST(FS_CONV_SOL26)
862                 AC_SUBST(install_FS_CONV_SOL26)
863                 AC_SUBST(dest_FS_CONV_SOL26)
864         ;;
865
866         alpha_dux*)
867                 FS_CONV_OSF40D="fs_conv_dux40D"
868                 install_FS_CONV_OSF40D='$(DESTDIR)${afssrvsbindir}/fs_conv_dux40D'
869                 dest_FS_CONV_OSF40D='$(DEST)/root.server/usr/afs/bin/fs_conv_dux40D'
870
871                 AC_SUBST(FS_CONV_OSF40D)
872                 AC_SUBST(install_FS_CONV_OSF40D)
873                 AC_SUBST(dest_FS_CONV_OSF40D)
874         ;;
875 esac
876
877 dnl Disable the default for debugging/optimization if not enabled
878 if test "x$enable_debug_kernel" = "xno"; then
879   KERN_DBG=
880 fi
881
882 if test "x$enable_optimize_kernel" = "xno"; then
883   KERN_OPTMZ=
884 fi
885
886 if test "x$enable_debug" = "xno"; then
887   DBG=
888 fi
889
890 if test "x$enable_optimize" = "xno"; then
891   OPTMZ=
892 fi
893
894 if test "x$enable_debug_lwp" = "xno"; then
895   LWP_DBG=
896 fi
897
898 if test "x$enable_optimize_lwp" = "xno"; then
899   LWP_OPTMZ=
900 fi
901
902 AC_SUBST(CCXPG2)
903 AC_SUBST(CCOBJ)
904 AC_SUBST(AFSD_LIBS)
905 AC_SUBST(AFSD_LDFLAGS)
906 AC_SUBST(AIX64)
907 AC_SUBST(AR)
908 AC_SUBST(AS)
909 AC_SUBST(CP)
910 AC_SUBST(DBG)
911 AC_SUBST(FSINCLUDES)
912 AC_SUBST(KERN_DBG)
913 AC_SUBST(KERN_OPTMZ)
914 AC_SUBST(LD)
915 AC_SUBST(LEX)
916 AC_SUBST(LWP_DBG)
917 AC_SUBST(LWP_OPTMZ)
918 AC_SUBST(MT_CC)
919 AC_SUBST(MT_CFLAGS)
920 AC_SUBST(MT_LIBS)
921 AC_SUBST(MV)
922 AC_SUBST(OPTMZ)
923 AC_SUBST(PAM_CFLAGS)
924 AC_SUBST(PAM_LIBS)
925 AC_SUBST(PINSTALL_LIBS)
926 AC_SUBST(RANLIB)
927 AC_SUBST(REGEX_OBJ)
928 AC_SUBST(RM)
929 AC_SUBST(SHLIB_CFLAGS)
930 AC_SUBST(SHLIB_LDFLAGS)
931 AC_SUBST(SHLIB_LINKER)
932 AC_SUBST(SHLIB_SUFFIX)
933 AC_SUBST(TXLIBS)
934 AC_SUBST(VFSCK_CFLAGS)
935 AC_SUBST(XCFLAGS)
936 AC_SUBST(XCFLAGS64)
937 AC_SUBST(XLDFLAGS)
938 AC_SUBST(XLDFLAGS64)
939 AC_SUBST(XLIBELFA)
940 AC_SUBST(XLIBKVM)
941 AC_SUBST(XLIBS)
942 AC_SUBST(YACC)
943
944
945 ])