X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=57ffa42594bf8ed03aec78adf31793ea967f1e3d;hb=4051c868959c72f0aae71b0d5314e4dd86fac3ef;hp=c10184091d98ac07aee9c842e3251ded1da94604;hpb=fcfe3c6975bfc047988b6219c0d1fec41ef26db4;p=psensor.git diff --git a/configure.ac b/configure.ac index c101840..57ffa42 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,11 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([psensor], [0.7.0.0],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) +AC_INIT([psensor], [0.8.0.x],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) AM_INIT_AUTOMAKE([-Wall -Werror gnu]) -AC_CONFIG_SRCDIR([src/compat.h]) +AC_CONFIG_SRCDIR([src/ui.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. @@ -18,7 +18,7 @@ AC_PROG_RANLIB # Checks for header files. AC_PATH_X -AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h getopt.h]) +AC_CHECK_HEADERS([stdbool.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -32,8 +32,17 @@ AC_CHECK_FUNCS([gettimeofday memmove socket strdup strtol]) AM_GNU_GETTEXT_VERSION([0.16]) AM_GNU_GETTEXT([external]) +# Gconf +AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +AM_GCONF_SOURCE_2 + ############### common +# Checks pthread +AC_CHECK_LIB(pthread, pthread_create) +PTHREAD_LIBS=-pthread +AC_SUBST(PTHREAD_LIBS) + # Checks sensors, required by psensor and psensor-server AC_CHECK_LIB(sensors, sensors_init) AC_CHECK_HEADERS([sensors/sensors.h sensors/errors.h]) @@ -65,7 +74,10 @@ AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) # Check GCONF -PKG_CHECK_MODULES(GCONF, gconf-2.0) +PKG_CHECK_MODULES(GCONF, gconf-2.0, + [AC_DEFINE([HAVE_GCONF2],[1],[Use gconf2])], + [AC_MSG_WARN("gconf2 not present")]) +AM_CONDITIONAL(GCONF, test -n "$GCONF_LIBS") AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONF_LIBS) @@ -129,9 +141,18 @@ AC_SUBST(CURL_LIBS) # Check JSON, needed for remote monitoring JSON_LIBS= PKG_CHECK_MODULES(JSON, - json, - [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], - [AC_MSG_WARN("Remote monitoring disabled, json missing")]) + 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) @@ -228,6 +249,7 @@ AC_SUBST(GTOP_LIBS) AC_CONFIG_FILES([ Makefile + doc/Makefile src/Makefile src/glade/Makefile src/lib/Makefile @@ -250,4 +272,7 @@ AC_CONFIG_FILES([ AC_CHECK_PROGS([HELP2MAN], [help2man]) +AC_CHECK_PROG(HAVE_CPPCHECK, cppcheck, yes) +AM_CONDITIONAL(CPPCHECK, test -n "$HAVE_CPPCHECK") + AC_OUTPUT