Respect CONFIG_SHELL from the environment. Some large packages using FreeType have to use a broken (deficient) /bin/sh. The configure scripts (as generated by Autoconf) are clever enough to find a better shell and put that one into the environment variable CONFIG_SHELL. If that environment variable is already set the script skips the test and assumes to be already running under a good shell. * builds/unix/detect.mk: Honour CONFIG_SHELL. * builds/unix/unix-def.in (SHELL): Define.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
diff --git a/ChangeLog b/ChangeLog
index 516b378..8d744e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Respect CONFIG_SHELL from the environment.
+
+ Some large packages using FreeType have to use a broken (deficient)
+ /bin/sh. The configure scripts (as generated by Autoconf) are
+ clever enough to find a better shell and put that one into the
+ environment variable CONFIG_SHELL. If that environment variable is
+ already set the script skips the test and assumes to be already
+ running under a good shell.
+
+ * builds/unix/detect.mk: Honour CONFIG_SHELL.
+ * builds/unix/unix-def.in (SHELL): Define.
+
2013-03-21 Werner Lemberg <wl@gnu.org>
Fix Savannah patch #7971.
diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk
index b2ae4f4..0506e7d 100644
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003, 2004, 2006 by
+# Copyright 1996-2000, 2002-2004, 2006, 2013 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -76,13 +76,14 @@ ifeq ($(PLATFORM),unix)
have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
+ CONFIG_SHELL ?= /bin/sh
setup: std_setup
ifdef must_configure
ifneq ($(have_Makefile),)
# we are building FT2 not in the src tree
- $(TOP_DIR)/builds/unix/configure $(value CFG)
+ $(CONFIG_SHELL) $(TOP_DIR)/builds/unix/configure $(value CFG)
else
- cd builds/unix; ./configure $(value CFG)
+ cd builds/unix; $(CONFIG_SHELL) ./configure $(value CFG)
endif
endif
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index 9c5e941..010607b 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -12,6 +12,7 @@
# indicate that you have read the license and understand and accept it
# fully.
+SHELL := @SHELL@
TOP_DIR := $(shell cd $(TOP_DIR); pwd)