Commit 2f1e736d authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

component/apache: Remove use of which command in configure

Apache failed to compile in environments in which the `which` command
was not present (such as Docker).
This is fixed upstream (by using `command -v` instead) in
https://github.com/apache/httpd/commit/05297d7b00f0cb1f20d3ff14f4409097df2615fe
but not yet released.

This commit patches the configure script in a similar way, so that
the `which` command is not used.

See merge request !1736
parent d6722e53
Pipeline #39732 failed with stage
in 0 seconds
# Based on https://github.com/apache/httpd/commit/05297d7b00f0cb1f20d3ff14f4409097df2615fe
--- a/configure
+++ b/configure
@@ -6608,7 +6608,7 @@
if test "x$with_pcre" = "x" || test "$with_pcre" = "yes"; then
with_pcre="$PATH"
-else if which $with_pcre 2>/dev/null; then :; else
+else if command -v $with_pcre 2>/dev/null; then :; else
with_pcre="$with_pcre/bin:$with_pcre"
fi
fi
@@ -6710,11 +6710,11 @@
test -n "$ac_ct_PCRE_CONFIG" && break
done
-test -n "$ac_ct_PCRE_CONFIG" || ac_ct_PCRE_CONFIG="`which $with_pcre 2>/dev/null`"
+test -n "$ac_ct_PCRE_CONFIG" || ac_ct_PCRE_CONFIG="`command -v $with_pcre 2>/dev/null`"
PCRE_CONFIG=$ac_ct_PCRE_CONFIG
else
- PCRE_CONFIG="`which $with_pcre 2>/dev/null`"
+ PCRE_CONFIG="`command -v $with_pcre 2>/dev/null`"
fi
fi
\ No newline at end of file
......@@ -47,6 +47,10 @@ shared = true
version = 2.4.62
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = cded7afa23c13c4854008d95a69ce016
patch-options = -p1
# XXX to be removed when we upgrade apache
patches =
${:_profile_base_location_}/apache_configure_which.patch#340f8cf5b66a08d90d95b72b85fe7824
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......@@ -100,7 +104,7 @@ configure-options = --disable-static
--with-apr-util=${apr-util:location}
environment =
PATH=${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PATH=${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
CPPFLAGS=-I${libuuid:location}/include -I${openssl:location}/include -I${apr:location}/include -I${apr-util:location}/include
LDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${gdbm:location}/lib -L${apr:location}/lib -Wl,-rpath=${apr:location}/lib -L${apr-util:location}/lib -Wl,-rpath=${apr-util:location}/lib -L${libexpat:location}/lib -Wl,-rpath=${libexpat:location}/lib
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment