Remove log path with arg from configure.
[deb_libnfs.git] / configure.ac
... / ...
CommitLineData
1AC_PREREQ(2.50)
2AC_INIT([libnfs], [0.0.0])
3AC_CONFIG_HEADERS([config.h])
4AM_INIT_AUTOMAKE([foreign])
5AC_CANONICAL_HOST
6
7# Work around stupid autoconf default cflags. pt 1
8SAVE_CFLAGS="x${CFLAGS}"
9
10AC_PROG_CC
11AC_PROG_LIBTOOL
12
13AM_PROG_CC_C_O
14
15# Work around stupid autoconf default cflags. pt 2
16if test "$SAVE_CFLAGS" = "x"; then
17 CFLAGS=""
18fi
19
20AC_CHECK_PROG([HAVE_RPCGEN], [rpcgen], [yes], [no])
21if test x$HAVE_RPCGEN != xyes; then
22 AC_MSG_ERROR([Can not find required program])
23fi
24
25#option: examples
26AC_ARG_ENABLE([examples],
27 [AC_HELP_STRING([--enable-examples],
28 [Build example programs])],
29 [ENABLE_EXAMPLES=$enableval],
30 [ENABLE_EXAMPLES="no"])
31
32if test x$ENABLE_EXAMPLES = xyes; then
33 MAYBE_EXAMPLES="examples"
34fi
35AC_SUBST(MAYBE_EXAMPLES)
36
37case $host in
38 *darwin*)
39 RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
40 ;;
41 *solaris*)
42 AC_CHECK_HEADERS([sys/filio.h])
43 if test x$ENABLE_EXAMPLES = xyes; then
44 AC_CHECK_LIB([socket], [main], , [AC_MSG_ERROR([Can not find required library])])
45 AC_CHECK_LIB([nsl], [main], , [AC_MSG_ERROR([Can not find required library])])
46 fi
47 ;;
48 *)
49 ;;
50esac
51
52AC_SUBST(RPCGENFLAGS)
53
54#output
55AC_CONFIG_FILES([Makefile]
56 [include/Makefile]
57 [lib/Makefile]
58 [mount/Makefile]
59 [nfs/Makefile]
60 [portmap/Makefile]
61 [rquota/Makefile]
62 [examples/Makefile]
63 )
64
65AC_OUTPUT