|
From: | Yevgen Muntyan |
Subject: | Re: AC_TRY_LINK command line problem |
Date: | Thu, 11 Jan 2007 21:17:10 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060809 Debian/1.7.13-0.3 |
Ralf Wildenhues wrote:
Hello Yevgen, * Yevgen Muntyan wrote on Wed, Jan 10, 2007 at 06:17:09AM CET:AC_TRY_LINK puts LDFLAGS before conftest.c on compilation command line, and it fails with mingw. Here, it made the following:/usr/bin/i586-mingw32msvc-gcc -o conftest.exe -O2 -I/usr/local/win/gtk/include -mms-bitfields -march=i686 -I/usr/local/win/gtk/include -I/usr/local/win/Python24/include -L/usr/local/win/gtk/lib -L/usr/local/win/Python24/libs -lpython24 conftest.cIt produces linker errors, undefined reference to whatever is in libpython24.AC_COMPILE_IFELSE does work fine.Post the errors, otherwise there's little we can do to help you.
Apparently same thing happens with -Wl,--as-needed option. If you put it into LDFLAGS, then AC_CHECK_FUNCS fails. 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 which fails with "undefined reference to `FAMOpen'", but this works: gcc -o conftest -g conftest.c -L/usr/local/gtk/lib -Wl,--as-needed -lfam Best regards, Yevgen
[Prev in Thread] | Current Thread | [Next in Thread] |