diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-21 18:27:38 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-21 18:27:38 +0000 |
commit | 3f35a3dfc764d4667cb72c5f64172211c843a9c2 (patch) | |
tree | 1aaf59616a95c8d54c09321b3eea187b35f3a06b | |
parent | 63c71a9d90fef747dd92c68bc89ebfa02df6f04d (diff) | |
download | gnunet-gtk-3f35a3dfc764d4667cb72c5f64172211c843a9c2.tar.gz gnunet-gtk-3f35a3dfc764d4667cb72c5f64172211c843a9c2.zip |
use modern pkg_config check for gtk
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | m4/ltsugar.m4 | 7 |
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 | |||
31 | AM_PROG_CC_C_O | 31 | AM_PROG_CC_C_O |
32 | AC_PROG_MKDIR_P | 32 | AC_PROG_MKDIR_P |
33 | AC_PROG_CPP | 33 | AC_PROG_CPP |
34 | AC_PROG_CC_C99 | ||
34 | AC_PROG_INSTALL | 35 | AC_PROG_INSTALL |
35 | AC_PROG_LN_S | 36 | AC_PROG_LN_S |
36 | AC_PROG_MAKE_SET | 37 | AC_PROG_MAKE_SET |
@@ -242,7 +243,7 @@ AC_SUBST(QR_LIBS) | |||
242 | 243 | ||
243 | AC_MSG_CHECKING(for gtk) | 244 | AC_MSG_CHECKING(for gtk) |
244 | without_gtk=true | 245 | without_gtk=true |
245 | AM_PATH_GTK_3_0([3.0.0],without_gtk=false,) | 246 | PKG_CHECK_MODULES([GTK], [gtk+-3.0]) |
246 | 247 | ||
247 | # test for libunique | 248 | # test for libunique |
248 | AC_ARG_WITH([libunique], AC_HELP_STRING([--without-libunique], [disable libunique])) | 249 | AC_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])) |
252 | fi | 253 | fi |
253 | 254 | ||
254 | AM_CONDITIONAL(HAVE_GTK, test x$without_gtk != xtrue) | ||
255 | if test $without_gtk != true | ||
256 | then | ||
257 | AC_DEFINE_UNQUOTED([HAVE_GTK], 1, [We have GTK]) | ||
258 | else | ||
259 | AC_MSG_ERROR(Cannot find GTK: Is pkg-config in path?) | ||
260 | fi | ||
261 | CFLAGS="$CFLAGS $GTK_CFLAGS" | 255 | CFLAGS="$CFLAGS $GTK_CFLAGS" |
262 | CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" | 256 | CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" |
263 | LIBS="$LIBS $GTK_LIBS" | 257 | LIBS="$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. |
37 | m4_define([lt_car], [[$1]]) | 38 | m4_define([lt_car], [[$1]]) |
38 | m4_define([lt_cdr], | 39 | m4_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 |