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