summaryrefslogtreecommitdiff
path: root/m4/ax_with_prog.m4
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2009-07-30 11:07:28 +0200
committerPeter Simons <simons@cryp.to>2009-07-30 11:07:28 +0200
commitf003fea6be58fc1080c81ece03fce764839a064f (patch)
treec23407416e6eaec969288af6b36210adbc815a05 /m4/ax_with_prog.m4
parent798eba04f43c6799e44befc25954e703b78e4de9 (diff)
downloadautoconf-archive-f003fea6be58fc1080c81ece03fce764839a064f.tar.gz
AX_WITH_PROG: fixed handling of '--without-foo' arguments
Submitted in <https://savannah.nongnu.org/patch/?6876>.
Diffstat (limited to 'm4/ax_with_prog.m4')
-rw-r--r--m4/ax_with_prog.m428
1 files changed, 14 insertions, 14 deletions
diff --git a/m4/ax_with_prog.m4 b/m4/ax_with_prog.m4
index ae3b72b..e20276c 100644
--- a/m4/ax_with_prog.m4
+++ b/m4/ax_with_prog.m4
@@ -42,21 +42,21 @@ AC_DEFUN([AX_WITH_PROG],[
AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable)
AS_IF(test -z "$VARIABLE",[
- AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
+ AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[[PATH]]]]],absolute path to EXECUTABLE executable), [
- AS_IF([test "$withval" != "yes"],[
- VARIABLE="$withval"
- AC_MSG_RESULT($VARIABLE)
- ],[
- VARIABLE=""
- AC_MSG_RESULT([no])
- ])
- ],[
- AC_MSG_RESULT([no])
- ])
-
- AS_IF(test -z "$VARIABLE",[
- AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
+ AS_IF([test "$withval" != yes -a "$withval" != no],[
+ VARIABLE="$withval"
+ AC_MSG_RESULT($VARIABLE)
+ ],[
+ VARIABLE=""
+ AC_MSG_RESULT([no])
+ AS_IF([test "$withval" != no], [
+ AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
+ ])
+ ])
+ ],[
+ AC_MSG_RESULT([no])
+ AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
])
])