Commit 83760814 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

configure: Check for new-enough getopt



macOS is shipped with an old non-enhanced version of getopt and it
doesn't support options used by run_tests.sh. Proper version of getopt
is available from homebrew but it has to be added to PATH before invoking
run_tests.sh.  Halt ./configure if enhanced getopt can't be found.
Based on a patch by Roman Bolshakov <r.bolshakov@yadro.com>.

Cc: Cameron Esfahani <dirty@apple.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d26193a0
......@@ -167,6 +167,13 @@ EOF
rm -f lib-test.{o,S}
fi
# require enhanced getopt
getopt -T > /dev/null
if [ $? -ne 4 ]; then
echo "Enhanced getopt is not available, add it to your PATH?"
exit 1
fi
# Are we in a separate build tree? If so, link the Makefile
# and shared stuff so that 'make' and run_tests.sh work.
if test ! -e Makefile; then
......
......@@ -34,6 +34,13 @@ EOF
RUNTIME_arch_run="./$TEST_DIR/run"
source scripts/runtime.bash
# require enhanced getopt
getopt -T > /dev/null
if [ $? -ne 4 ]; then
echo "Enhanced getopt is not available, add it to your PATH?"
exit 1
fi
only_tests=""
args=`getopt -u -o ag:htj:v -l all,group:,help,tap13,parallel:,verbose -- $*`
[ $? -ne 0 ] && exit 2;
......
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