In GNU PSPP, we have had a number of problems with users who pass
correct "configure" flags to link against a library
(e.g. LDFLAGS='-L/usr/local/lib') but do not pass the correct
flags to let binaries linked against those libraries run
(e.g. LDFLAGS='-Wl,-rpath,/usr/local/lib' or LD_LIBRARY_PATH).
This means that AC_RUN_IFELSE calls after those libraries are
added to LIBS always fail.  This causes bizarre symptoms, such as
build assertion failures in gnulib-generated stdint.h (e.g. see
http://lists.gnu.org/archive/html/pspp-dev/2009-10/msg00002.html).

To try to head off the problem, I'm thinking about putting
something like this after each command that adds to LIBS:
    AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])], 
                  [:],
                  [AC_MSG_FAILURE([Cannot run program linked against $LIBS.])],
                  [:])

Am I on the right track?  It seems to me that there should
already be a mechanism to help with this, but I do not see one.

Thanks,

Ben.
-- 
Ben Pfaff 
http://benpfaff.org


_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to