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 <bruno@clisp.org>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
$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