-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
66 lines (56 loc) · 2.05 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
AC_INIT(rpcbind, 0.2.0)
AM_INIT_AUTOMAKE
# AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/rpcbind.c])
AC_PROG_CC
AM_CONFIG_HEADER(config.h)
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_SRCDIR([src/config.h.in])
AC_CONFIG_HEADERS([src/config.h])
AC_PROG_LIBTOOL
AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
[case "${enableval}" in
yes) debug=true ;;
no) debug=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AC_ARG_ENABLE(warmstarts,[ --enable-warmstarts Enables Warm Starts],
[case "${enableval}" in
yes) warmstarts=true ;;
no) warmstarts=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-warmstarts) ;;
esac],[warmstarts=false])
AM_CONDITIONAL(WARMSTART, test x$warmstarts = xtrue)
if test "$warmstarts" = "true" ; then
AC_ARG_WITH(statedir,
[ --with-statedir=/foo use state dir /foo [/tmp]],
statedir=$withval,
statedir=/tmp)
AC_SUBST(statedir)
AC_DEFINE_UNQUOTED(RPCBIND_STATEDIR, "$statedir", [This defines the location where the state files will be kept for warm starts])
fi
AC_ARG_WITH(rpcuser,
[ --with-rpcuser=user uid to use [root]],
rpcuser=$withval,
rpcuser=root)
AC_SUBST(rpcuser)
AC_DEFINE_UNQUOTED(RPCBIND_USER, "$rpcuser", [This defines the uid to run as])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
netinet/in.h stdlib.h string.h \
sys/param.h sys/socket.h \
sys/time.h syslog.h \
unistd.h nss.h])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([tirpc], [clnt_create])
AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking],
[case "${enableval}" in
yes) libwarp=true
AC_CHECK_LIB([wrap], [hosts_access]) ;;
no) libwarp=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
esac],[libwarp=false])
AM_CONDITIONAL(LIBWRAP, test x$libwarp = xtrue)
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT()