X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=6ce3fbda823a321cc796e9b5c589c5beb84ad471;hb=08f8ffe30eede149c1b3b2b4ab638506060ea4a1;hp=fed2bd31f930a35db1495cc3bef385ebafa1c13b;hpb=b9e061f09a25f4b62ed200b27d6b260a8a51fc60;p=psensor.git diff --git a/configure.ac b/configure.ac index fed2bd3..6ce3fbd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([psensor], [1.1.0],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) +AC_INIT([psensor], [1.1.0.x],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) AM_INIT_AUTOMAKE([-Wall gnu]) @@ -26,22 +26,9 @@ AM_PROG_AR AC_PATH_X AC_CHECK_HEADERS([stdbool.h]) -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T - -# Checks for library functions. -AC_FUNC_MALLOC -AC_FUNC_REALLOC -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 - # Gsettings GLIB_GSETTINGS @@ -72,8 +59,10 @@ AM_CONDITIONAL(XEXT, test -n "$XEXT_LIBS") AC_SUBST(XEXT_CFLAGS) AC_SUBST(XEXT_LIBS) -# Checks GTK+ 3.0 -PKG_CHECK_MODULES(GTK, gtk+-3.0,,[AC_MSG_WARN("gtk missing psensor will not be built")]) +# Check GTK+ 3.0 +PKG_CHECK_MODULES(GTK, + [gtk+-3.0 >= 3.4],, + [AC_MSG_WARN("gtk missing psensor will not be built")]) AM_CONDITIONAL(GTK, test -n "$GTK_LIBS") # ensure that only allowed headers are included GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES " @@ -85,17 +74,16 @@ GTK_CFLAGS+=" -DGSEAL_ENABLE " AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -# Check GCONF -PKG_CHECK_MODULES(GCONF, gconf-2.0, - [AC_DEFINE([HAVE_GCONF2],[1],[Use gconf2])], - [AC_MSG_WARN("gconf2 missing psensor will not be built")]) -AM_CONDITIONAL(GCONF, test -n "$GCONF_LIBS") -AC_SUBST(GCONF_CFLAGS) -AC_SUBST(GCONF_LIBS) +# Check udisks2 +PKG_CHECK_MODULES(LIBUDISKS2, + udisks2, + [AC_DEFINE([HAVE_LIBUDISKS2],[1],[Use libudisks])], + [AC_MSG_WARN("Library udisks2 not present")]) +AM_CONDITIONAL(LIBUDISKS2, test -n "$LIBUDISKS2_LIBS") +AC_SUBST(LIBUDISKS2_CFLAGS) +AC_SUBST(LIBUDISKS2_LIBS) -### Optional - -# check libatasmart +# Check libatasmart PKG_CHECK_MODULES(ATASMART, libatasmart, [AC_DEFINE([HAVE_ATASMART],[1],[Use libatasmart])], [AC_MSG_WARN("Library atasmart not present")]) @@ -116,26 +104,9 @@ AC_SUBST(LIBNOTIFY_LIBS) # Checks AppIndicator APPINDICATOR_LIBS= - PKG_CHECK_MODULES(APPINDICATOR, appindicator3-0.1, [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator3-0.1])], [AC_MSG_WARN(AppIndicator 3-0.1 not present")]) - -if test "$APPINDICATOR_LIBS" == ""; then - PKG_CHECK_MODULES(APPINDICATOR, - appindicator-0.1 <= 0.2.9 , - [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator 0.2.9]) - AC_DEFINE([HAVE_APPINDICATOR_029],[1],[Use AppIndicator 0.2.9]) - ], - [AC_MSG_WARN(AppIndicator 0.2.9 not present")]) -fi - -if test "$APPINDICATOR_LIBS" == ""; then - PKG_CHECK_MODULES(APPINDICATOR, - appindicator-0.1 > 0.2.9, - [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator > 0.2.9])], - [AC_MSG_WARN("AppIndicator > 0.2.9 not present")]) -fi AM_CONDITIONAL(APPINDICATOR, test -n "$APPINDICATOR_LIBS") AC_SUBST(APPINDICATOR_CFLAGS) AC_SUBST(APPINDICATOR_LIBS) @@ -153,13 +124,13 @@ AC_SUBST(CURL_LIBS) # Check JSON, needed for remote monitoring JSON_LIBS= PKG_CHECK_MODULES(JSON, - json-c, + json-c >= 0.11.99, [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], [AC_MSG_WARN("json-c missing")]) if test "$JSON_LIBS" == ""; then PKG_CHECK_MODULES(JSON, - json, + json >= 0.11.99, [AC_DEFINE([HAVE_JSON],[1],[Use JSON]) AC_DEFINE([HAVE_JSON_0],[1],[Use JSON0])], [AC_MSG_WARN("json0 missing")]) @@ -207,7 +178,7 @@ AC_SUBST(UNITY_CFLAGS) AC_SUBST(UNITY_LIBS) AM_CONDITIONAL(UNITY, test -n "$UNITY_LIBS") -# libatiadl +# Check libatiadl AC_ARG_WITH(libatiadl, [ --with-libatiadl[=DIR] use libatiadlxx in DIR],[ ATIADL_DIR=${withval} @@ -230,7 +201,7 @@ AC_SUBST(LIBATIADL_LIBS) ############### psensor-server -# libmicrohttpd, mandatory for psensor-server +# Check libmicrohttpd, mandatory for psensor-server LIBMICROHTTPD_LIBS= PKG_CHECK_MODULES(LIBMICROHTTPD, libmicrohttpd, @@ -240,8 +211,7 @@ AM_CONDITIONAL(LIBMICROHTTPD, test -n "$LIBMICROHTTPD_LIBS") AC_SUBST(LIBMICROHTTPD_CFLAGS) AC_SUBST(LIBMICROHTTPD_LIBS) -# GTop, optional - +# Check gtop2, optional AC_ARG_WITH(gtop, [ --with-gtop[=yes|no] use gtop],[ with_gtop=$withval],[