1dnl configure.in file for am-utils-6.x 2dnl Contains general GNU-autoconf macros. 3dnl Author: Erez Zadok <ezk AT cs.sunysb.edu> 4dnl 5dnl ###################################################################### 6dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE 7dnl define([AC_CACHE_LOAD], )dnl 8dnl define([AC_CACHE_SAVE], )dnl 9dnl ====================================================================== 10 11dnl ###################################################################### 12dnl INITIALIZATION 13dnl AC_INIT 14dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS 15AC_INIT([am-utils], 16 sinclude([vers.m4]), 17 [https://bugzilla.am-utils.org/ or am-utils@am-utils.org]) 18AC_MSG_NOTICE(*** INITIALIZATION ***) 19AC_CONFIG_SRCDIR([amd/amd.c]) 20AC_CONFIG_MACRO_DIR([m4]) 21AM_CONFIG_HEADER(config.h) 22AH_TOP([ 23/* 24 * Start of am-utils-6.x config.h file. 25 * Erez Zadok <ezk AT cs.sunysb.edu> 26 * 27 * DO NOT EDIT BY HAND. 28 * Note: generated by autoheader from configure.in. 29 */ 30 31#ifndef _CONFIG_H 32#define _CONFIG_H 33]) 34dnl add actual "#undef" commands into m4/macros/header_templates.m4 35AH_BOTTOM([ 36/****************************************************************************/ 37/*** INCLUDE localconfig.h if it exists, to allow users to make some ***/ 38/*** compile time configuration changes. ***/ 39/****************************************************************************/ 40/* does a local configuration file exist? */ 41#undef HAVE_LOCALCONFIG_H 42#ifdef HAVE_LOCALCONFIG_H 43# include <localconfig.h> 44#endif /* HAVE_LOCALCONFIG_H */ 45 46#endif /* not _CONFIG_H */ 47 48/* 49 * Local Variables: 50 * mode: c 51 * End: 52 */ 53 54/* End of am-utils-6.x config.h file */ 55]) 56dnl 57dnl AC_CONFIG_AUX_DIR(m4) 58AC_PREREQ(2.52) 59AC_REVISION(Revision: 1.134 ) 60AC_COPYRIGHT([Copyright (c) 1997-2011 Erez Zadok]) 61dnl find out system type 62AC_MSG_NOTICE(*** SYSTEM TYPES ***) 63dnl run by libtool, but must be kept here because HOST_MACROS depends on it 64AC_CANONICAL_HOST 65AMU_HOST_MACROS 66dnl ====================================================================== 67 68dnl ###################################################################### 69dnl PACKAGE NAME AND VERSION 70AC_MSG_NOTICE(*** PACKAGE NAME AND VERSION ***) 71AMU_PACKAGE_NAME($PACKAGE_NAME) 72AMU_PACKAGE_VERSION($PACKAGE_VERSION) 73AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT) 74AM_INIT_AUTOMAKE 75dnl SET (shared) library version. Update it only before major release! 76dnl Clarification: 77dnl The major number should change when an incompatible change is made to 78dnl the API; the minor number should change when an API is added; the patch 79dnl level should change when an internal implementation change is made that 80dnl does not affect the API. 81dnl 82dnl In other words: if the major changes, the library is incompatible with 83dnl older ones; if the minor changes, the library is backwards compatible 84dnl with libraries using the same major; if the patchlevel changes, the 85dnl library is backward and forward compatible with libraries using the same 86dnl major and minor. 87dnl 88dnl For sanity, the lower numbers should be set to 0 when a higher number 89dnl is changed. 90dnl last version info was 3:2:1 (am-utils-6.0.2) 91dnl last version info was 4:0:2 (am-utils-6.0.3) 92dnl last version info was 4:1:2 (am-utils-6.0.4) 93dnl last version info was 3:0:0 (am-utils-6.1, should have been updated) 94dnl 95dnl We increase the major number for am-utils-6.1, because it has new API's 96dnl and removes some old API's. 97LIBTOOL_LDFLAGS="-version-info 4:0:0" 98AC_SUBST(LIBTOOL_LDFLAGS) 99dnl ====================================================================== 100 101dnl ###################################################################### 102dnl ALTERNATIVE PROGRAMS 103dnl Part 1: these are required before "unix variants" 104dnl ====================================================================== 105dnl Particular Program Checks 106AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***) 107dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings 108dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX 109AC_PROG_CC 110AC_PROG_CPP 111AC_PROG_CC_C_O 112AC_PROG_GCC_TRADITIONAL 113AC_PROG_MAKE_SET 114AC_ISC_POSIX 115AC_AIX 116dnl XXX: available in autoconf-2.14 117dnl AC_PROG_CC_STDC 118dnl ====================================================================== 119 120dnl ###################################################################### 121dnl OPTION PROCESSING 122AC_MSG_NOTICE(*** OPTION PROCESSING ***) 123dnl Do we want LDAP support ? 124AMU_WITH_ADDON(ldap, LDAP) 125dnl Do we want HESIOD support ? 126AMU_WITH_ADDON(hesiod, HESIOD) 127dnl Do we want NDBM support ? 128AMU_WITH_ADDON(ndbm, NDBM) 129dnl Debugging options (yes, mem, or no) 130AMU_OPT_DEBUG 131dnl additional preprocessor options for configuration/compilation 132AMU_OPT_CPPFLAGS 133dnl additional linker -l options for configuration/compilation 134AMU_OPT_LIBS 135dnl additional linker -L options for configuration/compilation 136AMU_OPT_LDFLAGS 137dnl Which options to add to CFLAGS for compilation only? 138AMU_OPT_AMU_CFLAGS 139dnl check if a local configuration file exists 140AMU_LOCALCONFIG 141dnl turn off maintainer-mode Makefile rules, unless using --enable-maintainer-mode 142AM_MAINTAINER_MODE 143dnl ====================================================================== 144 145dnl ###################################################################### 146AC_MSG_NOTICE(*** LIBTOOL ***) 147dnl my version of prog_libtool will not build shared by default 148dnl AM_PROG_LIBTOOL2 149dnl build static libraries by default 150AC_DISABLE_SHARED 151dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL 152case ${host_os} in 153 # Temporarily undo renaming of "linux-gnu" to "linux", because 154 # libtool only looks for "linux-gnu". Sigh. 155 linux ) host_os=linux-gnu ;; 156esac 157dnl this line must appear only once and on its own line 158dnl (hence the double case statements above and below) 159AC_PROG_LIBTOOL 160case ${host_os} in 161 # end temporary renaming of "linux-gnu" to "linux" 162 linux-gnu ) host_os=linux ;; 163esac 164dnl ====================================================================== 165 166dnl ###################################################################### 167dnl ADDITIONAL OPTION PROCESSING (must be done after CC is defined) 168AC_MSG_NOTICE(*** EXTRA OPTION PROCESSING ***) 169AMU_OS_CPPFLAGS 170AMU_OS_CFLAGS 171AMU_OS_LDFLAGS 172dnl ====================================================================== 173 174dnl ###################################################################### 175dnl Some of these macros must be called before any call to the C compiler 176AC_MSG_NOTICE(*** UNIX VARIANTS ***) 177dnl UNIX VARIANTS 178dnl AC_AIX 179dnl AC_ISC_POSIX 180AMU_LINUX_HEADERS 181dnl ====================================================================== 182 183dnl ###################################################################### 184dnl ALTERNATIVE PROGRAMS 185dnl Part 2: these are required after "unix variants" 186dnl ====================================================================== 187dnl Particular Program Checks (part 2) 188AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 2) ***) 189AC_PROG_INSTALL 190dnl the next two are run or supported natively by libtool 191dnl AC_PROG_LN_S 192dnl AC_PROG_RANLIB 193dnl AC_PROG_YACC 194AMU_PROG_YACC 195AMU_PROG_LEX 196dnl I have to keep a unused dummy AM_PROG_LEX here, because old Automake 197dnl (1.6.3) looks for it if you refer to LEX in your Makefile.am files. 198dnl Silly thing, fixed in newer versions of Automake (1.9.2). 199if test 0 != 0 ; then 200AM_PROG_LEX 201fi 202 203dnl ====================================================================== 204dnl Generic Program Checks 205AC_MSG_NOTICE(*** GENERIC PROGRAMS ***) 206AC_PATH_PROGS(AR, ar, :) 207AC_PATH_PROGS(PERL, perl5 perl4 perl, /usr/bin/perl) 208AC_PATH_PROGS(UNMOUNT_PROGRAM, umount unmount, /bin/umount) 209dnl ====================================================================== 210 211dnl ###################################################################### 212dnl LIBRARY FILES 213dnl ====================================================================== 214dnl Note that the configuration order of libraries is in reverse of linkage 215dnl for example, linking of the first two is -lc -lnsl. 216AC_MSG_NOTICE(*** LIBRARY FILES ***) 217 218dnl libnsl/libsocket are needed only on solaris and some svr4 systems. 219dnl Using a typical macro has proven unsuccesful, because on some other 220dnl systems such as irix, including libnsl and or libsocket actually breaks 221dnl lots of code. So I am forced to use a special purpose macro that sets 222dnl the libraries based on the OS. Sigh. -Erez. 223AMU_CHECK_OS_LIBS 224 225dnl librpc and librpcsvc are needed on Solaris 226AC_CHECK_LIB(rpc, clnt_sperrno) 227AC_CHECK_LIB(rpcsvc, xdr_fhandle) 228dnl libresolv is needed on Solaris/HPUX-11 for hstrerror() 229AC_CHECK_FUNC(hstrerror,,AC_CHECK_LIB(resolv, hstrerror)) 230dnl Linux RedHat 5.1 puts yp functions only in libnsl (libnsl broken on aix) 231AC_CHECK_FUNC(yp_all,,AC_CHECK_LIB(nsl, yp_all)) 232 233dnl hesiod library may not link unless libresolv is included 234if test "$with_hesiod" = "yes"; then 235AMU_CHECK_LIB2(hesiod, hes_init,,, -lresolv) 236fi 237if test "$with_ldap" = "yes"; then 238AMU_CHECK_LIB2(ldap, ldap_open,,, -llber) 239AC_CHECK_FUNCS(ldap_enable_cache) 240fi 241 242dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt 243dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt, 244dnl so only use one of them 245case "$ac_cv_opt_debug" in 246yes | mem ) 247 AC_CHECK_LIB(rt, clock_gettime,, AC_CHECK_LIB(posix4, clock_gettime)) 248 ;; 249esac 250 251dnl ###################################################################### 252dnl LIBRARY FUNCTIONS 253dnl ====================================================================== 254dnl Particular Function Checks 255AC_MSG_NOTICE(*** PARTICULAR LIBRARY FUNCTIONS ***) 256dnl AC_FUNC_ALLOCA 257dnl This GETMNTENT test will add -lgen to LIBS if needed. We may need it 258dnl if we have to build am-utils on Irix 4, PTX, or Unixware. 259dnl AC_FUNC_GETMNTENT 260AMU_FUNC_BAD_MEMCMP 261AMU_FUNC_BAD_YP_ALL 262AC_FUNC_FORK([]) 263AC_FUNC_WAIT3 264AC_FUNC_GETPGRP 265AC_FUNC_SETPGRP 266dnl if you get AIX link error related to rpl_malloc, turn off next test 267dnl AC_FUNC_MALLOC 268dnl ====================================================================== 269dnl Generic Function Checks 270AC_MSG_NOTICE(*** GENERIC LIBRARY FUNCTIONS ***) 271AC_CHECK_FUNCS( \ 272 __rpc_get_local_uid \ 273 __seterr_reply \ 274 _seterr_reply \ 275 bcmp \ 276 bcopy \ 277 bzero \ 278 clnt_create \ 279 clnt_create_vers \ 280 clnt_create_vers_timed \ 281 clnt_spcreateerror \ 282 clock_gettime \ 283 cnodeid \ 284 dg_mount \ 285 flock \ 286 fsmount \ 287 get_myaddress \ 288 getccent \ 289 getcwd \ 290 getdomainname \ 291 getdtablesize \ 292 gethostname \ 293 getifaddrs \ 294 getmntinfo \ 295 getmountent \ 296 getpagesize \ 297 gettimeofday \ 298 hasmntopt \ 299 hstrerror \ 300 madvise \ 301 memcmp \ 302 memcpy \ 303 memmove \ 304 memset \ 305 mkdir \ 306 mkstemp \ 307 mntctl \ 308 mlockall \ 309 mount \ 310 mountsyscall \ 311 plock \ 312 regcomp \ 313 regexec \ 314 rmdir \ 315 select \ 316 seteuid \ 317 setitimer \ 318 setresuid \ 319 setsid \ 320 sigaction \ 321 signal \ 322 sigsuspend \ 323 socket \ 324 statfs \ 325 statvfs \ 326 strcasecmp \ 327 strchr \ 328 strcspn \ 329 strdup \ 330 strerror \ 331 strlcat \ 332 strlcpy \ 333 strspn \ 334 strstr \ 335 svc_getreq \ 336 svc_getreqset \ 337 sysfs \ 338 syslog \ 339 uname \ 340 umount \ 341 umount2 \ 342 unmount \ 343 uvmount \ 344 vfork \ 345 vfsmount \ 346 vmount \ 347 vsnprintf \ 348 wait3 \ 349 waitpid \ 350 ) 351dnl optional functions 352if test "$with_hesiod" = "yes"; then 353AC_CHECK_FUNCS( \ 354 hes_init \ 355 hesiod_init \ 356 hesiod_reload \ 357 hesiod_to_bind \ 358 ) 359fi 360AC_REPLACE_FUNCS( \ 361 clnt_sperrno \ 362 hasmntopt \ 363 strcasecmp \ 364 strdup \ 365 strerror \ 366 strlcat \ 367 strlcpy \ 368 strstr \ 369 ualarm \ 370 ) 371dnl all xdr_* functions are implemented in libamu/xdr_func.c 372AC_CHECK_FUNCS( \ 373 xdr_attrstat \ 374 xdr_createargs \ 375 xdr_dirlist \ 376 xdr_diropargs \ 377 xdr_diropokres \ 378 xdr_diropres \ 379 xdr_dirpath \ 380 xdr_entry \ 381 xdr_exportnode \ 382 xdr_exports \ 383 xdr_fattr \ 384 xdr_fhandle \ 385 xdr_fhstatus \ 386 xdr_filename \ 387 xdr_ftype \ 388 xdr_groupnode \ 389 xdr_groups \ 390 xdr_linkargs \ 391 xdr_mountbody \ 392 xdr_mountlist \ 393 xdr_name \ 394 xdr_nfs_fh \ 395 xdr_nfscookie \ 396 xdr_nfspath \ 397 xdr_nfsstat \ 398 xdr_nfstime \ 399 xdr_pointer \ 400 xdr_u_int64_t \ 401 xdr_readargs \ 402 xdr_readdirargs \ 403 xdr_readdirres \ 404 xdr_readlinkres \ 405 xdr_readokres \ 406 xdr_readres \ 407 xdr_renameargs \ 408 xdr_sattr \ 409 xdr_sattrargs \ 410 xdr_statfsokres \ 411 xdr_statfsres \ 412 xdr_symlinkargs \ 413 xdr_writeargs \ 414 ) 415dnl ====================================================================== 416 417dnl ********* 418AMU_SAVE_STATE 419dnl ********* 420 421dnl ###################################################################### 422dnl HEADER FILES 423dnl ====================================================================== 424dnl Particular Header Checks 425AC_MSG_NOTICE(*** PARTICULAR HEADER FILES ***) 426AC_HEADER_DIRENT 427AC_HEADER_STDC 428AC_HEADER_SYS_WAIT 429dnl ====================================================================== 430dnl Generic Header Checks 431AC_MSG_NOTICE(*** GENERIC HEADER FILES ***) 432AC_CHECK_HEADERS( \ 433 arpa/nameser.h \ 434 arpa/inet.h \ 435 bsd/rpc/rpc.h \ 436 cdfs/cdfsmount.h \ 437 cdfs/cdfs_mount.h \ 438 fs/udf/udf_mount.h \ 439 db1/ndbm.h \ 440 fs/efs/efs_mount.h \ 441 fs/msdosfs/msdosfsmount.h \ 442 fs/tmpfs/tmpfs_args.h \ 443 gdbm/ndbm.h \ 444 hsfs/hsfs.h \ 445 linux/fs.h \ 446 linux/kdev_t.h \ 447 linux/list.h \ 448 linux/nfs.h \ 449 linux/nfs2.h \ 450 linux/nfs4.h \ 451 linux/posix_types.h \ 452 linux/socket.h \ 453 machine/endian.h \ 454 net/errno.h \ 455 net/if_var.h \ 456 netinet/in.h \ 457 nfs/export.h \ 458 nfs/mount.h \ 459 nfs/nfs_gfs.h \ 460 nfs/nfs_mount.h \ 461 nfs/nfsmount.h \ 462 nfs/nfsproto.h \ 463 nfs/nfsv2.h \ 464 nfs/pathconf.h \ 465 nfs/rpcv2.h \ 466 nfsclient/nfsargs.h \ 467 rpc/rpc.h \ 468 rpc/types.h \ 469 rpcsvc/autofs_prot.h \ 470 rpcsvc/mount.h \ 471 rpcsvc/mountv3.h \ 472 rpcsvc/nfs_prot.h \ 473 rpcsvc/nis.h \ 474 rpcsvc/ypclnt.h \ 475 sys/config.h \ 476 sys/dg_mount.h \ 477 sys/dir.h \ 478 sys/errno.h \ 479 sys/file.h \ 480 sys/fs/autofs.h \ 481 sys/fs/autofs_prot.h \ 482 sys/fs/cachefs_fs.h \ 483 sys/fs/efs_clnt.h \ 484 sys/fs/nfs.h \ 485 sys/fs/nfs/mount.h \ 486 sys/fs/nfs/nfs_clnt.h \ 487 sys/fs/nfs_clnt.h \ 488 sys/fs/pc_fs.h \ 489 sys/fs/tmp.h \ 490 sys/fs/ufs_mount.h \ 491 sys/fs/xfs_clnt.h \ 492 sys/fs_types.h \ 493 sys/fsid.h \ 494 sys/fstyp.h \ 495 sys/ioctl.h \ 496 sys/immu.h \ 497 sys/lock.h \ 498 sys/machine.h \ 499 sys/mman.h \ 500 sys/mntctl.h \ 501 sys/mntent.h \ 502 sys/mnttab.h \ 503 sys/mount.h \ 504 sys/ndir.h \ 505 sys/netconfig.h \ 506 sys/param.h \ 507 sys/pathconf.h \ 508 sys/resource.h \ 509 sys/sema.h \ 510 sys/signal.h \ 511 sys/socket.h \ 512 sys/sockio.h \ 513 sys/stat.h \ 514 sys/statfs.h \ 515 sys/statvfs.h \ 516 sys/syscall.h \ 517 sys/syslimits.h \ 518 sys/syslog.h \ 519 sys/time.h \ 520 sys/tiuser.h \ 521 sys/types.h \ 522 sys/ucred.h \ 523 sys/uio.h \ 524 sys/utsname.h \ 525 sys/vfs.h \ 526 sys/vmount.h \ 527 sys/vnode.h \ 528dnl sys/wait.h \ 529 ufs/ufs/extattr.h \ 530 ufs/ufs/ufsmount.h \ 531 ufs/ufs_mount.h \ 532 \ 533 assert.h \ 534dnl cfs.h \ 535 cluster.h \ 536 ctype.h \ 537dnl dirent.h \ 538 errno.h \ 539 fcntl.h \ 540 ifaddrs.h \ 541 irs.h \ 542 grp.h \ 543 libgen.h \ 544 limits.h \ 545 malloc.h \ 546 memory.h \ 547 mntent.h \ 548 mnttab.h \ 549 mount.h \ 550 ndbm.h \ 551 ndir.h \ 552 netconfig.h \ 553 netdb.h \ 554 netdir.h \ 555 nsswitch.h \ 556 pwd.h \ 557 regex.h \ 558 setjmp.h \ 559 signal.h \ 560 socketbits.h \ 561 statbuf.h \ 562 stdarg.h \ 563 stdlib.h \ 564 stdio.h \ 565 string.h \ 566 strings.h \ 567 syslog.h \ 568 tcpd.h \ 569 time.h \ 570 tiuser.h \ 571 varargs.h \ 572 unistd.h \ 573 ) 574dnl headers that likely have dependencies 575AC_CHECK_HEADERS([ \ 576 net/if.h \ 577 net/route.h \ 578 nfs/nfs_clnt.h \ 579], [], [], 580[ 581#ifdef HAVE_SYS_TYPES_H 582# include <sys/types.h> 583#endif /* HAVE_SYS_TYPES_H */ 584#ifdef HAVE_SYS_SOCKET_H 585# include <sys/socket.h> 586#endif /* HAVE_SYS_SOCKET_H */ 587]) 588 589dnl optional headers 590if test "$with_ldap" = "yes"; then 591AC_CHECK_HEADERS( \ 592 lber.h \ 593 ldap.h \ 594 ) 595fi 596if test "$with_hesiod" = "yes"; then 597AC_CHECK_HEADERS( \ 598 hesiod.h \ 599 ) 600fi 601dnl headers which depend on others, else you get an configure error 602AC_CHECK_HEADERS([ \ 603 isofs/cd9660/cd9660_mount.h \ 604 msdosfs/msdosfsmount.h \ 605 netinet/if_ether.h \ 606 nfs/nfs.h \ 607 rpc/auth.h \ 608 rpc/auth_des.h \ 609 rpc/pmap_clnt.h \ 610 rpc/pmap_prot.h \ 611 rpcsvc/yp_prot.h \ 612 sys/mbuf.h \ 613 sys/proc.h \ 614 resolv.h \ 615], [], [], 616[ 617#ifdef HAVE_SYS_TYPES_H 618# include <sys/types.h> 619#endif /* HAVE_SYS_TYPES_H */ 620#ifdef HAVE_SYS_SOCKET_H 621# include <sys/socket.h> 622#endif /* HAVE_SYS_SOCKET_H */ 623#ifdef HAVE_SYS_PARAM_H 624# include <sys/param.h> 625#endif /* HAVE_SYS_PARAM_H */ 626#ifdef HAVE_SYS_QUEUE_H 627# include <sys/queue.h> 628#endif /* HAVE_SYS_QUEUE_H */ 629#ifdef HAVE_NET_IF_H 630# include <net/if.h> 631#endif /* HAVE_NET_IF_H */ 632#ifdef HAVE_NETINET_IN_H 633# include <netinet/in.h> 634#endif /* HAVE_NETINET_IN_H */ 635#ifdef HAVE_SYS_MOUNT_H 636# include <sys/mount.h> 637#endif /* HAVE_SYS_MOUNT_H */ 638#ifdef HAVE_NFS_NFSMOUNT_H 639# include <nfs/nfsmount.h> 640#endif /* HAVE_NFS_NFSMOUNT_H */ 641#ifdef HAVE_RPC_TYPES_H 642# include <rpc/types.h> 643#endif /* HAVE_RPC_TYPES_H */ 644#ifdef HAVE_RPC_RPC_H 645# include <rpc/rpc.h> 646#endif /* HAVE_RPC_RPC_H */ 647#ifdef HAVE_NFS_RPCV2_H 648# include <nfs/rpcv2.h> 649#endif /* HAVE_NFS_RPCV2_H */ 650]) 651AC_CHECK_HEADERS([ \ 652 linux/auto_fs.h \ 653 linux/auto_fs4.h \ 654 linux/loop.h \ 655], [], [], 656[ 657#ifdef HAVE_SYS_SOCKET_H 658# include <sys/socket.h> 659#endif /* HAVE_SYS_SOCKET_H */ 660#ifdef HAVE_LIMITS_H 661# include <limits.h> 662#endif /* HAVE_LIMITS_H */ 663#ifdef HAVE_LINUX_POSIX_TYPES_H 664# include <linux/posix_types.h> 665#endif /* HAVE_LINUX_POSIX_TYPES_H */ 666/* next dev_t lines needed due to changes in kernel code */ 667#undef dev_t 668#define dev_t unsigned short /* compatible with Red Hat and SuSE */ 669]) 670dnl even more special checks for Linux nfs headers 671AC_CHECK_HEADERS([ \ 672 linux/nfs_mount.h \ 673], [], [], 674[ 675/* 676 * Needed to find nfs2_fh and nfs_fh on older systems (yellowdog2.3, gentoo, 677 * etc.) 678 * Needs to be defined before <asm/types.h> so u32 is available for 679 * <linux/sunrpc/msg_prot.h>. 680 */ 681#ifdef HAVE_SYS_TYPES_H 682# include <sys/types.h> 683#endif /* HAVE_SYS_TYPES_H */ 684/* 685 * It used to be the case that linux/socket.h would define sa_family_t, 686 * but as of FC15, this is not the case anymore (although the comments 687 * in some headers say that is true! So we include <sys/socket.h> too. 688 */ 689#ifdef HAVE_LINUX_SOCKET_H 690# include <linux/socket.h> 691#endif /* HAVE_LINUX_SOCKET_H */ 692#ifdef HAVE_SYS_SOCKET_H 693#include <sys/socket.h> 694#endif /* HAVE_SYS_SOCKET_H */ 695#ifdef HAVE_LIMITS_H 696# include <limits.h> 697#endif /* HAVE_LIMITS_H */ 698#ifdef HAVE_LINUX_POSIX_TYPES_H 699# include <linux/posix_types.h> 700#endif /* HAVE_LINUX_POSIX_TYPES_H */ 701#ifdef HAVE_LINUX_NFS2_H 702# if !defined(FHSIZE) && defined(NFS2_FHSIZE) 703# define FHSIZE NFS2_FHSIZE 704# endif 705#ifdef HAVE_LINUX_NFS_H 706# include <linux/nfs.h> 707# if !defined(FHSIZE) && defined(NFS_FHSIZE) 708# define FHSIZE NFS_FHSIZE 709# endif 710#endif 711struct nfs2_fh { 712 char data[[FHSIZE]]; 713}; 714# define _LINUX_NFS2_H 715#endif /* HAVE_LINUX_NFS2_H */ 716/* next dev_t lines needed due to changes in kernel code */ 717#undef dev_t 718#define dev_t unsigned short /* compatible with Red Hat and SuSE */ 719]) 720 721dnl ====================================================================== 722dnl db/ndbm/gdbm: This is serious autoconf-fu... 723dnl ====================================================================== 724if test "$with_ndbm" = "yes" 725then 726if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then 727 AC_CHECK_LIB(ndbm, dbm_open, 728dnl some systems replaced old ndbm.h include with GNU ndbm.h, which requires 729dnl libgdbm for dbm_pagfno, so check for this. 730 AC_CHECK_LIB(ndbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm", 731 AC_CHECK_LIB(gdbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm -lgdbm"))) 732fi 733dnl check if dbm_open is part of libc 734if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then 735 AC_CHECK_LIB(c, dbm_open, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c") 736fi 737if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then 738 AC_CHECK_LIB(db1, dbm_open, ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1") 739fi 740dnl nasty workaround: <gdbm/ndbm.h> and <gdbm-ndbm.h> map to the same ac_cv_ variable name 741if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then 742 AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm/ndbm.h"; ac_cv_lib_new_dbm="gdbm") 743else 744 # reset any previous knowledge and retest for different header name 745 # check also gdbm_compat library (Debian 3.1) 746 unset ac_cv_header_gdbm_ndbm_h 747 AC_CHECK_HEADERS(gdbm-ndbm.h) 748 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then 749 AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm", 750 AC_CHECK_LIB(gdbm_compat, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm -lgdbm_compat") 751 ) 752 fi 753fi 754if test "$ac_cv_header_new_dbm" != "" -a "$ac_cv_lib_new_dbm" != ""; then 755 AC_DEFINE_UNQUOTED(NEW_DBM_H, "$ac_cv_header_new_dbm") 756dnl don't bother adding "-lc" when it's the default anyway 757 if test "$ac_cv_lib_new_dbm" != "c" ; then 758 LIBS="-l$ac_cv_lib_new_dbm $LIBS" 759 fi 760fi 761fi 762dnl ====================================================================== 763 764dnl ********* 765AMU_SAVE_STATE 766dnl ********* 767 768dnl ###################################################################### 769dnl STRUCTURES 770AC_MSG_NOTICE(*** PARTICULAR STRUCTURES ***) 771AC_HEADER_STAT 772AC_HEADER_TIME 773AC_STRUCT_TM 774dnl ====================================================================== 775AC_MSG_NOTICE(*** GENERIC STRUCTURES ***) 776dnl before any use of macros that need nfs/mount headers, must define O/S 777dnl specific header to include. 778AMU_CHECK_NFS_PROT_HEADERS 779AMU_STRUCT_MNTENT 780AMU_STRUCT_MNTTAB 781dnl ----------------------------------------------------------------------- 782dnl check for bad hasmntopt() function after struct mntent/mnttab 783dnl but only if hasmntopt() is actually defined. 784if test $ac_cv_func_hasmntopt = yes 785then 786 AMU_FUNC_BAD_HASMNTOPT 787fi 788dnl ----------------------------------------------------------------------- 789AMU_STRUCT_NFS_ARGS 790AMU_STRUCT_NFS_GFS_MOUNT 791dnl ----------------------------------------------------------------------- 792dnl cannot proceed if struct nfs_args/gfs_mount is not found! 793if test "$ac_cv_have_struct_nfs_args" = notfound && test "$ac_cv_have_struct_nfs_gfs_mount" = no 794then 795AC_MSG_ERROR( 796[Cannot find any definition for struct nfs_args! 797This can be due to several reasons: a misconfigured system, a system that is 798missing some vital NFS-related headers or libraries, one for which am-utils 799was not ported to yet, or even a bug in the am-utils sources. Check the 800BUGS file in this distribution and see if there is any mention relevant to 801your system. If that does not help, check the config.log and config.cache 802files in this build for details and report them to 803https://bugzilla.am-utils.org/ or am-utils@am-utils.org please. 804]) 805fi 806dnl ----------------------------------------------------------------------- 807dnl NFS related tests need to happen earlier: many things depend on them 808AMU_STRUCT_FIELD_NFS_FH 809AMU_STRUCT_NFS_FH 810AMU_STRUCT_NFS_FH3 811AMU_CHECK_FS_MNTENT(nfs3) 812AMU_CHECK_FS_MNTENT(nfs4) 813dnl ====================================================================== 814 815dnl ----------------------------------------------------------------------- 816dnl Lustre related tests 817AMU_CHECK_FS_MNTENT(lustre) 818 819 820dnl ********* 821AMU_SAVE_STATE 822dnl ********* 823 824dnl ###################################################################### 825dnl TYPEDEFS 826dnl ====================================================================== 827dnl Particular Typedef Checks 828AC_MSG_NOTICE(*** PARTICULAR TYPEDEFS ***) 829AC_TYPE_GETGROUPS 830AC_TYPE_MODE_T 831AC_TYPE_PID_T 832AC_TYPE_SIGNAL 833AC_TYPE_SIZE_T 834AC_TYPE_UID_T 835dnl ====================================================================== 836dnl Generic Typedef Checks 837AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***) 838AMU_TYPE_TIME_T 839AMU_TYPE_RPCVERS_T 840case "${host_os}" in 841 irix6* ) 842AMU_TYPE_PTE_T 843 ;; 844esac 845AMU_CHECK_FHANDLE 846AMU_CHECK_MTYPE_TYPE 847AMU_CHECK_MTYPE_PRINTF_TYPE 848AMU_TYPE_YP_ORDER_OUTORDER 849AMU_TYPE_RECVFROM_FROMLEN 850AMU_TYPE_AUTH_CREATE_GIDLIST 851AMU_TYPE_SVC_IN_ARG 852AMU_TYPE_AUTOFS_ARGS 853AMU_TYPE_CACHEFS_ARGS 854AMU_TYPE_CDFS_ARGS 855AMU_TYPE_UDF_ARGS 856AMU_TYPE_LOFS_ARGS 857AMU_TYPE_MFS_ARGS 858AMU_TYPE_PCFS_ARGS 859AMU_TYPE_RFS_ARGS 860AMU_TYPE_TMPFS_ARGS 861AMU_TYPE_UFS_ARGS 862AMU_TYPE_XFS_ARGS 863AMU_TYPE_EFS_ARGS 864AMU_TYPE_XDRPROC_T 865dnl ====================================================================== 866 867dnl ###################################################################### 868dnl Particular Compiler Characteristics 869AC_MSG_NOTICE(*** PARTICULAR COMPILER CHARACTERISTICS ***) 870AC_C_BIGENDIAN 871AC_C_CONST 872AC_C_INLINE 873AC_C_VOLATILE 874dnl AC_CHECK_SIZEOF(void *, 0) 875dnl ====================================================================== 876dnl Generic Compiler Characteristics 877AC_MSG_NOTICE(*** GENERIC COMPILER CHARACTERISTICS ***) 878AMU_C_VOID_P 879AMU_VARARGS_MACROS 880dnl ====================================================================== 881 882dnl ********* 883AMU_SAVE_STATE 884dnl ********* 885 886dnl ###################################################################### 887AC_MSG_NOTICE(*** EXTERNAL DEFINITIONS ***) 888AMU_EXTERN_SYS_ERRLIST 889AMU_EXTERN_OPTARG 890AMU_CHECK_EXTERNS( 891 clnt_spcreateerror \ 892 clnt_sperrno \ 893 free \ 894 get_myaddress \ 895 getccent \ 896 getdomainname \ 897 getdtablesize \ 898 gethostname \ 899 getlogin \ 900 getpagesize \ 901 getwd \ 902 hosts_ctl \ 903 innetgr \ 904 mkstemp \ 905 mntctl \ 906 sbrk \ 907 seteuid \ 908 setitimer \ 909 sleep \ 910 strcasecmp \ 911 strdup \ 912 strlcat \ 913 strlcpy \ 914 strstr \ 915 ualarm \ 916 usleep \ 917 wait3 \ 918 vsnprintf \ 919 xdr_callmsg \ 920 xdr_opaque_auth \ 921 ) 922dnl Different macro to check for LDAP externs, so as to avoid 923dnl breaking the basic extern-checking macro. 924if test "$with_ldap" = "yes"; then 925AMU_CHECK_EXTERN_LDAP(ldap_enable_cache) 926fi 927dnl ====================================================================== 928 929dnl ###################################################################### 930dnl C PREPROCESSOR MACROS 931AC_MSG_NOTICE(*** C PREPROCESSOR MACROS ***) 932dnl ====================================================================== 933 934dnl ###################################################################### 935dnl SYSTEM SERVICES 936AC_MSG_NOTICE(*** SYSTEM SERVICES ***) 937AC_SYS_LONG_FILE_NAMES 938AC_SYS_LARGEFILE 939AC_SYS_RESTARTABLE_SYSCALLS 940AMU_CHECK_NETWORK_TRANSPORT_TYPE 941dnl ====================================================================== 942 943dnl ********* 944AMU_SAVE_STATE 945dnl ********* 946 947dnl ###################################################################### 948AC_MSG_NOTICE(*** FIELDS WITHIN STRUCTURES ***) 949AMU_CHECK_FIELD(fd_set.fds_bits) 950AMU_CHECK_FIELD(mntent_t.mnt_cnode) 951AMU_CHECK_FIELD(mntent_t.mnt_ro) 952AMU_CHECK_FIELD(mntent_t.mnt_time) 953AMU_FIELD_MNTENT_T_MNT_TIME_STRING 954AMU_CHECK_FIELD(cdfs_args_t.flags) 955AMU_CHECK_FIELD(cdfs_args_t.fspec) 956AMU_CHECK_FIELD(cdfs_args_t.iso_flags) 957AMU_CHECK_FIELD(cdfs_args_t.iso_pgthresh) 958AMU_CHECK_FIELD(cdfs_args_t.norrip) 959AMU_CHECK_FIELD(cdfs_args_t.ssector) 960AMU_CHECK_FIELD(udf_args_t.version) 961AMU_CHECK_FIELD(udf_args_t.fspec) 962AMU_CHECK_FIELD(udf_args_t.sessionnr) 963AMU_CHECK_FIELD(udf_args_t.udfmflags) 964AMU_CHECK_FIELD(udf_args_t.gmtoff) 965AMU_CHECK_FIELD(udf_args_t.anon_uid) 966AMU_CHECK_FIELD(udf_args_t.anon_gid) 967AMU_CHECK_FIELD(udf_args_t.nobody_uid) 968AMU_CHECK_FIELD(udf_args_t.nobody_gid) 969AMU_CHECK_FIELD(udf_args_t.sector_size) 970AMU_CHECK_FIELD(pcfs_args_t.dirmask) 971AMU_CHECK_FIELD(pcfs_args_t.dsttime) 972AMU_CHECK_FIELD(pcfs_args_t.fspec) 973AMU_CHECK_FIELD(pcfs_args_t.gid) 974AMU_CHECK_FIELD(pcfs_args_t.mask) 975AMU_CHECK_FIELD(pcfs_args_t.secondswest) 976AMU_CHECK_FIELD(pcfs_args_t.uid) 977AMU_CHECK_FIELD(ufs_args_t.flags) 978AMU_CHECK_FIELD(ufs_args_t.fspec) 979AMU_CHECK_FIELD(ufs_args_t.ufs_flags) 980AMU_CHECK_FIELD(ufs_args_t.ufs_pgthresh) 981AMU_CHECK_FIELD(efs_args_t.flags) 982AMU_CHECK_FIELD(efs_args_t.fspec) 983AMU_CHECK_FIELD(efs_args_t.version) 984AMU_CHECK_FIELD(xfs_args_t.flags) 985AMU_CHECK_FIELD(xfs_args_t.fspec) 986AMU_CHECK_FIELD(tmpfs_args_t.ta_version) 987AMU_CHECK_FIELD(tmpfs_args_t.ta_nodes_max) 988AMU_CHECK_FIELD(tmpfs_args_t.ta_size_max) 989AMU_CHECK_FIELD(tmpfs_args_t.ta_root_uid) 990AMU_CHECK_FIELD(tmpfs_args_t.ta_root_gid) 991AMU_CHECK_FIELD(tmpfs_args_t.ta_root_mode) 992AMU_CHECK_FIELD(struct fhstatus.fhs_fh) 993AMU_CHECK_FIELD(struct statfs.f_fstypename) 994AMU_CHECK_FIELD(nfs_args_t.acdirmin) 995AMU_CHECK_FIELD(nfs_args_t.acdirmax) 996AMU_CHECK_FIELD(nfs_args_t.acregmin) 997AMU_CHECK_FIELD(nfs_args_t.acregmax) 998AMU_CHECK_FIELD(nfs_args_t.addrlen) 999AMU_CHECK_FIELD(nfs_args_t.bsize) 1000AMU_CHECK_FIELD(nfs_args_t.fh_len) 1001AMU_CHECK_FIELD(nfs_args_t.fhsize) 1002AMU_CHECK_FIELD(nfs_args_t.gfs_flags) 1003AMU_CHECK_FIELD(nfs_args_t.namlen) 1004AMU_CHECK_FIELD(nfs_args_t.optstr) 1005AMU_CHECK_FIELD(nfs_args_t.pathconf) 1006AMU_CHECK_FIELD(nfs_args_t.proto) 1007AMU_CHECK_FIELD(nfs_args_t.sotype) 1008AMU_CHECK_FIELD(nfs_args_t.version) 1009AMU_CHECK_FIELD(nfs_args_t.pseudoflavor) 1010AMU_CHECK_FIELD(nfs_args_t.context) 1011AMU_CHECK_FIELD(struct ifreq.ifr_addr) 1012AMU_CHECK_FIELD(struct ifaddrs.ifa_next) 1013AMU_CHECK_FIELD(struct sockaddr.sa_len) 1014AMU_CHECK_FIELD(struct umntrequest.devid) 1015dnl This one is for Irix 1016AMU_CHECK_FIELD(autofs_args_t.addr) 1017dnl For Solaris 2.8+ 1018AMU_CHECK_FIELD(mounta.optptr) 1019 1020dnl ====================================================================== 1021 1022dnl ###################################################################### 1023dnl MAP TYPES 1024AC_MSG_NOTICE(*** MAP TYPES ***) 1025dnl DBM is obsolete, use NDBM 1026dnl AMU_CHECK_MAP_FUNCS(dbminit dbmopen, dbm) 1027AMU_CHECK_MAP_FUNCS(fgets, file) 1028AMU_CHECK_MAP_FUNCS(fgets, sun) 1029AMU_CHECK_MAP_FUNCS(waitpid, exec) 1030dnl Define HESIOD map if user wanted it, and both headers and libraries exist 1031if test "$with_hesiod" = "yes" && test "$ac_cv_header_hesiod_h" = "yes" 1032then 1033AMU_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod) 1034fi 1035dnl Define LDAP map if user wanted it, and both headers and libraries exist 1036if test "$with_ldap" = "yes" && test "$ac_cv_header_ldap_h" = "yes" 1037then 1038AMU_CHECK_MAP_FUNCS(ldap_open, ldap) 1039fi 1040if test "$with_ndbm" = "yes" -a "$ac_cv_lib_new_dbm" != "" 1041then 1042AMU_CHECK_MAP_FUNCS(dbm_open, $ac_cv_lib_new_dbm, ndbm) 1043fi 1044AMU_CHECK_MAP_FUNCS(yp_get_default_domain yp_all, nis) 1045AMU_CHECK_MAP_FUNCS(nis_domain_of, nisplus, nisplus) 1046AMU_CHECK_MAP_FUNCS(getpwnam, passwd) 1047AMU_CHECK_MAP_FUNCS(opendir, union) 1048dnl ====================================================================== 1049 1050dnl ********* 1051AMU_SAVE_STATE 1052dnl ********* 1053 1054dnl ###################################################################### 1055dnl FILESYSTEM TYPES 1056AC_MSG_NOTICE(*** FILESYSTEM TYPES ***) 1057dnl check for filesystem existence if MNTTYPE_<filesystem> exists, then if 1058dnl MOUNT_<fs>, then MNT_<fs>, then in /proc/filesystems, and getvfsbyname() 1059AMU_CHECK_FS_MNTENT(autofs) 1060AMU_CHECK_FS_MNTENT(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) 1061AMU_CHECK_FS_MNTENT(udf) 1062AMU_CHECK_FS_MNTENT(cache) 1063AMU_CHECK_FS_MNTENT(lofs lo, lofs) 1064AMU_CHECK_FS_MNTENT(mfs) 1065AMU_CHECK_FS_MNTENT(nfs) 1066AMU_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs) 1067AMU_CHECK_FS_MNTENT(tfs) 1068AMU_CHECK_FS_MNTENT(tmpfs) 1069AMU_CHECK_FS_MNTENT(ext4 ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix, ufs) 1070dnl openbsd 2.4 introduce a new file system called xfs, which is not 1071dnl the same as irix-s xfs. Sigh, why did openbsd have to use such a name! 1072case "${host_os_name}" in 1073 openbsd* ) ;; 1074 * ) AMU_CHECK_FS_MNTENT(xfs) ;; 1075esac 1076AMU_CHECK_FS_MNTENT(efs) 1077dnl new ones in bsd44 1078AMU_CHECK_FS_MNTENT(null nullfs, nullfs) 1079AMU_CHECK_FS_MNTENT(union unionfs, unionfs) 1080AMU_CHECK_FS_MNTENT(umap umapfs, umapfs) 1081 1082dnl check for filesystem existence if their headers exist 1083dnl AMU_CHECK_FS_HEADERS(cfs.h, cfs) 1084AMU_CHECK_FS_HEADERS(hsfs/hsfs.h, cdfs) 1085AMU_CHECK_FS_HEADERS(fs/udf/udf_mount.h, udf) 1086AMU_CHECK_FS_HEADERS(tmpfs/tmp.h, tmpfs) 1087AMU_CHECK_FS_HEADERS(fs/tmpfs/tmpfs_args.h, tmpfs) 1088AMU_CHECK_FS_HEADERS(fs/efs/efs_mount.h, efs) 1089AMU_CHECK_FS_HEADERS(sys/fs/autofs.h linux/auto_fs.h, autofs) 1090AMU_CHECK_FS_HEADERS(sys/fs/cachefs_fs.h, cachefs) 1091dnl AMU_CHECK_FS_HEADERS(jfs/jfsmount.h, ufs) 1092dnl ====================================================================== 1093dnl AUTOMOUNTER FILESYSTEM TYPES 1094AC_MSG_NOTICE(*** AUTOMOUNTER FILESYSTEM TYPES ***) 1095AMU_CHECK_AMU_FS(auto, automounter) 1096AMU_CHECK_AMU_FS(direct, direct automount) 1097AMU_CHECK_AMU_FS(toplvl, top-level) 1098AMU_CHECK_AMU_FS(error, error) 1099dnl AMU_CHECK_AMU_FS(inherit, inheritance) 1100AMU_CHECK_AMU_FS(program, program) 1101AMU_CHECK_AMU_FS(link, symlink) 1102AMU_CHECK_AMU_FS(linkx, symlink with existence check) 1103AMU_CHECK_AMU_FS(host, host (nfs), nfs) 1104AMU_CHECK_AMU_FS(nfsx, multi-nfs mount, nfs) 1105AMU_CHECK_AMU_FS(nfsl, NFS with local existence check) 1106AMU_CHECK_AMU_FS(union, union) 1107dnl AMU_CHECK_AMU_FS(autofs, Sun AutoFS, autofs) 1108dnl ====================================================================== 1109 1110dnl ********* 1111AMU_SAVE_STATE 1112dnl ********* 1113 1114dnl ###################################################################### 1115dnl MOUNTING TYPES AND NAMES FOR MOUNTING TABLE 1116dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*) 1117AC_MSG_NOTICE(*** MOUNTING TYPES ***) 1118AMU_CHECK_MOUNT_TYPE(nfs) 1119AMU_CHECK_MOUNT_TYPE(nfs3) 1120AMU_CHECK_MOUNT_TYPE(nfs4) 1121AMU_CHECK_MOUNT_TYPE(lustre) 1122AMU_CHECK_MOUNT_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) 1123AMU_CHECK_MOUNT_TYPE(xfs) 1124AMU_CHECK_MOUNT_TYPE(efs) 1125AMU_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) 1126AMU_CHECK_MOUNT_TYPE(udf) 1127AMU_CHECK_MOUNT_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs) 1128AMU_CHECK_MOUNT_TYPE(mfs) 1129AMU_CHECK_MOUNT_TYPE(tmpfs tmp, tmpfs) 1130AMU_CHECK_MOUNT_TYPE(lofs lo, lofs) 1131AMU_CHECK_MOUNT_TYPE(lfs) 1132AMU_CHECK_MOUNT_TYPE(afs) 1133AMU_CHECK_MOUNT_TYPE(autofs) 1134AMU_CHECK_MOUNT_TYPE(tfs) 1135AMU_CHECK_MOUNT_TYPE(cachefs) 1136AMU_CHECK_MOUNT_TYPE(ignore) 1137dnl new ones in bsd44 1138AMU_CHECK_MOUNT_TYPE(null nullfs, nullfs) 1139AMU_CHECK_MOUNT_TYPE(union unionfs, unionfs) 1140AMU_CHECK_MOUNT_TYPE(umap umapfs, umapfs) 1141dnl ###################################################################### 1142dnl check for mnttab name for filesystem 1143AC_MSG_NOTICE(*** MOUNTING TABLE NAMES ***) 1144AMU_CHECK_MNTTAB_TYPE(nfs) 1145AMU_CHECK_MNTTAB_TYPE(nfs3) 1146AMU_CHECK_MNTTAB_TYPE(nfs4) 1147AMU_CHECK_MNTTAB_TYPE(lustre) 1148AMU_CHECK_MNTTAB_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs) 1149AMU_CHECK_MNTTAB_TYPE(xfs) 1150AMU_CHECK_MNTTAB_TYPE(efs) 1151AMU_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs) 1152AMU_CHECK_MNTTAB_TYPE(udf) 1153AMU_CHECK_MNTTAB_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs) 1154AMU_CHECK_MNTTAB_TYPE(mfs) 1155AMU_CHECK_MNTTAB_TYPE(tmpfs tmp, tmpfs) 1156AMU_CHECK_MNTTAB_TYPE(lofs lo, lofs) 1157AMU_CHECK_MNTTAB_TYPE(lfs) 1158AMU_CHECK_MNTTAB_TYPE(afs) 1159AMU_CHECK_MNTTAB_TYPE(autofs) 1160AMU_CHECK_MNTTAB_TYPE(tfs) 1161AMU_CHECK_MNTTAB_TYPE(cachefs) 1162dnl new ones in bsd44 1163AMU_CHECK_MNTTAB_TYPE(null nullfs, nullfs) 1164AMU_CHECK_MNTTAB_TYPE(union unionfs, unionfs) 1165AMU_CHECK_MNTTAB_TYPE(umap umapfs, umapfs) 1166dnl ====================================================================== 1167 1168dnl ********* 1169AMU_SAVE_STATE 1170dnl ********* 1171 1172dnl ###################################################################### 1173dnl Mount Table option name strings like MNTOPT_* 1174dnl if found, defines MNTTAB_OPT_* 1175AC_MSG_NOTICE(*** MOUNT TABLE OPTION NAME STRINGS ***) 1176AMU_CHECK_MNTTAB_OPTS( \ 1177 acdirmax \ 1178 acdirmin \ 1179 acregmax \ 1180 acregmin \ 1181 actimeo \ 1182 compress \ 1183 dev \ 1184 fsid \ 1185 grpid \ 1186 ignore \ 1187 intr \ 1188 longname \ 1189 maxgroups \ 1190 multi \ 1191 noac \ 1192 noacl \ 1193 noauto \ 1194 noconn \ 1195 nocto \ 1196 nosub \ 1197 nosuid \ 1198 nowin95 \ 1199 pgthresh \ 1200 port \ 1201 posix \ 1202 private \ 1203 proplist \ 1204 proto \ 1205 public \ 1206 retrans \ 1207 retry \ 1208 ro \ 1209 rsize \ 1210 rw \ 1211 shortname \ 1212 soft \ 1213 spongy \ 1214 suid \ 1215 symttl \ 1216 timeo \ 1217 vers \ 1218 wsize \ 1219 ) 1220dnl ====================================================================== 1221 1222dnl ********* 1223AMU_SAVE_STATE 1224dnl ********* 1225 1226dnl ###################################################################### 1227dnl Generic mount(2) system call flags (hex/int numbers) like M_*/MS_*/MNT_* 1228dnl if found, defines MNT2_GEN_OPT_* 1229AC_MSG_NOTICE(*** GENERIC MOUNT(2) OPTIONS ***) 1230AMU_CHECK_MNT2_GEN_OPTS( \ 1231 active \ 1232 async \ 1233 automntfs \ 1234 bind \ 1235 cache \ 1236 data \ 1237 detach \ 1238 force \ 1239 fss \ 1240 grpid \ 1241 ignore \ 1242 i_version \ 1243 jfs \ 1244 kernmount \ 1245 log \ 1246 mandlock \ 1247 move \ 1248 multi \ 1249 newtype \ 1250 nfs \ 1251 noatime \ 1252 nocache \ 1253 nocoredump \ 1254 nodev \ 1255 nodevmtime \ 1256 nodiratime \ 1257 noexec \ 1258 nomnttab \ 1259 nosub \ 1260 nosuid \ 1261 nouser \ 1262 optionstr \ 1263 overlay \ 1264 posixacl \ 1265 private \ 1266 quota \ 1267 rdonly \ 1268 rec \ 1269 remount \ 1270 relatime \ 1271 ronly \ 1272 shared \ 1273 silent \ 1274 slave \ 1275 softdep \ 1276 strictatime \ 1277 sync \ 1278 synchronous \ 1279 symperm \ 1280 unbindable \ 1281 union \ 1282 verbose \ 1283 ) 1284dnl ====================================================================== 1285 1286dnl ********* 1287AMU_SAVE_STATE 1288dnl ********* 1289 1290dnl ###################################################################### 1291dnl NFS-specific mount(2) options (hex numbers) like NFSMNT_*/NFS_MOUNT_* 1292AC_MSG_NOTICE(*** NFS-SPECIFIC MOUNT(2) OPTIONS ***) 1293dnl if found, defines MNT2_NFS_OPT_* 1294AMU_CHECK_MNT2_NFS_OPTS( \ 1295 acdirmax \ 1296 acdirmin \ 1297 acregmax \ 1298 acregmin \ 1299 auto \ 1300 broken_suid \ 1301 deadthresh \ 1302 dirsync \ 1303 dumbtimr \ 1304 fsname \ 1305 grpid \ 1306 hostname \ 1307 ignore \ 1308 int \ 1309 intr \ 1310 kerb \ 1311 knconf \ 1312 leaseterm \ 1313 maxgrps \ 1314 nfsv3 \ 1315 noac \ 1316 noacl \ 1317 noconn \ 1318 nocto \ 1319 noint \ 1320 nonlm \ 1321 nordirplus \ 1322 nqnfs \ 1323 nqlooklease \ 1324 pgthresh \ 1325 posix \ 1326 private \ 1327 proplist \ 1328 rdirplus \ 1329 readahead \ 1330 readdirsize \ 1331 resvport \ 1332 retrans \ 1333 ronly \ 1334 rsize \ 1335 soft \ 1336 spongy \ 1337 strictlock \ 1338 symttl \ 1339 tcp \ 1340 timeo \ 1341 unshared \ 1342 ver3 \ 1343 wsize \ 1344 xlatecookie \ 1345 ) 1346dnl ====================================================================== 1347 1348dnl ###################################################################### 1349dnl CDFS-specific mount(2) options (hex numbers) like M_* 1350AC_MSG_NOTICE(*** CDFS-SPECIFIC MOUNT(2) OPTIONS ***) 1351dnl if found, defines MNT2_CDFS_OPT_* 1352AMU_CHECK_MNT2_CDFS_OPTS(\ 1353 defperm \ 1354 extatt \ 1355 gens \ 1356 nocasetrans \ 1357 nodefperm \ 1358 nojoliet \ 1359 norrip \ 1360 noversion \ 1361 rrcaseins \ 1362 rrip \ 1363 ) 1364dnl ====================================================================== 1365 1366dnl ###################################################################### 1367dnl UDF-specific mount(2) options (hex numbers) like M_* 1368AC_MSG_NOTICE(*** UDF-SPECIFIC MOUNT(2) OPTIONS ***) 1369dnl if found, defines MNT2_UDF_OPT_* 1370AMU_CHECK_MNT2_UDF_OPTS(\ 1371 closesession \ 1372 ) 1373dnl ====================================================================== 1374 1375dnl ###################################################################### 1376dnl PCFS-specific mount(2) options (hex numbers) like M_* 1377AC_MSG_NOTICE(*** PCFS-SPECIFIC MOUNT(2) OPTIONS ***) 1378dnl if found, defines MNT2_PCFS_OPT_* 1379AMU_CHECK_MNT2_PCFS_OPTS(\ 1380 longname \ 1381 nowin95 \ 1382 shortname \ 1383 ) 1384dnl ====================================================================== 1385 1386dnl ********* 1387AMU_SAVE_STATE 1388dnl ********* 1389 1390dnl ###################################################################### 1391dnl SYSTEM-SPECIFIC TESTS 1392AC_MSG_NOTICE(*** SYSTEM-SPECIFIC TESTS ***) 1393dnl ====================================================================== 1394dnl Mount table style 1395AMU_CHECK_MNTTAB_STYLE 1396AMU_CHECK_HIDE_MOUNT_TYPE 1397AMU_CHECK_MNTTAB_LOCATION 1398dnl ----------------------------------------------------------------------- 1399dnl check if has mnttab/mntent or in-kernel mount tables 1400dnl this test must follow AMU_CHECK_MNTTAB_LOCATION and 1401dnl AMU_CHECK_MNT2_GEN_OPTS(nomnttab) 1402if test "$ac_cv_have_struct_mnttab" != yes && test "$ac_cv_have_struct_mntent" != yes && test "$ac_cv_mnttab_location" = file 1403then 1404AC_MSG_ERROR( 1405[No definition found for struct mnttab or struct mntent 1406and this system stores its mount tables on files (not in kernel). 1407This can be due to a misconfigured system, one for which am-utils 1408was not ported to yet, or a bug in the am-utils sources. Check 1409config.log for details and report them to am-utils@am-utils.org please.]) 1410fi 1411dnl ----------------------------------------------------------------------- 1412AMU_CHECK_MNTTAB_FILE_NAME 1413AMU_CHECK_MOUNT_TRAP 1414AMU_CHECK_MOUNT_STYLE 1415AMU_CHECK_UMOUNT_STYLE 1416AMU_CHECK_AUTOFS_STYLE 1417AMU_CHECK_UNMOUNT_CALL 1418AMU_CHECK_UNMOUNT_ARGS 1419AMU_CHECK_NFS_SA_DREF 1420AMU_CHECK_NFS_HN_DREF 1421AMU_CHECK_NFS_FH_DREF 1422AMU_CHECK_NFS_SOCKET_CONNECTION 1423AMU_CHECK_CHECKMOUNT_STYLE 1424AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER 1425AMU_CHECK_GNU_GETOPT 1426dnl ====================================================================== 1427 1428dnl ###################################################################### 1429dnl Check for tcpwrappers 1430dnl This check is moved this far down because on modern tcpwrapper systems 1431dnl such as openbsd, the caller must provide two symbols: deny_severity and 1432dnl allow_severity, which determine the logging level of rejected and 1433dnl requested requests, respectively. If this check happens too early, then 1434dnl $LIBS includes -lwrap, which causes many subsequent tests to fail with 1435dnl missing symbols. 1436AC_CHECK_LIB(wrap, hosts_ctl, 1437[ 1438AC_DEFINE(HAVE_LIBWRAP) 1439WRAPLIB="-lwrap" 1440]) 1441dnl replace value of WRAPLIB in specific Makefiles 1442AC_SUBST(WRAPLIB) 1443dnl next, check if libwrap defines allow/deny_severity or expects the caller to define it 1444if test "$ac_cv_lib_wrap_hosts_ctl" = "yes" 1445then 1446AMU_CHECK_LIBWRAP_SEVERITY 1447fi 1448dnl ====================================================================== 1449 1450dnl ********* 1451AMU_SAVE_STATE 1452dnl ********* 1453 1454dnl ###################################################################### 1455dnl output files 1456AC_MSG_NOTICE(*** OUTPUT FILES ***) 1457dnl The am_utils_link_files variable is set in macros in aclocal.m4 1458AC_CONFIG_LINKS(${am_utils_link_files}) 1459dnl ========================================================================== 1460dnl This is necessary so that .o files in LIBOBJS are also built via 1461dnl the ANSI2KNR-filtering rules. 1462LIB@&t@OBJS=`echo "$LIB@&t@OBJS" | 1463 sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` 1464LTLIBOBJS=`echo "$LIB@&t@OBJS" | 1465 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` 1466AC_SUBST(LTLIBOBJS) 1467dnl XXX: next two lines are temp hack until automake newer than 1.4 comes out 1468AMU_LIB_OBJS="${LTLIBOBJS}" 1469AC_SUBST(AMU_LIB_OBJS) 1470dnl for Makefile rule to regenerate libtool 1471AC_SUBST(LIBTOOL_DEPS) 1472dnl ========================================================================== 1473AC_CONFIG_FILES( \ 1474 aux_conf.h \ 1475 \ 1476 Makefile \ 1477 amd/Makefile \ 1478 amq/Makefile \ 1479 \ 1480 fixmount/Makefile \ 1481 fsinfo/Makefile \ 1482 hlfsd/Makefile \ 1483 libamu/Makefile \ 1484 mk-amd-map/Makefile \ 1485 wire-test/Makefile \ 1486 \ 1487 scripts/Makefile \ 1488 doc/Makefile \ 1489 \ 1490 scripts/am-eject \ 1491 scripts/amd2ldif \ 1492 scripts/amd2sun \ 1493 scripts/automount2amd \ 1494 scripts/ctl-amd \ 1495 scripts/ctl-hlfsd \ 1496 scripts/fix-amd-map \ 1497 scripts/fixrmtab \ 1498 scripts/lostaltmail \ 1499 scripts/redhat-ctl-amd \ 1500 scripts/test-attrcache \ 1501 scripts/wait4amd \ 1502 scripts/wait4amd2die \ 1503 ) 1504AC_OUTPUT 1505# chmod some scripts that are built but not installed 1506test -f scripts/test-attrcache && chmod +x scripts/test-attrcache 1507dnl ====================================================================== 1508 1509dnl ###################################################################### 1510AC_MSG_NOTICE(*** END OF CONFIGURATION ***) 1511dnl end of configure.in for am-utils-6.x 1512