From 58ac0f92c0b34fc67b66be81cbf752e6cd27374c Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Sat, 10 Nov 2007 16:15:23 +0000
Subject: [PATCH] Use strip -x on OS/X-darwin because non-"-x" causes link
 problems:

  http://archives.postgresql.org/pgsql-hackers/2007-10/msg01470.php
---
 config/install-sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/config/install-sh b/config/install-sh
index 9ad17050e6..9796c8dea4 100755
--- a/config/install-sh
+++ b/config/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-# $PostgreSQL: pgsql/config/install-sh,v 1.4 2006/03/11 04:38:28 momjian Exp $
+# $PostgreSQL: pgsql/config/install-sh,v 1.5 2007/11/10 16:15:23 momjian Exp $
 
 scriptversion=2005-02-02.21
 
@@ -56,7 +56,13 @@ cpprog="${CPPROG-cp}"
 chmodprog="${CHMODPROG-chmod}"
 chownprog="${CHOWNPROG-chown}"
 chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
+# Darwin normal strip removes symbols from shared libraries
+# that are later needed for dynamic linking, so use strip -x.
+# http://archives.postgresql.org/pgsql-hackers/2007-10/msg01470.php
+if test "$template" = "darwin"
+then	stripprog="${STRIPPROG-strip -x}"
+else	stripprog="${STRIPPROG-strip}"
+fi
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-- 
2.40.0