autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

checking for libraries that link but do not run


From: Ben Pfaff
Subject: checking for libraries that link but do not run
Date: Mon, 05 Oct 2009 09:20:47 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]