X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=7b0aa271be15ff0bb07a4bbe849f4ca19402e1d8;hb=244e0904d73dd3d995d014def169f2a85f77c223;hp=8cbeefd12c038cc204808d84c4fabde5d47edafb;hpb=50cb5b56107bbbdc5eb1565404015efaba66bed4;p=ppastats.git diff --git a/configure.ac b/configure.ac index 8cbeefd..7b0aa27 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([ppastats], [0.0.x],[jeanfi@gmail.com],[ppastats],[http://wpitchoune.net/ppastats]) +AC_INIT([ppastats], [1.3.2],[jeanfi@gmail.com],[ppastats],[http://wpitchoune.net/ppastats]) -AM_INIT_AUTOMAKE([-Wall -Werror gnu]) +AM_INIT_AUTOMAKE([-Wall gnu]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([config.h]) @@ -29,18 +29,41 @@ PKG_CHECK_MODULES(CURL, libcurl ) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LIBS) -# Checks JSON -PKG_CHECK_MODULES(JSON, json ) +# Checks JSON +JSON_LIBS= +PKG_CHECK_MODULES(JSON, + json-c, + [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], + [AC_MSG_WARN("json-c missing")]) + +if test "$JSON_LIBS" == ""; then +PKG_CHECK_MODULES(JSON, + json, + [AC_DEFINE([HAVE_JSON],[1],[Use JSON]) + AC_DEFINE([HAVE_JSON_0],[1],[Use JSON0])], + [AC_MSG_WARN("json0 missing")]) +fi + +AM_CONDITIONAL(JSON, test -n "$JSON_LIBS") AC_SUBST(JSON_CFLAGS) AC_SUBST(JSON_LIBS) +AC_CHECK_TYPE(json_bool, [AC_DEFINE([HAVE_JSON_BOOL], 1, [Use json_bool])], [], [[#include ]]) + AC_CONFIG_FILES([ po/Makefile.in Makefile src/Makefile tests/Makefile - www/Makefile + themes/Makefile + themes/default/css/Makefile + themes/default/js/Makefile + themes/default/templates/Makefile + themes/default/templates/footer.tpl ]) AC_CHECK_PROGS([HELP2MAN], [help2man]) +AC_CHECK_PROG(HAVE_CPPCHECK, cppcheck, yes) +AM_CONDITIONAL(CPPCHECK, test -n "$HAVE_CPPCHECK") + AC_OUTPUT