X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=configure.ac;h=c10184091d98ac07aee9c842e3251ded1da94604;hb=fcfe3c6975bfc047988b6219c0d1fec41ef26db4;hp=51f2670eb1bebf5c718b99d52156a7ddb6ce8c93;hpb=22028eb2107acc13c8da4a9203d3c8c83f5c53f9;p=psensor.git diff --git a/configure.ac b/configure.ac index 51f2670..c101840 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([psensor], [0.6.2.15],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) +AC_INIT([psensor], [0.7.0.0],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor]) AM_INIT_AUTOMAKE([-Wall -Werror gnu]) @@ -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 sys/sysinfo.h]) +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]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -29,14 +29,6 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([gettimeofday memmove socket strdup strtol]) -# Detects whether the function sysinfo is available -# At least kfreebsd 6.0.3 does not provide it. -SYSINFO_FCT= -AC_CHECK_FUNC(sysinfo, - [SYSINFO_FCT='1' AC_DEFINE([HAVE_SYSINFO_FCT],[1],[Use sysinfo])], - [AC_MSG_WARN("sysinfo function not present")]) -AM_CONDITIONAL(SYSINFO_FCT, test -n "$SYSINFO_FCT") - AM_GNU_GETTEXT_VERSION([0.16]) AM_GNU_GETTEXT([external]) @@ -60,23 +52,18 @@ PKG_CHECK_MODULES(XEXT, xext) AC_SUBST(XEXT_CFLAGS) AC_SUBST(XEXT_LIBS) -# Checks GTK -GTK_LIBS= -PKG_CHECK_MODULES(GTK, - gtk+-3.0, - [AC_DEFINE([HAVE_GTK3],[1],[Use GTK3])], - [AC_MSG_WARN("GTK+ 3 not present")]) -AM_CONDITIONAL(GTK, test -n "$GTK_LIBS") +# Checks GTK+ 3.0 +PKG_CHECK_MODULES(GTK, gtk+-3.0) +# ensure that only allowed headers are included +GTK_CFLAGS+=" -DGTK_DISABLE_SINGLE_INCLUDES " +# ensure that no gtk deprecated symbols are used +GTK_CFLAGS+=" -DGDK_DISABLE_DEPRECATED " +GTK_CFLAGS+=" -DGTK_DISABLE_DEPRECATED " +# ensure use of accessors +GTK_CFLAGS+=" -DGSEAL_ENABLE " AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -if test "$GTK_LIBS" == ""; then - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.18) - AM_CONDITIONAL(GTK, test -n "$GTK_LIBS") - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) -fi - # Check GCONF PKG_CHECK_MODULES(GCONF, gconf-2.0) AC_SUBST(GCONF_CFLAGS) @@ -84,6 +71,15 @@ AC_SUBST(GCONF_LIBS) ### Optional +# check libatasmart +PKG_CHECK_MODULES(ATASMART, libatasmart, + [AC_DEFINE([HAVE_ATASMART],[1],[Use libatasmart])], + [AC_MSG_WARN("Library atasmart not present")]) + +AM_CONDITIONAL(ATASMART, test -n "$ATASMART_LIBS") +AC_SUBST(ATASMART_CFLAGS) +AC_SUBST(ATASMART_LIBS) + # Check libnotify LIBNOTIFY_LIBS= PKG_CHECK_MODULES(LIBNOTIFY,