OpenBSD: Change code optimization setting
[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                 XCFLAGS="-no-cpp-precomp"
404                 EXTRA_VLIBOBJS="fstab.o"
405                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
406                 SHLIB_SUFFIX="dylib"
407                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
408                 ;;
409
410         *_darwin_80)
411                 CC="cc"
412                 CCOBJ="cc"
413                 MT_CC="cc"
414                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
415                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
416                 KROOT=
417                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
418                 KERN_OPTMZ="-Os"
419                 LWP_OPTMZ="-Os"
420                 OPTMZ="-Os"
421                 REGEX_OBJ="regex.o"
422                 EXTRA_VLIBOBJS="fstab.o"
423                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
424                 SHLIB_SUFFIX="dylib"
425                 RANLIB="ranlib -c"
426                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
427                 ;;
428
429         *_darwin_90)
430                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
431                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
432                 KROOT=
433                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
434                 LD="cc"
435                 KERN_OPTMZ="-Os"
436                 LWP_OPTMZ="-Os"
437                 OPTMZ="-Os"
438                 REGEX_OBJ="regex.o"
439                 EXTRA_VLIBOBJS="fstab.o"
440                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
441                 SHLIB_SUFFIX="dylib"
442                 RANLIB="ranlib -c"
443                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
444                 ;;
445
446         *_darwin_100)
447                 AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
448                 MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"
449                 MT_LIBS='${XLIBS}'
450                 KROOT=
451                 KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
452                 LD="cc"
453                 KERN_OPTMZ="-Os"
454                 LWP_OPTMZ="-Os"
455                 OPTMZ="-Os"
456                 PAM_LIBS="-lpam"
457                 REGEX_OBJ="regex.o"
458                 EXTRA_VLIBOBJS="fstab.o"
459                 SHLIB_LINKER="${MT_CC} \${ARCHFLAGS} -dynamiclib"
460                 SHLIB_SUFFIX="dylib"
461                 RANLIB="ranlib"
462                 XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
463                 ;;
464
465         ppc_linux*)
466                 KERN_OPTMZ=-O2
467                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
468                 PAM_OPTMZ=-O2
469                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
470                 SHLIB_CFLAGS="-fPIC"
471                 SHLIB_LDFLAGS="-shared -Xlinker -x"
472                 XCFLAGS="-D_LARGEFILE64_SOURCE"
473                 SHLIB_LINKER="${MT_CC} -shared"
474                 ;;
475
476         rs_aix42)
477                 CC="cc"
478                 CCOBJ="cc"
479                 DBG=""
480                 LIBSYS_AIX_EXP="afsl.exp"
481                 MT_CC="xlc_r"
482                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
483                 SHLIB_SUFFIX="o"
484                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
485                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
486                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
487                 AIX32="yes"
488                 AIX64="no"
489                 ;;
490
491
492         rs_aix51)
493                 CC="cc"
494                 CCOBJ="cc"
495                 DBG=""
496                 LIBSYS_AIX_EXP="afsl.exp"
497                 MT_CC="xlc_r"
498                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
499                 SHLIB_SUFFIX="o"
500                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
501                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
502                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
503                 AIX32="yes"
504                 AIX64="yes"
505                 ;;
506
507         rs_aix52)       
508                 CC="cc"
509                 CCOBJ="cc"
510                 DBG=""
511                 LIBSYS_AIX_EXP="afsl.exp"
512                 MT_CC="xlc_r"
513                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
514                 SHLIB_SUFFIX="o"
515                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
516                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
517                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
518                 AIX32="yes"
519                 AIX64="yes"
520                 ;;
521
522         rs_aix53)       
523                 CC="cc"
524                 CCOBJ="cc"
525                 DBG="-g"
526                 LIBSYS_AIX_EXP="afsl.exp"
527                 MT_CC="xlc_r"
528                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
529                 SHLIB_SUFFIX="o"
530                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
531                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
532                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
533                 AIX32="yes"
534                 AIX64="yes"
535                 ;;
536
537         rs_aix61)       
538                 CC="cc"
539                 CCOBJ="cc"
540                 DBG="-g"
541                 LIBSYS_AIX_EXP="afsl.exp"
542                 MT_CC="xlc_r"
543                 MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
544                 SHLIB_SUFFIX="o"
545                 XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
546                 XLIBS="${LIB_AFSDB} ${LIB_libintl} -ldl"
547                 SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
548                 AIX32="no"
549                 AIX64="yes"
550                 ;;
551
552         s390_linux22)
553                 LD="ld"
554                 KERN_OPTMZ=-O2
555                 MT_CC="$CC"
556                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
557                 PAM_OPTMZ=-O
558                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
559                 SHLIB_CFLAGS="-fPIC"
560                 SHLIB_LDFLAGS="-shared -Xlinker -x"
561                 OPTMZ=-O
562                 XCFLAGS="-D_LARGEFILE64_SOURCE"
563                 SHLIB_LINKER="${MT_CC} -shared"
564                 ;;
565
566         s390_linux24|s390_linux26)
567                 LD="ld"
568                 KERN_OPTMZ=-O2
569                 MT_CC="$CC"
570                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
571                 PAM_OPTMZ=-O2
572                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
573                 SHLIB_CFLAGS="-fPIC"
574                 SHLIB_LDFLAGS="-shared -Xlinker -x"
575                 XCFLAGS="-D_LARGEFILE64_SOURCE"
576                 SHLIB_LINKER="${MT_CC} -shared"
577                 ;;
578
579         s390x_linux24|s390x_linux26)
580                 CCOBJ="${CC} -fPIC"
581                 LD="ld"
582                 KERN_OPTMZ=-O2
583                 MT_CC="$CC"
584                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
585                 PAM_OPTMZ=-O
586                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
587                 SHLIB_CFLAGS="-fPIC"
588                 SHLIB_LDFLAGS="-shared -Xlinker -x -Xlinker -Bsymbolic"
589                 OPTMZ=-O
590                 XCFLAGS="-D_LARGEFILE64_SOURCE -D__s390x__"
591                 SHLIB_LINKER="${MT_CC} -shared"
592                 ;;
593
594         sgi_62)
595                 CC="cc"
596                 CCOBJ="cc"
597                 MT_CC="cc"
598                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
599                 FSINCLUDES="-I/usr/include/sys/fs"
600                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
601                 XCFLAGS64="-64 -mips3"
602                 XCFLAGS="-o32"
603                 XLDFLAGS64="-64"
604                 XLDFLAGS="-o32"
605                 SHLIB_LINKER="${CC} -shared"
606                 ;;
607
608         sgi_63)
609                 CC="cc"
610                 CCOBJ="cc"
611                 MT_CC="cc"
612                 AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
613                 FSINCLUDES="-I/usr/include/sys/fs"
614                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
615                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
616                 XCFLAGS="-D_OLD_TERMIOS -D_BSD_COMPAT -o32"
617                 XLDFLAGS64="-64"
618                 XLDFLAGS="-o32"
619                 SHLIB_LINKER="${CC} -shared"
620                 ;;
621
622         sgi_64)
623                 CC="cc"
624                 CCOBJ="cc"
625                 MT_CC="cc"
626                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
627                 FSINCLUDES="-I/usr/include/sys/fs"
628                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
629                 XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
630                 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"
631                 XLDFLAGS64="-64"
632                 XLDFLAGS="-n32"
633                 SHLIB_LINKER="${CC} -shared"
634                 ;;
635
636         sgi_65)
637                 AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
638                 CC="/usr/bin/cc"
639                 CCOBJ="/usr/bin/cc"
640                 FSINCLUDES="-I/usr/include/sys/fs"
641                 LD="/usr/bin/ld"
642                 MT_CC="/usr/bin/cc"
643                 MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
644                 XCFLAGS64="-64 -mips3"
645                 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"
646                 XLDFLAGS64="-64 -mips3"
647                 XLDFLAGS="-n32 -mips3"
648                 SHLIB_LINKER="${CC} -shared"
649                 ;;
650
651         sparc*_linux*)
652                 KERN_OPTMZ=-O2
653                 MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
654                 PAM_OPTMZ=-O2
655                 PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
656                 SHLIB_CFLAGS="-fPIC"
657                 SHLIB_LDFLAGS="-shared -Xlinker -x"
658                 XCFLAGS="-D_LARGEFILE64_SOURCE"
659                 XCFLAGS64="-D_LARGEFILE64_SOURCE -m64"
660                 XLDFLAGS64="-m64"
661                 SHLIB_LINKER="${MT_CC} -shared"
662                 ;;
663
664         sun4_413)
665                 CCXPG2="/usr/xpg2bin/cc"
666                 CC="gcc"
667                 CCOBJ="gcc"
668                 SHLIB_CFLAGS="-PIC"
669                 XCFLAGS=""
670                 XLIBELFA="-lelf"
671                 XLIBKVM="-lkvm"
672                 XLIBS="${LIB_AFSDB}"
673                 LD="ld"
674                 ;;
675
676         sun4x_55)
677                 CC=$SOLARISCC
678                 CCOBJ=$SOLARISCC
679                 MT_CC=$SOLARISCC
680                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
681                 SHLIB_CFLAGS="-KPIC"
682                 XCFLAGS="-dy -Bdynamic"
683                 XLIBELFA="-lelf"
684                 XLIBKVM="-lkvm"
685                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
686                 LD="/usr/ccs/bin/ld"
687                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
688                 LWP_OPTMZ="-g"
689                 ;;
690
691         sun4x_56)
692                 CC=$SOLARISCC
693                 CCOBJ=$SOLARISCC
694                 MT_CC=$SOLARISCC
695                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
696                 PAM_CFLAGS="-KPIC"
697                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
698                 SHLIB_CFLAGS="-KPIC"
699                 SHLIB_LDFLAGS="-G -Bsymbolic"
700                 XCFLAGS="-dy -Bdynamic"
701                 XLIBELFA="-lelf"
702                 LD="/usr/ccs/bin/ld"
703                 XLIBKVM="-lkvm"
704                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
705                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
706                 LWP_OPTMZ="-g"
707                 ;;
708
709         sun4x_57)
710                 CC=$SOLARISCC
711                 CCOBJ=$SOLARISCC
712                 LD="/usr/ccs/bin/ld"
713                 MT_CC=$SOLARISCC
714                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
715                 PAM_CFLAGS="-KPIC"
716                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
717                 SHLIB_CFLAGS="-KPIC"
718                 SHLIB_LDFLAGS="-G -Bsymbolic"
719                 XCFLAGS64='${XCFLAGS} -xarch=v9'
720                 XCFLAGS="-dy -Bdynamic"
721                 XLIBELFA="-lelf"
722                 XLIBKVM="-lkvm"
723                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
724                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
725                 LWP_OPTMZ="-g"
726                 ;;
727
728         sun4x_58)
729                 CC=$SOLARISCC
730                 CCOBJ=$SOLARISCC
731                 LD="/usr/ccs/bin/ld"
732                 MT_CC=$SOLARISCC
733                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
734                 PAM_CFLAGS="-KPIC"
735                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
736                 SHLIB_CFLAGS="-KPIC"
737                 SHLIB_LDFLAGS="-G -Bsymbolic"
738                 XCFLAGS64='${XCFLAGS} -xarch=v9'
739                 XCFLAGS="-dy -Bdynamic"
740                 XLIBELFA="-lelf"
741                 XLIBKVM="-lkvm"
742                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
743                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
744                 LWP_OPTMZ="-g"
745                 ;;
746
747         sun4x_59)
748                 CC=$SOLARISCC
749                 CCOBJ=$SOLARISCC
750                 LD="/usr/ccs/bin/ld"
751                 MT_CC=$SOLARISCC
752                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
753                 PAM_CFLAGS="-KPIC"
754                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
755                 SHLIB_CFLAGS="-KPIC"
756                 SHLIB_LDFLAGS="-G -Bsymbolic"
757                 XCFLAGS64='${XCFLAGS} -xarch=v9'
758                 XCFLAGS="-dy -Bdynamic"
759                 XLIBELFA="-lelf"
760                 XLIBKVM="-lkvm"
761                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
762                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
763                 LWP_OPTMZ="-g"
764                 ;;
765
766         sun4x_510)
767                 CC=$SOLARISCC
768                 CCOBJ=$SOLARISCC
769                 LD="/usr/ccs/bin/ld"
770                 MT_CC=$SOLARISCC
771                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
772                 PAM_CFLAGS="-KPIC"
773                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
774                 SHLIB_CFLAGS="-KPIC"
775                 SHLIB_LDFLAGS="-G -Bsymbolic"
776                 XCFLAGS64='${XCFLAGS} -m64'
777                 XCFLAGS="-dy -Bdynamic"
778                 XLIBELFA="-lelf"
779                 XLIBKVM="-lkvm"
780                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
781                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
782                 LWP_OPTMZ="-g"
783                 ;;
784
785         sun4x_511)
786                 CC=$SOLARISCC
787                 CCOBJ=$SOLARISCC
788                 LD="/usr/ccs/bin/ld"
789                 MT_CC=$SOLARISCC
790                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
791                 PAM_CFLAGS="-KPIC"
792                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
793                 SHLIB_CFLAGS="-KPIC"
794                 SHLIB_LDFLAGS="-G -Bsymbolic"
795                 XCFLAGS64='${XCFLAGS} -xarch=v9'
796                 XCFLAGS="-dy -Bdynamic"
797                 XLIBELFA="-lelf"
798                 XLIBKVM="-lkvm"
799                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
800                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
801                 LWP_OPTMZ="-g"
802                 ;;
803
804         sunx86_57)
805                 CC=$SOLARISCC
806                 CCOBJ=$SOLARISCC
807                 LD="/usr/ccs/bin/ld"
808                 MT_CC=$SOLARISCC
809                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
810                 PAM_CFLAGS="-KPIC"
811                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
812                 SHLIB_CFLAGS="-KPIC"
813                 SHLIB_LDFLAGS="-G -Bsymbolic"
814                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
815                 XCFLAGS="-dy -Bdynamic"
816                 XLIBELFA="-lelf"
817                 XLIBKVM="-lkvm"
818                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
819                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
820                 ;;
821
822         sunx86_58)
823                 CC=$SOLARISCC
824                 CCOBJ=$SOLARISCC
825                 LD="/usr/ccs/bin/ld"
826                 MT_CC=$SOLARISCC
827                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
828                 PAM_CFLAGS="-KPIC"
829                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
830                 SHLIB_CFLAGS="-KPIC"
831                 SHLIB_LDFLAGS="-G -Bsymbolic"
832                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
833                 XCFLAGS="-dy -Bdynamic"
834                 XLIBELFA="-lelf"
835                 XLIBKVM="-lkvm"
836                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
837                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
838                 ;;
839
840         sunx86_59)
841                 CC=$SOLARISCC
842                 CCOBJ=$SOLARISCC
843                 LD="/usr/ccs/bin/ld"
844                 MT_CC=$SOLARISCC
845                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
846                 PAM_CFLAGS="-KPIC"
847                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
848                 SHLIB_CFLAGS="-KPIC"
849                 SHLIB_LDFLAGS="-G -Bsymbolic"
850                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
851                 XCFLAGS="-dy -Bdynamic"
852                 XLIBELFA="-lelf"
853                 XLIBKVM="-lkvm"
854                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
855                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
856                 ;;
857
858         sunx86_510)
859                 CC=$SOLARISCC
860                 CCOBJ=$SOLARISCC
861                 LD="/usr/ccs/bin/ld"
862                 MT_CC=$SOLARISCC
863                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
864                 PAM_CFLAGS="-KPIC"
865                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
866                 SHLIB_CFLAGS="-KPIC"
867                 SHLIB_LDFLAGS="-G -Bsymbolic"
868                 XCFLAGS64='${XCFLAGS} -m64'
869                 XCFLAGS="-dy -Bdynamic"
870                 XLIBELFA="-lelf"
871                 XLIBKVM="-lkvm"
872                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
873                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
874                 ;;
875
876         sunx86_511)
877                 CC=$SOLARISCC
878                 CCOBJ=$SOLARISCC
879                 LD="/usr/ccs/bin/ld"
880                 MT_CC=$SOLARISCC
881                 MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
882                 PAM_CFLAGS="-KPIC"
883                 PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
884                 SHLIB_CFLAGS="-KPIC"
885                 SHLIB_LDFLAGS="-G -Bsymbolic"
886                 XCFLAGS64='${XCFLAGS} -xarch=amd64'
887                 XCFLAGS="-dy -Bdynamic"
888                 XLIBELFA="-lelf"
889                 XLIBKVM="-lkvm"
890                 XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
891                 SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
892                 ;;
893 esac
894
895 #
896 # Special build targets
897 #
898 case $AFS_SYSNAME in
899         sgi_6*)
900                 IRIX_SYS_SYSTM_H_HAS_MEM_FUNCS
901                 XFS_SIZE_CHECK="xfs_size_check"
902                 install_XFS_SIZE_CHECK='$(DESTDIR)${afssrvsbindir}/xfs_size_check'
903                 dest_XFS_SIZE_CHECK='$(DEST)/root.server/usr/afs/bin/xfs_size_check'
904         
905                 AC_SUBST(XFS_SIZE_CHECK)
906                 AC_SUBST(install_XFS_SIZE_CHECK)
907                 AC_SUBST(dest_XFS_SIZE_CHECK)
908         ;;
909 esac
910
911 dnl Disable the default for debugging/optimization if not enabled
912 if test "x$enable_debug_kernel" = "xno"; then
913   KERN_DBG=
914 fi
915
916 if test "x$enable_optimize_kernel" = "xno"; then
917   KERN_OPTMZ=
918 fi
919
920 if test "x$enable_debug" = "xno"; then
921   DBG=
922   NO_STRIP_BIN=-s
923 fi
924
925 if test "x$enable_optimize" = "xno"; then
926   OPTMZ=
927 fi
928
929 if test "x$enable_debug_lwp" = "xno"; then
930   LWP_DBG=
931 fi
932
933 if test "x$enable_optimize_lwp" = "xno"; then
934   LWP_OPTMZ=
935 fi
936
937 if test "x$enable_strip_binaries" != "xno"; then
938   if test "x$enable_strip_binaries" = "xmaybe" -a "x$enable_debug" = "xyes"; then
939     NO_STRIP_BIN=
940   else
941     NO_STRIP_BIN=-s
942   fi
943 else
944   NO_STRIP_BIN=
945 fi
946
947 CFLAGS_NOERROR=
948 CFLAGS_NOSTRICT=
949 CFLAGS_NOUNUSED=
950 CFLAGS_NOOLDSTYLE=
951
952 if test "x$GCC" = "xyes"; then
953   if test "x$enable_warnings" = "xyes"; then
954     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith"
955   fi
956   if test "x$enable_checking" != "xno"; then
957     XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith"
958     if test "x$enable_checking" != "xall"; then
959       CFLAGS_NOERROR="-Wno-error"
960       CFLAGS_NOSTRICT="-fno-strict-aliasing"
961       CFLAGS_NOUNUSED="-Wno-unused"
962       CFLAGS_NOOLDSTYLE="-Wno-old-style-definition"
963       AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode])
964     fi
965   fi
966 else
967   case $AFS_SYSNAME in
968     sun*_51?)
969       # Solaris Studio
970       warn_common="-v -errfmt=error -errtags=yes -erroff=E_ATTRIBUTE_UNKNOWN,E_END_OF_LOOP_CODE_NOT_REACHED"
971       if test "x$enable_warnings" = "xyes" ; then
972         XCFLAGS="${XCFLAGS} $warn_common"
973       fi
974       if test "x$enable_checking" != "xno" ; then
975         XCFLAGS="${XCFLAGS} $warn_common -errwarn=%all"
976         if test "x$enable_checking" != "xall" ; then
977           CFLAGS_NOERROR="-errwarn=%none"
978         fi
979       fi
980       ;;
981   esac
982 fi
983
984 dnl horribly cheating, assuming double / is ok.
985 case $INSTALL in
986   ./* ) 
987     INSTALL="/@abs_top_srcdir@/install-sh -c"
988   ;;
989   *) 
990   ;;
991 esac
992
993 INSTALL_PROGRAM="${INSTALL_PROGRAM} ${NO_STRIP_BIN}"
994
995 AC_SUBST(CCXPG2)
996 AC_SUBST(CCOBJ)
997 AC_SUBST(AFSD_LIBS)
998 AC_SUBST(AFSD_LDFLAGS)
999 AC_SUBST(AIX32)
1000 AC_SUBST(AIX64)
1001 AC_SUBST(AR)
1002 AC_SUBST(AS)
1003 AC_SUBST(CP)
1004 AC_SUBST(DBG)
1005 AC_SUBST(FSINCLUDES)
1006 AC_SUBST(KERN_DBG)
1007 AC_SUBST(KERN_OPTMZ)
1008 AC_SUBST(LD)
1009 AC_SUBST(LEX)
1010 AC_SUBST(LWP_DBG)
1011 AC_SUBST(LWP_OPTMZ)
1012 AC_SUBST(MT_CC)
1013 AC_SUBST(MT_CFLAGS)
1014 AC_SUBST(MT_LIBS)
1015 AC_SUBST(MV)
1016 AC_SUBST(NO_STRIP_BIN)
1017 AC_SUBST(OPTMZ)
1018 AC_SUBST(PAM_CFLAGS)
1019 AC_SUBST(PAM_LIBS)
1020 AC_SUBST(PAM_DBG)
1021 AC_SUBST(PAM_OPTMZ)
1022 AC_SUBST(RANLIB)
1023 AC_SUBST(REGEX_OBJ)
1024 AC_SUBST(RM)
1025 AC_SUBST(RXDEBUG)
1026 AC_SUBST(SHLIB_CFLAGS)
1027 AC_SUBST(SHLIB_LDFLAGS)
1028 AC_SUBST(SHLIB_LINKER)
1029 AC_SUBST(SHLIB_SUFFIX)
1030 AC_SUBST(VFSCK_CFLAGS)
1031 AC_SUBST(XCFLAGS)
1032 AC_SUBST(CFLAGS_NOERROR)
1033 AC_SUBST(CFLAGS_NOSTRICT)
1034 AC_SUBST(CFLAGS_NOUNUSED)
1035 AC_SUBST(CFLAGS_NOOLDSTYLE)
1036 AC_SUBST(XCFLAGS64)
1037 AC_SUBST(XLDFLAGS)
1038 AC_SUBST(XLDFLAGS64)
1039 AC_SUBST(XLIBELFA)
1040 AC_SUBST(XLIBKVM)
1041 AC_SUBST(XLIBS)
1042 AC_SUBST(YACC)
1043
1044
1045 ])