From dcd5af6c3498a265053aa3292d41c3946e225627 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Thu, 28 Jun 2012 20:05:36 +0300
Subject: [PATCH] Further fix install program detection

The $(or) make function was introduced in GNU make 3.81, so the
previous coding didn't work in 3.80.  Write it differently, and
improve the variable naming to make more sense in the new coding.
---
 configure              | 6 +++---
 configure.in           | 6 +++---
 src/Makefile.global.in | 3 ++-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 1661be7d29f..acec60c3a7a 100755
--- a/configure
+++ b/configure
@@ -693,7 +693,7 @@ MKDIR_P
 AWK
 LN_S
 TAR
-INSTALL_
+install_bin
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -6956,8 +6956,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 # a relative path to it in each makefile where it subsitutes it. This clashes
 # with our Makefile.global concept. This workaround helps.
 case $INSTALL in
-  *install-sh*) INSTALL_='';;
-  *) INSTALL_=$INSTALL;;
+  *install-sh*) install_bin='';;
+  *) install_bin=$INSTALL;;
 esac
 
 
diff --git a/configure.in b/configure.in
index 5e5318b9b7e..05e6324e8f1 100644
--- a/configure.in
+++ b/configure.in
@@ -814,10 +814,10 @@ AC_PROG_INSTALL
 # a relative path to it in each makefile where it subsitutes it. This clashes
 # with our Makefile.global concept. This workaround helps.
 case $INSTALL in
-  *install-sh*) INSTALL_='';;
-  *) INSTALL_=$INSTALL;;
+  *install-sh*) install_bin='';;
+  *) install_bin=$INSTALL;;
 esac
-AC_SUBST(INSTALL_)
+AC_SUBST(install_bin)
 
 AC_PATH_PROG(TAR, tar)
 AC_PROG_LN_S
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 1e61e73b0df..3941d969b86 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -289,8 +289,9 @@ BZIP2	= bzip2
 
 # Installation.
 
+install_bin = @install_bin@
 install_sh = $(SHELL) $(top_srcdir)/config/install-sh -c
-INSTALL = $(if $(use_install_sh),$(install_sh),$(or @INSTALL_@,$(install_sh)))
+INSTALL = $(if $(use_install_sh),$(install_sh),$(if $(install_bin),$(install_bin),$(install_sh)))
 
 INSTALL_SCRIPT_MODE	= 755
 INSTALL_DATA_MODE	= 644
-- 
GitLab