[git] Pinentry - branch, master, updated. pinentry-1.0.0-24-g6053cb4
by Alon Bar-Lev
cvs at cvs.gnupg.org
Tue Jul 11 21:03:22 CEST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".
The branch, master has been updated
via 6053cb4f3873897acf5d899bc6f02046d0748a0f (commit)
from 1dba96fafa123f3631c0a50bb01835306c23b903 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6053cb4f3873897acf5d899bc6f02046d0748a0f
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date: Tue Jul 11 20:54:42 2017 +0200
Use pkg-config consistently.
* configure.ac: Invoke PKG_PROG_PKG_CONFIG. Consistently use
PKG_CHECK_MODULES for GTK+2.0, Gnome 3 and libsecret.
* gnome3/Makefile.am (AM_CPPFLAGS, LDADD): Adjust Gnome 3 flags.
* gtk+-2/Makefile.am (AM_CPPFLAGS, LDADD): Adjust Gtk+2.0 flags.
Proofread-by: Marcus Brinkmann <mb at g10code.com>
Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
GnuPG-bug-id: 2049
diff --git a/configure.ac b/configure.ac
index 8b38149..ea12d56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ AC_PROG_RANLIB
# for Qt and autoconf does does not allow that.
AC_PROG_CXX
AC_PROG_LN_S
+PKG_PROG_PKG_CONFIG
AC_CHECK_TOOL(WINDRES, windres, :)
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
[build-aux/gitlog-to-changelog])
@@ -428,62 +429,36 @@ AC_ARG_ENABLE(pinentry-gnome3,
AC_HELP_STRING([--enable-pinentry-gnome3], [build GNOME 3 pinentry]),
pinentry_gnome_3=$enableval, pinentry_gnome_3=maybe)
-dnl check for pkg-config
-if test "$pinentry_gtk_2" != "no" -o "$pinentry_gnome_3" != "no"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x"${PKG_CONFIG}" = xno ; then
- pinentry_gtk_2=no
- pinentry_gnome_3=no
- fi
-fi
-
dnl check if the module gtk+-2.0 exists
if test "$pinentry_gtk_2" != "no"; then
- AC_MSG_CHECKING([for gtk+-2])
- "${PKG_CONFIG}" --exists gtk+-2.0
- if test $? -ne 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([pkg-config could not find the module gtk+-2.0])
- pinentry_gtk_2=no
- else
- AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([gtk+-2 version >= 2.4.0])
- modvers=`"${PKG_CONFIG}" --modversion gtk+-2.0`
- AC_MSG_RESULT([$modvers])
- "${PKG_CONFIG}" --atleast-version=2.4.0 gtk+-2.0
- if test $? -ne 0 ; then
- AC_MSG_WARN([building GTK+-2 pinentry disabled])
+ PKG_CHECK_MODULES(
+ GTK2,
+ [gtk+-2.0 >= 2.4.0],
+ [
+ test "$pinentry_gtk_2" != "no" && pinentry_gtk_2=yes
+ test "$pinentry_gnome_3" != "no" && pinentry_gnome_3=yes
+ ],
+ [
+ AC_MSG_WARN([pkg-config could not find the module gtk+-2.0])
pinentry_gtk_2=no
- else
- GTK2CFLAGS=`"${PKG_CONFIG}" --cflags gtk+-2.0`
- GTK2LIBS=`"${PKG_CONFIG}" --libs gtk+-2.0`
- AC_SUBST(GTK2CFLAGS)
- AC_SUBST(GTK2LIBS)
- if test "$pinentry_gtk_2" != "no"
- then
- pinentry_gtk_2=yes
- fi
- fi
- fi
+ ]
+ )
fi
AM_CONDITIONAL(BUILD_PINENTRY_GTK_2, test "$pinentry_gtk_2" = "yes")
if test "$pinentry_gnome_3" != "no"; then
- AC_MSG_CHECKING([for gcr])
- "${PKG_CONFIG}" --exists gcr-base-3
- if test $? -ne 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([pkg-config could not find the module gcr-base-3])
- pinentry_gnome_3=no
- else
- AC_MSG_RESULT([yes])
- GNOME3CFLAGS=`"${PKG_CONFIG}" --cflags gcr-base-3`
- GNOME3LIBS=`"${PKG_CONFIG}" --libs gcr-base-3`
- AC_SUBST(GNOME3CFLAGS)
- AC_SUBST(GNOME3LIBS)
- AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
- pinentry_gnome_3=yes
- fi
+ PKG_CHECK_MODULES(
+ GNOME3,
+ [gcr-3,gcr-base-3],
+ [
+ pinentry_gnome_3=yes
+ AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
+ ],
+ [
+ AC_MSG_WARN([pkg-config could not find the module gcr-3,gcr-base-3])
+ pinentry_gnome_3=no
+ ]
+ )
fi
AM_CONDITIONAL(BUILD_PINENTRY_GNOME_3, test "$pinentry_gnome_3" = "yes")
@@ -496,36 +471,17 @@ AC_ARG_ENABLE(libsecret,
[optionally cache passphrases using libsecret]),
libsecret=$enableval, libsecret=maybe)
-dnl check for pkg-config
-if test "$libsecret" != "no" -o "$pinentry-qt" != "no"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- if test x"${PKG_CONFIG}" = xno ; then
- if test "$pinentry_qt" = "yes"; then
- AC_MSG_ERROR([[
- ***
- *** pkg-config is required to find the Qt libraries for pinentry-qt
- ***]])
- else
- pinentry_qt=no
- fi
- libsecret=no
- fi
-fi
-
dnl check if the module libsecret exists
if test "$libsecret" != "no"; then
- AC_MSG_CHECKING([for libsecret])
- "${PKG_CONFIG}" --exists 'libsecret-1'
- if test $? -ne 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([pkg-config could not find the modules libsecret-1])
- libsecret=no
- else
- AC_MSG_RESULT([yes])
- LIBSECRET_CFLAGS=`"${PKG_CONFIG}" --cflags 'libsecret-1'`
- LIBSECRET_LIBS=`"${PKG_CONFIG}" --libs 'libsecret-1'`
- libsecret=yes
- fi
+ PKG_CHECK_MODULES(
+ LIBSECRET,
+ [libsecret-1],
+ [libsecret=yes],
+ [
+ AC_MSG_WARN([pkg-config could not find the module libsecret-1])
+ libsecret=no
+ ]
+ )
fi
AM_CONDITIONAL(BUILD_WITH_LIBSECRET, test "$libsecret" = "yes")
if test "$libsecret" = "yes"; then
diff --git a/gnome3/Makefile.am b/gnome3/Makefile.am
index 71c0732..9dc487a 100644
--- a/gnome3/Makefile.am
+++ b/gnome3/Makefile.am
@@ -29,9 +29,9 @@ ncurses_include =
libcurses =
endif
-AM_CPPFLAGS = $(COMMON_CFLAGS) $(GNOME3CFLAGS) \
+AM_CPPFLAGS = $(COMMON_CFLAGS) $(GNOME3_CFLAGS) \
$(ncurses_include) -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \
- $(COMMON_LIBS) $(LIBCAP) $(GNOME3LIBS) $(libcurses)
+ $(COMMON_LIBS) $(LIBCAP) $(GNOME3_LIBS) $(libcurses)
pinentry_gnome3_SOURCES = pinentry-gnome3.c
diff --git a/gtk+-2/Makefile.am b/gtk+-2/Makefile.am
index 2037004..e9bff80 100644
--- a/gtk+-2/Makefile.am
+++ b/gtk+-2/Makefile.am
@@ -29,9 +29,9 @@ ncurses_include =
libcurses =
endif
-AM_CPPFLAGS = $(COMMON_CFLAGS) $(GTK2CFLAGS) $(ncurses_include) \
+AM_CPPFLAGS = $(COMMON_CFLAGS) $(GTK2_CFLAGS) $(ncurses_include) \
-I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \
- $(COMMON_LIBS) $(LIBCAP) $(GTK2LIBS) $(libcurses)
+ $(COMMON_LIBS) $(LIBCAP) $(GTK2_LIBS) $(libcurses)
pinentry_gtk_2_SOURCES = pinentry-gtk-2.c
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 110 ++++++++++++++++-------------------------------------
gnome3/Makefile.am | 4 +-
gtk+-2/Makefile.am | 4 +-
3 files changed, 37 insertions(+), 81 deletions(-)
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list