summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2023-03-10 10:54:03 +0000
committerRuediger Pluem <rpluem@apache.org>2023-03-10 10:54:03 +0000
commit130cf8cb3c6fe713095e560ade1df050aa2a6a14 (patch)
treee9e80d5eaa0a4a28e7b65af8cccebc1caba2d4ae /configure.in
parentcb9c2b2d049db7513d3de1d8028d33ec0ed4f894 (diff)
downloadapr-130cf8cb3c6fe713095e560ade1df050aa2a6a14.tar.gz
Fix crosscompiling detection in apr-1-config
Since r1872148 apr-1-config tries to detect if it runs in a crosscompile scenario. Fix the detection to correctly distinguish between crosscompiling and DESTDIR installations for packaging. * configure.in: Set APR_CROSS_COMPILING to 'no', 'yes' or 'maybe' based on possible --host and --build parameters given to configure to determine if configure was called for a crosscompiling scenario. This was inspired by how autoconf itself detects crosscompiling scenarios. * apr-config.in: Use the value from APR_CROSS_COMPILING to determine if we are in a crosscompiling scenario. Furthermore normalize the pathes we use for suffix matches by collapsing multiple consecutive '/' to one. PR: 66510 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index d8356b76e..9e828ec6a 100644
--- a/configure.in
+++ b/configure.in
@@ -150,6 +150,18 @@ fi
AC_SUBST(APR_CONFIG_LOCATION)
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ APR_CROSS_COMPILING=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ APR_CROSS_COMPILING=yes
+ fi
+else
+ APR_CROSS_COMPILING=no
+fi
+
+AC_SUBST(APR_CROSS_COMPILING)
+
# Libtool might need this symbol -- it must point to the location of
# the generated libtool script (not necessarily the "top" build dir).
#