[gnome-panel/merge-gnome-applets] configure.ac: add remaining parts from gnome-applets/configure.ac



commit 06fbda3ef4b44868bdb6f58dfd87542e524d1bd5
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Jun 17 10:59:58 2014 +0300

    configure.ac: add remaining parts from gnome-applets/configure.ac

 configure.ac               |  147 +++++++++++++++++++++++++++++++
 gnome-applets/configure.ac |  206 --------------------------------------------
 2 files changed, 147 insertions(+), 206 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 17dc7e1..7354129 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,7 @@ AC_SUBST([LIBPANEL_APPLET_API_VERSION],[$LIBPANEL_APPLET_API_VERSION])
 LIB_PANEL_APPLET_LT_VERSION=1:1:1
 AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)
 
+AM_MAINTAINER_MODE
 GNOME_MAINTAINER_MODE_DEFINES
 
 AC_ARG_ENABLE([documentation],
@@ -31,8 +32,15 @@ LT_PREREQ([2.2.6])
 LT_INIT([dlopen disable-static])
 
 IT_PROG_INTLTOOL([0.40.6])
+PKG_PROG_PKG_CONFIG([0.19])
 
 AC_PROG_CC
+AC_ISC_POSIX
+AC_STDC_HEADERS
+AM_PROG_LIBTOOL
+AC_PATH_XTRA
+
+LT_LIB_M
 
 AM_PATH_PYTHON
 AM_CHECK_PYTHON_HEADERS(HAVE_PYHDRS="yes", HAVE_PYHDRS="no")
@@ -62,6 +70,48 @@ if test "x$enable_deprecation_flags" = "xyes"; then
    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 fi
 
+dnl ***************************************************************************
+dnl *** --enable-more-warnings turns on more compiler warnings              ***
+dnl ***************************************************************************
+AC_ARG_ENABLE(more-warnings,
+[  --enable-more-warnings  Maximum compiler warnings],
+set_more_warnings="$enableval",[
+    set_more_warnings=no
+])
+AC_MSG_CHECKING(for more warnings, including -Werror)
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+    AC_MSG_RESULT(yes)
+    CFLAGS="\
+    -Wall \
+    -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
+    -Wnested-externs -Wpointer-arith \
+    -Wcast-align -Wsign-compare \
+    -std=gnu89 \
+    $CFLAGS"
+
+    for option in -Wno-strict-aliasing -Wno-sign-compare; do
+        SAVE_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $option"
+        AC_MSG_CHECKING([whether gcc understands $option])
+        AC_TRY_COMPILE([], [],
+            has_option=yes,
+            has_option=no,)
+        if test $has_option = no; then
+            CFLAGS="$SAVE_CFLAGS"
+        fi
+        AC_MSG_RESULT($has_option)
+        unset has_option
+        unset SAVE_CFLAGS
+    done
+    unset option
+else
+    AC_MSG_RESULT(no)
+fi
+dnl ***************************************************************************
+
+dnl Check for non-portable headers
+AC_CHECK_HEADERS([pty.h values.h])
+
 AC_CHECK_HEADERS(crt_externs.h)
 AC_CHECK_FUNCS(_NSGetEnviron)
 
@@ -91,6 +141,9 @@ LIBNOTIFY_REQUIRED=0.7
 GST10_REQUIRED=0.10.2
 LIBGTOP_REQUIRED=2.11.92
 LIBXML_REQUIRED=2.5.0
+GIO_REQUIRED=2.15.3
+LIBXKLAVIER_REQUIRED=4.0
+GNOME_ICON_THEME_REQUIRED=2.15.91
 
 dnl pkg-config dependency checks
 
@@ -321,6 +374,55 @@ case $host in
        ;;
 esac
 
+case "$host" in
+       sparc-*-solaris*)       gkb_type_sun=true;;
+       *)                      gkb_type_sun=false;;
+esac
+AM_CONDITIONAL(GKB_SUN, $gkb_type_sun)
+
+dnl -- gdk-pixbuf-csource -----------------------------------------------------
+AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
+
+if test x"$GDK_PIXBUF_CSOURCE" = xno; then
+  AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
+fi
+AC_SUBST(GDK_PIXBUF_CSOURCE)
+
+dnl -- xsltproc ---------------------------------------------------------------
+AC_PATH_PROG(XSLTPROC, xsltproc, no)
+if test x"$XSLTPROC" = xno; then
+  AC_MSG_ERROR([xsltproc executable not found in your path - should be installed with libxslt])
+fi
+
+dnl -- scrollkeeper -----------------------------------------------------------
+AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config, no)
+if test x$SCROLLKEEPER_CONFIG = xno; then
+  AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the Scrollkeeper 0.1.4 package)
+fi
+AC_SUBST(SCROLLKEEPER_REQUIRED)
+
+dnl -- jw ---------------------------------------------------------------------
+AC_PATH_PROG(JW, jw, no)
+if test x$JW = xno; then
+  HAVE_JW="no"
+else
+  HAVE_JW="yes"
+fi
+AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
+AC_SUBST(HAVE_JW)
+
+dnl -- Check for gnome-icon-theme (required) ----------------------------------
+PKG_CHECK_MODULES(GIT, gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED)
+
+dnl -- check for gio (required) ------------------------------------------
+PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQUIRED)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= $GIO_REQUIRED)
+AC_SUBST(GIO_UNIX_CFLAGS)
+AC_SUBST(GIO_UNIX_LIBS)
+
 dnl -- check for libnotify (optional) -----------------------------------------
 LIBNOTIFY_CFLAGS=
 LIBNOTIFY_LIBS=
@@ -510,6 +612,51 @@ AC_SUBST(MIXER_CFLAGS)
 AC_SUBST(MIXER_LIBS)
 
 dnl ***************************************************************************
+dnl *** Check for getaddrinfo                                               ***
+dnl ***************************************************************************
+have_getaddrinfo=no
+AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
+if test $have_getaddrinfo != yes; then
+  # getaddrinfo is not in the default libraries.  See if it's in some other.
+  for lib in bsd socket inet; do
+    AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break])
+  done
+fi
+if test $have_getaddrinfo = yes; then
+  AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo() exists on the system])
+fi
+
+dnl ***************************************************************************
+dnl *** Check for presence of tm.tm_gmtoff on the system                    ***
+dnl ***************************************************************************
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],[struct_tm_tm_gmtoff=true],[struct_tm_tm_gmtoff=false],[#include 
<time.h>])
+case $struct_tm_tm_gmtoff in
+        true)
+                AC_DEFINE_UNQUOTED(HAVE_TM_TM_GMOFF, 1, Have the tm.tm_gmtoff member.)
+                ;;
+        *)
+                AC_CHECK_DECL(timezone,AC_DEFINE(HAVE_TIMEZONE,1,Have timezone),,
+[
+#include <time.h>
+])
+                ;;
+esac
+
+dnl ***************************************************************************
+dnl *** _NL_MEASUREMENT_MEASUREMENT is an enum and not a define             ***
+dnl ***************************************************************************
+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+  AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
+            [Define if _NL_MEASUREMENT_MEASUREMENT is available])
+fi
+
+dnl ***************************************************************************
 dnl *** Check if IPv6 is available                                          ***
 dnl ***************************************************************************
 AC_MSG_CHECKING([whether to enable ipv6])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]