]> granicus.if.org Git - graphviz/commitdiff
use AC_PATH_PROGS for alternatives
authorellson <devnull@localhost>
Sat, 30 Aug 2008 11:16:30 +0000 (11:16 +0000)
committerellson <devnull@localhost>
Sat, 30 Aug 2008 11:16:30 +0000 (11:16 +0000)
configure.ac

index 2bbe6c063f4eb85117fbc2050c0c6144ad2d30f8..af677d7695c1e0376720711bbc092ace8a29bb68 100644 (file)
@@ -1344,16 +1344,7 @@ if test "x$use_tcl" = "x"; then
     TCLSH=$withval,)
 
   if test "x$TCLSH" = "x"; then
-    AC_PATH_PROG(TCLSH,tclsh8.5)
-    if test "x$TCLSH" = "x"; then
-      AC_PATH_PROG(TCLSH,tclsh8.4)
-      if test "x$TCLSH" = "x"; then
-        AC_PATH_PROG(TCLSH,tclsh8.3)
-        if test "x$TCLSH" = "x"; then
-          AC_PATH_PROG(TCLSH,tclsh)
-        fi
-      fi
-    fi
+    AC_PATH_PROGS(TCLSH,[tclsh8.5 tclsh8.4 tclsh8.3 tclsh])
     if test "x$TCLSH" = "x"; then
       AC_MSG_WARN([Unable to find a tclsh. The Tcl packages will not be built])
       use_tcl="No (tclsh unavailable)"
@@ -1497,20 +1488,11 @@ if test "x$use_tk" = "x"; then
         [AC_HELP_STRING([--with-wish=PROG], [use a specific wish])],
         WISH=$withval,)
     if test "x$WISH" = "x"; then
-        AC_PATH_PROG(WISH,wish)
+        AC_PATH_PROGS(TCLSH,[wish8.5 wish8.4 wish8.3 wish])
         if test "x$WISH" = "x"; then
-            AC_PATH_PROG(WISH,wish8.5)
-            if test "x$WISH" = "x"; then
-               AC_PATH_PROG(WISH,wish8.4)
-               if test "x$WISH" = "x"; then
-                    AC_PATH_PROG(WISH,wish8.3)
-                fi
-            fi
-       fi
+            AC_MSG_WARN([Unable to find a wish. The Tk packages will not be built])
+            use_tk="No (wish not found)"
     fi
-    if test "x$WISH" = "x"; then
-        AC_MSG_WARN([Unable to find a wish. The Tk packages will not be built])
-        use_tk="No (wish not found)"
     fi
 fi