--- a/make/autoconf/configure Mon Feb 12 09:12:41 2018 +0100
+++ b/make/autoconf/configure Mon Feb 12 16:36:15 2018 +0100
@@ -50,9 +50,21 @@
echo "Error: Cannot continue" 1>&2
exit 1
fi
- build_support_dir="$CUSTOM_ROOT/.build"
+fi
+
+CURRENT_DIR=`pwd`
+if test "x$CURRENT_DIR" = "x$TOPDIR"; then
+ # We are running configure from the src root.
+ # Create '.configure-support' under $TOPDIR/build
+ build_support_dir="$TOPDIR/build/.configure-support"
+elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
+ # We are running configure from the custom root.
+ # Create '.configure-support' under $CUSTOM_ROOT/build
+ build_support_dir="$CUSTOM_ROOT/build/.configure-support"
else
- build_support_dir="$TOPDIR/.build"
+ # We are running configure from outside of the src dir.
+ # Create 'build_support_dir' in the current directory.
+ build_support_dir="$CURRENT_DIR/configure-support"
fi
conf_script_dir="$TOPDIR/make/autoconf"
@@ -114,7 +126,7 @@
custom_patcher='cat'
fi
- mkdir -p `dirname $generated_script`
+ mkdir -p $build_support_dir
# Call autoconf but replace the "magic" variable in configure.ac if requested.
cat $conf_script_dir/configure.ac | eval $custom_patcher | \
${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
@@ -164,7 +176,7 @@
fi
if test "x$run_autoconf" = xtrue; then
- echo "Generating runnable configure script"
+ echo "Generating runnable configure script at $generated_script"
generate_configure_script
fi