1 dnl configure.in file for am-utils-6.x
2 dnl Contains general GNU-autoconf macros.
3 dnl Author: Erez Zadok <ezk AT cs.sunysb.edu>
5 dnl ######################################################################
6 dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE
7 dnl define([AC_CACHE_LOAD], )dnl
8 dnl define([AC_CACHE_SAVE], )dnl
9 dnl ======================================================================
11 dnl ######################################################################
14 dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS
17 [https://bugzilla.am-utils.org/ or am-utils@am-utils.org])
18 AC_MSG_NOTICE(*** INITIALIZATION ***)
19 AC_CONFIG_SRCDIR([amd/amd.c])
20 AM_CONFIG_HEADER(config.h)
23 * Start of am-utils-6.x config.h file.
24 * Erez Zadok <ezk AT cs.sunysb.edu>
26 * DO NOT EDIT BY HAND.
27 * Note: generated by autoheader from configure.in.
33 dnl add actual "#undef" commands into m4/macros/header_templates.m4
35 /****************************************************************************/
36 /*** INCLUDE localconfig.h if it exists, to allow users to make some ***/
37 /*** compile time configuration changes. ***/
38 /****************************************************************************/
39 /* does a local configuration file exist? */
40 #undef HAVE_LOCALCONFIG_H
41 #ifdef HAVE_LOCALCONFIG_H
42 # include <localconfig.h>
43 #endif /* HAVE_LOCALCONFIG_H */
45 #endif /* not _CONFIG_H */
53 /* End of am-utils-6.x config.h file */
56 dnl AC_CONFIG_AUX_DIR(m4)
58 AC_REVISION(Revision: 1.2)
59 AC_COPYRIGHT([Copyright (c) 1997-2009 Erez Zadok])
60 dnl find out system type
61 AC_MSG_NOTICE(*** SYSTEM TYPES ***)
62 dnl run by libtool, but must be kept here because HOST_MACROS depends on it
65 dnl ======================================================================
67 dnl ######################################################################
68 dnl PACKAGE NAME AND VERSION
69 AC_MSG_NOTICE(*** PACKAGE NAME AND VERSION ***)
70 AMU_PACKAGE_NAME($PACKAGE_NAME)
71 AMU_PACKAGE_VERSION($PACKAGE_VERSION)
72 AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT)
73 AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
74 dnl SET (shared) library version. Update it only before major release!
76 dnl The major number should change when an incompatible change is made to
77 dnl the API; the minor number should change when an API is added; the patch
78 dnl level should change when an internal implementation change is made that
79 dnl does not affect the API.
81 dnl In other words: if the major changes, the library is incompatible with
82 dnl older ones; if the minor changes, the library is backwards compatible
83 dnl with libraries using the same major; if the patchlevel changes, the
84 dnl library is backward and forward compatible with libraries using the same
87 dnl For sanity, the lower numbers should be set to 0 when a higher number
89 dnl last version info was 3:2:1 (am-utils-6.0.2)
90 dnl last version info was 4:0:2 (am-utils-6.0.3)
91 dnl last version info was 4:1:2 (am-utils-6.0.4)
92 dnl last version info was 3:0:0 (am-utils-6.1, should have been updated)
94 dnl We increase the major number for am-utils-6.1, because it has new API's
95 dnl and removes some old API's.
96 LIBTOOL_LDFLAGS="-version-info 4:0:0"
97 AC_SUBST(LIBTOOL_LDFLAGS)
98 dnl ======================================================================
100 dnl ######################################################################
101 dnl ALTERNATIVE PROGRAMS
102 dnl Part 1: these are required before "unix variants"
103 dnl ======================================================================
104 dnl Particular Program Checks
105 AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***)
106 dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings
107 dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX
111 AC_PROG_GCC_TRADITIONAL
115 dnl XXX: available in autoconf-2.14
117 dnl ======================================================================
119 dnl ######################################################################
120 dnl OPTION PROCESSING
121 AC_MSG_NOTICE(*** OPTION PROCESSING ***)
122 dnl Do we want LDAP support ?
123 AMU_WITH_ADDON(ldap, LDAP)
124 dnl Do we want HESIOD support ?
125 AMU_WITH_ADDON(hesiod, HESIOD)
126 dnl Do we want NDBM support ?
127 AMU_WITH_ADDON(ndbm, NDBM)
128 dnl Debugging options (yes, mem, or no)
130 dnl additional preprocessor options for configuration/compilation
132 dnl additional linker -l options for configuration/compilation
134 dnl additional linker -L options for configuration/compilation
136 dnl Which options to add to CFLAGS for compilation only?
138 dnl check if a local configuration file exists
140 dnl turn off maintainer-mode Makefile rules, unless using --enable-maintainer-mode
142 dnl ======================================================================
144 dnl ######################################################################
145 AC_MSG_NOTICE(*** LIBTOOL ***)
146 dnl my version of prog_libtool will not build shared by default
148 dnl build static libraries by default
150 dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL
152 # Temporarily undo renaming of "linux-gnu" to "linux", because
153 # libtool only looks for "linux-gnu". Sigh.
154 linux ) host_os=linux-gnu ;;
156 dnl this line must appear only once and on its own line
157 dnl (hence the double case statements above and below)
160 # end temporary renaming of "linux-gnu" to "linux"
161 linux-gnu ) host_os=linux ;;
163 dnl ======================================================================
165 dnl ######################################################################
166 dnl ADDITIONAL OPTION PROCESSING (must be done after CC is defined)
167 AC_MSG_NOTICE(*** EXTRA OPTION PROCESSING ***)
171 dnl ======================================================================
173 dnl ######################################################################
174 dnl Some of these macros must be called before any call to the C compiler
175 AC_MSG_NOTICE(*** UNIX VARIANTS ***)
180 dnl ======================================================================
182 dnl ######################################################################
183 dnl ALTERNATIVE PROGRAMS
184 dnl Part 2: these are required after "unix variants"
185 dnl ======================================================================
186 dnl Particular Program Checks (part 2)
187 AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 2) ***)
189 dnl the next two are run or supported natively by libtool
195 dnl I have to keep a unused dummy AM_PROG_LEX here, because old Automake
196 dnl (1.6.3) looks for it if you refer to LEX in your Makefile.am files.
197 dnl Silly thing, fixed in newer versions of Automake (1.9.2).
198 if test 0 != 0 ; then
202 dnl ======================================================================
203 dnl Generic Program Checks
204 AC_MSG_NOTICE(*** GENERIC PROGRAMS ***)
205 AC_PATH_PROGS(AR, ar, :)
206 AC_PATH_PROGS(PERL, perl5 perl4 perl, /usr/bin/perl)
207 AC_PATH_PROGS(UNMOUNT_PROGRAM, umount unmount, /bin/umount)
208 dnl ======================================================================
210 dnl ######################################################################
212 dnl ======================================================================
213 dnl Note that the configuration order of libraries is in reverse of linkage
214 dnl for example, linking of the first two is -lc -lnsl.
215 AC_MSG_NOTICE(*** LIBRARY FILES ***)
217 dnl libnsl/libsocket are needed only on solaris and some svr4 systems.
218 dnl Using a typical macro has proven unsuccesful, because on some other
219 dnl systems such as irix, including libnsl and or libsocket actually breaks
220 dnl lots of code. So I am forced to use a special purpose macro that sets
221 dnl the libraries based on the OS. Sigh. -Erez.
224 dnl librpc and librpcsvc are needed on Solaris
225 AC_CHECK_LIB(rpc, clnt_sperrno)
226 AC_CHECK_LIB(rpcsvc, xdr_fhandle)
227 dnl libresolv is needed on Solaris/HPUX-11 for hstrerror()
228 AC_CHECK_FUNC(hstrerror,,AC_CHECK_LIB(resolv, hstrerror))
229 dnl Linux RedHat 5.1 puts yp functions only in libnsl (libnsl broken on aix)
230 AC_CHECK_FUNC(yp_all,,AC_CHECK_LIB(nsl, yp_all))
232 dnl hesiod library may not link unless libresolv is included
233 if test "$with_hesiod" = "yes"; then
234 AMU_CHECK_LIB2(hesiod, hes_init,,, -lresolv)
236 if test "$with_ldap" = "yes"; then
237 AMU_CHECK_LIB2(ldap, ldap_open,,, -llber)
238 AC_CHECK_FUNCS(ldap_enable_cache)
241 dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
242 dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
243 dnl so only use one of them
244 case "$ac_cv_opt_debug" in
246 AC_CHECK_LIB(rt, clock_gettime,, AC_CHECK_LIB(posix4, clock_gettime))
250 dnl ######################################################################
251 dnl LIBRARY FUNCTIONS
252 dnl ======================================================================
253 dnl Particular Function Checks
254 AC_MSG_NOTICE(*** PARTICULAR LIBRARY FUNCTIONS ***)
256 dnl This GETMNTENT test will add -lgen to LIBS if needed. We may need it
257 dnl if we have to build am-utils on Irix 4, PTX, or Unixware.
258 dnl AC_FUNC_GETMNTENT
265 dnl if you get AIX link error related to rpl_malloc, turn off next test
267 dnl ======================================================================
268 dnl Generic Function Checks
269 AC_MSG_NOTICE(*** GENERIC LIBRARY FUNCTIONS ***)
271 __rpc_get_local_uid \
279 clnt_create_vers_timed \
350 dnl optional functions
351 if test "$with_hesiod" = "yes"; then
370 dnl all xdr_* functions are implemented in libamu/xdr_func.c
413 dnl ======================================================================
419 dnl ######################################################################
421 dnl ======================================================================
422 dnl Particular Header Checks
423 AC_MSG_NOTICE(*** PARTICULAR HEADER FILES ***)
427 dnl ======================================================================
428 dnl Generic Header Checks
429 AC_MSG_NOTICE(*** GENERIC HEADER FILES ***)
439 fs/msdosfs/msdosfsmount.h \
440 fs/tmpfs/tmpfs_args.h \
448 linux/posix_types.h \
466 nfsclient/nfsargs.h \
470 rpcsvc/autofs_prot.h \
482 sys/fs/autofs_prot.h \
483 sys/fs/cachefs_fs.h \
487 sys/fs/nfs/nfs_clnt.h \
576 if test "$with_ldap" = "yes"; then
582 if test "$with_hesiod" = "yes"; then
587 dnl headers which depend on others, else you get an configure error
589 isofs/cd9660/cd9660_mount.h \
590 msdosfs/msdosfsmount.h \
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif /* HAVE_SYS_TYPES_H */
604 #ifdef HAVE_SYS_PARAM_H
605 # include <sys/param.h>
606 #endif /* HAVE_SYS_PARAM_H */
607 #ifdef HAVE_SYS_QUEUE_H
608 # include <sys/queue.h>
609 #endif /* HAVE_SYS_QUEUE_H */
612 #endif /* HAVE_NET_IF_H */
613 #ifdef HAVE_NETINET_IN_H
614 # include <netinet/in.h>
615 #endif /* HAVE_NETINET_IN_H */
616 #ifdef HAVE_SYS_MOUNT_H
617 # include <sys/mount.h>
618 #endif /* HAVE_SYS_MOUNT_H */
619 #ifdef HAVE_NFS_NFSMOUNT_H
620 # include <nfs/nfsmount.h>
621 #endif /* HAVE_NFS_NFSMOUNT_H */
622 #ifdef HAVE_RPC_TYPES_H
623 # include <rpc/types.h>
624 #endif /* HAVE_RPC_TYPES_H */
625 #ifdef HAVE_RPC_RPC_H
626 # include <rpc/rpc.h>
627 #endif /* HAVE_RPC_RPC_H */
628 #ifdef HAVE_NFS_RPCV2_H
629 # include <nfs/rpcv2.h>
630 #endif /* HAVE_NFS_RPCV2_H */
638 #ifdef HAVE_SYS_SOCKET_H
639 # include <sys/socket.h>
640 #endif /* HAVE_SYS_SOCKET_H */
643 #endif /* HAVE_LIMITS_H */
644 #ifdef HAVE_LINUX_POSIX_TYPES_H
645 # include <linux/posix_types.h>
646 #endif /* HAVE_LINUX_POSIX_TYPES_H */
647 /* next dev_t lines needed due to changes in kernel code */
649 #define dev_t unsigned short /* compatible with Red Hat and SuSE */
651 dnl even more special checks for Linux nfs headers
657 * Needed to find nfs2_fh and nfs_fh on older systems (yellowdog2.3, gentoo,
659 * Needs to be defined before <asm/types.h> so u32 is available for
660 * <linux/sunrpc/msg_prot.h>.
662 #ifdef HAVE_SYS_TYPES_H
663 # include <sys/types.h>
664 #endif /* HAVE_SYS_TYPES_H */
667 # endif /* __KERNEL__ */
668 #ifdef HAVE_LINUX_SOCKET_H
669 # include <linux/socket.h>
670 #endif /* HAVE_LINUX_SOCKET_H */
673 #endif /* HAVE_LIMITS_H */
674 #ifdef HAVE_LINUX_POSIX_TYPES_H
675 # include <linux/posix_types.h>
676 #endif /* HAVE_LINUX_POSIX_TYPES_H */
677 #ifdef HAVE_LINUX_NFS2_H
681 # define _LINUX_NFS2_H
682 #endif /* HAVE_LINUX_NFS2_H */
683 /* next dev_t lines needed due to changes in kernel code */
685 #define dev_t unsigned short /* compatible with Red Hat and SuSE */
688 dnl ======================================================================
689 dnl db/ndbm/gdbm: This is serious autoconf-fu...
690 dnl ======================================================================
691 if test "$with_ndbm" = "yes"
693 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then
694 AC_CHECK_LIB(ndbm, dbm_open,
695 dnl some systems replaced old ndbm.h include with GNU ndbm.h, which requires
696 dnl libgdbm for dbm_pagfno, so check for this.
697 AC_CHECK_LIB(ndbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm",
698 AC_CHECK_LIB(gdbm, dbm_pagfno, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="ndbm -lgdbm")))
700 dnl check if dbm_open is part of libc
701 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_ndbm_h" = "yes"; then
702 AC_CHECK_LIB(c, dbm_open, ac_cv_header_new_dbm="ndbm.h"; ac_cv_lib_new_dbm="c")
704 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_db1_ndbm_h" = "yes"; then
705 AC_CHECK_LIB(db1, dbm_open, ac_cv_header_new_dbm="db1/ndbm.h"; ac_cv_lib_new_dbm="db1")
707 dnl nasty workaround: <gdbm/ndbm.h> and <gdbm-ndbm.h> map to the same ac_cv_ variable name
708 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then
709 AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm/ndbm.h"; ac_cv_lib_new_dbm="gdbm")
711 # reset any previous knowledge and retest for different header name
712 # check also gdbm_compat library (Debian 3.1)
713 unset ac_cv_header_gdbm_ndbm_h
714 AC_CHECK_HEADERS(gdbm-ndbm.h)
715 if test "$ac_cv_lib_new_dbm" = "" -a "$ac_cv_header_gdbm_ndbm_h" = "yes"; then
716 AC_CHECK_LIB(gdbm, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm",
717 AC_CHECK_LIB(gdbm_compat, dbm_open, ac_cv_header_new_dbm="gdbm-ndbm.h"; ac_cv_lib_new_dbm="gdbm -lgdbm_compat")
721 if test "$ac_cv_header_new_dbm" != "" -a "$ac_cv_lib_new_dbm" != ""; then
722 AC_DEFINE_UNQUOTED(NEW_DBM_H, "$ac_cv_header_new_dbm")
723 dnl don't bother adding "-lc" when it's the default anyway
724 if test "$ac_cv_lib_new_dbm" != "c" ; then
725 LIBS="-l$ac_cv_lib_new_dbm $LIBS"
729 dnl ======================================================================
735 dnl ######################################################################
737 AC_MSG_NOTICE(*** PARTICULAR STRUCTURES ***)
741 dnl ======================================================================
742 AC_MSG_NOTICE(*** GENERIC STRUCTURES ***)
743 dnl before any use of macros that need nfs/mount headers, must define O/S
744 dnl specific header to include.
745 AMU_CHECK_NFS_PROT_HEADERS
748 dnl -----------------------------------------------------------------------
749 dnl check for bad hasmntopt() function after struct mntent/mnttab
750 dnl but only if hasmntopt() is actually defined.
751 if test $ac_cv_func_hasmntopt = yes
753 AMU_FUNC_BAD_HASMNTOPT
755 dnl -----------------------------------------------------------------------
757 AMU_STRUCT_NFS_GFS_MOUNT
758 dnl -----------------------------------------------------------------------
759 dnl cannot proceed if struct nfs_args/gfs_mount is not found!
760 if test "$ac_cv_have_struct_nfs_args" = notfound && test "$ac_cv_have_struct_nfs_gfs_mount" = no
763 [Cannot find any definition for struct nfs_args!
764 This can be due to several reasons: a misconfigured system, a system that is
765 missing some vital NFS-related headers or libraries, one for which am-utils
766 was not ported to yet, or even a bug in the am-utils sources. Check the
767 BUGS file in this distribution and see if there is any mention relevant to
768 your system. If that does not help, check the config.log and config.cache
769 files in this build for details and report them to
770 https://bugzilla.am-utils.org/ or am-utils@am-utils.org please.
773 dnl -----------------------------------------------------------------------
774 AMU_STRUCT_FIELD_NFS_FH
777 AMU_CHECK_FS_MNTENT(nfs3)
778 dnl ======================================================================
784 dnl ######################################################################
786 dnl ======================================================================
787 dnl Particular Typedef Checks
788 AC_MSG_NOTICE(*** PARTICULAR TYPEDEFS ***)
795 dnl ======================================================================
796 dnl Generic Typedef Checks
797 AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***)
807 AMU_CHECK_MTYPE_PRINTF_TYPE
808 AMU_TYPE_YP_ORDER_OUTORDER
809 AMU_TYPE_RECVFROM_FROMLEN
810 AMU_TYPE_AUTH_CREATE_GIDLIST
813 AMU_TYPE_CACHEFS_ARGS
825 dnl ======================================================================
827 dnl ######################################################################
828 dnl Particular Compiler Characteristics
829 AC_MSG_NOTICE(*** PARTICULAR COMPILER CHARACTERISTICS ***)
834 dnl AC_CHECK_SIZEOF(void *, 0)
835 dnl ======================================================================
836 dnl Generic Compiler Characteristics
837 AC_MSG_NOTICE(*** GENERIC COMPILER CHARACTERISTICS ***)
840 dnl ======================================================================
846 dnl ######################################################################
847 AC_MSG_NOTICE(*** EXTERNAL DEFINITIONS ***)
848 AMU_EXTERN_SYS_ERRLIST
882 dnl Different macro to check for LDAP externs, so as to avoid
883 dnl breaking the basic extern-checking macro.
884 if test "$with_ldap" = "yes"; then
885 AMU_CHECK_EXTERN_LDAP(ldap_enable_cache)
887 dnl ======================================================================
889 dnl ######################################################################
890 dnl C PREPROCESSOR MACROS
891 AC_MSG_NOTICE(*** C PREPROCESSOR MACROS ***)
892 dnl ======================================================================
894 dnl ######################################################################
896 AC_MSG_NOTICE(*** SYSTEM SERVICES ***)
897 AC_SYS_LONG_FILE_NAMES
898 AC_SYS_RESTARTABLE_SYSCALLS
899 AMU_CHECK_NETWORK_TRANSPORT_TYPE
900 dnl ======================================================================
906 dnl ######################################################################
907 AC_MSG_NOTICE(*** FIELDS WITHIN STRUCTURES ***)
908 AMU_CHECK_FIELD(fd_set.fds_bits)
909 AMU_CHECK_FIELD(mntent_t.mnt_cnode)
910 AMU_CHECK_FIELD(mntent_t.mnt_ro)
911 AMU_CHECK_FIELD(mntent_t.mnt_time)
912 AMU_FIELD_MNTENT_T_MNT_TIME_STRING
913 AMU_CHECK_FIELD(cdfs_args_t.flags)
914 AMU_CHECK_FIELD(cdfs_args_t.fspec)
915 AMU_CHECK_FIELD(cdfs_args_t.iso_flags)
916 AMU_CHECK_FIELD(cdfs_args_t.iso_pgthresh)
917 AMU_CHECK_FIELD(cdfs_args_t.norrip)
918 AMU_CHECK_FIELD(cdfs_args_t.ssector)
919 AMU_CHECK_FIELD(udf_args_t.version)
920 AMU_CHECK_FIELD(udf_args_t.fspec)
921 AMU_CHECK_FIELD(udf_args_t.sessionnr)
922 AMU_CHECK_FIELD(udf_args_t.udfmflags)
923 AMU_CHECK_FIELD(udf_args_t.gmtoff)
924 AMU_CHECK_FIELD(udf_args_t.anon_uid)
925 AMU_CHECK_FIELD(udf_args_t.anon_gid)
926 AMU_CHECK_FIELD(udf_args_t.nobody_uid)
927 AMU_CHECK_FIELD(udf_args_t.nobody_gid)
928 AMU_CHECK_FIELD(udf_args_t.sector_size)
929 AMU_CHECK_FIELD(pcfs_args_t.dirmask)
930 AMU_CHECK_FIELD(pcfs_args_t.dsttime)
931 AMU_CHECK_FIELD(pcfs_args_t.fspec)
932 AMU_CHECK_FIELD(pcfs_args_t.gid)
933 AMU_CHECK_FIELD(pcfs_args_t.mask)
934 AMU_CHECK_FIELD(pcfs_args_t.secondswest)
935 AMU_CHECK_FIELD(pcfs_args_t.uid)
936 AMU_CHECK_FIELD(ufs_args_t.flags)
937 AMU_CHECK_FIELD(ufs_args_t.fspec)
938 AMU_CHECK_FIELD(ufs_args_t.ufs_flags)
939 AMU_CHECK_FIELD(ufs_args_t.ufs_pgthresh)
940 AMU_CHECK_FIELD(efs_args_t.flags)
941 AMU_CHECK_FIELD(efs_args_t.fspec)
942 AMU_CHECK_FIELD(efs_args_t.version)
943 AMU_CHECK_FIELD(xfs_args_t.flags)
944 AMU_CHECK_FIELD(xfs_args_t.fspec)
945 AMU_CHECK_FIELD(tmpfs_args_t.ta_version)
946 AMU_CHECK_FIELD(tmpfs_args_t.ta_nodes_max)
947 AMU_CHECK_FIELD(tmpfs_args_t.ta_size_max)
948 AMU_CHECK_FIELD(tmpfs_args_t.ta_root_uid)
949 AMU_CHECK_FIELD(tmpfs_args_t.ta_root_gid)
950 AMU_CHECK_FIELD(tmpfs_args_t.ta_root_mode)
951 AMU_CHECK_FIELD(struct fhstatus.fhs_fh)
952 AMU_CHECK_FIELD(struct statfs.f_fstypename)
953 AMU_CHECK_FIELD(nfs_args_t.acdirmin)
954 AMU_CHECK_FIELD(nfs_args_t.acdirmax)
955 AMU_CHECK_FIELD(nfs_args_t.acregmin)
956 AMU_CHECK_FIELD(nfs_args_t.acregmax)
957 AMU_CHECK_FIELD(nfs_args_t.addrlen)
958 AMU_CHECK_FIELD(nfs_args_t.bsize)
959 AMU_CHECK_FIELD(nfs_args_t.fh_len)
960 AMU_CHECK_FIELD(nfs_args_t.fhsize)
961 AMU_CHECK_FIELD(nfs_args_t.gfs_flags)
962 AMU_CHECK_FIELD(nfs_args_t.namlen)
963 AMU_CHECK_FIELD(nfs_args_t.optstr)
964 AMU_CHECK_FIELD(nfs_args_t.pathconf)
965 AMU_CHECK_FIELD(nfs_args_t.proto)
966 AMU_CHECK_FIELD(nfs_args_t.sotype)
967 AMU_CHECK_FIELD(nfs_args_t.version)
968 AMU_CHECK_FIELD(nfs_args_t.pseudoflavor)
969 AMU_CHECK_FIELD(nfs_args_t.context)
970 AMU_CHECK_FIELD(struct ifreq.ifr_addr)
971 AMU_CHECK_FIELD(struct ifaddrs.ifa_next)
972 AMU_CHECK_FIELD(struct sockaddr.sa_len)
973 AMU_CHECK_FIELD(struct umntrequest.devid)
974 dnl This one is for Irix
975 AMU_CHECK_FIELD(autofs_args_t.addr)
977 AMU_CHECK_FIELD(mounta.optptr)
979 dnl ======================================================================
981 dnl ######################################################################
983 AC_MSG_NOTICE(*** MAP TYPES ***)
984 dnl DBM is obsolete, use NDBM
985 dnl AMU_CHECK_MAP_FUNCS(dbminit dbmopen, dbm)
986 AMU_CHECK_MAP_FUNCS(fgets, file)
987 AMU_CHECK_MAP_FUNCS(fgets, sun)
988 AMU_CHECK_MAP_FUNCS(waitpid, exec)
989 dnl Define HESIOD map if user wanted it, and both headers and libraries exist
990 if test "$with_hesiod" = "yes" && test "$ac_cv_header_hesiod_h" = "yes"
992 AMU_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod)
994 dnl Define LDAP map if user wanted it, and both headers and libraries exist
995 if test "$with_ldap" = "yes" && test "$ac_cv_header_ldap_h" = "yes"
997 AMU_CHECK_MAP_FUNCS(ldap_open, ldap)
999 if test "$with_ndbm" = "yes" -a "$ac_cv_lib_new_dbm" != ""
1001 AMU_CHECK_MAP_FUNCS(dbm_open, $ac_cv_lib_new_dbm, ndbm)
1003 AMU_CHECK_MAP_FUNCS(yp_get_default_domain yp_all, nis)
1004 AMU_CHECK_MAP_FUNCS(nis_domain_of, nisplus, nisplus)
1005 AMU_CHECK_MAP_FUNCS(getpwnam, passwd)
1006 AMU_CHECK_MAP_FUNCS(opendir, union)
1007 dnl ======================================================================
1013 dnl ######################################################################
1014 dnl FILESYSTEM TYPES
1015 AC_MSG_NOTICE(*** FILESYSTEM TYPES ***)
1016 dnl check for filesystem existence if MNTTYPE_<filesystem> exists, then if
1017 dnl MOUNT_<fs>, then MNT_<fs>, then in /proc/filesystems, and getvfsbyname()
1018 AMU_CHECK_FS_MNTENT(autofs)
1019 AMU_CHECK_FS_MNTENT(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
1020 AMU_CHECK_FS_MNTENT(udf)
1021 AMU_CHECK_FS_MNTENT(cache)
1022 AMU_CHECK_FS_MNTENT(lofs lo, lofs)
1023 AMU_CHECK_FS_MNTENT(mfs)
1024 AMU_CHECK_FS_MNTENT(nfs)
1025 dnl This test for nfs3 was moved up, because other tests depend on it
1026 dnl especially checking for nfsv3 file handle structure types
1027 dnl AMU_CHECK_FS_MNTENT(nfs3)
1028 AMU_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs)
1029 AMU_CHECK_FS_MNTENT(tfs)
1030 AMU_CHECK_FS_MNTENT(tmpfs)
1031 AMU_CHECK_FS_MNTENT(ext3 ext2 ffs ufs 42 43 44 efs xfs jfs ultrix, ufs)
1032 dnl openbsd 2.4 introduce a new file system called xfs, which is not
1033 dnl the same as irix-s xfs. Sigh, why did openbsd have to use such a name!
1034 case "${host_os_name}" in
1036 * ) AMU_CHECK_FS_MNTENT(xfs) ;;
1038 AMU_CHECK_FS_MNTENT(efs)
1039 dnl new ones in bsd44
1040 AMU_CHECK_FS_MNTENT(null nullfs, nullfs)
1041 AMU_CHECK_FS_MNTENT(union unionfs, unionfs)
1042 AMU_CHECK_FS_MNTENT(umap umapfs, umapfs)
1044 dnl check for filesystem existence if their headers exist
1045 dnl AMU_CHECK_FS_HEADERS(cfs.h, cfs)
1046 AMU_CHECK_FS_HEADERS(hsfs/hsfs.h, cdfs)
1047 AMU_CHECK_FS_HEADERS(fs/udf/udf_mount.h, udf)
1048 AMU_CHECK_FS_HEADERS(tmpfs/tmp.h, tmpfs)
1049 AMU_CHECK_FS_HEADERS(fs/tmpfs/tmpfs_args.h, tmpfs)
1050 AMU_CHECK_FS_HEADERS(fs/efs/efs_mount.h, efs)
1051 AMU_CHECK_FS_HEADERS(sys/fs/autofs.h, autofs)
1052 AMU_CHECK_FS_HEADERS(sys/fs/cachefs_fs.h, cachefs)
1053 dnl AMU_CHECK_FS_HEADERS(jfs/jfsmount.h, ufs)
1054 dnl ======================================================================
1055 dnl AUTOMOUNTER FILESYSTEM TYPES
1056 AC_MSG_NOTICE(*** AUTOMOUNTER FILESYSTEM TYPES ***)
1057 AMU_CHECK_AMU_FS(auto, automounter)
1058 AMU_CHECK_AMU_FS(direct, direct automount)
1059 AMU_CHECK_AMU_FS(toplvl, top-level)
1060 AMU_CHECK_AMU_FS(error, error)
1061 dnl AMU_CHECK_AMU_FS(inherit, inheritance)
1062 AMU_CHECK_AMU_FS(program, program)
1063 AMU_CHECK_AMU_FS(link, symlink)
1064 AMU_CHECK_AMU_FS(linkx, symlink with existence check)
1065 AMU_CHECK_AMU_FS(host, host (nfs), nfs)
1066 AMU_CHECK_AMU_FS(nfsx, multi-nfs mount, nfs)
1067 AMU_CHECK_AMU_FS(nfsl, NFS with local existence check)
1068 AMU_CHECK_AMU_FS(union, union)
1069 dnl AMU_CHECK_AMU_FS(autofs, Sun AutoFS, autofs)
1070 dnl ======================================================================
1076 dnl ######################################################################
1077 dnl MOUNTING TYPES AND NAMES FOR MOUNTING TABLE
1078 dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*)
1079 AC_MSG_NOTICE(*** MOUNTING TYPES ***)
1080 AMU_CHECK_MOUNT_TYPE(nfs)
1081 AMU_CHECK_MOUNT_TYPE(nfs3)
1082 AMU_CHECK_MOUNT_TYPE(ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs)
1083 AMU_CHECK_MOUNT_TYPE(xfs)
1084 AMU_CHECK_MOUNT_TYPE(efs)
1085 AMU_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
1086 AMU_CHECK_MOUNT_TYPE(udf)
1087 AMU_CHECK_MOUNT_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
1088 AMU_CHECK_MOUNT_TYPE(mfs)
1089 AMU_CHECK_MOUNT_TYPE(tmpfs tmp, tmpfs)
1090 AMU_CHECK_MOUNT_TYPE(lofs lo, lofs)
1091 AMU_CHECK_MOUNT_TYPE(lfs)
1092 AMU_CHECK_MOUNT_TYPE(afs)
1093 AMU_CHECK_MOUNT_TYPE(autofs)
1094 AMU_CHECK_MOUNT_TYPE(tfs)
1095 AMU_CHECK_MOUNT_TYPE(cachefs)
1096 AMU_CHECK_MOUNT_TYPE(ignore)
1097 dnl new ones in bsd44
1098 AMU_CHECK_MOUNT_TYPE(null nullfs, nullfs)
1099 AMU_CHECK_MOUNT_TYPE(union unionfs, unionfs)
1100 AMU_CHECK_MOUNT_TYPE(umap umapfs, umapfs)
1101 dnl ######################################################################
1102 dnl check for mnttab name for filesystem
1103 AC_MSG_NOTICE(*** MOUNTING TABLE NAMES ***)
1104 AMU_CHECK_MNTTAB_TYPE(nfs)
1105 AMU_CHECK_MNTTAB_TYPE(nfs3)
1106 AMU_CHECK_MNTTAB_TYPE(ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs)
1107 AMU_CHECK_MNTTAB_TYPE(xfs)
1108 AMU_CHECK_MNTTAB_TYPE(efs)
1109 AMU_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
1110 AMU_CHECK_MNTTAB_TYPE(udf)
1111 AMU_CHECK_MNTTAB_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
1112 AMU_CHECK_MNTTAB_TYPE(mfs)
1113 AMU_CHECK_MNTTAB_TYPE(tmpfs tmp, tmpfs)
1114 AMU_CHECK_MNTTAB_TYPE(lofs lo, lofs)
1115 AMU_CHECK_MNTTAB_TYPE(lfs)
1116 AMU_CHECK_MNTTAB_TYPE(afs)
1117 AMU_CHECK_MNTTAB_TYPE(autofs)
1118 AMU_CHECK_MNTTAB_TYPE(tfs)
1119 AMU_CHECK_MNTTAB_TYPE(cachefs)
1120 dnl new ones in bsd44
1121 AMU_CHECK_MNTTAB_TYPE(null nullfs, nullfs)
1122 AMU_CHECK_MNTTAB_TYPE(union unionfs, unionfs)
1123 AMU_CHECK_MNTTAB_TYPE(umap umapfs, umapfs)
1124 dnl ======================================================================
1130 dnl ######################################################################
1131 dnl Mount Table option name strings like MNTOPT_*
1132 dnl if found, defines MNTTAB_OPT_*
1133 AC_MSG_NOTICE(*** MOUNT TABLE OPTION NAME STRINGS ***)
1134 AMU_CHECK_MNTTAB_OPTS( \
1177 dnl ======================================================================
1183 dnl ######################################################################
1184 dnl Generic mount(2) system call flags (hex/int numbers) like M_*/MS_*/MNT_*
1185 dnl if found, defines MNT2_GEN_OPT_*
1186 AC_MSG_NOTICE(*** GENERIC MOUNT(2) OPTIONS ***)
1187 AMU_CHECK_MNT2_GEN_OPTS( \
1223 dnl ======================================================================
1229 dnl ######################################################################
1230 dnl NFS-specific mount(2) options (hex numbers) like NFSMNT_*/NFS_MOUNT_*
1231 AC_MSG_NOTICE(*** NFS-SPECIFIC MOUNT(2) OPTIONS ***)
1232 dnl if found, defines MNT2_NFS_OPT_*
1233 AMU_CHECK_MNT2_NFS_OPTS( \
1278 dnl ======================================================================
1280 dnl ######################################################################
1281 dnl CDFS-specific mount(2) options (hex numbers) like M_*
1282 AC_MSG_NOTICE(*** CDFS-SPECIFIC MOUNT(2) OPTIONS ***)
1283 dnl if found, defines MNT2_CDFS_OPT_*
1284 AMU_CHECK_MNT2_CDFS_OPTS(\
1296 dnl ======================================================================
1298 dnl ######################################################################
1299 dnl UDF-specific mount(2) options (hex numbers) like M_*
1300 AC_MSG_NOTICE(*** UDF-SPECIFIC MOUNT(2) OPTIONS ***)
1301 dnl if found, defines MNT2_UDF_OPT_*
1302 AMU_CHECK_MNT2_UDF_OPTS(\
1305 dnl ======================================================================
1307 dnl ######################################################################
1308 dnl PCFS-specific mount(2) options (hex numbers) like M_*
1309 AC_MSG_NOTICE(*** PCFS-SPECIFIC MOUNT(2) OPTIONS ***)
1310 dnl if found, defines MNT2_PCFS_OPT_*
1311 AMU_CHECK_MNT2_PCFS_OPTS(\
1316 dnl ======================================================================
1322 dnl ######################################################################
1323 dnl SYSTEM-SPECIFIC TESTS
1324 AC_MSG_NOTICE(*** SYSTEM-SPECIFIC TESTS ***)
1325 dnl ======================================================================
1326 dnl Mount table style
1327 AMU_CHECK_MNTTAB_STYLE
1328 AMU_CHECK_HIDE_MOUNT_TYPE
1329 AMU_CHECK_MNTTAB_LOCATION
1330 dnl -----------------------------------------------------------------------
1331 dnl check if has mnttab/mntent or in-kernel mount tables
1332 dnl this test must follow AMU_CHECK_MNTTAB_LOCATION and
1333 dnl AMU_CHECK_MNT2_GEN_OPTS(nomnttab)
1334 if test "$ac_cv_have_struct_mnttab" != yes && test "$ac_cv_have_struct_mntent" != yes && test "$ac_cv_mnttab_location" = file
1337 [No definition found for struct mnttab or struct mntent
1338 and this system stores its mount tables on files (not in kernel).
1339 This can be due to a misconfigured system, one for which am-utils
1340 was not ported to yet, or a bug in the am-utils sources. Check
1341 config.log for details and report them to am-utils@am-utils.org please.])
1343 dnl -----------------------------------------------------------------------
1344 AMU_CHECK_MNTTAB_FILE_NAME
1345 AMU_CHECK_MOUNT_TRAP
1346 AMU_CHECK_MOUNT_STYLE
1347 AMU_CHECK_UMOUNT_STYLE
1348 AMU_CHECK_AUTOFS_STYLE
1349 AMU_CHECK_UNMOUNT_CALL
1350 AMU_CHECK_UNMOUNT_ARGS
1351 AMU_CHECK_NFS_SA_DREF
1352 AMU_CHECK_NFS_HN_DREF
1353 AMU_CHECK_NFS_FH_DREF
1354 AMU_CHECK_NFS_SOCKET_CONNECTION
1355 AMU_CHECK_CHECKMOUNT_STYLE
1356 AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER
1357 AMU_CHECK_GNU_GETOPT
1358 dnl ======================================================================
1360 dnl ######################################################################
1361 dnl Check for tcpwrappers
1362 dnl This check is moved this far down because on modern tcpwrapper systems
1363 dnl such as openbsd, the caller must provide two symbols: deny_severity and
1364 dnl allow_severity, which determine the logging level of rejected and
1365 dnl requested requests, respectively. If this check happens too early, then
1366 dnl $LIBS includes -lwrap, which causes many subsequent tests to fail with
1367 dnl missing symbols.
1368 AC_CHECK_LIB(wrap, hosts_ctl,
1370 AC_DEFINE(HAVE_LIBWRAP)
1373 dnl replace value of WRAPLIB in specific Makefiles
1375 dnl next, check if libwrap defines allow/deny_severity or expects the caller to define it
1376 if test "$ac_cv_lib_wrap_hosts_ctl" = "yes"
1378 AMU_CHECK_LIBWRAP_SEVERITY
1380 dnl ======================================================================
1386 dnl ######################################################################
1388 AC_MSG_NOTICE(*** OUTPUT FILES ***)
1389 dnl The am_utils_link_files variable is set in macros in aclocal.m4
1390 AC_CONFIG_LINKS(${am_utils_link_files})
1391 dnl ==========================================================================
1392 dnl This is necessary so that .o files in LIBOBJS are also built via
1393 dnl the ANSI2KNR-filtering rules.
1394 LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
1395 sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
1396 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
1397 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
1399 dnl XXX: next two lines are temp hack until automake newer than 1.4 comes out
1400 AMU_LIB_OBJS="${LTLIBOBJS}"
1401 AC_SUBST(AMU_LIB_OBJS)
1402 dnl for Makefile rule to regenerate libtool
1403 AC_SUBST(LIBTOOL_DEPS)
1404 dnl ==========================================================================
1416 mk-amd-map/Makefile \
1417 wire-test/Makefile \
1425 scripts/automount2amd \
1429 scripts/fix-amd-map \
1431 scripts/lostaltmail \
1432 scripts/redhat-ctl-amd \
1433 scripts/test-attrcache \
1435 scripts/wait4amd2die \
1438 # chmod some scripts that are built but not installed
1439 test -f scripts/test-attrcache && chmod +x scripts/test-attrcache
1440 dnl ======================================================================
1442 dnl ######################################################################
1443 AC_MSG_NOTICE(*** END OF CONFIGURATION ***)
1444 dnl end of configure.in for am-utils-6.x