X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=60cece3c95283bd1eb5c2bfd219382fcea7faaf0;hb=677d2bfc3beae998b73f48a4be3036f09d6848ff;hp=e11923f3f17c1e9ce3ae3aafb4649e0cc0448286;hpb=91119f38b1102166475467dc0cee470bac61f01c;p=ppastats.git diff --git a/configure.ac b/configure.ac index e11923f..60cece3 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.3],[jeanfi@gmail.com],[ppastats],[http://wpitchoune.net/ppastats]) +AC_INIT([ppastats], [1.0.x],[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]) @@ -16,28 +16,53 @@ AM_PROG_CC_C_O # Checks lib build AC_PROG_RANLIB +# Intl support +AM_GNU_GETTEXT_VERSION([0.18.1]) +AM_GNU_GETTEXT([external]) + # Checks for header files. AC_PATH_X -AC_CHECK_HEADERS([stdlib.h getopt.h]) +AC_CHECK_HEADERS([getopt.h stdio.h stdlib.h string.h sys/stat.h sys/time.h sys/types.h time.h]) # Checks CURL 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([ +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) + AC_OUTPUT