am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / objcxx-flags.sh
old mode 100755 (executable)
new mode 100644 (file)
index aea7e19..986ebf5
@@ -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
 # Test Objective C++ compilation flags.
 # See also sister test 'objc-flags.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
@@ -50,23 +48,16 @@ for i in 2 4; do
 END
 done
 
-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 -a
 
 $FGREP OBJCXXFLAGS Makefile.in # For debugging.
-grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)'       Makefile.in && Exit 1
-grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)'    Makefile.in && Exit 1
-grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
+grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)'       Makefile.in && exit 1
+grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)'    Makefile.in && exit 1
+grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
 
 ./configure OBJCXXFLAGS=-UERROR
-$MAKE 
+$MAKE
 
 :