#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
# should work.
required=cc
-. ./defs || Exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
test -f '$(bindir)/libquux.a'
ls -l '$(libexecdir)/bar.h'
test -f '$(libexecdir)/bar.h'
- test ! -x '$(libexecdir)/bar.h'
+## If this test is run as root, "test -x" could succeed also for
+## non-executable files, so we need to protect the next check.
+## See automake bug#12041.
+ if test -x Makefile; then echo SKIP THIS; else \
+ test ! -x '$(libexecdir)/bar.h'; \
+ fi;
END
cat > foo.c <<'END'