summaryrefslogtreecommitdiff
path: root/configure.in
blob: be5c368f018df80c1547a36d79dd915dd75da9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
dnl Process this file with autoconf to produce a configure script.
AC_INIT(rrdui, 0.3, nielsen@memberwebs.com)
AM_INIT_AUTOMAKE(rrdui, 0.3)

LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include"

AC_CONFIG_SRCDIR([tools/rrdui-cgi.c])
AM_CONFIG_HEADER([config.h])

CFLAGS="$CFLAGS -Wall"

# Debug mode
AC_ARG_ENABLE(debug,
        AC_HELP_STRING([--enable-debug],
        [Compile binaries in debug mode]))

if test "$enable_debug" = "yes"; then
    CFLAGS="$CFLAGS -g -O0"
    AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
    echo "enabling debug compile mode"
fi

dnl Check for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

dnl Checks for libraries
AC_CHECK_LIB(rrd, rrd_update, ,
    [echo "ERROR: librrd not found."; exit 1])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

AC_HEADER_STDC

AC_MSG_RESULT()

AC_CONFIG_FILES([Makefile tools/Makefile www/Makefile])
AC_OUTPUT