cosmetics: fix typo in a user-facing message in tests
[platform/upstream/automake.git] / t / lex-header.sh
old mode 100755 (executable)
new mode 100644 (file)
index d50a1ef..1ba81dd
@@ -1,5 +1,5 @@
 #! /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
 required='cc flex'
 . test-init.sh
 
+# Here, we need to use the use flex option '--header-file', but some
+# older flex versions don't support is (see automake bug#11524 and
+# bug#12836).  Skip this test if such an old flex version is detected.
+$LEX --help | grep '.*--header-file' \
+  || skip_ "flex doesn't support the '--header-file' option"
+
 cat >> configure.ac << 'END'
 AC_PROG_CC
 AC_PROG_LEX
@@ -49,6 +55,7 @@ cat > lexer.l << 'END'
 END
 
 cat > main.c <<'END'
+#define YY_NO_UNISTD_H 1
 #include "mylex.h"
 int main (void)
 {