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