Paul Eggert wrote:
Yevgen Muntyan <[EMAIL PROTECTED]> writes:
AC_TRY_LINK puts LDFLAGS before conftest.c on compilation command line...
For instance for
AC_CHECK_FUNCS([FAMMonitorDirectory FAMOpen],[fam_found=yes],[fam_found=no])
it produces this command line:
gcc -o conftest -g -L/usr/local/gtk/lib -Wl,--as-needed -lfam conftest.c
-lfam belongs in LIBS, not in LDFLAGS. That's your problem, most likely.
Yes, that was it! And it means normal usage of pkg-config is broken.
In any case, after splitting linker flags into LIBS and LDFLAGS properly
everything compiles and links, both this FAM thing, and python test on
mingw; it does put LIBS after conftest.c. My bug :)
Thank you,
Yevgen