Fix solaris bootstrap.
[deb_libnfs.git] / configure.ac
CommitLineData
84004dbf 1AC_PREREQ(2.50)
2842ff15 2AC_INIT([libnfs], [0.0.0])
6c437065
TN
3AC_CONFIG_HEADERS([config.h])
4AM_INIT_AUTOMAKE([foreign])
5AC_CANONICAL_HOST
84004dbf 6
752d8ed2
TN
7case $host in
8 *darwin*)
9 RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
10 ;;
11 *)
12 ;;
13esac
14
15AC_SUBST(RPCGENFLAGS)
16
6c437065
TN
17# Work around stupid autoconf default cflags. pt 1
18SAVE_CFLAGS="x${CFLAGS}"
84004dbf 19
6c437065
TN
20AC_PROG_CC
21AC_PROG_LIBTOOL
84004dbf 22
6c437065 23AM_PROG_CC_C_O
84004dbf 24
6c437065
TN
25# Work around stupid autoconf default cflags. pt 2
26if test "$SAVE_CFLAGS" = "x"; then
27 CFLAGS=""
84004dbf 28fi
e644e700 29
6c437065
TN
30AC_CHECK_PROG([HAVE_RPCGEN], [rpcgen], [yes], [no])
31if test x$HAVE_RPCGEN != xyes; then
32 AC_MSG_ERROR([Can not find required program])
d20a6d6b
SR
33fi
34
6c437065
TN
35# option: logdir
36AC_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
45AC_SUBST(LOGDIR)
84004dbf 46
6c437065
TN
47#option: examples
48AC_ARG_ENABLE([examples],
49 [AC_HELP_STRING([--enable-examples],
50 [Build example programs])],
51 [ENABLE_EXAMPLES=$enableval],
52 [ENABLE_EXAMPLES="no"])
13283beb
TN
53
54if test x$ENABLE_EXAMPLES = xyes; then
55 MAYBE_EXAMPLES="examples"
56fi
6c437065
TN
57AC_SUBST(MAYBE_EXAMPLES)
58
59#output
60AC_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
70AC_OUTPUT