@@ -45,6 +45,11 @@ AC_PROG_RANLIB
45
45
m4_ifndef ( [ PKG_PROG_PKG_CONFIG] ,
46
46
[ AC_MSG_ERROR ( [ PKG_PROG_PKG_CONFIG not found, please install pkgconf package before configuring.] ) ] )
47
47
48
+ # #
49
+ # Initialize pkg-config for PKG_CHECK_MODULES to avoid conditional issues
50
+ # #
51
+ PKG_PROG_PKG_CONFIG
52
+
48
53
# #
49
54
# Checks for ncurses
50
55
# #
@@ -75,8 +80,6 @@ AC_CHECK_FUNCS( \
75
80
)
76
81
AC_FUNC_STRERROR_R
77
82
X_AC_CHECK_PTHREADS
78
- X_AC_CHECK_COND_LIB(munge, munge_ctx_create)
79
- X_AC_CHECK_COND_LIB(cap, cap_get_proc)
80
83
X_AC_TCMALLOC
81
84
X_AC_RDMA
82
85
@@ -95,10 +98,32 @@ AC_SYS_LARGEFILE
95
98
AC_ARG_ENABLE ( [ diodmount] ,
96
99
[ AS_HELP_STRING ( [ --disable-diodmount] , [ do not build diodmount] ) ] )
97
100
98
- AC_ARG_ENABLE ( [ impersonation] ,
99
- [ AS_HELP_STRING ( [ --enable-impersonation] , [ allow access=user] ) ] ,
100
- [ ] ,
101
- [ enable_impersonation=auto] )
101
+ AC_ARG_ENABLE ( [ multiuser] ,
102
+ [ AS_HELP_STRING ( [ --disable-multiuser] , [ build without multi-user support] ) ] )
103
+
104
+ AC_ARG_ENABLE ( [ auth] ,
105
+ [ AS_HELP_STRING ( [ --disable-auth] , [ build without authentication support] ) ] )
106
+
107
+ AC_ARG_WITH ( [ ganesha-kmod] ,
108
+ [ AS_HELP_STRING ( [ --with-ganesha-kmod] , [ use nfs-ganesha-kmod syscalls for multi-user] ) ] )
109
+
110
+ AS_IF ( [ test "x$with_ganesha_kmod" = "xyes"] , [
111
+ AC_DEFINE ( [ USE_GANESHA_KMOD] , [ 1] , [ Use nfs-ganesha-kmod syscalls] )
112
+ ] )
113
+
114
+ AS_IF ( [ test "x$enable_auth" != "xno"] , [
115
+ PKG_CHECK_MODULES([ MUNGE] , [ munge] , [ ] , [
116
+ AC_MSG_ERROR ( [ Install munge or configure with --disable-auth] )
117
+ ] )
118
+ AC_DEFINE ( [ AUTH] , [ 1] , [ Support MUNGE authentication] )
119
+ ] )
120
+
121
+ AS_IF ( [ test "x$enable_multiuser" != "xno"] , [
122
+ PKG_CHECK_MODULES([ CAP] , [ libcap] , [ ] , [
123
+ AC_MSG_ERROR ( [ Install libcap or configure with --disable-multiuser] )
124
+ ] )
125
+ AC_DEFINE ( [ MULTIUSER] , [ 1] , [ service files to multiple users] )
126
+ ] )
102
127
103
128
AC_ARG_ENABLE ( [ config] ,
104
129
[ AS_HELP_STRING ( [ --disable-config] , [ disable lua config file support] ) ] )
@@ -114,47 +139,9 @@ AS_IF([test "x$enable_config" != "xno"], [
114
139
AC_DEFINE ( [ HAVE_CONFIG_FILE] , [ 1] , [ lua config file support] )
115
140
] )
116
141
117
- case "${host_os}" in
118
- linux*)
119
- case "${enable_impersonation}" in
120
- no)
121
- ;;
122
- yes|linux|auto)
123
- enable_impersonation=linux;;
124
- *)
125
- AC_MSG_FAILURE ( [ unsupported impersonation model] ) ;;
126
- esac
127
- ;;
128
- freebsd*)
129
- case "${enable_impersonation}" in
130
- no|auto)
131
- enable_impersonation=no;;
132
- yes|ganesha)
133
- enable_impersonation=ganesha;;
134
- *)
135
- AC_MSG_FAILURE ( [ unsupported impersonation model] ) ;;
136
- esac
137
- ;;
138
- *)
139
- case "${enable_impersonation}" in
140
- no|auto)
141
- enable_impersonation=no;;
142
- *)
143
- AC_MSG_FAILURE ( [ unsupported impersonation model] ) ;;
144
- esac
145
- ;;
146
- esac
147
-
148
142
AM_CONDITIONAL([ ENABLE_DIODMOUNT] , [ test "x${enable_diodmount}" != "xno"] )
149
- AM_CONDITIONAL([ USE_IMPERSONATION_LINUX] , [ test "x${enable_impersonation}" = "xlinux"] )
150
- AM_CONDITIONAL([ USE_IMPERSONATION_GANESHA] , [ test "x${enable_impersonation}" = "xganesha"] )
151
-
152
- if test "x${enable_impersonation}" = "xlinux"; then
153
- AC_DEFINE ( [ USE_IMPERSONATION_LINUX] , [ 1] , [ Use Linux setfsuid] )
154
- fi
155
- if test "x${enable_impersonation}" = "xganesha"; then
156
- AC_DEFINE ( [ USE_IMPERSONATION_GANESHA] , [ 1] , [ Use nfs-ganesha-kmod syscalls] )
157
- fi
143
+ AM_CONDITIONAL([ MULTIUSER] , [ test "x${enable_multiuser}" != "xno"] )
144
+ AM_CONDITIONAL([ USE_GANESHA_KMOD] , [ test "x${with_ganesha_kmod}" = "xyes"] )
158
145
159
146
# #
160
147
# Check for systemd
0 commit comments