shared-libafsrpc-and-libafsauthent-20020828
[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_EXPORTS_TASKLIST_LOCK
144                  LINUX_NEED_RHCONFIG
145                  LINUX_WHICH_MODULES
146                  if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
147                   AC_DEFINE(EXPORTED_TASKLIST_LOCK)
148                  fi
149                  if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
150                   AC_DEFINE(INODE_SETATTR_NOT_VOID)
151                  fi
152                  if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then 
153                   AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK)
154                  fi
155                  if test "x$ac_cv_linux_fs_struct_address_space_has_gfp_mask" = "xyes"; then 
156                   AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_GFP_MASK)
157                  fi
158                  if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then 
159                   AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM)
160                  fi
161                  if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then 
162                   AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES)
163                  fi
164                  if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then 
165                   AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS)
166                  fi
167                 :
168                 fi
169                 ;;
170         *-solaris*)
171                 MKAFS_OSTYPE=SOLARIS
172                 AC_MSG_RESULT(sun4)
173                 SOLARIS_UFSVFS_HAS_DQRWLOCK
174                 SOLARIS_PROC_HAS_P_COREFILE
175                 ;;
176         *-sunos*)
177                 MKAFS_OSTYPE=SUNOS
178                 enable_kernel_module=no
179                 AC_MSG_RESULT(sun4)
180                 ;;
181         *-hpux*)
182                 MKAFS_OSTYPE=HPUX
183                 AC_MSG_RESULT(hp_ux)
184                 ;;
185         *-irix*)
186                 if test -d /usr/include/sys/SN/SN1; then
187                  IRIX_BUILD_IP35="IP35"
188                 fi
189                 MKAFS_OSTYPE=IRIX
190                 AC_MSG_RESULT(sgi)
191                 ;;
192         *-aix*)
193                 MKAFS_OSTYPE=AIX
194                 AC_MSG_RESULT(rs_aix)
195                 ;;
196         *-osf*)
197                 MKAFS_OSTYPE=DUX
198                 AC_MSG_RESULT(alpha_dux)
199                 if test "x$enable_kernel_module" = "xyes"; then
200                  if test "x$with_dux_kernel_headers" != "x"; then
201                    HEADER_RT=`ls ${with_dux_kernel_headers}/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
202                  else
203                    HEADER_RT=`ls /usr/sys/*/rt_preempt.h | head -1 | sed 's,/rt_preempt.h,,;s,/usr/sys/,,'`
204                  fi
205                 fi
206                 if test "$HEADER_RT" = "*" ; then
207                         AC_MSG_ERROR([Need a configured kernel directory])
208                 fi
209                 AC_SUBST([HEADER_RT])
210                 ;;
211         *-darwin*)
212                 MKAFS_OSTYPE=DARWIN
213                 AC_MSG_RESULT(ppc_darwin)
214                 ;;
215         *-freebsd*)
216                 MKAFS_OSTYPE=FBSD
217                 AC_MSG_RESULT(i386_fbsd)
218                 ;;
219         *-netbsd*)
220                 MKAFS_OSTYPE=NBSD
221                 AC_MSG_RESULT(nbsd)
222                 ;;
223         *-openbsd*)
224                 MKAFS_OSTYPE=OBSD
225                 AC_MSG_RESULT(i386_obsd)
226                 ;;
227         *)
228                 AC_MSG_RESULT($system)
229                 ;;
230 esac
231 AC_SUBST(KERN_DEBUG_OPT)
232
233 if test "x$with_afs_sysname" != "x"; then
234         AFS_SYSNAME="$with_afs_sysname"
235 else
236         AC_MSG_CHECKING(your AFS sysname)
237         case $host in
238                 i?86-*-freebsd4.2*)
239                         AFS_SYSNAME="i386_fbsd_42"
240                         ;;
241                 i?86-*-freebsd4.3*)
242                         AFS_SYSNAME="i386_fbsd_43"
243                         ;;
244                 i?86-*-freebsd4.4*)
245                         AFS_SYSNAME="i386_fbsd_44"
246                         ;;
247                 i?86-*-freebsd4.5*)
248                         AFS_SYSNAME="i386_fbsd_45"
249                         ;;
250                 i?86-*-freebsd4.6*)
251                         AFS_SYSNAME="i386_fbsd_46"
252                         ;;
253                 i?86-*-netbsd*1.5*)
254                         AFS_PARAM_COMMON=param.nbsd15.h
255                         AFS_SYSNAME="i386_nbsd15"
256                         ;;
257                 alpha-*-netbsd*1.5*)
258                         AFS_PARAM_COMMON=param.nbsd15.h
259                         AFS_SYSNAME="alpha_nbsd15"
260                         ;;
261                 i?86-*-netbsd*1.6*)
262                         AFS_PARAM_COMMON=param.nbsd16.h
263                         AFS_SYSNAME="i386_nbsd16"
264                         ;;
265                 alpha-*-netbsd*1.6*)
266                         AFS_PARAM_COMMON=param.nbsd16.h
267                         AFS_SYSNAME="alpha_nbsd16"
268                         ;;
269                 hppa*-hp-hpux11*)
270                         AFS_SYSNAME="hp_ux110"
271                         ;;
272                 hppa*-hp-hpux10*)
273                         AFS_SYSNAME="hp_ux102"
274                         ;;
275                 powerpc-apple-darwin1.2*)
276                         AFS_SYSNAME="ppc_darwin_12"
277                         ;;
278                 powerpc-apple-darwin1.3*)
279                         AFS_SYSNAME="ppc_darwin_13"
280                         ;;
281                 powerpc-apple-darwin1.4*)
282                         AFS_SYSNAME="ppc_darwin_14"
283                         ;;
284                 powerpc-apple-darwin5.1*)
285                         AFS_SYSNAME="ppc_darwin_14"
286                         ;;
287                 powerpc-apple-darwin5.2*)
288                         AFS_SYSNAME="ppc_darwin_14"
289                         ;;
290                 powerpc-apple-darwin5.3*)
291                         AFS_SYSNAME="ppc_darwin_14"
292                         ;;
293                 powerpc-apple-darwin5.4*)
294                         AFS_SYSNAME="ppc_darwin_14"
295                         ;;
296                 powerpc-apple-darwin5.5*)
297                         AFS_SYSNAME="ppc_darwin_14"
298                         ;;
299                 powerpc-apple-darwin6.0*)
300                         AFS_SYSNAME="ppc_darwin_60"
301                         ;;
302                 sparc-sun-solaris2.5*)
303                         AFS_SYSNAME="sun4x_55"
304                         ;;
305                 sparc-sun-solaris2.6)
306                         AFS_SYSNAME="sun4x_56"
307                         ;;
308                 sparc-sun-solaris2.7)
309                         AFS_SYSNAME="sun4x_57"
310                         ;;
311                 sparc-sun-solaris2.8)
312                         AFS_SYSNAME="sun4x_58"
313                         ;;
314                 sparc-sun-solaris2.9)
315                         AFS_SYSNAME="sun4x_59"
316                         ;;
317                 sparc-sun-sunos4*)
318                         AFS_SYSNAME="sun4_413"
319                         ;;
320                 i386-pc-solaris2.7)
321                         AFS_SYSNAME="sunx86_57"
322                         ;;
323                 i386-pc-solaris2.8)
324                         AFS_SYSNAME="sunx86_58"
325                         ;;
326                 i386-pc-solaris2.9)
327                         AFS_SYSNAME="sunx86_59"
328                         ;;
329                 alpha*-dec-osf4.0*)
330                         AFS_SYSNAME="alpha_dux40"
331                         ;;
332                 alpha*-dec-osf5.0*)
333                         AFS_SYSNAME="alpha_dux50"
334                         ;;
335                 mips-sgi-irix6.5)
336                         AFS_SYSNAME="sgi_65"
337                         ;;
338                 ia64-*-linux*)
339                         AFS_SYSNAME="ia64_linuxXX"
340                         ;;
341                 powerpc-*-linux*)
342                         AFS_SYSNAME="ppc_linuxXX"
343                         ;;
344                 alpha*-linux*)
345                         AFS_SYSNAME="alpha_linux_XX"
346                         ;;
347                 s390-*-linux*)
348                         AFS_SYSNAME="s390_linuxXX"
349                         ;;
350                 sparc-*-linux*)
351                         AFS_SYSNAME="sparc_linuxXX"
352                         ;;
353                 sparc64-*-linux*)
354                         AFS_SYSNAME="sparc64_linuxXX"
355                         ;;
356                 i?86-*-linux*)
357                         AFS_SYSNAME="i386_linuxXX"
358                         ;;
359                 parisc-*-linux-gnu)
360                         AFS_SYSNAME="parisc_linuxXX"
361                         ;;
362                 power*-ibm-aix4.2*)
363                         AFS_SYSNAME="rs_aix42"
364                         ;;
365                 power*-ibm-aix4.3*)
366                         AFS_SYSNAME="rs_aix42"
367                         ;;
368                 *)
369                         AC_MSG_ERROR(An AFS sysname is required)
370                         exit 1
371                         ;;
372         esac
373         case $AFS_SYSNAME in
374                 *_linux*)
375                         AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $[]1 $[]2}'`
376                         if test "x${AFS_SYSKVERS}" = "x"; then
377                          AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
378                         fi
379                         _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
380                         AFS_SYSNAME="$_AFS_SYSNAME"
381                         ;;
382         esac
383         AC_MSG_RESULT($AFS_SYSNAME)
384 fi
385
386 case $AFS_SYSNAME in
387         *_darwin*)
388                 DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
389                 DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
390                 dnl the test below fails on darwin, even if the CPPFLAGS below
391                 dnl are added. the headers from Kernel.Framework must be used
392                 dnl when KERNEL is defined.
393
394                 dnl really, such a thing isn't guaranteed to work on any 
395                 dnl platform until the kernel cflags from MakefileProto are
396                 dnl known to configure
397                 AC_DEFINE(HAVE_STRUCT_BUF)
398                 ;;
399         *)
400 AC_MSG_CHECKING(for definition of struct buf)
401 dnl save_CPPFLAGS="$CPPFLAGS"
402 dnl CPPFLAGS="$CPPFLAGS -DKERNEL -D_KERNEL -D__KERNEL -D__KERNEL__"
403 AC_CACHE_VAL(ac_cv_have_struct_buf, [
404         ac_cv_have_struct_buf=no
405         AC_TRY_COMPILE(
406                 [#include <sys/buf.h>],
407                 [struct buf x;
408                 printf("%d\n", sizeof(x));],
409                 ac_cv_have_struct_buf=yes,)
410         ]
411 )
412 dnl CPPFLAGS="$save_CPPFLAGS"
413 AC_MSG_RESULT($ac_cv_have_struct_buf)
414 if test "$ac_cv_have_struct_buf" = yes; then
415         AC_DEFINE(HAVE_STRUCT_BUF)
416 fi
417 ;;
418 esac
419
420
421 AC_CACHE_VAL(ac_cv_sockaddr_len,
422 [
423 AC_MSG_CHECKING([if struct sockaddr has sa_len field])
424 AC_TRY_COMPILE( [#include <sys/types.h>
425 #include <sys/socket.h>],
426 [struct sockaddr *a;
427 a->sa_len=0;], ac_cv_sockaddr_len=yes, ac_cv_sockaddr_len=no)
428 AC_MSG_RESULT($ac_cv_sockaddr_len)])
429 if test "$ac_cv_sockaddr_len" = "yes"; then
430    AC_DEFINE(STRUCT_SOCKADDR_HAS_SA_LEN)
431 fi
432 if test "x${MKAFS_OSTYPE}" = "xIRIX"; then
433         echo Skipping library tests because they confuse Irix.
434 else
435   AC_CHECK_FUNCS(socket)
436
437   if test "$ac_cv_func_socket" = no; then
438     for lib in socket inet; do
439         if test "$HAVE_SOCKET" != 1; then
440                 AC_CHECK_LIB(${lib}, socket,LIBS="$LIBS -l$lib";HAVE_SOCKET=1;AC_DEFINE(HAVE_SOCKET))
441         fi
442     done
443   fi
444   
445   AC_CHECK_FUNCS(connect)       
446
447   if test "$ac_cv_func_connect" = no; then
448     for lib in nsl; do
449         if test "$HAVE_CONNECT" != 1; then
450                 AC_CHECK_LIB(${lib}, connect,LIBS="$LIBS -l$lib";HAVE_CONNECT=1;AC_DEFINE(HAVE_CONNECT))
451         fi
452     done
453   fi
454
455   AC_CHECK_FUNCS(gethostbyname)
456   if test "$ac_cv_func_gethostbyname" = no; then
457         for lib in dns nsl resolv; do
458           if test "$HAVE_GETHOSTBYNAME" != 1; then
459             AC_CHECK_LIB(${lib}, gethostbyname, LIBS="$LIBS -l$lib";HAVE_GETHOSTBYNAME=1;AC_DEFINE(HAVE_GETHOSTBYNAME))
460           fi
461         done    
462   fi    
463
464   AC_CHECK_FUNCS(res_search)
465   if test "$ac_cv_func_res_search" = no; then
466         for lib in dns nsl resolv; do
467           if test "$HAVE_RES_SEARCH" != 1; then
468             AC_CHECK_LIB(${lib}, res_search, LIBS="$LIBS -l$lib";HAVE_RES_SEARCH=1;AC_DEFINE(HAVE_RES_SEARCH))
469           fi
470         done    
471         if test "$HAVE_RES_SEARCH" = 1; then
472           LIB_res_search="-l$lib"       
473         fi
474   fi    
475 fi
476
477 PTHREAD_LIBS=error
478 AC_CHECK_LIB(pthread, pthread_attr_init,
479              PTHREAD_LIBS="-lpthread")
480 if test "x$PTHREAD_LIBS" = xerror; then
481         AC_CHECK_LIB(pthreads, pthread_attr_init,
482                 PTHREAD_LIBS="-lpthreads")
483 fi
484 if test "x$PTHREAD_LIBS" = xerror; then
485         AC_CHECK_LIB(c_r, pthread_attr_init,
486                 PTHREAD_LIBS="-lc_r")
487 fi
488 if test "x$PTHREAD_LIBS" = xerror; then
489         AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
490 fi
491 if test "x$PTHREAD_LIBS" = xerror; then
492         AC_MSG_WARN(*** Unable to locate working posix thread library ***)
493 fi
494 AC_SUBST(PTHREAD_LIBS)
495
496 WITH_OBSOLETE=NO
497 if test "$enable_obsolete" = "yes"; then
498         WITH_OBSOLETE=YES
499 fi
500
501 WITH_INSECURE=NO
502 if test "$enable_insecure" = "yes"; then
503         WITH_INSECURE=YES
504 fi
505
506 # Fast restart
507 if test "$enable_fast_restart" = "yes"; then
508         AC_DEFINE(FAST_RESTART)
509 fi
510
511 if test "$enable_bitmap_later" = "yes"; then
512         AC_DEFINE(BITMAP_LATER)
513 fi
514
515 if test "$enable_full_vos_listvol_switch" = "yes"; then
516         AC_DEFINE(FULL_LISTVOL_SWITCH)
517 fi
518
519 if test "$enable_bos_restricted_mode" = "yes"; then
520         AC_DEFINE(BOS_RESTRICTED_MODE)
521 fi
522
523 if test "$enable_namei_fileserver" = "yes"; then
524         AC_DEFINE(AFS_NAMEI_ENV)
525 fi
526
527 if test "$enable_afsdb" = "yes"; then
528         LIB_AFSDB="$LIB_res_search"
529         AC_DEFINE(AFS_AFSDB_ENV)
530 fi
531
532 dnl check for tivoli
533 AC_MSG_CHECKING(for tivoli tsm butc support)
534 XBSA_CFLAGS=""
535 if test "$enable_tivoli_tsm" = "yes"; then
536         XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
537         XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
538
539         if test -e "$XBSADIR1/xbsa.h"; then
540                 XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
541                 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
542         elif test -e "$XBSADIR2/xbsa.h"; then
543                 XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
544                 AC_MSG_RESULT([yes, $XBSA_CFLAGS])
545         else
546                 AC_MSG_RESULT([no, missing xbsa.h header file])
547         fi
548 else
549         AC_MSG_RESULT([no])
550 fi
551 AC_SUBST(XBSA_CFLAGS)
552
553 dnl checks for header files.
554 AC_HEADER_STDC
555 AC_HEADER_SYS_WAIT
556 AC_HEADER_DIRENT
557 AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h)
558 AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
559 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h)
560 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h)
561 AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
562 AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h)
563
564 AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
565 AC_CHECK_FUNCS(setprogname getprogname sigaction)
566 AC_CHECK_TYPE(ssize_t, int)
567
568 dnl Directory PATH handling
569 if test "x$enable_transarc_paths" = "xyes"  ; then 
570     afsconfdir=${afsconfdir=/usr/afs/etc}
571     viceetcdir=${viceetcdir=/usr/vice/etc}
572     afskerneldir=${afskerneldir=${viceetcdir}}
573     afssrvbindir=${afssrvbindir=/usr/afs/bin}
574     afssrvsbindir=${afssrvsbindir=/usr/afs/bin}
575     afssrvlibexecdir=${afssrvlibexecdir=/usr/afs/bin}
576     afsdbdir=${afsdbdir=/usr/afs/db}
577     afslogsdir=${afslogsdir=/usr/afs/logs}
578     afslocaldir=${afslocaldir=/usr/afs/local}
579     afsbackupdir=${afsbackupdir=/usr/afs/backup}
580     afsbosconfigdir=${afsbosconfigdir=/usr/afs/local}
581 else 
582     afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'}
583     viceetcdir=${viceetcdir='${sysconfdir}/openafs'}
584     afskerneldir=${afskerneldir='${libdir}/openafs'}
585     afssrvbindir=${afssrvbindir='${bindir}'}
586     afssrvsbindir=${afssrvsbindir='${sbindir}'}
587     afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'}
588     afsdbdir=${afsdbdir='${localstatedir}/openafs/db'}
589     afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'}
590     afslocaldir=${afslocaldir='${localstatedir}/openafs'}
591     afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'}
592     afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'}
593 fi
594 AC_SUBST(afsconfdir)
595 AC_SUBST(viceetcdir)
596 AC_SUBST(afskerneldir)
597 AC_SUBST(afssrvbindir)
598 AC_SUBST(afssrvsbindir)
599 AC_SUBST(afssrvlibexecdir)
600 AC_SUBST(afsdbdir)
601 AC_SUBST(afslogsdir)
602 AC_SUBST(afslocaldir)
603 AC_SUBST(afsbackupdir)
604 AC_SUBST(afsbosconfigdir)
605
606 if test "x$enable_kernel_module" = "xyes"; then
607 ENABLE_KERNEL_MODULE=libafs
608 fi
609
610 AC_SUBST(AFS_SYSNAME)
611 AC_SUBST(AFS_PARAM_COMMON)
612 AC_SUBST(ENABLE_KERNEL_MODULE)
613 AC_SUBST(LIB_AFSDB)
614 AC_SUBST(LINUX_KERNEL_PATH)
615 AC_SUBST(LINUX_VERSION)
616 AC_SUBST(MKAFS_OSTYPE)
617 AC_SUBST(TOP_OBJDIR)
618 AC_SUBST(TOP_SRCDIR)
619 AC_SUBST(TOP_INCDIR)
620 AC_SUBST(TOP_LIBDIR)
621 AC_SUBST(DEST)
622 AC_SUBST(WITH_OBSOLETE)
623 AC_SUBST(WITH_INSECURE)
624 AC_SUBST(DARWIN_INFOFILE)
625 AC_SUBST(IRIX_BUILD_IP35)
626
627 OPENAFS_OSCONF
628
629 ])