Hello,
  when a test sets $required so that it contains both *libtool* and
*gettext*, we should look for libtool.m4 _and_ gettext.m4.
Current code in defs.in forgets to look for gettext.m4.

Please find attached a proposed patch.

Have a nice day,
        Stepan Kasal
2005-07-20  Stepan Kasal  <[EMAIL PROTECTED]>

        * tests/defs.in: When required matches both `*libtool*' and
        `*gettext*', check for both m4 files.

Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.36
diff -u -r1.36 defs.in
--- tests/defs.in       14 May 2005 20:28:54 -0000      1.36
+++ tests/defs.in       20 Jul 2005 15:53:27 -0000
@@ -272,34 +272,33 @@
 # files from an old version of Automake that we don't want to use.
 # Use `-Wno-syntax' because we do not want our test suite to fail because
 # some third-party .m4 file is underquoted.
-aclocaldir='@prefix@/share/aclocal'
-extra_includes=""
-if [ -f $aclocaldir/dirlist ] ; then
-   extra_includes=`(tmp_inc=""
-   while read LINE ; do
-      tmp_inc="$tmp_inc -I $LINE"
-   done
-   echo $tmp_inc) < $aclocaldir/dirlist`
-fi
 case $required in
-  *libtool* )
+  *libtool* | *gettext* )
+    aclocaldir='@prefix@/share/aclocal'
+    extra_includes=""
+    if [ -f $aclocaldir/dirlist ] ; then
+       extra_includes=`(tmp_inc=""
+       while read LINE ; do
+         tmp_inc="$tmp_inc -I $LINE"
+       done
+       echo $tmp_inc) < $aclocaldir/dirlist`
+    fi
+
     libtool_found=no
+    gettext_found=no
     for d in $extra_includes $aclocaldir ; do
-       if [ "x$d" != "x-I" ] && [ -f "$d/libtool.m4" ] ; then
+       [ "x$d" != x-I ] || continue
+       if [ -f "$d/libtool.m4" ] ; then
           libtool_found=yes
        fi
-    done
-    test "x$libtool_found" = "xyes" || exit 77
-    ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I 
$aclocaldir"
-    ;;
-  *gettext* )
-    gettext_found=no
-    for d in $extra_includes $aclocaldir ; do
-       if [ "x$d" != "x-I" ] && [ -f "$d/gettext.m4" ] ; then
+       if [ -f "$d/gettext.m4" ] ; then
           gettext_found=yes
        fi
     done
-    test "x$gettext_found" = "xyes" || exit 77
+    case $required in
+      *libtool* ) test $libtool_found = yes || exit 77 ;;
+      *gettext* ) test $gettext_found = yes || exit 77 ;;
+    esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I 
$aclocaldir"
     ;;
 esac

Reply via email to