linux-kernel-detect-gfp-mask-in-struct-address-space-20020624
[openafs.git] / acinclude.m4
1 dnl This file contains the common configuration code which would
2 dnl otherwise be duplicated between configure and configure-libafs.
3 dnl
4 dnl NB: Because this code is a macro, references to positional shell
5 dnl parameters must be done like $[]1 instead of $1
6
7 AC_DEFUN(OPENAFS_CONFIGURE_COMMON,[
8
9 AC_CANONICAL_HOST
10 SRCDIR_PARENT=`pwd`
11
12 #BOZO_SAVE_CORES BOS_RESTRICTED_MODE BOS_NEW_CONFIG pam sia
13 AC_ARG_WITH(afs-sysname,
14 [  --with-afs-sysname=sys    use sys for the afs sysname]
15 )
16 AC_ARG_ENABLE( obsolete,
17 [  --enable-obsolete                    enable obsolete portions of AFS (mpp, ntp and package)],, enable_obsolete="no")
18 AC_ARG_ENABLE( insecure,
19 [  --enable-insecure                    enable insecure portions of AFS (ftpd, inetd, rcp, rlogind and rsh)],, enable_insecure="no")
20 AC_ARG_ENABLE( afsdb,
21 [  --disable-afsdb                      disable AFSDB RR support],, enable_afsdb="yes")
22 AC_ARG_ENABLE( bos-restricted-mode,
23 [  --enable-bos-restricted-mode         enable bosserver restricted mode which disables certain bosserver functionality],, enable_bos_restricted_mode="no")
24 AC_ARG_ENABLE( namei-fileserver,
25 [  --enable-namei-fileserver            force compilation of namei fileserver in preference to inode fileserver],, enable_namei_fileserver="no")
26 AC_ARG_ENABLE( fast-restart,
27 [  --enable-fast-restart                enable fast startup of file server without salvaging],, enable_fast_restart="no")
28 AC_ARG_ENABLE( bitmap-later,
29 [  --enable-bitmap-later                enable fast startup of file server by not reading bitmap till needed],, enable_bitmap_later="no")
30 AC_ARG_ENABLE( full-vos-listvol-switch,
31 [  --enable-full-vos-listvol-switch     enable vos full listvol switch for formatted output],, enable_full_vos_listvol_switch="no")
32 AC_ARG_WITH(dux-kernel-headers,
33 [  --with-dux-kernel-headers=path       use the kernel headers found at path(optional, defaults to first match in /usr/sys)]
34 )
35 AC_ARG_WITH(linux-kernel-headers,
36 [  --with-linux-kernel-headers=path     use the kernel headers found at path(optional, defaults to /usr/src/linux)]
37 )
38 AC_ARG_ENABLE(kernel-module,
39 [  --disable-kernel-module              disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
40 )
41 AC_ARG_ENABLE(redhat-buildsys,
42 [  --enable-redhat-buildsys             enable compilation of the redhat build system kernel (defaults to disabled)],, enable_redhat_buildsys="no"
43 )
44 AC_ARG_ENABLE(transarc-paths,
45 [  --enable-transarc-paths                      Use Transarc style paths like /usr/afs and /usr/vice],, enable_transarc_paths="no"
46 )
47 AC_ARG_ENABLE(tivoli-tsm,
48 [  --enable-tivoli-tsm                  Enable use of the Tivoli TSM API libraries for butc support],, enable_tivoli_tsm="no"
49 )
50 AC_ARG_ENABLE(debug-kernel,
51 [  --enable-debug-kernel                enable compilation of the kernel module with debugging information (defaults to disabled)],, enable_debug_kernel="no"
52 )
53
54 dnl weird ass systems
55 AC_AIX
56 AC_ISC_POSIX
57 AC_MINIX
58
59 dnl Various compiler setup.
60 AC_TYPE_PID_T
61 AC_TYPE_SIZE_T
62 AC_TYPE_SIGNAL
63
64 dnl Checks for programs.
65 AC_PROG_INSTALL
66 AC_PROG_LN_S
67 AC_PROG_RANLIB
68 AC_PROG_YACC
69 AM_PROG_LEX
70
71 OPENAFS_CHECK_BIGENDIAN
72
73 KERN_DEBUG_OPT=
74 if test "x$enable_debug_kernel" = "xyes"; then
75   KERN_DEBUG_OPT=-g
76 fi
77
78 AC_MSG_CHECKING(your OS)
79 system=$host
80 case $system in
81         *-linux*)
82                 MKAFS_OSTYPE=LINUX
83                 if test "x$enable_redhat_buildsys" = "xyes"; then
84                  AC_DEFINE(ENABLE_REDHAT_BUILDSYS)
85                 fi
86                 if test "x$enable_kernel_module" = "xyes"; then
87                  if test "x$with_linux_kernel_headers" != "x"; then
88                    LINUX_KERNEL_PATH="$with_linux_kernel_headers"
89                  else
90                    LINUX_KERNEL_PATH="/usr/src/linux"
91                  fi
92                  if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
93                   linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -1`
94                   if test "x$linux_kvers" = "x"; then
95                     if test -f "$LINUX_KERNEL_PATH/include/linux/version-up.h"; then
96                       linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -1`
97                       if test "x$linux_kvers" = "x"; then
98
99                         AC_MSG_ERROR(Linux headers lack version definition [2])
100                         exit 1
101                       else
102                         LINUX_VERSION="$linux_kvers"
103                       fi
104                     else
105                       AC_MSG_ERROR(Linux headers lack version definition)
106                       exit 1
107                     fi
108                   else
109                     LINUX_VERSION="$linux_kvers"
110                   fi
111                  else
112                     enable_kernel_module="no"
113                  fi
114                  if test ! -f "$LINUX_KERNEL_PATH/include/linux/autoconf.h"; then
115                      enable_kernel_module="no"
116                  fi
117                  if test "x$enable_kernel_module" = "xno"; then
118                   if test "x$with_linux_kernel_headers" != "x"; then
119                    AC_MSG_ERROR(No usable linux headers found at $LINUX_KERNEL_PATH)
120                    exit 1
121                   else
122                    AC_MSG_WARN(No usable linux headers found at $LINUX_KERNEL_PATH so disabling kernel module)
123                   fi
124                  fi
125                 fi
126                 AC_MSG_RESULT(linux)
127                 if test "x$enable_kernel_module" = "xyes"; then
128                  OMIT_FRAME_POINTER=
129                  if test "x$enable_debug_kernel" = "xno"; then
130                         OMIT_FRAME_POINTER=-fomit-frame-pointer
131                  fi
132                  AC_SUBST(OMIT_FRAME_POINTER)
133                  ifdef([OPENAFS_CONFIGURE_LIBAFS],
134                    [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
135                    [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
136                  )
137                  LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
138                  LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
139                  LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
140                  LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
141                  LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
142                  LINUX_INODE_SETATTR_RETURN_TYPE
143                  LINUX_NEED_RHCONFIG
144                  LINUX_WHICH_MODULES
145                  if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
146                   AC_DEFINE(INODE_SETATTR_NOT_VOID)
147                  fi
148                  if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then 
149                   AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK)
150                  fi
151                  if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then 
152                   AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK)
153                  fi
154                  if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then 
155                   AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM)
156                  fi
157                  if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then 
158                   AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES)
159                  fi
160                  if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then 
161                   AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS)
162                  fi
163                 :
164                 fi
165                 ;;
166         *-solaris*)
167                 MKAFS_OSTYPE=SOLARIS
168                 AC_MSG_RESULT(sun4)
169                 SOLARIS_UFSVFS_HAS_DQRWLOCK
170                 SOLARIS_PROC_HAS_P_COREFILE
171                 ;;
172         *-hpux*)
173                 MKAFS_OSTYPE=HPUX
174                 AC_MSG_RESULT(hp_ux)
175                 ;;
176         *-irix*)
177                 if test -d /usr/include/sys/SN/SN1; then
178                  IRIX_BUILD_IP35="IP35"
179                 fi
180                 MKAFS_OSTYPE=IRIX
181                 AC_MSG_RESULT(sgi)
182                 ;;
183         *-aix*)
184                 MKAFS_OSTYPE=AIX
185                 AC_MSG_RESULT(rs_aix)
186                 ;;
187         *-osf*)
188                 MKAFS_OSTYPE=DUX
189                 AC_MSG_RESULT(alpha_dux)
190                 if test "x$enable_kernel_module" = "xyes"; then
191                  if test "x$with_dux_kernel_headers" != "x"; then
192                    HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
193                  else
194                    HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
195                  fi
196                 fi
197                 if test "$HEADER_RT" = "*" ; then
198                         AC_MSG_ERROR([Need a configured kernel directory])
199                 fi
200                 AC_SUBST([HEADER_RT])
201                 ;;
202         *-darwin*)
203                 MKAFS_OSTYPE=DARWIN
204                 AC_MSG_RESULT(ppc_darwin)
205                 ;;
206         *-freebsd*)
207                 MKAFS_OSTYPE=FBSD
208                 AC_MSG_RESULT(i386_fbsd)
209                 ;;
210         *-netbsd*)
211                 MKAFS_OSTYPE=NBSD
212                 AC_MSG_RESULT(nbsd)
213                 ;;
214         *-openbsd*)
215                 MKAFS_OSTYPE=OBSD
216                 AC_MSG_RESULT(i386_obsd)
217                 ;;
218         *)
219                 AC_MSG_RESULT($system)
220                 ;;
221 esac
222 AC_SUBST(KERN_DEBUG_OPT)
223
224 if test "x$with_afs_sysname" != "x"; then
225         AFS_SYSNAME="$with_afs_sysname"
226 else
227         AC_MSG_CHECKING(your AFS sysname)
228         case $host in
229                 i?86-*-freebsd4.2*)
230                         AFS_SYSNAME="i386_fbsd_42"
231                         ;;
232                 i?86-*-freebsd4.3*)
233                         AFS_SYSNAME="i386_fbsd_43"
234                         ;;
235                 i?86-*-freebsd4.4*)
236                         AFS_SYSNAME="i386_fbsd_44"
237                         ;;
238                 i?86-*-freebsd4.5*)
239                         AFS_SYSNAME="i386_fbsd_45"
240                         ;;
241                 i?86-*-netbsd*1.5*)
242                         AFS_PARAM_COMMON=param.nbsd15.h
243                         AFS_SYSNAME="i386_nbsd15"
244                         ;;
245                 alpha-*-netbsd*1.5*)
246                         AFS_PARAM_COMMON=param.nbsd15.h
247                         AFS_SYSNAME="alpha_nbsd15"
248                         ;;
249                 hppa*-hp-hpux11*)
250                         AFS_SYSNAME="hp_ux110"
251                         ;;
252                 hppa*-hp-hpux10*)
253                         AFS_SYSNAME="hp_ux102"
254                         ;;
255                 powerpc-apple-darwin1.2*)
256                         AFS_SYSNAME="ppc_darwin_12"
257                         ;;
258                 powerpc-apple-darwin1.3*)
259                         AFS_SYSNAME="ppc_darwin_13"
260                         ;;
261                 powerpc-apple-darwin1.4*)
262                         AFS_SYSNAME="ppc_darwin_14"
263                         ;;
264                 powerpc-apple-darwin5.1*)
265                         AFS_SYSNAME="ppc_darwin_14"
266                         ;;
267                 powerpc-apple-darwin5.2*)
268                         AFS_SYSNAME="ppc_darwin_14"
269                         ;;
270                 powerpc-apple-darwin5.3*)
271                         AFS_SYSNAME="ppc_darwin_14"
272                         ;;
273                 powerpc-apple-darwin5.4*)
274                         AFS_SYSNAME="ppc_darwin_14"
275                         ;;
276                 powerpc-apple-darwin5.5*)
277                         AFS_SYSNAME="ppc_darwin_14"
278                         ;;
279                 sparc-sun-solaris2.5*)
280                         AFS_SYSNAME="sun4x_55"
281                         ;;
282                 sparc-sun-solaris2.6)
283                         AFS_SYSNAME="sun4x_56"
284                         ;;
285                 sparc-sun-solaris2.7)
286                         AFS_SYSNAME="sun4x_57"
287                         ;;
288                 sparc-sun-solaris2.8)
289                         AFS_SYSNAME="sun4x_58"
290                         ;;
291                 sparc-sun-solaris2.9)
292                         AFS_SYSNAME="sun4x_59"
293                         ;;
294                 i386-pc-solaris2.7)
295                         AFS_SYSNAME="sunx86_57"
296                         ;;
297                 i386-pc-solaris2.8)
298                         AFS_SYSNAME="sunx86_58"
299                         ;;
300                 i386-pc-solaris2.9)
301                         AFS_SYSNAME="sunx86_59"
302                         ;;
303                 alpha*-dec-osf4.0*)
304                         AFS_SYSNAME="alpha_dux40"
305                         ;;
306                 alpha*-dec-osf5.0*)
307                         AFS_SYSNAME="alpha_dux50"
308                         ;;
309                 mips-sgi-irix6.5)
310                         AFS_SYSNAME="sgi_65"
311                         ;;
312                 ia64-*-linux*)
313                         AFS_SYSNAME="ia64_linuxXX"
314                         ;;
315                 powerpc-*-linux*)
316                         AFS_SYSNAME="ppc_linuxXX"
317                         ;;
318                 alpha*-linux*)
319                         AFS_SYSNAME="alpha_linux_XX"
320                         ;;
321                 s390-*-linux*)
322                         AFS_SYSNAME="s390_linuxXX"
323                         ;;
324                 sparc-*-linux*)
325                         AFS_SYSNAME="sparc_linuxXX"
326                         ;;
327                 sparc64-*-linux*)
328                         AFS_SYSNAME="sparc64_linuxXX"
329                         ;;
330                 i?86-*-linux*)
331                         AFS_SYSNAME="i386_linuxXX"
332                         ;;
333                 parisc-*-linux-gnu)
334                         AFS_SYSNAME="parisc_linuxXX"
335                         ;;
336                 power*-ibm-aix4.2*)
337                         AFS_SYSNAME="rs_aix42"
338                         ;;
339                 power*-ibm-aix4.3*)
340                         AFS_SYSNAME="rs_aix42"
341                         ;;
342                 *)
343                         AC_MSG_ERROR(An AFS sysname is required)
344                         exit 1
345                         ;;
346         esac
347         case $AFS_SYSNAME in
348                 *_linux*)
349                         AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
350                         if test "x${AFS_SYSKVERS}" = "x"; then
351                          AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
352                         fi
353                         _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
354                         AFS_SYSNAME="$_AFS_SYSNAME"
355                         ;;
356         esac
357         AC_MSG_RESULT($AFS_SYSNAME)
358 fi
359
360 case $AFS_SYSNAME in
361         *_darwin*)
362                 DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
363                 DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
364                 ;;
365 esac
366 AC_CACHE_VAL(ac_cv_sockaddr_len,
367 [
368 AC_MSG_CHECKING([if struct sockaddr has sa_len field])
369 AC_TRY_COMPILE( [#include <sys/types.h>
370 #include <sys/socket.h>],
371 [struct sockaddr *a;
372 a->sa_len=0;], ac_cv_sockaddr_len=yes, ac_cv_sockaddr_len=no)
373 AC_MSG_RESULT($ac_cv_sockaddr_len)])
374 if test "$ac_cv_sockaddr_len" = "yes"; then
375    AC_DEFINE(STRUCT_SOCKADDR_HAS_SA_LEN)
376 fi
377 if test "x${MKAFS_OSTYPE}" = "xIRIX"; then
378         echo Skipping library tests because they confuse Irix.
379 else
380   AC_CHECK_FUNCS(socket)
381
382   if test "$ac_cv_func_socket" = no; then
383     for lib in socket inet; do
384         if test "$HAVE_SOCKET" != 1; then
385                 AC_CHECK_LIB(${lib}, socket,LIBS="$LIBS -l$lib";HAVE_SOCKET=1;AC_DEFINE(HAVE_SOCKET))
386         fi
387     done
388   fi
389   
390   AC_CHECK_FUNCS(connect)       
391
392   if test "$ac_cv_func_connect" = no; then
393     for lib in nsl; do
394         if test "$HAVE_CONNECT" != 1; then
395                 AC_CHECK_LIB(${lib}, connect,LIBS="$LIBS -l$lib";HAVE_CONNECT=1;AC_DEFINE(HAVE_CONNECT))
396         fi
397     done
398   fi
399
400   AC_CHECK_FUNCS(gethostbyname)
401   if test "$ac_cv_func_gethostbyname" = no; then
402         for lib in dns nsl resolv; do
403           if test "$HAVE_GETHOSTBYNAME" != 1; then
404             AC_CHECK_LIB(${lib}, gethostbyname, LIBS="$LIBS -l$lib";HAVE_GETHOSTBYNAME=1;AC_DEFINE(HAVE_GETHOSTBYNAME))
405           fi
406         done    
407   fi    
408
409   AC_CHECK_FUNCS(res_search)
410   if test "$ac_cv_func_res_search" = no; then
411         for lib in dns nsl resolv; do
412           if test "$HAVE_RES_SEARCH" != 1; then
413             AC_CHECK_LIB(${lib}, res_search, LIBS="$LIBS -l$lib";HAVE_RES_SEARCH=1;AC_DEFINE(HAVE_RES_SEARCH))
414           fi
415         done    
416         if test "$HAVE_RES_SEARCH" = 1; then
417           LIB_res_search="-l$lib"       
418         fi
419   fi    
420 fi
421
422 PTHREAD_LIBS=error
423 AC_CHECK_LIB(pthread, pthread_attr_init,
424              PTHREAD_LIBS="-lpthread")
425 if test "x$PTHREAD_LIBS" = xerror; then
426         AC_CHECK_LIB(pthreads, pthread_attr_init,
427                 PTHREAD_LIBS="-lpthreads")
428 fi
429 if test "x$PTHREAD_LIBS" = xerror; then
430         AC_CHECK_LIB(c_r, pthread_attr_init,
431                 PTHREAD_LIBS="-lc_r")
432 fi
433 if test "x$PTHREAD_LIBS" = xerror; then
434         AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
435 fi
436 if test "x$PTHREAD_LIBS" = xerror; then
437         AC_MSG_WARN(*** Unable to locate working posix thread library ***)
438 fi
439 AC_SUBST(PTHREAD_LIBS)
440
441 WITH_OBSOLETE=NO
442 if test "$enable_obsolete" = "yes"; then
443         WITH_OBSOLETE=YES
444 fi
445
446 WITH_INSECURE=NO
447 if test "$enable_insecure" = "yes"; then
448         WITH_INSECURE=YES
449 fi
450
451 # Fast restart
452 if test "$enable_fast_restart" = "yes"; then
453         AC_DEFINE(FAST_RESTART)
454 fi
455
456 if test "$enable_bitmap_later" = "yes"; then
457         AC_DEFINE(BITMAP_LATER)
458 fi
459
460 if test "$enable_full_vos_listvol_switch" = "yes"; then
461         AC_DEFINE(FULL_LISTVOL_SWITCH)
462 fi
463
464 if test "$enable_bos_restricted_mode" = "yes"; then
465         AC_DEFINE(BOS_RESTRICTED_MODE)
466 fi
467
468 if test "$enable_namei_fileserver" = "yes"; then
469         AC_DEFINE(AFS_NAMEI_ENV)
470 fi
471
472 if test "$enable_afsdb" = "yes"; then
473         LIB_AFSDB="$LIB_res_search"
474         AC_DEFINE(AFS_AFSDB_ENV)
475 fi
476
477 dnl check for tivoli
478 AC_MSG_CHECKING(for tivoli tsm butc support)
479 XBSA_CFLAGS=""
480 if test "$enable_tivoli_tsm" = "yes"; then
481         XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
482         XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
483
484         if test -e "$XBSADIR1/xbsa.h"; then
485                 XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
486                 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
487         elif test -e "$XBSADIR2/xbsa.h"; then
488                 XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
489                 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
490         else
491                 AC_MSG_RESULT([no, missing xbsa.h header file])
492         fi
493 else
494         AC_MSG_RESULT([no])
495 fi
496 AC_SUBST(XBSA_CFLAGS)
497
498 dnl checks for header files.
499 AC_HEADER_STDC
500 AC_HEADER_SYS_WAIT
501 AC_HEADER_DIRENT
502 AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h)
503 AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
504 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h)
505 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h)
506 AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
507 AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h)
508
509 AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
510 AC_CHECK_FUNCS(setprogname getprogname)
511
512 dnl Directory PATH handling
513 if test "x$enable_transarc_paths" = "xyes"  ; then 
514     afsconfdir=${afsconfdir=/usr/afs/etc}
515     viceetcdir=${viceetcdir=/usr/vice/etc}
516     afskerneldir=${afskerneldir=${viceetcdir}}
517     afssrvbindir=${afssrvbindir=/usr/afs/bin}
518     afssrvsbindir=${afssrvsbindir=/usr/afs/bin}
519     afssrvlibexecdir=${afssrvlibexecdir=/usr/afs/bin}
520     afsdbdir=${afsdbdir=/usr/afs/db}
521     afslogsdir=${afslogsdir=/usr/afs/logs}
522     afslocaldir=${afslocaldir=/usr/afs/local}
523     afsbackupdir=${afsbackupdir=/usr/afs/backup}
524     afsbosconfigdir=${afsbosconfigdir=/usr/afs/local}
525 else 
526     afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'}
527     viceetcdir=${viceetcdir='${sysconfdir}/openafs'}
528     afskerneldir=${afskerneldir='${libdir}/openafs'}
529     afssrvbindir=${afssrvbindir='${bindir}'}
530     afssrvsbindir=${afssrvsbindir='${sbindir}'}
531     afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'}
532     afsdbdir=${afsdbdir='${localstatedir}/openafs/db'}
533     afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'}
534     afslocaldir=${afslocaldir='${localstatedir}/openafs'}
535     afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'}
536     afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'}
537 fi
538 AC_SUBST(afsconfdir)
539 AC_SUBST(viceetcdir)
540 AC_SUBST(afskerneldir)
541 AC_SUBST(afssrvbindir)
542 AC_SUBST(afssrvsbindir)
543 AC_SUBST(afssrvlibexecdir)
544 AC_SUBST(afsdbdir)
545 AC_SUBST(afslogsdir)
546 AC_SUBST(afslocaldir)
547 AC_SUBST(afsbackupdir)
548 AC_SUBST(afsbosconfigdir)
549
550 if test "x$enable_kernel_module" = "xyes"; then
551 ENABLE_KERNEL_MODULE=libafs
552 fi
553
554 AC_SUBST(AFS_SYSNAME)
555 AC_SUBST(AFS_PARAM_COMMON)
556 AC_SUBST(ENABLE_KERNEL_MODULE)
557 AC_SUBST(LIB_AFSDB)
558 AC_SUBST(LINUX_KERNEL_PATH)
559 AC_SUBST(LINUX_VERSION)
560 AC_SUBST(MKAFS_OSTYPE)
561 AC_SUBST(TOP_OBJDIR)
562 AC_SUBST(TOP_SRCDIR)
563 AC_SUBST(TOP_INCDIR)
564 AC_SUBST(TOP_LIBDIR)
565 AC_SUBST(DEST)
566 AC_SUBST(WITH_OBSOLETE)
567 AC_SUBST(WITH_INSECURE)
568 AC_SUBST(DARWIN_INFOFILE)
569 AC_SUBST(IRIX_BUILD_IP35)
570
571 OPENAFS_OSCONF
572
573 ])