[CLAM] ./configuring CLAM
Pupeno
pupeno at pupeno.com
Tue Apr 13 11:45:02 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Trying to run ./configure on CLAM I've got the following error:
checking for fftw library...... configure: error:
The test program did not compile or link. Check your config.log for
details.
Checking config.log I see that there are a couple of problems, the compiling
line is like this:
gcc -o conftest -g -O2 -lfftw conftest.c >&5
1) It should be g++, not gcc (fftw is C++, not C) and -lfftw should be at the
end.
2) -lfftw should be at the end, after conftest.c
The resulting like should be this:
g++ -o conftest -g -O2 conftest.c -lfftw
and that line works without problem.
But I can't find how to integrate it back in the build system.
I tracked down this error to the file aclocal.m4, here:
if test $found_fftw = yes; then
AC_MSG_CHECKING([for fftw library...])
OLD_FLAGS=$CXXFLAGS
link_ok=no
FFTW_LIBS="fftw"
FLAG_FFTW_LIBS="$FLAG_FFTW_LIBS -lfftw"
CFLAGS="$CFLAGS $FLAG_FFTW_INCLUDES $FLAG_FFTW_LIB_PATH $FLAG_FFTW_LIBS"
AC_TRY_LINK([
#include<fftw.h>
],[
fftw_sizeof_fftw_real();
return 0;
],[
link_ok=yes
],[])
if test $link_ok = no; then
AC_MSG_ERROR([
The test program did not compile or link. Check your config.log for
details.]
)
else
AC_MSG_RESULT(yes: [$FFTW_LIBS])
fi
AC_TRY_RUN([
#include<fftw.h>
int main()
{
fftw_sizeof_fftw_real();
return 0;
}
],[
AC_MSG_RESULT(yes)
DEFINE_HAVE_FFTW=HAVE_FFTW
if test $fftw_local = yes; then
FFTW_INCLUDES="\$(CLAM_PATH)/../fftw/include"
FFTW_LIB_PATH="\$(CLAM_PATH)/../fftw/lib"
fi
],[
AC_MSG_ERROR([
The test program did compile, but failed to link. This probably means that
the run-time linker is not able to find libfftw. You might want to set
your LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OS X) variable, or edit
/etc/ld/ld.conf to point to the right location.]
)
],[
echo $ac_n "cross compiling; assumed OK... $ac_c"
])
CXXFLAGS=$OLD_FLAGS
else
AC_MSG_ERROR([
No fftw headers found!]
)
fi;
but it seems the compiling like is built by the back end, by this macro:
AC_TRY_LINK and I don't think that macro should be modified (I wouldn't know
where to modify it anyway).
So, does anybody know an idea of how to solve this problem ?
Thank you.
- --
Pupeno: pupeno at pupeno.com
http://www.pupeno.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAfDUxtCepaMf3unIRAs0vAJ43kYdLIhbOLcYSQGdae934STSGDACbBqay
5nWhM7LQRsB9ZUs7hmgfLfA=
=bT8B
-----END PGP SIGNATURE-----
More information about the clam-users
mailing list