@@ -8582,6 +8582,49 @@ echo "# Automatically generated by configure - do not modify" > "$iotests_common
echo >> "$iotests_common_env"
echo "export PYTHON='$python'" >> "$iotests_common_env"
+cross="config-meson.cross"
+cross_arg=
+
+if test -n "$cross_prefix"; then
+ echo "# Automatically generated by configure - do not modify" > $cross
+ echo "[binaries]" >> $cross
+ echo "c = '$cc'" >> $cross
+ echo "cpp = '$cxx'" >> $cross
+ echo "ar = '$ar'" >> $cross
+ echo "nm = '$nm'" >> $cross
+ echo "pkgconfig = '$pkg_config_exe'" >> $cross
+ echo "ranlib = '$ranlib'" >> $cross
+ echo "strip = '$strip'" >> $cross
+ echo "windres = '$windres'" >> $cross
+
+ echo "[properties]" >> $cross
+ echo "root = '$prefix'" >> $cross
+
+ echo "[host_machine]" >> $cross
+if test "$mingw32" = "yes" ; then
+ echo "system = 'windows'" >> $cross
+fi
+case "$ARCH" in
+ i386|x86_64)
+ echo "cpu_family = 'x86'" >> $cross
+ ;;
+ ppc64le)
+ echo "cpu_family = 'ppc64'" >> $cross
+ ;;
+ *)
+ echo "cpu_family = '$ARCH'" >> $cross
+ ;;
+esac
+ echo "cpu = '$cpu'" >> $cross
+if test "$bigendian" = "yes" ; then
+ echo "endian = 'big'" >> $cross
+else
+ echo "endian = 'little'" >> $cross
+fi
+
+ cross_arg="--cross-file=$cross"
+fi
+
rm -rf meson-private/ meson-logs/ meson-info/
NINJA=$PWD/ninjatool $python $meson setup \
--prefix "$prefix" \
@@ -8597,11 +8640,13 @@ NINJA=$PWD/ninjatool $python $meson setup \
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
+ $cross_arg \
"$PWD" "$source_path"
if test "$?" -ne 0 ; then
error_exit "meson setup failed"
fi
+touch ninjatool.stamp
# Save the configure command line for later reuse.
cat <<EOD >config.status