Commit | Line | Data |
---|---|---|
84004dbf | 1 | AC_PREREQ(2.50) |
6c437065 TN |
2 | AC_INIT([libnfs], [1.0.0]) |
3 | AC_CONFIG_HEADERS([config.h]) | |
4 | AM_INIT_AUTOMAKE([foreign]) | |
5 | AC_CANONICAL_HOST | |
84004dbf | 6 | |
6c437065 TN |
7 | # Work around stupid autoconf default cflags. pt 1 |
8 | SAVE_CFLAGS="x${CFLAGS}" | |
84004dbf | 9 | |
6c437065 TN |
10 | AC_PROG_CC |
11 | AC_PROG_LIBTOOL | |
84004dbf | 12 | |
6c437065 | 13 | AM_PROG_CC_C_O |
84004dbf | 14 | |
6c437065 TN |
15 | # Work around stupid autoconf default cflags. pt 2 |
16 | if test "$SAVE_CFLAGS" = "x"; then | |
17 | CFLAGS="" | |
84004dbf | 18 | fi |
e644e700 | 19 | |
6c437065 TN |
20 | AC_CHECK_PROG([HAVE_RPCGEN], [rpcgen], [yes], [no]) |
21 | if test x$HAVE_RPCGEN != xyes; then | |
22 | AC_MSG_ERROR([Can not find required program]) | |
d20a6d6b SR |
23 | fi |
24 | ||
6c437065 TN |
25 | # option: logdir |
26 | AC_ARG_WITH([logdir], | |
27 | [AC_HELP_STRING([--with-logdir=DIR], | |
28 | [path to log directory [[LOCALSTATEDIR/log]]])], | |
29 | [LOGDIR=$withval], | |
30 | [LOGDIR='${localstatedir}/log']) | |
31 | ||
32 | #if test ! -d "$LOGDIR"; then | |
33 | # AC_MSG_ERROR([--with-logdir must specify a path]) | |
34 | #fi | |
35 | AC_SUBST(LOGDIR) | |
84004dbf | 36 | |
6c437065 TN |
37 | #option: examples |
38 | AC_ARG_ENABLE([examples], | |
39 | [AC_HELP_STRING([--enable-examples], | |
40 | [Build example programs])], | |
41 | [ENABLE_EXAMPLES=$enableval], | |
42 | [ENABLE_EXAMPLES="no"]) | |
43 | AM_CONDITIONAL(EXAMPLES, [test x$ENABLE_EXAMPLES = xyes]) | |
44 | AM_COND_IF(EXAMPLES, | |
45 | [MAYBE_EXAMPLES="examples"] | |
46 | [config_examples="examples/Makefile"]) | |
47 | AC_SUBST(MAYBE_EXAMPLES) | |
48 | ||
49 | #output | |
50 | AC_CONFIG_FILES([Makefile] | |
51 | [include/Makefile] | |
52 | [lib/Makefile] | |
53 | [mount/Makefile] | |
54 | [nfs/Makefile] | |
55 | [portmap/Makefile] | |
56 | [rquota/Makefile] | |
57 | [examples/Makefile] | |
58 | ) | |
59 | ||
60 | AC_OUTPUT |