Add back rpcgen uint64 fix for osx
[deb_libnfs.git] / configure.ac
1 AC_PREREQ(2.50)
2 AC_INIT([libnfs], [0.0.0])
3 AC_CONFIG_HEADERS([config.h])
4 AM_INIT_AUTOMAKE([foreign])
5 AC_CANONICAL_HOST
6
7 case $host in
8 *darwin*)
9 RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
10 ;;
11 *)
12 ;;
13 esac
14
15 AC_SUBST(RPCGENFLAGS)
16
17 # Work around stupid autoconf default cflags. pt 1
18 SAVE_CFLAGS="x${CFLAGS}"
19
20 AC_PROG_CC
21 AC_PROG_LIBTOOL
22
23 AM_PROG_CC_C_O
24
25 # Work around stupid autoconf default cflags. pt 2
26 if test "$SAVE_CFLAGS" = "x"; then
27 CFLAGS=""
28 fi
29
30 AC_CHECK_PROG([HAVE_RPCGEN], [rpcgen], [yes], [no])
31 if test x$HAVE_RPCGEN != xyes; then
32 AC_MSG_ERROR([Can not find required program])
33 fi
34
35 # option: logdir
36 AC_ARG_WITH([logdir],
37 [AC_HELP_STRING([--with-logdir=DIR],
38 [path to log directory [[LOCALSTATEDIR/log]]])],
39 [LOGDIR=$withval],
40 [LOGDIR='${localstatedir}/log'])
41
42 #if test ! -d "$LOGDIR"; then
43 # AC_MSG_ERROR([--with-logdir must specify a path])
44 #fi
45 AC_SUBST(LOGDIR)
46
47 #option: examples
48 AC_ARG_ENABLE([examples],
49 [AC_HELP_STRING([--enable-examples],
50 [Build example programs])],
51 [ENABLE_EXAMPLES=$enableval],
52 [ENABLE_EXAMPLES="no"])
53 AM_CONDITIONAL(EXAMPLES, [test x$ENABLE_EXAMPLES = xyes])
54 AM_COND_IF(EXAMPLES,
55 [MAYBE_EXAMPLES="examples"]
56 [config_examples="examples/Makefile"])
57 AC_SUBST(MAYBE_EXAMPLES)
58
59 #output
60 AC_CONFIG_FILES([Makefile]
61 [include/Makefile]
62 [lib/Makefile]
63 [mount/Makefile]
64 [nfs/Makefile]
65 [portmap/Makefile]
66 [rquota/Makefile]
67 [examples/Makefile]
68 )
69
70 AC_OUTPUT