1 AC_INIT(collection, 4.0.0)
2 AC_CONFIG_SRCDIR(src/main.c)
3 AC_CONFIG_HEADERS(src/config.h)
4 AM_INIT_AUTOMAKE(dist-bzip2)
5 AC_LANG(C)
7 AC_PREFIX_DEFAULT("/opt/collection4")
9 #
10 # Check for programs/utilities
11 #
12 AC_PROG_CC
13 AC_PROG_CPP
14 AC_PROG_INSTALL
15 AC_PROG_LEX
16 AC_PROG_YACC
17 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
19 #
20 # Checks for header files.
21 #
22 AC_HEADER_STDC
23 AC_CHECK_HEADERS(stdbool.h sys/types.h sys/socket.h netdb.h)
25 AC_CHECK_HEADERS(fcgiapp.h fcgi_stdio.h rrd.h, [],
26 [AC_MSG_ERROR(a required header file cannot be found.)])
28 AC_CHECK_LIB(fcgi, FCGI_Accept, [],
29 [AC_MSG_ERROR(cannot find libfcgi.)])
30 AC_CHECK_LIB(rrd_th, rrd_graph_v, [],
31 [AC_MSG_ERROR(cannot find librrd_th.)], [-lm])
33 AC_OUTPUT(Makefile share/Makefile src/Makefile)