[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_TRY_LINK command line problem

From: Yevgen Muntyan
Subject: Re: AC_TRY_LINK command line problem
Date: Fri, 12 Jan 2007 02:32:46 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060809 Debian/1.7.13-0.3

Paul Eggert wrote:

Yevgen Muntyan <address@hidden> 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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]