tests: expose automake bug#14560
[platform/upstream/automake.git] / t / objcxx-minidemo.sh
old mode 100755 (executable)
new mode 100644 (file)
index fe93ea6..41f6634
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # See also sister test 'objc-minidemo.sh'.
 
 required=native
-. ./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_CONFIG_HEADERS([config.h])
 AC_OUTPUT
@@ -40,10 +38,9 @@ cat > ok.mm << 'END'
 /* The use of #import makes this valid Object C++ but invalid C++. */
 #import <iostream>
 #import <config.h>
-using namespace std;
 int main (void)
 {
-    cout << "Success (" << PACKAGE_STRING << ")\n";
+    std::cout << "Success (" << PACKAGE_STRING << ")\n";
     return 0;
 }
 END
@@ -58,13 +55,7 @@ int main (void)
 }
 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
 $AUTOHEADER
 $AUTOMAKE --add-missing