>From 5e905daf11e59202b1420a972aeeb2469a3ebafa Mon Sep 17 00:00:00 2001 Message-Id: From: Stefano Lattarini Date: Mon, 23 Apr 2012 12:47:43 +0200 Subject: [PATCH] tests: fix spurious failure on Mac OS X See automake bug#11306. * t/lex-libobj.sh: We used to pass LEXLIB='-L /lib' to the ./configure invocation, to prevent it from explicitly searching for a "lex library". But the linker on MacOS X 10.5 apparently chokes on that: cc -g -O2 -o foo foo.o -L /lib yywrap.o ld: file not found: /lib collect2: ld returned 1 exit status So, we now instead pass LEXLIB=' ', which being non-empty is enough to prevent the search of a "lex library". And since we are at it, enhance comments on this non-obvious usage. Co-authored-by: Bruno Haible Signed-off-by: Stefano Lattarini --- t/lex-libobj.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/lex-libobj.sh b/t/lex-libobj.sh index 3bc2981..1c3b0cc 100755 --- a/t/lex-libobj.sh +++ b/t/lex-libobj.sh @@ -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 foo 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 -- 1.7.9.5