Unify interfae of both variants FP_ARG_WITH_PATH... in aclocal.m4 and
authorDavid Terei <davidterei@gmail.com>
Wed, 6 Feb 2013 21:47:51 +0000 (13:47 -0800)
committerDavid Terei <davidterei@gmail.com>
Wed, 6 Feb 2013 21:51:13 +0000 (13:51 -0800)
document them.

aclocal.m4
configure.ac

index 0fe79cf..837eea0 100644 (file)
@@ -602,7 +602,11 @@ AC_DEFUN([FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN],
 
 # FP_ARG_WITH_PATH_GNU_PROG
 # --------------------
-# XXX
+# Find the specified command on the path or allow a user to set it manually
+# with a --with-<command> option. An error will be thrown if the command isn't
+# found.
+#
+# This is ignored on the mingw32 platform.
 #
 # $1 = the variable to set
 # $2 = the with option name
@@ -641,10 +645,14 @@ AC_ARG_WITH($2,
 
 # FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
 # --------------------
-# XXX
+# Same as FP_ARG_WITH_PATH_GNU_PROG but no error will be thrown if the command
+# isn't found.
+#
+# This is ignored on the mingw32 platform.
 #
 # $1 = the variable to set
-# $2 = the command to look for
+# $2 = the with option name
+# $3 = the command to look for
 #
 AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL],
 [
@@ -662,7 +670,7 @@ AC_ARG_WITH($2,
 [
     if test "$HostOS" != "mingw32"
     then
-        AC_PATH_PROG([$1], [$2])
+        AC_PATH_PROG([$1], [$3])
     fi
 ]
 )
index b7cd351..1a0fa81 100644 (file)
@@ -502,13 +502,13 @@ esac
 
 dnl ** Which LLVM llc to use?
 dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([LLC], [llc])
+FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([LLC], [llc], [llc])
 LlcCmd="$LLC"
 AC_SUBST([LlcCmd])
 
 dnl ** Which LLVM opt to use?
 dnl --------------------------------------------------------------
-FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([OPT], [opt])
+FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL([OPT], [opt], [opt])
 OptCmd="$OPT"
 AC_SUBST([OptCmd])