xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/check_nfs_prot_headers.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1dnl ######################################################################
2dnl check if system has NFS protocol headers
3AC_DEFUN([AMU_CHECK_NFS_PROT_HEADERS],
4[
5AC_CACHE_CHECK(location of NFS protocol header files,
6ac_cv_nfs_prot_headers,
7[
8# select the correct style for mounting filesystems
9case "${host_os}" in
10	irix5* )
11			ac_cv_nfs_prot_headers=irix5 ;;
12	irix* )
13			ac_cv_nfs_prot_headers=irix6 ;;
14	sunos3* )
15			ac_cv_nfs_prot_headers=sunos3 ;;
16	sunos4* | solaris1* )
17			ac_cv_nfs_prot_headers=sunos4 ;;
18	sunos5.[[0-3]] | solaris2.[[0-3]] )
19			ac_cv_nfs_prot_headers=sunos5_3 ;;
20	sunos5.4* | solaris2.4* )
21			ac_cv_nfs_prot_headers=sunos5_4 ;;
22	sunos5.5* | solaris2.5* )
23			ac_cv_nfs_prot_headers=sunos5_5 ;;
24	sunos5.6* | solaris2.6* )
25			ac_cv_nfs_prot_headers=sunos5_6 ;;
26	sunos5.7* | solaris2.7* )
27			ac_cv_nfs_prot_headers=sunos5_7 ;;
28	sunos5* | solaris2* )
29			ac_cv_nfs_prot_headers=sunos5_8 ;;
30	bsdi2*)
31			ac_cv_nfs_prot_headers=bsdi2 ;;
32	bsdi* )
33			ac_cv_nfs_prot_headers=bsdi3 ;;
34	freebsd2* )
35			ac_cv_nfs_prot_headers=freebsd2 ;;
36	freebsd* | freebsdelf* )
37			ac_cv_nfs_prot_headers=freebsd3 ;;
38	netbsd1.[[0-2]]* )
39			ac_cv_nfs_prot_headers=netbsd ;;
40	netbsd1.3* )
41			ac_cv_nfs_prot_headers=netbsd1_3 ;;
42	netbsd* | netbsdelf* )
43			ac_cv_nfs_prot_headers=netbsd1_4 ;;
44	openbsd* )
45			ac_cv_nfs_prot_headers=openbsd ;;
46	hpux[[6-9]]* | hpux10* )
47			ac_cv_nfs_prot_headers=hpux ;;
48	hpux* )
49			ac_cv_nfs_prot_headers=hpux11 ;;
50	aix[[1-3]]* )
51			ac_cv_nfs_prot_headers=aix3 ;;
52	aix4.[[01]]* )
53			ac_cv_nfs_prot_headers=aix4 ;;
54	aix4.2* )
55			ac_cv_nfs_prot_headers=aix4_2 ;;
56	aix4.3* )
57			ac_cv_nfs_prot_headers=aix4_3 ;;
58	aix5.1* )
59			ac_cv_nfs_prot_headers=aix5_1 ;;
60	aix* )
61			ac_cv_nfs_prot_headers=aix5_2 ;;
62	osf[[1-3]]* )
63			ac_cv_nfs_prot_headers=osf2 ;;
64	osf4* )
65			ac_cv_nfs_prot_headers=osf4 ;;
66	osf* )
67			ac_cv_nfs_prot_headers=osf5 ;;
68	svr4* )
69			ac_cv_nfs_prot_headers=svr4 ;;
70	sysv4* )	# this is for NCR2 machines
71			ac_cv_nfs_prot_headers=ncr2 ;;
72	linux* )
73			ac_cv_nfs_prot_headers=linux ;;
74	nextstep* )
75			ac_cv_nfs_prot_headers=nextstep ;;
76	ultrix* )
77			ac_cv_nfs_prot_headers=ultrix ;;
78 	darwin* | macosx* | rhapsody* )
79 			ac_cv_nfs_prot_headers=darwin ;;
80	* )
81			ac_cv_nfs_prot_headers=default ;;
82esac
83])
84
85# make sure correct header is linked in top build directory
86am_utils_nfs_prot_file="amu_nfs_prot.h"
87am_utils_link_files=${am_utils_link_files}${am_utils_nfs_prot_file}:conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" "
88
89# define the name of the header to be included for other M4 macros
90AC_DEFINE_UNQUOTED(AMU_NFS_PROTOCOL_HEADER, "${srcdir}/conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h")
91
92# set headers in a macro for Makefile.am files to use (for dependencies)
93AMU_NFS_PROT_HEADER='${top_builddir}/'$am_utils_nfs_prot_file
94AC_SUBST(AMU_NFS_PROT_HEADER)
95])
96dnl ======================================================================
97