Handle dia not being present more gracefully.
authorTim Potter <tpot@samba.org>
Thu, 13 Oct 2005 01:19:46 +0000 (01:19 +0000)
committerGerald W. Carter <jerry@samba.org>
Wed, 23 Apr 2008 13:47:07 +0000 (08:47 -0500)
(This used to be commit 71a59a3e75bbe482c3ee48e897cfbb462c269af2)

docs/configure.in

index 9d336e232085417e4498ff22143cb6536ed7df27..3e4157af270bf3fa313f714e6624992268bde0c6 100644 (file)
@@ -19,16 +19,19 @@ DOCS_TARGET_REQUIRE_PROGRAM(RM, rm, ALL)
 DOCS_TARGET_REQUIRE_PROGRAM(DIA, dia, ALL)
 
 # Check dia version number
-[ DIA_VERSION=`$DIA -v | egrep -o '([0-9]+)\.([0-9]+)'`]
-DIA_MAJ_VERSION=`echo $DIA_VERSION | cut -d . -f 1`
-DIA_MIN_VERSION=`echo $DIA_VERSION | cut -d . -f 2`
 
-if test "$DIA_MAJ_VERSION" -le "0"
-then
+if test -n "$DIA"; then
+   [ DIA_VERSION=`$DIA -v | egrep -o '([0-9]+)\.([0-9]+)'`]
+   DIA_MAJ_VERSION=`echo $DIA_VERSION | cut -d . -f 1`
+   DIA_MIN_VERSION=`echo $DIA_VERSION | cut -d . -f 2`
+
+   if test "$DIA_MAJ_VERSION" -le "0"
+   then
        if test "$DIA_MIN_VERSION" -le "92" && test -z "$DISPLAY" 
        then
                AC_MSG_ERROR([Dia below 0.93 requires an X environment. Set \$DISPLAY or install Dia 0.93 or higher])
        fi
+   fi   
 fi
 
 DOCS_TARGET_REQUIRE_PROGRAM(MAKEINDEX, makeindex, LATEX)