aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-21 18:27:38 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-21 18:27:38 +0000
commit3f35a3dfc764d4667cb72c5f64172211c843a9c2 (patch)
tree1aaf59616a95c8d54c09321b3eea187b35f3a06b
parent63c71a9d90fef747dd92c68bc89ebfa02df6f04d (diff)
downloadgnunet-gtk-3f35a3dfc764d4667cb72c5f64172211c843a9c2.tar.gz
gnunet-gtk-3f35a3dfc764d4667cb72c5f64172211c843a9c2.zip
use modern pkg_config check for gtk
-rw-r--r--configure.ac10
-rw-r--r--m4/ltsugar.m47
2 files changed, 6 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 8cc98a01..fdcaac53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_PROG_AWK
31AM_PROG_CC_C_O 31AM_PROG_CC_C_O
32AC_PROG_MKDIR_P 32AC_PROG_MKDIR_P
33AC_PROG_CPP 33AC_PROG_CPP
34AC_PROG_CC_C99
34AC_PROG_INSTALL 35AC_PROG_INSTALL
35AC_PROG_LN_S 36AC_PROG_LN_S
36AC_PROG_MAKE_SET 37AC_PROG_MAKE_SET
@@ -242,7 +243,7 @@ AC_SUBST(QR_LIBS)
242 243
243AC_MSG_CHECKING(for gtk) 244AC_MSG_CHECKING(for gtk)
244without_gtk=true 245without_gtk=true
245AM_PATH_GTK_3_0([3.0.0],without_gtk=false,) 246PKG_CHECK_MODULES([GTK], [gtk+-3.0])
246 247
247# test for libunique 248# test for libunique
248AC_ARG_WITH([libunique], AC_HELP_STRING([--without-libunique], [disable libunique])) 249AC_ARG_WITH([libunique], AC_HELP_STRING([--without-libunique], [disable libunique]))
@@ -251,13 +252,6 @@ if test x$with_libunique != xno; then
251 PKG_CHECK_MODULES([unique], [unique-3.0], AC_DEFINE(HAVE_LIBUNIQUE, 1, [Define if libunique is available]), AC_MSG_WARN([libunique would be nice to have])) 252 PKG_CHECK_MODULES([unique], [unique-3.0], AC_DEFINE(HAVE_LIBUNIQUE, 1, [Define if libunique is available]), AC_MSG_WARN([libunique would be nice to have]))
252fi 253fi
253 254
254AM_CONDITIONAL(HAVE_GTK, test x$without_gtk != xtrue)
255if test $without_gtk != true
256then
257 AC_DEFINE_UNQUOTED([HAVE_GTK], 1, [We have GTK])
258else
259 AC_MSG_ERROR(Cannot find GTK: Is pkg-config in path?)
260fi
261CFLAGS="$CFLAGS $GTK_CFLAGS" 255CFLAGS="$CFLAGS $GTK_CFLAGS"
262CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" 256CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
263LIBS="$LIBS $GTK_LIBS" 257LIBS="$LIBS $GTK_LIBS"
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 9000a057..48bc9344 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,7 @@
1# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 1# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
2# 2#
3# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 3# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
4# Foundation, Inc.
4# Written by Gary V. Vaughan, 2004 5# Written by Gary V. Vaughan, 2004
5# 6#
6# This file is free software; the Free Software Foundation gives 7# This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
33# ------------ 34# ------------
34# Manipulate m4 lists. 35# Manipulate m4 lists.
35# These macros are necessary as long as will still need to support 36# These macros are necessary as long as will still need to support
36# Autoconf-2.59 which quotes differently. 37# Autoconf-2.59, which quotes differently.
37m4_define([lt_car], [[$1]]) 38m4_define([lt_car], [[$1]])
38m4_define([lt_cdr], 39m4_define([lt_cdr],
39[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 40[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
44 45
45# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 46# lt_append(MACRO-NAME, STRING, [SEPARATOR])
46# ------------------------------------------ 47# ------------------------------------------
47# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 48# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
48# Note that neither SEPARATOR nor STRING are expanded; they are appended 49# Note that neither SEPARATOR nor STRING are expanded; they are appended
49# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 50# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50# No SEPARATOR is output if MACRO-NAME was previously undefined (different 51# No SEPARATOR is output if MACRO-NAME was previously undefined (different