From 87a695ed4bcae356587fc7133232772ce9ab9742 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 14 Jan 2016 10:00:56 +0000 Subject: Fix behaviour of --with-metasmt when passed a path that doesn't exist. --- autoconf/configure.ac | 6 +++++- configure | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 8ba6a029..13d6f945 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -627,7 +627,11 @@ AC_ARG_WITH(metasmt, if test X$with_metasmt = X ; then ENABLE_METASMT=0 else - metasmt_root=`cd $with_metasmt 2> /dev/null; pwd` + metasmt_root=`(cd $with_metasmt && pwd) 2> /dev/null` + #Check for bad path + if test "X$metasmt_root" = X ; then + AC_MSG_ERROR([Cannot access path $with_metasmt passed to --with-metasmt]) + fi dnl AC_LANG(C++) old_CPPFLAGS="$CPPFLAGS" diff --git a/configure b/configure index af871ce6..832c35e5 100755 --- a/configure +++ b/configure @@ -5031,7 +5031,11 @@ fi if test X$with_metasmt = X ; then ENABLE_METASMT=0 else - metasmt_root=`cd $with_metasmt 2> /dev/null; pwd` + metasmt_root=`(cd $with_metasmt && pwd) 2> /dev/null` + #Check for bad path + if test "X$metasmt_root" = X ; then + as_fn_error $? "Cannot access path $with_metasmt passed to --with-metasmt" "$LINENO" 5 + fi old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" -- cgit 1.4.1