aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2019-06-18 06:26:50 +0000
committerNIIBE Yutaka <[email protected]>2019-06-18 06:37:09 +0000
commit7a7caf4ba1c460c9c36f754fcd0ebfeb4aa5cc6a (patch)
tree23ec8446742c79a12efae0bb36d4d2cf62288612
parentPortability fix for PID. (diff)
downloadlibgpg-error-7a7caf4ba1c460c9c36f754fcd0ebfeb4aa5cc6a.tar.gz
libgpg-error-7a7caf4ba1c460c9c36f754fcd0ebfeb4aa5cc6a.zip
build: Take care of POSIX shell path.
* configure.ac (INSTALLSHELLPATH): New. * src/Makefile.am: Change invocation of gpg-error-config-test.sh. * src/gpgrt-config.in (INSTALLSHELLPATH): To be substituted. * src/gpg-error-config-test.sh.in: Likewise. -- GnuPG-bug-id: 4574 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--configure.ac6
-rw-r--r--src/Makefile.am2
-rw-r--r--[-rwxr-xr-x]src/gpg-error-config-test.sh.in (renamed from src/gpg-error-config-test.sh)2
-rw-r--r--src/gpg-error-config.in2
-rw-r--r--[-rwxr-xr-x]src/gpgrt-config.in (renamed from src/gpgrt-config)2
5 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index d56f4c1..dc93071 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,17 +195,21 @@ AC_CHECK_HEADERS([stdlib.h locale.h stdint.h sys/select.h sys/time.h \
AC_FUNC_STRERROR_R
case "${host_os}" in
mingw32*)
+ INSTALLSHELLPATH=/bin/sh
AC_CHECK_FUNC([strerror_s])
;;
solaris*)
+ INSTALLSHELLPATH=/usr/xpg4/bin/sh
# All versions of Solaris from 2.4 have a thread-safe strerror().
# Since Solaris 10, in addition strerror_r() exists.
;;
*)
+ INSTALLSHELLPATH=/bin/sh
AC_CHECK_FUNC([strerror_r], [],
AC_MSG_WARN([[Without strerror_r, gpg_strerror_r might not be thread-safe]]))
;;
esac
+AC_SUBST(INSTALLSHELLPATH)
AC_FUNC_FORK
AC_CHECK_FUNCS([flockfile vasprintf mmap rand strlwr stpcpy setenv stat \
@@ -699,6 +703,8 @@ 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_CONFIG_FILES([src/gpg-error-config-test.sh], [chmod +x src/gpg-error-config-test.sh])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 27d3dff..fb4ef48 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -338,7 +338,7 @@ gpgrt.h: gpg-error.h
gpg-error-config: gpgrt-config gpg-error-config-old
@echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)"
- @if $(srcdir)/gpg-error-config-test.sh --old-new; then \
+ @if ./gpg-error-config-test.sh --old-new; then \
echo "good"; \
else \
echo "no"; \
diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh.in
index 7125e10..2a4ad7a 100755..100644
--- a/src/gpg-error-config-test.sh
+++ b/src/gpg-error-config-test.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@INSTALLSHELLPATH@
srcdir=${0%/*}
diff --git a/src/gpg-error-config.in b/src/gpg-error-config.in
index c1c771a..3b45928 100644
--- a/src/gpg-error-config.in
+++ b/src/gpg-error-config.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@INSTALLSHELLPATH@
# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
diff --git a/src/gpgrt-config b/src/gpgrt-config.in
index 646224f..622b056 100755..100644
--- a/src/gpgrt-config
+++ b/src/gpgrt-config.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@INSTALLSHELLPATH@
# Copyright (C) 2018 g10 Code GmbH
#
# This file is free software; as a special exception the author gives