1 |
Thomas Kahle schrieb: |
2 |
> Hi, |
3 |
> the following check in configure.ac fails with --as-needed but works |
4 |
> without it. Any hints what is wrong ? Thanks / Thomas |
5 |
> |
6 |
> -------------------- |
7 |
> |
8 |
> if test $BUILD_ntl = no |
9 |
> then AC_LANG(C++) |
10 |
> AC_CHECK_HEADER(NTL/version.h,,BUILD_ntl=yes) |
11 |
> AC_MSG_CHECKING(for ntl library) |
12 |
> FOUND= |
13 |
> SAVELIBS=$LIBS |
14 |
> for lib in "" "-lntl" "-lntl -lgf2x" |
15 |
> do test "$lib" && LIBS="$lib $LIBS" |
16 |
> AC_LINK_IFELSE( [ |
17 |
> #include <NTL/tools.h> |
18 |
> int main () { _ntl_GetTime(); } |
19 |
> ], |
20 |
> FOUND=yes; break;, |
21 |
> LIBS=$SAVELIBS) |
22 |
> done |
23 |
> if test "$FOUND" |
24 |
> then if test "$lib" |
25 |
> then AC_MSG_RESULT([$lib]) |
26 |
> else AC_MSG_RESULT([none needed]) |
27 |
> fi |
28 |
> else AC_MSG_RESULT(none found) |
29 |
> BUILD_ntl=yes |
30 |
> fi |
31 |
> fi |
32 |
> |
33 |
> |
34 |
|
35 |
Perhaps you will find a hint in Diego's blog. I think he wrote about |
36 |
configure checks which fail with as-needed and how to fix them. |
37 |
|
38 |
justin |