From: Jean-Philippe Orsini Date: Sun, 19 May 2013 08:27:15 +0000 (+0000) Subject: gconf optional X-Git-Tag: v0.8.0.5~62 X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=427d5d13aea3d3010e928274533907aa99a94df7 gconf optional --- diff --git a/config.h.in b/config.h.in index ac3f2c5..32c3bfd 100644 --- a/config.h.in +++ b/config.h.in @@ -31,6 +31,9 @@ */ #undef HAVE_DCGETTEXT +/* Use gconf2 */ +#undef HAVE_GCON2 + /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT diff --git a/configure b/configure index ce52a9c..9b1dc4e 100755 --- a/configure +++ b/configure @@ -670,6 +670,8 @@ ATASMART_FALSE ATASMART_TRUE ATASMART_LIBS ATASMART_CFLAGS +GCONF_FALSE +GCONF_TRUE GCONF_LIBS GCONF_CFLAGS GTK_LIBS @@ -7648,42 +7650,33 @@ fi # Put the nasty error message in config.log where it belongs echo "$GCONF_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (gconf-2.0) were not met: - -$GCONF_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gconf2 not present\"" >&5 +$as_echo "$as_me: WARNING: \"gconf2 not present\"" >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables GCONF_CFLAGS -and GCONF_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gconf2 not present\"" >&5 +$as_echo "$as_me: WARNING: \"gconf2 not present\"" >&2;} else GCONF_CFLAGS=$pkg_cv_GCONF_CFLAGS GCONF_LIBS=$pkg_cv_GCONF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"gconf2 not present\"" >&5 -$as_echo "$as_me: WARNING: \"gconf2 not present\"" >&2;} + +$as_echo "#define HAVE_GCON2 1" >>confdefs.h + +fi + if test -n "$GCONF_LIBS"; then + GCONF_TRUE= + GCONF_FALSE='#' +else + GCONF_TRUE='#' + GCONF_FALSE= fi + ### Optional # check libatasmart @@ -8959,6 +8952,10 @@ if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_F as_fn_error $? "conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GCONF_TRUE}" && test -z "${GCONF_FALSE}"; then + as_fn_error $? "conditional \"GCONF\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ATASMART_TRUE}" && test -z "${ATASMART_FALSE}"; then as_fn_error $? "conditional \"ATASMART\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 7ec9779..994ac01 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,10 @@ AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) # Check GCONF -PKG_CHECK_MODULES(GCONF, gconf-2.0, [AC_MSG_WARN("gconf2 not present")]) +PKG_CHECK_MODULES(GCONF, gconf-2.0, + [AC_DEFINE([HAVE_GCON2],[1],[Use gconf2])], + [AC_MSG_WARN("gconf2 not present")]) +AM_CONDITIONAL(GCONF, test -n "$GCONF_LIBS") AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONF_LIBS) diff --git a/po/Makefile.in b/po/Makefile.in index a45906f..ccdb387 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -21,7 +21,7 @@ srcdir = . top_srcdir = .. -prefix = /usr +prefix = /usr/local exec_prefix = ${prefix} datarootdir = ${prefix}/share datadir = ${datarootdir}