[git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-43-g93d45f7
by NIIBE Yutaka
cvs at cvs.gnupg.org
Mon Oct 29 04:13:17 CET 2018
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 "Error codes used by GnuPG et al.".
The branch, master has been updated
via 93d45f7e7e937020c796781705516a4b62e6589a (commit)
from b229ed40e2653bd3eabaa6931cd8582280a226d7 (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 93d45f7e7e937020c796781705516a4b62e6589a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Mon Oct 29 12:11:05 2018 +0900
gpgrt-config: Better architecture independent support.
* configure.ac: Don't generate gpgrt-config.
* src/gpgrt-config: Rename from gpgrt-config.in.
(--prefix, --exec-prefix, --libdir): Use --libdir to determine
PKG_CONFIG_LIBDIR.
* src/Makefile.am (EXTRA_DIST): Remove gpgrt-config.in.
* src/gpg-error-config-test.sh: Fix for path to gpgrt-config.
* src/gpg-error.m4: Provide --prefix, --exec-prefix, --libdir
option from configure. Don't use CC because we have --libdir.
Bump version date.
* src/gpgrt.m4: Likewise.
--
Considering multilib support as well as multiarch support, it is
better to provide the information for PKG_CONFIG_LIBDIR by --libdir
directly, instead of CC.
Difficulty is that configure allows variable reference like:
--libdir='${exec_prefix}/i386-linux'
So, it should also support --prefix and --exec_prefix options.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/configure.ac b/configure.ac
index 81b72f0..34ea775 100644
--- a/configure.ac
+++ b/configure.ac
@@ -651,17 +651,6 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
build_tests=$enableval, build_tests=yes)
AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno])
-case "$libdir" in
- */*-*-*)
- # Looks like it's multiarch, then,
- # let the script detect host architecture at runtime
- pkg_config_libdir=auto
- ;;
- *)
- pkg_config_libdir=$libdir/pkgconfig
- ;;
-esac
-AC_SUBST(pkg_config_libdir)
#
# Substitution
#
@@ -672,7 +661,6 @@ AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest])
AC_CONFIG_FILES([src/gpg-error.pc])
AC_CONFIG_FILES([src/gpg-error-config-old:src/gpg-error-config.in], [chmod +x src/gpg-error-config-old])
-AC_CONFIG_FILES([src/gpgrt-config], [chmod +x src/gpgrt-config])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 6df2d6c..280a673 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,7 +98,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \
gpg-error.vers gpg-error.def.in \
versioninfo.rc.in gpg-error.w32-manifest.in \
- gpgrt-config.in gpg-error-config-test.sh gpg-error.pc.in \
+ gpg-error-config-test.sh gpg-error.pc.in \
$(lock_obj_pub)
BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh
index 2d8b94b..7125e10 100755
--- a/src/gpg-error-config-test.sh
+++ b/src/gpg-error-config-test.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+srcdir=${0%/*}
+
PKG_CONFIG_PATH="."
export PKG_CONFIG_PATH
@@ -32,54 +34,54 @@ failure () {
rm -f gpg-error-config-test.log
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --libs))
-OUTPUT_NEW=$(./gpgrt-config --libs)
+OUTPUT_NEW=$($srcdir/gpgrt-config --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --libs
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags))
-OUTPUT_NEW=$(./gpgrt-config --cflags)
+OUTPUT_NEW=$($srcdir/gpgrt-config --cflags)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs))
-OUTPUT_NEW=$(./gpgrt-config --cflags --libs)
+OUTPUT_NEW=$($srcdir/gpgrt-config --cflags --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs
if [ "$PKG_CONFIG_CMD" = ./gpg-error-config-old ]; then
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --version))
- OUTPUT_NEW=$(./gpgrt-config --version)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --version)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --version
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --libs))
- OUTPUT_NEW=$(./gpgrt-config --mt --libs)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --mt --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --libs
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags))
- OUTPUT_NEW=$(./gpgrt-config --mt --cflags)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --mt --cflags)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs))
- OUTPUT_NEW=$(./gpgrt-config --cflags --libs)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --cflags --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags --libs))
- OUTPUT_NEW=$(./gpgrt-config --mt --cflags --libs)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --mt --cflags --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags --libs
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtcflags))
- OUTPUT_NEW=$(./gpgrt-config --variable=mtcflags)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --variable=mtcflags)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtcflags
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtlibs))
- OUTPUT_NEW=$(./gpgrt-config --variable=mtlibs)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --variable=mtlibs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtlibs
OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=host))
- OUTPUT_NEW=$(./gpgrt-config --variable=host)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --variable=host)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=host
fi
if [ -n "$test_failed" ]; then
OUTPUT_OLD=$($PKG_CONFIG_CMD --version)
- OUTPUT_NEW=$(./gpgrt-config --version)
+ OUTPUT_NEW=$($srcdir/gpgrt-config --version)
failure --version
exit 99
diff --git a/src/gpg-error.m4 b/src/gpg-error.m4
index 70dc501..0964a26 100644
--- a/src/gpg-error.m4
+++ b/src/gpg-error.m4
@@ -9,7 +9,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Last-changed: 2018-10-26
+# Last-changed: 2018-10-29
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
use_gpgrt_config=""
if test "$GPG_ERROR_CONFIG" = "no"; then
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
- if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
- use_gpgrt_config=yes
- gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion`
+ if test "$GPGRT_CONFIG" != "no"; then
+ GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+ if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+ GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+ use_gpgrt_config=yes
+ gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
+ fi
fi
else
- gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version`
+ gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
fi
if test "$GPG_ERROR_CONFIG" != "no"; then
req_major=`echo $min_gpg_error_version | \
@@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
if test -z "$GPGRT_CONFIG"; then
if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
- GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
- use_gpgrt_config=yes
+ if test "$GPGRT_CONFIG" != "no"; then
+ GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+ GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+ use_gpgrt_config=yes
+ fi
fi
fi
fi
AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
if test $ok = yes; then
- GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags`
- GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs`
+ GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
+ GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
if test -z "$use_gpgrt_config"; then
- GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
- GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+ GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null`
+ GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null`
else
- GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
+ GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null`
GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS"
- GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
+ GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null`
GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS"
fi
AC_MSG_RESULT([yes ($gpg_error_config_version)])
ifelse([$2], , :, [$2])
if test -z "$use_gpgrt_config"; then
- gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
+ gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
else
- gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
+ gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
fi
if test x"$gpg_error_config_host" != xnone ; then
if test x"$gpg_error_config_host" != x"$host" ; then
diff --git a/src/gpgrt-config.in b/src/gpgrt-config
old mode 100644
new mode 100755
similarity index 88%
rename from src/gpgrt-config.in
rename to src/gpgrt-config
index 9df01b7..1524677
--- a/src/gpgrt-config.in
+++ b/src/gpgrt-config
@@ -10,52 +10,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# SPDX-License-Identifier: FSFULLR
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-pkg_config_libdir=@pkg_config_libdir@
-if [ x"${PKG_CONFIG_LIBDIR+set}" = x ]; then
- # If PKG_CONFIG_LIBDIR is not specified, detect the directory.
-
- # We supports standard cross build with $CC
- triplet=""
- case "$CC" in
- *-*-*) triplet=${CC%-*} ;;
- *) ;;
- esac
- if [ "$pkg_config_libdir" = auto ]; then
- # It's multiarch environment.
- # It may be standard cross build, native multiarch build, or
- # multiarch-cross build
- multiarch=""
- if [ -n "$triplet" ]; then
- triplet1=$triplet
- else
- triplet1=$(gcc -dumpmachine)
- fi
- # Follow existing practice for multiarch name
- if expr $triplet1 : "^i[4567]86-" >/dev/null; then
- multiarch="i386-${triplet1#*-}"
- else
- multiarch=$triplet1
- fi
- if [ -n "$triplet" ]; then
- PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig:@exec_prefix@/lib/$multiarch/pkgconfig"
- else
- PKG_CONFIG_LIBDIR="@exec_prefix@/lib/$multiarch/pkgconfig"
- fi
- unset multiarch triplet1
- elif [ -n "$triplet" ]; then
- # It's cross build
- PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig"
- else
- # Native build in standard (non-multiarch) environment
- PKG_CONFIG_LIBDIR="$pkg_config_libdir"
- fi
- unset triplet
-fi
-PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR"
-#
-
#### start of functions for this script
#
@@ -460,19 +414,10 @@ sysroot () {
echo "$_result"
}
-#### end of functions for this script
-
-myname=${0##*/}
-if [ $myname = gpgrt-config ]; then
- default_module="gpg-error"
-else
- default_module=${myname%-config}
-fi
-
-usage()
-{
+# Show usage
+usage () {
cat <<EOF
-Usage: gpgrt-config [OPTIONS] MODULES
+Usage: gpgrt-config [--prefix=PREFIX] [--libdir=LIBDIR] [OPTIONS] MODULES
Options:
[--exists]
[--modversion]
@@ -482,12 +427,82 @@ Options:
EOF
exit $1
}
+#### end of functions for this script
+
+myname=${0##*/}
+if [ $myname = gpgrt-config ]; then
+ default_module="gpg-error"
+else
+ default_module=${myname%-config}
+fi
+
+# First stage to process --prefix, --exec_prefix and --libdir options
+
+prefix_option=""
+exec_prefix_option=""
+libdir_option=""
+
+while test $# -gt 0; do
+ case $1 in
+ --prefix=*)
+ prefix_option=${1#--prefix=}
+ if [ "$prefix_option" = NONE ]; then
+ prefix_option=/usr/local
+ fi
+ shift
+ ;;
+ --exec-prefix=*)
+ exec_prefix_option=${1#--exec-prefix=}
+ if [ "$exec_prefix_option" = NONE ]; then
+ exec_prefix_option='${prefix}'
+ fi
+ shift
+ ;;
+ --libdir=*)
+ libdir_option=${1#--libdir=}
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if [ -n "$prefix_option" ]; then
+ read_config_from_stdin __gpgrt-config__ <<EOF
+prefix=$prefix_option
+EOF
+fi
+if [ -n "$exec_prefix_option" ]; then
+ read_config_from_stdin __gpgrt-config__ <<EOF
+exec_prefix=$exec_prefix_option
+EOF
+fi
+
+# --libdir option has precedence over the env var.
+if [ -n "libdir_option" ]; then
+ libdir=$(substitute_vars $libdir_option)
+ PKG_CONFIG_LIBDIR=$libdir/pkgconfig
+fi
+
+if [ x"$PKG_CONFIG_PATH" = x -a x"$PKG_CONFIG_LIBDIR" = x ]; then
+ echo "Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR" 1>&2
+ echo "When LIBDIR has variable references for prefix and/or exec_prefix," 1>&2
+ echo "you should provide --prefix=PREFIX option and/or" 1>&2
+ echo "--exec-prefix=EXEC_PREFIX option, too" 1>&2
+ exit 1
+fi
+
+PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR"
+#
if test $# -eq 0; then
usage 1 1>&2
fi
+# Second stage to do the main functionality
+
module_list=""
want_var=""
want_attr=""
diff --git a/src/gpgrt.m4 b/src/gpgrt.m4
index fab1eb4..7f92a22 100644
--- a/src/gpgrt.m4
+++ b/src/gpgrt.m4
@@ -10,7 +10,7 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# SPDX-License-Identifier: FSFULLR
#
-# Last-changed: 2018-10-25
+# Last-changed: 2018-10-29
# Note: This is a kind of duplicate of gpg-error.m4 with uses the
# future name of libgpg-error to prepare for a smooth migration in
# some distant time.
@@ -70,6 +70,9 @@ AC_DEFUN([AM_PATH_GPGRT],
fi
AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
+ if test "$GPGRT_CONFIG" != "no"; then
+ GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+ fi
min_gpgrt_version=ifelse([$1], ,1.33,$1)
AC_MSG_CHECKING(for GPG Runtime - version >= $min_gpgrt_version)
ok=no
@@ -79,7 +82,7 @@ AC_DEFUN([AM_PATH_GPGRT],
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $min_gpgrt_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
- gpgrt_config_version=`CC=$CC $GPGRT_CONFIG --version`
+ gpgrt_config_version=`$GPGRT_CONFIG --version`
major=`echo $gpgrt_config_version | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $gpgrt_config_version | \
@@ -95,15 +98,15 @@ AC_DEFUN([AM_PATH_GPGRT],
fi
fi
if test $ok = yes; then
- GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG --cflags`
- GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG --libs`
- GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG --variable=mtcflags 2>/dev/null`
+ GPGRT_CFLAGS=`$GPGRT_CONFIG --cflags`
+ GPGRT_LIBS=`$GPGRT_CONFIG --libs`
+ GPGRT_MT_CFLAGS=`$GPGRT_CONFIG --variable=mtcflags 2>/dev/null`
GPGRT_MT_CFLAGS="$GPGRT_CFLAGS${GPGRT_CFLAGS:+ }$GPGRT_MT_CFLAGS"
- GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG --variable=mtlibs 2>/dev/null`
+ GPGRT_MT_LIBS=`$GPGRT_CONFIG --variable=mtlibs 2>/dev/null`
GPGRT_MT_LIBS="$GPGRT_LIBS${GPGRT_LIBS:+ }$GPGRT_MT_LIBS"
AC_MSG_RESULT([yes ($gpgrt_config_version)])
ifelse([$2], , :, [$2])
- gpgrt_config_host=`CC=$CC $GPGRT_CONFIG --variable=host 2>/dev/null || echo none`
+ gpgrt_config_host=`$GPGRT_CONFIG --variable=host 2>/dev/null || echo none`
if test x"$gpgrt_config_host" != xnone ; then
if test x"$gpgrt_config_host" != x"$host" ; then
AC_MSG_WARN([[
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 12 ----
src/Makefile.am | 2 +-
src/gpg-error-config-test.sh | 26 +++----
src/gpg-error.m4 | 38 +++++-----
src/{gpgrt-config.in => gpgrt-config} | 131 +++++++++++++++++++---------------
src/gpgrt.m4 | 17 +++--
6 files changed, 120 insertions(+), 106 deletions(-)
rename src/{gpgrt-config.in => gpgrt-config} (88%)
mode change 100644 => 100755
hooks/post-receive
--
Error codes used by GnuPG et al.
http://git.gnupg.org
More information about the Gnupg-commits
mailing list