hcrypto: Use new LWP_CCRULE
[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 RXDEBUG="-DRXDEBUG"
7 SHLIB_SUFFIX="so"
8 CCOBJ="$CC"
9 MT_CC="$CC"
10 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} ${LIB_libintl}"
11 MT_LIBS='-lpthread ${XLIBS}'
12
13 dnl debugging and optimization flag defaults
14 dnl Note, these are all the defaults for if debug/optimize turned on, and
15 dnl the arch cases below do override as needed
16 KERN_DBG=-g
17 KERN_OPTMZ=-O
18 DBG=-g
19 OPTMZ=-O
20 LWP_DBG=-g
21 NO_STRIP_BIN=
22 LWP_OPTMZ=-O
23 PAM_DBG=-g
24 PAM_OPTMZ=
25
26 dnl standard programs
27 AC_PROG_RANLIB
28 AC_CHECK_PROGS(AS, as, [${am_missing_run}as])
29 AC_CHECK_PROGS(AR, ar, [${am_missing_run}ar])
30 AC_CHECK_PROGS(MV, mv, [${am_missing_run}mv])
31 AC_CHECK_PROGS(RM, rm, [${am_missing_run}rm])
32 AC_CHECK_PROGS(LD, ld, [${am_missing_run}ld])
33 AC_CHECK_PROGS(CP, cp, [${am_missing_run}cp])
34 AC_CHECK_PROGS(STRIP, strip, [${am_missing_run}strip])
35 AC_CHECK_PROGS(LORDER, lorder, [${am_missing_run}lorder])
36
37 dnl TODO - need to disable STRIP if we are doing debugging in any user space code
38
39 case $AFS_SYSNAME in
40         alpha_dux40)
41                 CC="cc"
42                 CCOBJ="cc"
43                 MT_CC="cc"
44                 CSTATIC="-non_shared"
45                 DBG="-g3"
46                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
47                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
48                 XCFLAGS="-D_NO_PROTO -DOSF"
49                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
50                 ;;
51
52         alpha_dux50)
53                 CC="cc"
54                 CCOBJ="cc"
55                 MT_CC="cc"
56                 LEX="flex -l"
57                 DBG="-g3"
58                 CSTATIC="-non_shared"
59                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
60                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
61                 XCFLAGS="-D_NO_PROTO -DOSF"
62                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
63                 ;;
64
65         alpha_dux51)
66                 CC="cc"
67                 CCOBJ="cc"
68                 MT_CC="cc"
69                 DBG="-g3"
70                 CSTATIC="-non_shared"
71                 LWP_OPTMZ="-O2"
72                 MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
73                 MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
74                 XCFLAGS="-D_NO_PROTO -DOSF"
75                 SHLIB_LINKER="${CC} -all -shared -expect_unresolved \"*\""
76                 ;;
77
78         alpha_linux_22)
79                 KERN_OPTMZ=-O2
80                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
81                 PAM_OPTMZ=-O2
82                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
83                 SHLIB_CFLAGS="-fPIC"
84                 SHLIB_LDFLAGS="-shared -Xlinker -x"
85                 XCFLAGS="-D_LARGEFILE64_SOURCE"
86                 SHLIB_LINKER="${MT_CC} -shared"
87                 ;;
88
89         alpha_linux_24)
90                 CCOBJ="${CC} -fPIC"
91                 KERN_OPTMZ=-O2
92                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
93                 PAM_OPTMZ=-O2
94                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
95                 SHLIB_CFLAGS="-fPIC"
96                 SHLIB_LDFLAGS="-shared -Xlinker -x"
97                 XCFLAGS="-D_LARGEFILE64_SOURCE"
98                 SHLIB_LINKER="${MT_CC} -shared"
99                 ;;
100
101         alpha_linux_26)
102                 CCOBJ="${CC} -fPIC"
103                 KERN_OPTMZ=-O2
104                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
105                 PAM_OPTMZ=-O2
106                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
107                 SHLIB_CFLAGS="-fPIC"
108                 SHLIB_LDFLAGS="-shared -Xlinker -x"
109                 XCFLAGS="-D_LARGEFILE64_SOURCE"
110                 SHLIB_LINKER="${MT_CC} -shared"
111                 ;;
112
113         arm_linux24)
114                 CCOBJ="${CC} -fPIC"
115                 KERN_OPTMZ=-O2
116                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
117                 PAM_OPTMZ=-O2
118                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
119                 SHLIB_CFLAGS="-fPIC"
120                 SHLIB_LDFLAGS="-shared -Xlinker -x"
121                 XCFLAGS="-D_LARGEFILE64_SOURCE"
122                 SHLIB_LINKER="${MT_CC} -shared"
123                 ;;
124
125         arm_linux26)
126                 CCOBJ="${CC} -fPIC"
127                 KERN_OPTMZ=-O2
128                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
129                 PAM_OPTMZ=-O2
130                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
131                 SHLIB_CFLAGS="-fPIC"
132                 SHLIB_LDFLAGS="-shared -Xlinker -x"
133                 XCFLAGS="-D_LARGEFILE64_SOURCE"
134                 SHLIB_LINKER="${MT_CC} -shared"
135                 ;;
136
137         hp_ux102)
138                 AS="/usr/ccs/bin/as"
139                 CC="/opt/ansic/bin/cc -Ae"
140                 CCOBJ="/opt/ansic/bin/cc -Ae"
141                 DBM="/lib/libndbm.a"
142                 LD="/bin/ld"
143                 LEX="/opt/langtools/bin/lex"
144                 LWP_OPTMZ="-O"
145                 MT_CC="/opt/ansic/bin/cc -Ae"
146                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
147                 MT_LIBS='-L/opt/dce/lib -ldce ${XLIBS}'
148                 MV="/bin/mv"
149                 OPTMZ="-O"
150                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
151                 PAM_LIBS="/usr/lib/libpam.1"
152                 RANLIB="/usr/bin/ranlib"
153                 RM="/bin/rm"
154                 SHLIB_LDFLAGS="-b -Bsymbolic"
155                 SHLIB_SUFFIX="sl"
156                 VFSCK_CFLAGS="-D_FILE64"
157                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
158                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
159                 XCFLAGS="${XCFLAGS0} +DA1.0"
160                 YACC="/opt/langtools/bin/yacc"
161                 SHLIB_LINKER="ld -b"
162                 ;;
163
164         hp_ux11*)
165                 AR="/usr/bin/ar"
166                 AS="/usr/ccs/bin/as"
167                 CC="/opt/ansic/bin/cc"
168                 CCOBJ="/opt/ansic/bin/cc"
169                 DBM="/lib/libndbm.a"
170                 LD="/bin/ld   "
171                 LEX="/opt/langtools/bin/lex"
172                 LWP_OPTMZ="-O"
173                 MT_CC="$CC"
174                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
175                 MV="/bin/mv"
176                 OPTMZ="-O"
177                 PAM_CFLAGS="+DA1.0 +z -Wl,+k"
178                 PAM_LIBS="/usr/lib/libpam.1"
179                 RANLIB="/usr/bin/ranlib"
180                 RM="/bin/rm"
181                 SHLIB_LDFLAGS="-b -Bsymbolic"
182                 SHLIB_SUFFIX="sl"
183                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
184                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
185                 XCFLAGS64="${XCFLAGS0} +DA2.0W"
186                 XCFLAGS="${XCFLAGS0} +DA1.0"
187                 XLIBELFA="-lelf"
188                 YACC="/opt/langtools/bin/yacc"
189                 SHLIB_LINKER="ld -b"
190                 ;;
191
192         ia64_hpux*)
193                 AR="/usr/bin/ar"
194                 AS="/usr/ccs/bin/as"
195                 CC="/opt/ansic/bin/cc"
196                 CCOBJ="/opt/ansic/bin/cc"
197                 DBM="/lib/hpux32/libndbm.so"
198                 LD="/bin/ld   "
199                 LEX="/opt/langtools/bin/lex"
200                 LWP_OPTMZ=""
201                 MT_CC="$CC"
202                 MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
203                 MV="/bin/mv"
204                 OPTMZ="-O"
205                 PAM_CFLAGS="-b +z -Wl,+k"
206                 PAM_LIBS="/usr/lib/hpux32/libpam.so"
207                 RANLIB="/usr/bin/ranlib"
208                 RM="/bin/rm"
209                 SHLIB_LDFLAGS="-b -Bsymbolic"
210                 SHLIB_SUFFIX="sl"
211                 VFSCK_CFLAGS="-I/usr/old/usr/include -D_FILE64"
212                 XCFLAGS0="-ldld -lc -Wp,-H200000 -Wl,-a,archive_shared -DAUTH_DBM_LOG +z -Wl,+k -D_LARGEFILE64_SOURCE"
213                 XCFLAGS64="${XCFLAGS0} +DD64"
214                 XCFLAGS="${XCFLAGS0}"
215                 XLIBELFA="-lelf"
216                 YACC="/opt/langtools/bin/yacc"
217                 SHLIB_LINKER="ld -b"
218                 ;;
219
220         i386_fbsd_*)
221                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
222                 PAM_OPTMZ=-O2
223                 PAM_CFLAGS="-pipe -fPIC"
224                 SHLIB_LDFLAGS="-shared -Xlinker -x"
225                 SHLIB_LINKER="${MT_CC} -shared"
226                 XCFLAGS="-pipe"
227                 ;;
228
229         i386_dfbsd_*)
230                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
231                 PAM_OPTMZ=-O2
232                 PAM_CFLAGS="-pipe -fPIC"
233                 SHLIB_LDFLAGS="-shared -Xlinker -x"
234                 SHLIB_LINKER="${MT_CC} -shared"
235                 XCFLAGS="-pipe"
236                 ;;
237
238         amd64_fbsd_*)
239                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
240                 PAM_CFLAGS="-O2 -pipe -fPIC"
241                 SHLIB_LDFLAGS="-shared -Xlinker -x"
242                 SHLIB_LINKER="${MT_CC} -shared"
243                 XCFLAGS="-O2 -pipe -fPIC"
244                 ;;
245
246         *nbsd2*|*nbsd3*|*nbsd4*|*nbsd5*)
247                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
248                 PAM_OPTMZ=-O2
249                 PAM_CFLAGS="-pipe -fPIC"
250                 SHLIB_CFLAGS="-fPIC"
251                 SHLIB_LDFLAGS="-shared -Xlinker -x"
252                 SHLIB_LINKER="${MT_CC} -shared"
253                 XCFLAGS="-pipe"
254                 ;;
255
256         *nbsd15|*nbsd16)
257                 MT_CFLAGS='${XCFLAGS}'
258                 MT_LIBS='${XLIBS}'
259                 PAM_OPTMZ=-O2
260                 PAM_CFLAGS="-pipe -fPIC"
261                 SHLIB_LDFLAGS="-shared -Xlinker -x"
262                 SHLIB_LINKER="${MT_CC} -shared"
263                 XCFLAGS="-pipe"
264                 ;;
265
266         ia64_linux24|ia64_linux26)
267                 KERN_OPTMZ=-O2
268                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
269                 PAM_OPTMZ=-O2
270                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
271                 SHLIB_CFLAGS="-fPIC"
272                 SHLIB_LDFLAGS="-shared -Xlinker -x"
273                 XCFLAGS="-D_LARGEFILE64_SOURCE -G0"
274                 SHLIB_LINKER="${MT_CC} -shared"
275                 ;;
276
277         amd64_linux*)
278                 CCOBJ="${CC} -fPIC"
279                 KERN_OPTMZ=-O2
280                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
281                 PAM_OPTMZ=-O2
282                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
283                 SHLIB_CFLAGS="-fPIC"
284                 SHLIB_LDFLAGS="-shared -Xlinker -x"
285                 XCFLAGS="-D_LARGEFILE64_SOURCE"
286                 SHLIB_LINKER="${MT_CC} -shared"
287                 ;;
288
289         ppc64_linux24)
290                 KERN_OPTMZ=-O2
291                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
292                 PAM_OPTMZ=-O2
293                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
294                 SHLIB_LDFLAGS="-shared -Xlinker -x"
295                 SHLIB_CFLAGS="-fPIC"
296                 XCFLAGS="-D_LARGEFILE64_SOURCE"
297                 SHLIB_LINKER="${MT_CC} -shared"
298                 ;;
299
300         ppc64_linux26)
301                 KERN_OPTMZ=-O2
302                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
303                 PAM_OPTMZ=-O2
304                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
305                 SHLIB_LDFLAGS="-shared -Xlinker -x"
306                 SHLIB_CFLAGS="-fPIC"
307                 XCFLAGS="-D_LARGEFILE64_SOURCE -fPIC"
308                 SHLIB_LINKER="${MT_CC} -shared"
309                 ;;
310
311         i386_umlinux22)
312                 KERN_OPTMZ=-O2
313                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
314                 PAM_OPTMZ=-O2
315                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
316                 SHLIB_CFLAGS="-fPIC"
317                 SHLIB_LDFLAGS="-shared -Xlinker -x"
318                 XCFLAGS="-D_LARGEFILE64_SOURCE"
319                 SHLIB_LINKER="${MT_CC} -shared"
320                 ;;
321
322         i386_linux*)
323                 KERN_OPTMZ=-O2
324                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
325                 DBG=-g
326                 KERN_DBG=-g
327                 LWP_DBG=-g
328                 LWP_OPTMZ=-O2
329                 OPTMZ=-O2
330                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
331                 SHLIB_CFLAGS="-fPIC"
332                 SHLIB_LDFLAGS="-shared -Xlinker -x"
333                 XCFLAGS="-D_LARGEFILE64_SOURCE"
334                 SHLIB_LINKER="${MT_CC} -shared"
335                 ;;
336
337         i386_umlinux24)
338                 KERN_OPTMZ=-O2
339                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
340                 DBG=-g
341                 KERN_DBG=-g
342                 LWP_DBG=-g
343                 LWP_OPTMZ=-O2
344                 OPTMZ=-O2
345                 PAM_OPTMZ=-O2
346                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
347                 SHLIB_CFLAGS="-fPIC"
348                 SHLIB_LDFLAGS="-shared -Xlinker -x"
349                 XCFLAGS="-D_LARGEFILE64_SOURCE"
350                 SHLIB_LINKER="${MT_CC} -shared"
351                 ;;
352
353         i386_umlinux26)
354                 KERN_OPTMZ=-O2
355                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
356                 DBG=-g
357                 KERN_DBG=-g
358                 LWP_DBG=-g
359                 LWP_OPTMZ=-O2
360                 OPTMZ=-O2
361                 PAM_OPTMZ=-O2
362                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
363                 SHLIB_CFLAGS="-fPIC"
364                 SHLIB_LDFLAGS="-shared -Xlinker -x"
365                 XCFLAGS="-D_LARGEFILE64_SOURCE"
366                 SHLIB_LINKER="${MT_CC} -shared"
367                 ;;
368
369         *_obsd*)
370                 KERN_OPTMZ=-O2
371                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
372                 LWP_OPTMZ=-O2
373                 OPTMZ=-O2
374                 PAM_OPTMZ=-O2
375                 PAM_CFLAGS="-pipe -fpic"
376                 SHLIB_CFLAGS="-fpic"
377                 SHLIB_LDFLAGS="-shared -Xlinker -x"
378                 SHLIB_LINKER="${MT_CC} -shared"
379                 XCFLAGS=
380                 ;;
381
382         parisc_linux24)
383                 KERN_OPTMZ=-O2
384                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
385                 PAM_OPTMZ=-O2
386                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
387                 SHLIB_CFLAGS="-fPIC"
388                 SHLIB_LDFLAGS="-shared -Xlinker -x"
389                 XCFLAGS="-D_LARGEFILE64_SOURCE"
390                 SHLIB_LINKER="${MT_CC} -shared"
391                 ;;
392
393         ppc_darwin_70)
394                 CC="cc"
395                 CCOBJ="cc"
396                 MT_CC="cc"
397                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
398                 MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
399                 KROOT=
400                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
401                 LWP_OPTMZ="-O2"
402                 REGEX_OBJ="regex.o"
403                 REGEX_OBJ_PIC="pic_regex.o"
404                 XCFLAGS="-no-cpp-precomp"
405                 EXTRA_VLIBOBJS="fstab.o"
406                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
407                 SHLIB_SUFFIX="dylib"
408                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
409                 ;;
410
411         *_darwin_80)
412                 CC="cc"
413                 CCOBJ="cc"
414                 MT_CC="cc"
415                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
416                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
417                 KROOT=
418                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
419                 KERN_OPTMZ="-Os"
420                 LWP_OPTMZ="-Os"
421                 OPTMZ="-Os"
422                 REGEX_OBJ="regex.o"
423                 REGEX_OBJ_PIC="pic_regex.o"
424                 EXTRA_VLIBOBJS="fstab.o"
425                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
426                 SHLIB_SUFFIX="dylib"
427                 RANLIB="ranlib -c"
428                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
429                 ;;
430
431         *_darwin_90)
432                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
433                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
434                 KROOT=
435                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
436                 LD="cc"
437                 KERN_OPTMZ="-Os"
438                 LWP_OPTMZ="-Os"
439                 OPTMZ="-Os"
440                 REGEX_OBJ="regex.o"
441                 REGEX_OBJ_PIC="pic_regex.o"
442                 EXTRA_VLIBOBJS="fstab.o"
443                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
444                 SHLIB_SUFFIX="dylib"
445                 RANLIB="ranlib -c"
446                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
447                 ;;
448
449         *_darwin_100)
450                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
451                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
452                 MT_LIBS='${XLIBS}'
453                 KROOT=
454                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
455                 LD="cc"
456                 KERN_OPTMZ="-Os"
457                 LWP_OPTMZ="-Os"
458                 OPTMZ="-Os"
459                 PAM_LIBS="-lpam"
460                 REGEX_OBJ="regex.o"
461                 REGEX_OBJ_PIC="pic_regex.o"
462                 EXTRA_VLIBOBJS="fstab.o"
463                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
464                 SHLIB_SUFFIX="dylib"
465                 RANLIB="ranlib"
466                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
467                 ;;
468
469         ppc_linux*)
470                 KERN_OPTMZ=-O2
471                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
472                 PAM_OPTMZ=-O2
473                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
474                 SHLIB_CFLAGS="-fPIC"
475                 SHLIB_LDFLAGS="-shared -Xlinker -x"
476                 XCFLAGS="-D_LARGEFILE64_SOURCE"
477                 SHLIB_LINKER="${MT_CC} -shared"
478                 ;;
479
480         rs_aix42)
481                 CC="cc"
482                 CCOBJ="cc"
483                 DBG=""
484                 LIBSYS_AIX_EXP="afsl.exp"
485                 MT_CC="xlc_r"
486                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
487                 SHLIB_SUFFIX="o"
488                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
489                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
490                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
491                 AIX32="yes"
492                 AIX64="no"
493                 ;;
494
495
496         rs_aix51)
497                 CC="cc"
498                 CCOBJ="cc"
499                 DBG=""
500                 LIBSYS_AIX_EXP="afsl.exp"
501                 MT_CC="xlc_r"
502                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
503                 SHLIB_SUFFIX="o"
504                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
505                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
506                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
507                 AIX32="yes"
508                 AIX64="yes"
509                 ;;
510
511         rs_aix52)       
512                 CC="cc"
513                 CCOBJ="cc"
514                 DBG=""
515                 LIBSYS_AIX_EXP="afsl.exp"
516                 MT_CC="xlc_r"
517                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
518                 SHLIB_SUFFIX="o"
519                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
520                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
521                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
522                 AIX32="yes"
523                 AIX64="yes"
524                 ;;
525
526         rs_aix53)       
527                 CC="cc"
528                 CCOBJ="cc"
529                 DBG="-g"
530                 LIBSYS_AIX_EXP="afsl.exp"
531                 MT_CC="xlc_r"
532                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
533                 SHLIB_SUFFIX="o"
534                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
535                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
536                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
537                 AIX32="yes"
538                 AIX64="yes"
539                 ;;
540
541         rs_aix61)       
542                 CC="cc"
543                 CCOBJ="cc"
544                 DBG="-g"
545                 LIBSYS_AIX_EXP="afsl.exp"
546                 MT_CC="xlc_r"
547                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
548                 SHLIB_SUFFIX="o"
549                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
550                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
551                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
552                 AIX32="no"
553                 AIX64="yes"
554                 ;;
555
556         s390_linux22)
557                 LD="ld"
558                 KERN_OPTMZ=-O2
559                 MT_CC="$CC"
560                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
561                 PAM_OPTMZ=-O
562                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
563                 SHLIB_CFLAGS="-fPIC"
564                 SHLIB_LDFLAGS="-shared -Xlinker -x"
565                 OPTMZ=-O
566                 XCFLAGS="-D_LARGEFILE64_SOURCE"
567                 SHLIB_LINKER="${MT_CC} -shared"
568                 ;;
569
570         s390_linux24|s390_linux26)
571                 LD="ld"
572                 KERN_OPTMZ=-O2
573                 MT_CC="$CC"
574                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
575                 PAM_OPTMZ=-O2
576                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
577                 SHLIB_CFLAGS="-fPIC"
578                 SHLIB_LDFLAGS="-shared -Xlinker -x"
579                 XCFLAGS="-D_LARGEFILE64_SOURCE"
580                 SHLIB_LINKER="${MT_CC} -shared"
581                 ;;
582
583         s390x_linux24|s390x_linux26)
584                 CCOBJ="${CC} -fPIC"
585                 LD="ld"
586                 KERN_OPTMZ=-O2
587                 MT_CC="$CC"
588                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
589                 PAM_OPTMZ=-O
590                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
591                 SHLIB_CFLAGS="-fPIC"
592                 SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
593                 OPTMZ=-O
594                 XCFLAGS="-D_LARGEFILE64_SOURCE -D__s390x__"
595                 SHLIB_LINKER="${MT_CC} -shared"
596                 ;;
597
598         sgi_62)
599                 CC="cc"
600                 CCOBJ="cc"
601                 MT_CC="cc"
602                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
603                 FSINCLUDES="-I/usr/include/sys/fs"
604                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
605                 XCFLAGS64="-64 -mips3"
606                 XCFLAGS="-o32"
607                 XLDFLAGS64="-64"
608                 XLDFLAGS="-o32"
609                 SHLIB_LINKER="${CC} -shared"
610                 ;;
611
612         sgi_63)
613                 CC="cc"
614                 CCOBJ="cc"
615                 MT_CC="cc"
616                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
617                 FSINCLUDES="-I/usr/include/sys/fs"
618                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
619                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
620                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
621                 XLDFLAGS64="-64"
622                 XLDFLAGS="-o32"
623                 SHLIB_LINKER="${CC} -shared"
624                 ;;
625
626         sgi_64)
627                 CC="cc"
628                 CCOBJ="cc"
629                 MT_CC="cc"
630                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
631                 FSINCLUDES="-I/usr/include/sys/fs"
632                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
633                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
634                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -n32 -woff 1009,1014,1110,1116,1164,1169,1171,1174,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552,3201 -Wl,-woff,84,-woff,15"
635                 XLDFLAGS64="-64"
636                 XLDFLAGS="-n32"
637                 SHLIB_LINKER="${CC} -shared"
638                 ;;
639
640         sgi_65)
641                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
642                 CC="/usr/bin/cc"
643                 CCOBJ="/usr/bin/cc"
644                 FSINCLUDES="-I/usr/include/sys/fs"
645                 LD="/usr/bin/ld"
646                 MT_CC="/usr/bin/cc"
647                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
648                 XCFLAGS64="-64 -mips3"
649                 XCFLAGS="-n32 -mips3 -woff 1009,1014,1110,1116,1164,1171,1177,1183,1185,1204,1233,1515,1516,1548,1169,1174,1177,1196,1498,1506,1552,3201 -Wl,-woff,84,-woff,15"
650                 XLDFLAGS64="-64 -mips3"
651                 XLDFLAGS="-n32 -mips3"
652                 SHLIB_LINKER="${CC} -shared"
653                 ;;
654
655         sparc*_linux*)
656                 KERN_OPTMZ=-O2
657                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
658                 PAM_OPTMZ=-O2
659                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
660                 SHLIB_CFLAGS="-fPIC"
661                 SHLIB_LDFLAGS="-shared -Xlinker -x"
662                 XCFLAGS="-D_LARGEFILE64_SOURCE"
663                 XCFLAGS64="-D_LARGEFILE64_SOURCE -m64"
664                 XLDFLAGS64="-m64"
665                 SHLIB_LINKER="${MT_CC} -shared"
666                 ;;
667
668         sun4_413)
669                 CCXPG2="/usr/xpg2bin/cc"
670                 CC="gcc"
671                 CCOBJ="gcc"
672                 SHLIB_CFLAGS="-PIC"
673                 XCFLAGS=""
674                 XLIBELFA="-lelf"
675                 XLIBKVM="-lkvm"
676                 XLIBS="${LIB_AFSDB}"
677                 LD="ld"
678                 ;;
679
680         sun4x_55)
681                 CC=$SOLARISCC
682                 CCOBJ=$SOLARISCC
683                 MT_CC=$SOLARISCC
684                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
685                 SHLIB_CFLAGS="-KPIC"
686                 XCFLAGS="-dy -Bdynamic"
687                 XLIBELFA="-lelf"
688                 XLIBKVM="-lkvm"
689                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
690                 LD="/usr/ccs/bin/ld"
691                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
692                 LWP_OPTMZ="-g"
693                 ;;
694
695         sun4x_56)
696                 CC=$SOLARISCC
697                 CCOBJ=$SOLARISCC
698                 MT_CC=$SOLARISCC
699                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
700                 PAM_CFLAGS="-KPIC"
701                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
702                 SHLIB_CFLAGS="-KPIC"
703                 SHLIB_LDFLAGS="-G -Bsymbolic"
704                 XCFLAGS="-dy -Bdynamic"
705                 XLIBELFA="-lelf"
706                 LD="/usr/ccs/bin/ld"
707                 XLIBKVM="-lkvm"
708                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
709                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
710                 LWP_OPTMZ="-g"
711                 ;;
712
713         sun4x_57)
714                 CC=$SOLARISCC
715                 CCOBJ=$SOLARISCC
716                 LD="/usr/ccs/bin/ld"
717                 MT_CC=$SOLARISCC
718                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
719                 PAM_CFLAGS="-KPIC"
720                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
721                 SHLIB_CFLAGS="-KPIC"
722                 SHLIB_LDFLAGS="-G -Bsymbolic"
723                 XCFLAGS64='${XCFLAGS} -xarch=v9'
724                 XCFLAGS="-dy -Bdynamic"
725                 XLIBELFA="-lelf"
726                 XLIBKVM="-lkvm"
727                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
728                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
729                 LWP_OPTMZ="-g"
730                 ;;
731
732         sun4x_58)
733                 CC=$SOLARISCC
734                 CCOBJ=$SOLARISCC
735                 LD="/usr/ccs/bin/ld"
736                 MT_CC=$SOLARISCC
737                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
738                 PAM_CFLAGS="-KPIC"
739                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
740                 SHLIB_CFLAGS="-KPIC"
741                 SHLIB_LDFLAGS="-G -Bsymbolic"
742                 XCFLAGS64='${XCFLAGS} -xarch=v9'
743                 XCFLAGS="-dy -Bdynamic"
744                 XLIBELFA="-lelf"
745                 XLIBKVM="-lkvm"
746                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
747                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
748                 LWP_OPTMZ="-g"
749                 ;;
750
751         sun4x_59)
752                 CC=$SOLARISCC
753                 CCOBJ=$SOLARISCC
754                 LD="/usr/ccs/bin/ld"
755                 MT_CC=$SOLARISCC
756                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
757                 PAM_CFLAGS="-KPIC"
758                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
759                 SHLIB_CFLAGS="-KPIC"
760                 SHLIB_LDFLAGS="-G -Bsymbolic"
761                 XCFLAGS64='${XCFLAGS} -xarch=v9'
762                 XCFLAGS="-dy -Bdynamic"
763                 XLIBELFA="-lelf"
764                 XLIBKVM="-lkvm"
765                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
766                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
767                 LWP_OPTMZ="-g"
768                 ;;
769
770         sun4x_510)
771                 CC=$SOLARISCC
772                 CCOBJ=$SOLARISCC
773                 LD="/usr/ccs/bin/ld"
774                 MT_CC=$SOLARISCC
775                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
776                 PAM_CFLAGS="-KPIC"
777                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
778                 SHLIB_CFLAGS="-KPIC"
779                 SHLIB_LDFLAGS="-G -Bsymbolic"
780                 XCFLAGS64='${XCFLAGS} -m64'
781                 XCFLAGS="-dy -Bdynamic"
782                 XLIBELFA="-lelf"
783                 XLIBKVM="-lkvm"
784                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
785                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
786                 LWP_OPTMZ="-g"
787                 ;;
788
789         sun4x_511)
790                 CC=$SOLARISCC
791                 CCOBJ=$SOLARISCC
792                 LD="/usr/ccs/bin/ld"
793                 MT_CC=$SOLARISCC
794                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
795                 PAM_CFLAGS="-KPIC"
796                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
797                 SHLIB_CFLAGS="-KPIC"
798                 SHLIB_LDFLAGS="-G -Bsymbolic"
799                 XCFLAGS64='${XCFLAGS} -xarch=v9'
800                 XCFLAGS="-dy -Bdynamic"
801                 XLIBELFA="-lelf"
802                 XLIBKVM="-lkvm"
803                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
804                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
805                 LWP_OPTMZ="-g"
806                 ;;
807
808         sunx86_57)
809                 CC=$SOLARISCC
810                 CCOBJ=$SOLARISCC
811                 LD="/usr/ccs/bin/ld"
812                 MT_CC=$SOLARISCC
813                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
814                 PAM_CFLAGS="-KPIC"
815                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
816                 SHLIB_CFLAGS="-KPIC"
817                 SHLIB_LDFLAGS="-G -Bsymbolic"
818                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
819                 XCFLAGS="-dy -Bdynamic"
820                 XLIBELFA="-lelf"
821                 XLIBKVM="-lkvm"
822                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
823                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
824                 ;;
825
826         sunx86_58)
827                 CC=$SOLARISCC
828                 CCOBJ=$SOLARISCC
829                 LD="/usr/ccs/bin/ld"
830                 MT_CC=$SOLARISCC
831                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
832                 PAM_CFLAGS="-KPIC"
833                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
834                 SHLIB_CFLAGS="-KPIC"
835                 SHLIB_LDFLAGS="-G -Bsymbolic"
836                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
837                 XCFLAGS="-dy -Bdynamic"
838                 XLIBELFA="-lelf"
839                 XLIBKVM="-lkvm"
840                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
841                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
842                 ;;
843
844         sunx86_59)
845                 CC=$SOLARISCC
846                 CCOBJ=$SOLARISCC
847                 LD="/usr/ccs/bin/ld"
848                 MT_CC=$SOLARISCC
849                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
850                 PAM_CFLAGS="-KPIC"
851                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
852                 SHLIB_CFLAGS="-KPIC"
853                 SHLIB_LDFLAGS="-G -Bsymbolic"
854                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
855                 XCFLAGS="-dy -Bdynamic"
856                 XLIBELFA="-lelf"
857                 XLIBKVM="-lkvm"
858                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
859                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
860                 ;;
861
862         sunx86_510)
863                 CC=$SOLARISCC
864                 CCOBJ=$SOLARISCC
865                 LD="/usr/ccs/bin/ld"
866                 MT_CC=$SOLARISCC
867                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
868                 PAM_CFLAGS="-KPIC"
869                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
870                 SHLIB_CFLAGS="-KPIC"
871                 SHLIB_LDFLAGS="-G -Bsymbolic"
872                 XCFLAGS64='${XCFLAGS} -m64'
873                 XCFLAGS="-dy -Bdynamic"
874                 XLIBELFA="-lelf"
875                 XLIBKVM="-lkvm"
876                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
877                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
878                 ;;
879
880         sunx86_511)
881                 CC=$SOLARISCC
882                 CCOBJ=$SOLARISCC
883                 LD="/usr/ccs/bin/ld"
884                 MT_CC=$SOLARISCC
885                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
886                 PAM_CFLAGS="-KPIC"
887                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
888                 SHLIB_CFLAGS="-KPIC"
889                 SHLIB_LDFLAGS="-G -Bsymbolic"
890                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
891                 XCFLAGS="-dy -Bdynamic"
892                 XLIBELFA="-lelf"
893                 XLIBKVM="-lkvm"
894                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
895                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
896                 ;;
897 esac
898
899 #
900 # Special build targets
901 #
902 case $AFS_SYSNAME in
903         sgi_6*)
904                 IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
905                 XFS_SIZE_CHECK="xfs_size_check"
906                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
907                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
908         
909                 AC_SUBST(XFS_SIZE_CHECK)
910                 AC_SUBST(install_XFS_SIZE_CHECK)
911                 AC_SUBST(dest_XFS_SIZE_CHECK)
912         ;;
913 esac
914
915 dnl Disable the default for debugging/optimization if not enabled
916 if test "x$enable_debug_kernel" = "xno"; then
917   KERN_DBG=
918 fi
919
920 if test "x$enable_optimize_kernel" = "xno"; then
921   KERN_OPTMZ=
922 fi
923
924 if test "x$enable_debug" = "xno"; then
925   DBG=
926   NO_STRIP_BIN=-s
927 fi
928
929 if test "x$enable_optimize" = "xno"; then
930   OPTMZ=
931 fi
932
933 if test "x$enable_debug_lwp" = "xno"; then
934   LWP_DBG=
935 fi
936
937 if test "x$enable_optimize_lwp" = "xno"; then
938   LWP_OPTMZ=
939 fi
940
941 if test "x$enable_strip_binaries" != "xno"; then
942   if test "x$enable_strip_binaries" = "xmaybe" -a "x$enable_debug" = "xyes"; then
943     NO_STRIP_BIN=
944   else
945     NO_STRIP_BIN=-s
946   fi
947 else
948   NO_STRIP_BIN=
949 fi
950
951 CFLAGS_NOERROR=
952 CFLAGS_NOSTRICT=
953 CFLAGS_NOUNUSED=
954 CFLAGS_NOOLDSTYLE=
955
956 if test "x$GCC" = "xyes"; then
957   if test "x$enable_warnings" = "xyes"; then
958     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith"
959   fi
960   if test "x$enable_checking" != "xno"; then
961     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith"
962     if test "x$enable_checking" != "xall"; then
963       CFLAGS_NOERROR="-Wno-error"
964       CFLAGS_NOSTRICT="-fno-strict-aliasing"
965       CFLAGS_NOUNUSED="-Wno-unused"
966       CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
967       AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
968     fi
969   fi
970 else
971   case $AFS_SYSNAME in
972     sun*_51?)
973       # Solaris Studio
974       warn_common="-v -errfmt=error -errtags=yes -erroff=E_ATTRIBUTE_UNKNOWN,E_END_OF_LOOP_CODE_NOT_REACHED"
975       if test "x$enable_warnings" = "xyes" ; then
976         XCFLAGS="${XCFLAGS} $warn_common"
977       fi
978       if test "x$enable_checking" != "xno" ; then
979         XCFLAGS="${XCFLAGS} $warn_common -errwarn=%all"
980         if test "x$enable_checking" != "xall" ; then
981           CFLAGS_NOERROR="-errwarn=%none"
982         fi
983       fi
984       ;;
985   esac
986 fi
987
988 dnl horribly cheating, assuming double / is ok.
989 case $INSTALL in
990   ./* ) 
991     INSTALL="/@abs_top_srcdir@/install-sh -c"
992   ;;
993   *) 
994   ;;
995 esac
996
997 INSTALL_PROGRAM="${INSTALL_PROGRAM} ${NO_STRIP_BIN}"
998
999 AC_SUBST(CCXPG2)
1000 AC_SUBST(CCOBJ)
1001 AC_SUBST(AFSD_LIBS)
1002 AC_SUBST(AFSD_LDFLAGS)
1003 AC_SUBST(AIX32)
1004 AC_SUBST(AIX64)
1005 AC_SUBST(AR)
1006 AC_SUBST(AS)
1007 AC_SUBST(CP)
1008 AC_SUBST(DBG)
1009 AC_SUBST(FSINCLUDES)
1010 AC_SUBST(KERN_DBG)
1011 AC_SUBST(KERN_OPTMZ)
1012 AC_SUBST(LD)
1013 AC_SUBST(LEX)
1014 AC_SUBST(LWP_DBG)
1015 AC_SUBST(LWP_OPTMZ)
1016 AC_SUBST(MT_CC)
1017 AC_SUBST(MT_CFLAGS)
1018 AC_SUBST(MT_LIBS)
1019 AC_SUBST(MV)
1020 AC_SUBST(NO_STRIP_BIN)
1021 AC_SUBST(OPTMZ)
1022 AC_SUBST(PAM_CFLAGS)
1023 AC_SUBST(PAM_LIBS)
1024 AC_SUBST(PAM_DBG)
1025 AC_SUBST(PAM_OPTMZ)
1026 AC_SUBST(RANLIB)
1027 AC_SUBST(REGEX_OBJ)
1028 AC_SUBST(REGEX_OBJ_PIC)
1029 AC_SUBST(RM)
1030 AC_SUBST(RXDEBUG)
1031 AC_SUBST(SHLIB_CFLAGS)
1032 AC_SUBST(SHLIB_LDFLAGS)
1033 AC_SUBST(SHLIB_LINKER)
1034 AC_SUBST(SHLIB_SUFFIX)
1035 AC_SUBST(VFSCK_CFLAGS)
1036 AC_SUBST(XCFLAGS)
1037 AC_SUBST(CFLAGS_NOERROR)
1038 AC_SUBST(CFLAGS_NOSTRICT)
1039 AC_SUBST(CFLAGS_NOUNUSED)
1040 AC_SUBST(CFLAGS_NOOLDSTYLE)
1041 AC_SUBST(XCFLAGS64)
1042 AC_SUBST(XLDFLAGS)
1043 AC_SUBST(XLDFLAGS64)
1044 AC_SUBST(XLIBELFA)
1045 AC_SUBST(XLIBKVM)
1046 AC_SUBST(XLIBS)
1047 AC_SUBST(YACC)
1048
1049
1050 ])