Rainer wrote: > * If this first attempt fails, a second attempt should be made with > *both* -lhesiod and -lresolv on the link line. If this succeeds, both > -lhesiod and -lresolv should be added to LIBS.
I think that the 5th argument of AC_CHECK_LIB is intended primarily for the case where you *don't* want the auxiliary libraries to be added to LIBS, since they're going in your own private variable (e.g. @X_LIBS@) that you'll add to the link command separately. (Usually, in this case, you'll also override ACTION-IF-FOUND to not put the result in LIBS either.) > * It always tries to use -lresolv, while it may be necessary (or even > present) only on some platforms. This may even be harmful in some > cases: This kind of pathology is best encapsulated in a separate check, I think. i.e. you have a check (or a macro) that detects whether -lresolve is present/working, and sets RESOLVE_LIB appropriately. Then, if you want, you can either add $RESOLVE_LIB to $LIBS, or use it in the 5th argument of AC_CHECK_LIB if you don't want it in $LIBS. Steven
