Hi Paulo, * Paulo Jorge Matos wrote on Thu, Nov 10, 2005 at 06:42:00PM CET: > On 10/11/05, Paulo Jorge Matos <pocmatos@xxxxxxxxx> wrote: > > > > The problem is I'm checking for a library using AC_CHECK_LIB and I was > > expecting to be able to say: (glpk - gnu linear programming kit) > > AC_CHECK_LIB(glpk) > > and that's it. However, I need to also give a function name. Why? Some linkers do not error out if the named library was not found but also not used to satisfy a certain symbol. (At least I believe so.) > > I imagine this is the only way to check if the library is linkable... > > so, I asked for lpx_create_prob. (does this function need any > > particular feature?) > > Still config.log says it does not work because the test program needs > > to include glpk.h. I don't think this is the exact error it gives. If lpx_create_prob is a function in libglpk, that should work. It may be that they used a macro to define it in some header file. Then use a different function that is not implemented as a macro. But the error you are citing from comes most likely from a different test. It is usually better to quote (copy and paste from config.log) error messages, so possible misunderstandings are avoided. > > How can I tell that to autoconf? > > Oh well, this is a quite nice trick. > Checking for main, i.e. > AC_CHECK_LIB(glpk, main) This is not a trick. This is plain broken. There is no need for Autoconf if you are going to disable its primary use anyway. Might as well just set LIBS="-lglpk $LIBS" right away instead of invoking AC_CHECK_LIB. Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf