Hello, * aaragon wrote on Sat, Mar 29, 2008 at 10:22:43PM CET: > > I'm trying to create a test for a library that I use in my code but the > AC_CHECK_LIB failed in all my attempts. The library is not installed in the > standard path so I give the configure command the necessary parameters: > > ./configure CXX=g++-mp-4.3 CXXFLAGS="-I$HOME/Lib/SuperLU" > LDFLAGS="-L$HOME/Lib/SuperLU" LIBS="$HOME/Lib/SuperLU/libblas.a > -lsuperlu_3.0" > > In the configure.ac file, I have: > > AC_CHECK_LIB([superlu],[_dCreate_CompCol_Matrix],,[echo "ERROR: SuperLU > library not found." && exit 1]) > > I know that the symbol is correct, since in the directory where the library > is located (-I$HOME/Lib/SuperLU), I checked: > > aaragon@~/Lib/SuperLU$strings libsuperlu_3.0.a | grep -i dcreate > _dCreate_CompCol_Matrix > _dCreate_CompRow_Matrix > _dCreate_Dense_Matrix > _dCreate_SuperNode_Matrix FWIW, a better way to check for exported symbols is to use nm instead of strings, and check for nonstatic symbols. > Now, the name of the library in that directory is libsuperlu_3.0. So instead > of superlu (as it is supposed to be from the Autoconf manual), I have tried > superlu_3, superlu_3.0, libsuperlu, libsuperlu_3 and libsuperlu_3.0. > > All the tests have failed. Can someone point out what am I doing wrong? What system are you on? Maybe you need to get rid of the leading underscore in the name? Also, please use AS_MSG_ERROR or AS_ERROR, as 'exit 1' may not actually exit the script with an error status with some shells: AC_CHECK_LIB([superlu], [dCreate_CompCol_Matrix],, [AS_MSG_ERROR([SuperLU library not found])]) Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf