[gpm] [PATCH 4/4] configure: shrink code
- From: Rémi Cardona <remi gentoo org>
- To: gnome-power-manager-list gnome org
- Subject: [gpm] [PATCH 4/4] configure: shrink code
- Date: Tue, 8 Dec 2009 11:08:52 +0100
Signed-off-by: Rémi Cardona <remi gentoo org>
---
configure.ac | 96 +++++++++++++++++-----------------------------------------
1 files changed, 28 insertions(+), 68 deletions(-)
diff --git a/configure.ac b/configure.ac
index a01d878..59596de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,43 +141,24 @@ AC_SUBST(XRANDR_REQUIRED)
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0)
-
-PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk >= $CANBERRA_REQUIRED)
-
-PKG_CHECK_MODULES(DBUS,[
- dbus-glib-1 >= $DBUS_GLIB_REQUIRED
- dbus-1 >= $DBUS_REQUIRED
- gthread-2.0])
-
-PKG_CHECK_MODULES(GNOME, [
- libwnck-1.0 >= $LIBWNCK_REQUIRED
- gtk+-2.0 >= $GTK_REQUIRED
- gconf-2.0 >= $GCONF_REQUIRED
- gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
- cairo >= $CAIRO_REQUIRED])
-
-PKG_CHECK_MODULES(PANEL, [
- libpanelapplet-2.0 >= $LIBPANEL_REQUIRED])
-
-PKG_CHECK_MODULES(GDK, [
- gdk-2.0 >= $GDK_REQUIRED
- gdk-x11-2.0 >= $GDK_REQUIRED])
-
-PKG_CHECK_MODULES(X11, [
- xrandr >= $XRANDR_REQUIRED
- xrender x11 xext xproto])
-
-PKG_CHECK_EXISTS(
- [xrandr >= 1.3],
- [AC_DEFINE(HAVE_XRANDR_13, 1, [xrandr 1.3 available])])
-
-PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
-
-PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
-
-PKG_CHECK_MODULES(DEVKIT, [
- devkit-power-gobject >= $DEVKIT_POWER_REQUIRED])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= $GLIB_REQUIRED gobject-2.0])
+PKG_CHECK_MODULES(CANBERRA, [libcanberra-gtk >= $CANBERRA_REQUIRED])
+PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= $DBUS_GLIB_REQUIRED
+ dbus-1 >= $DBUS_REQUIRED gthread-2.0])
+PKG_CHECK_MODULES(GNOME, [libwnck-1.0 >= $LIBWNCK_REQUIRED
+ gtk+-2.0 >= $GTK_REQUIRED
+ gconf-2.0 >= $GCONF_REQUIRED
+ gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
+ cairo >= $CAIRO_REQUIRED])
+PKG_CHECK_MODULES(PANEL, [libpanelapplet-2.0 >= $LIBPANEL_REQUIRED])
+PKG_CHECK_MODULES(GDK, [gdk-2.0 >= $GDK_REQUIRED gdk-x11-2.0 >= $GDK_REQUIRED])
+PKG_CHECK_MODULES(X11, [xrandr >= $XRANDR_REQUIRED xrender x11 xext xproto])
+PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= $LIBNOTIFY_REQUIRED])
+PKG_CHECK_MODULES(UNIQUE, [unique-1.0 >= $UNIQUE_REQUIRED])
+PKG_CHECK_MODULES(DEVKIT, [devkit-power-gobject >= $DEVKIT_POWER_REQUIRED])
+
+PKG_CHECK_EXISTS([xrandr >= 1.3],
+ [AC_DEFINE(HAVE_XRANDR_13, 1, [xrandr 1.3 available])])
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
@@ -207,13 +188,9 @@ dnl - Where should we put documentation ?
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(doc-dir,
AS_HELP_STRING([--with-doc-dir=<dir>],
- [directory to install documentation]))
-
-if ! test -z "$with_doc_dir"; then
- DOCDIR="$with_doc_dir/gnome-power-manager-$VERSION"
-else
- DOCDIR="$DATADIR/doc/gnome-power-manager-$VERSION"
-fi
+ [directory to install documentation]),
+ [DOCDIR="$with_doc_dir/gnome-power-manager-$VERSION"],
+ [DOCDIR="$DATADIR/doc/gnome-power-manager-$VERSION"])
AC_SUBST(DOCDIR)
dnl ---------------------------------------------------------------------------
@@ -256,10 +233,8 @@ AC_ARG_ENABLE(gconf-defaults,
AC_MSG_CHECKING([whether to support gconf defaults])
if test x$have_gconfdefaults = xyes ; then
AC_DEFINE(HAVE_GCONF_DEFAULTS, 1, [Define if have gconf defaults])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
fi
+AC_MSG_RESULT([$have_gconfdefaults])
AM_CONDITIONAL([HAVE_GCONF_DEFAULTS], [test $have_gconfdefaults = yes])
dnl ---------------------------------------------------------------------------
@@ -275,10 +250,8 @@ have_applets=no
if test x$enable_applets = xyes ; then
have_applets=yes
AC_DEFINE(HAVE_APPLETS, 1, [Define if we are building applets])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
fi
+AC_MSG_RESULT([$have_applets])
AM_CONDITIONAL([HAVE_APPLETS], [test $have_applets = yes])
dnl ---------------------------------------------------------------------------
@@ -291,22 +264,15 @@ AC_ARG_ENABLE(docbook-docs,
AC_PATH_PROG(XMLTO, xmlto, no)
AC_MSG_CHECKING([whether to build DocBook documentation])
-if test x$XMLTO = xno ; then
- have_docbook=no
-else
- have_docbook=yes
-fi
if test x$enable_docbook_docs = xauto ; then
- if test x$have_docbook = xno ; then
+ if test x$XMLTO = xno ; then
enable_docbook_docs=no
else
enable_docbook_docs=yes
fi
fi
-if test x$enable_docbook_docs = xyes; then
- if test x$have_docbook = xno; then
+if test x$enable_docbook_docs = xyes -a x$XMLTO = xno; then
AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
- fi
fi
AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
AC_MSG_RESULT(yes)
@@ -316,14 +282,9 @@ dnl - Are we specifying a different dbus root ?
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(dbus-services,
AS_HELP_STRING([--with-dbus-services=<dir>],
- [where D-BUS services directory is]))
-
-if ! test -z "$with_dbus_services" ; then
- DBUS_SERVICES_DIR="$with_dbus_services"
-else
- # D-BUS 0.23 and higher use $prefix/share/dbus-1/services
- DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
-fi
+ [where D-BUS services directory is]),
+ [DBUS_SERVICES_DIR="$with_dbus_services"],
+ [DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"])
AC_SUBST(DBUS_SERVICES_DIR)
dnl ---------------------------------------------------------------------------
@@ -332,7 +293,6 @@ dnl ---------------------------------------------------------------------------
GPM_EXTRA_LIBS="-lresolv"
-AC_MSG_CHECKING(for Solaris kstat)
AC_CHECK_LIB(kstat, kstat_open,
[
AC_DEFINE(HAVE_KSTAT, 1, [Define if Solaris kstat is support])
--
1.6.5.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]