summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am13
-rwxr-xr-xsrc/gpg-error-config-test.sh14
3 files changed, 18 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 16896a6..ad78677 100644
--- a/configure.ac
+++ b/configure.ac
@@ -634,7 +634,7 @@ AC_CONFIG_FILES([src/Makefile tests/Makefile])
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], [chmod +x src/gpg-error-config])
+AC_CONFIG_FILES([src/gpg-error-config-old:src/gpg-error-config.in], [chmod +x src/gpg-error-config-old])
AC_CONFIG_FILES([src/gpg-error-config-new], [chmod +x src/gpg-error-config-new])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 5ba1496..69cc487 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,7 +96,8 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
err-sources.h err-codes.h \
- gpg-error-config.in \
+ gpg-error-config-old.in gpg-error-config-test.sh \
+ gpg-error-config-new.in \
gpg-error.pc.in \
gpg-error.m4 gpgrt.m4 \
gpg-error.vers gpg-error.def.in \
@@ -115,8 +116,6 @@ CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \
gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) $(tmp_files) lock-obj-pub.native.h
-TESTS=gpg-error-config-test.sh
-
#
# {{{ Begin Windows part
#
@@ -331,6 +330,14 @@ gpgrt.h: gpg-error.h
gpgrt-config: gpg-error-config
cp gpg-error-config gpgrt-config
+gpg-error-config: gpg-error-config-new gpg-error-config-old
+ if $(srcdir)/gpg-error-config-test.sh; then \
+ cp gpg-error-config-new $@; \
+ else \
+ echo "New gpg-error-config doesn't work on this machine, please report to <https://bugs.gnupg.org>" \
+ cp gpg-error-config-old $@; \
+ fi
+
install-data-local:
if HAVE_W32CE_SYSTEM
-$(MKDIR_P) "$(DESTDIR)$(includedir)/gpg-extra"
diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh
index d65c06d..9d8c2ce 100755
--- a/src/gpg-error-config-test.sh
+++ b/src/gpg-error-config-test.sh
@@ -4,31 +4,31 @@ PKG_CONFIG_PATH="."
export PKG_CONFIG_PATH
-OUTPUT_OLD=$(./gpg-error-config --version)
+OUTPUT_OLD=$(./gpg-error-config-old --version)
OUTPUT_NEW=$(./gpg-error-config-new --version)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --libs)
+OUTPUT_OLD=$(./gpg-error-config-old --libs)
OUTPUT_NEW=$(./gpg-error-config-new --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --cflags)
+OUTPUT_OLD=$(./gpg-error-config-old --cflags)
OUTPUT_NEW=$(./gpg-error-config-new --cflags)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --mt --libs)
+OUTPUT_OLD=$(./gpg-error-config-old --mt --libs)
OUTPUT_NEW=$(./gpg-error-config-new --mt --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --mt --cflags)
+OUTPUT_OLD=$(./gpg-error-config-old --mt --cflags)
OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --cflags --libs)
+OUTPUT_OLD=$(./gpg-error-config-old --cflags --libs)
OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
-OUTPUT_OLD=$(./gpg-error-config --mt --cflags --libs)
+OUTPUT_OLD=$(./gpg-error-config-old --mt --cflags --libs)
OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags --libs)
[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99