Merge branch 'maint'
[platform/upstream/automake.git] / t / objcxx-deps.sh
index 24665cc..5f35080 100755 (executable)
 # Automatic dependency tracking for Objective C++.
 # See also sister test 'objc-deps.sh'.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
 AC_PROG_OBJCXX
 AC_OUTPUT
 END
@@ -33,7 +31,6 @@ END
 
 cat > baz.h++ << 'END'
 #include <iostream>
-using namespace std;
 #include "baz2.hh"
 END
 
@@ -46,24 +43,18 @@ cat > bar.mm << 'END'
 #import "baz.h++"
 int main (void)
 {
-    cout << MSG << "\n";
+    std::cout << MSG << "\n";
     return 0;
 }
 END
 
-if $ACLOCAL; then
-  : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
-  skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
-  Exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
 ./configure --enable-dependency-tracking
 $MAKE
-cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
 
 $sleep
 : > old
@@ -74,7 +65,7 @@ if test -f foo; then
 else
   is_newest foo.exe old
 fi
-cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
 
 $MAKE distcheck