packaging: Bump to 1.14.1
[platform/upstream/automake.git] / t / lex-libobj.sh
old mode 100755 (executable)
new mode 100644 (file)
index 3bc2981..f0eed91
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-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
@@ -18,7 +18,7 @@
 # LIBOBJ machinery.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -67,8 +67,13 @@ grep LIBOBJS Makefile # For debugging.
 $MAKE
 $MAKE distclean
 
-# Force "no system lex library".
-./configure LEXLIB='-L /lib'
+# Force "no system lex library".  Setting LEXLIB to a non-empty value
+# ensures that configure won't search for a "lex library", and simply
+# rely on the LEXLIB to provide it, if needed.  So, by setting LEXLIB
+# to a blank but non-empty value we can fool configure into thinking
+# that no system-level library providing a 'yywrap' function is
+# available.  See also discussion on automake bug#11306.
+./configure LEXLIB=' '
 grep LIBOBJS Makefile # For debugging.
 grep '^LIBOBJS *=.*yywrap.*\.o' Makefile # Sanity check.
 $MAKE