Add following events: PSTATE, REPEAT, RANDOM, CONSUME, SINGLE, SONGID
[mpdcron.git] / configure.ac
blob10d6bcd84f534498885903a098f8cd8912ea178e
1 AC_PREREQ(2.60)
2 AC_INIT(mpdcron, 0.01~git, mpdcron)
3 AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2])
4 AM_CONFIG_HEADER([config.h])
6 AC_PROG_CC_C99
9 dnl
10 dnl OS specific defaults
11 dnl
13 AC_CANONICAL_HOST
15 case "$host_os" in
16 mingw32* | windows*)
17         LIBS="$LIBS -lws2_32"
18         ;;
19 esac
22 dnl
23 dnl libraries
24 dnl
26 PKG_CHECK_MODULES([LIBMPDCLIENT], [libmpdclient >= 2.0],,
27         [AC_MSG_ERROR([libmpdclient2 is required])])
29 dnl
30 dnl build options
31 dnl
33 AC_ARG_ENABLE(werror,
34         AS_HELP_STRING([--enable-werror],
35                 [treat warnings as errors (default: disabled)]),,
36         enable_werror=no)
38 if test "x$enable_werror" = xyes; then
39         AM_CFLAGS="$AM_CFLAGS -Werror -pedantic-errors"
42 AC_ARG_ENABLE(debug,
43         AS_HELP_STRING([--enable-debug],
44                 [enable debugging (default: disabled)]),,
45         enable_debug=no)
47 if test "x$enable_debug" = xno; then
48         AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
52 dnl
53 dnl CFLAGS
54 dnl
56 AC_SUBST(AM_CFLAGS)
58 CHECK_CFLAG([-Wall])
59 CHECK_CFLAG([-Wextra])
60 CHECK_CFLAG([-Wno-deprecated-declarations])
61 CHECK_CFLAG([-Wmissing-prototypes])
62 CHECK_CFLAG([-Wdeclaration-after-statement])
63 CHECK_CFLAG([-Wshadow])
64 CHECK_CFLAG([-Wpointer-arith])
65 CHECK_CFLAG([-Wstrict-prototypes])
66 CHECK_CFLAG([-Wcast-qual])
67 CHECK_CFLAG([-Wwrite-strings])
70 dnl
71 dnl Generate output files
72 dnl
74 AC_OUTPUT(Makefile)