build-sys: make sure LD_AS_NEEDED=1 does not break AC_LINK_IFELSE.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Wed, 26 Jun 2013 17:38:36 +0000 (20:38 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Wed, 26 Jun 2013 17:38:52 +0000 (20:38 +0300)
commitb8364e0afa414e099b19ba80b8576de2b5f811a1
tree20b7c04346856be54e2913124e48bbcff0be7d03
parent758403c82a3d90ca573fe3fc58ce67e3be6f1af8
build-sys: make sure LD_AS_NEEDED=1 does not break AC_LINK_IFELSE.

For some combinations of autoconf/gcc (e.g. 2.69/4.7.2) setting
LD_AS_NEEDED to 1 breaks AC_LINK_IFELSE. That macro generates
a compilation command line where the libraries precede the generated
C source code. With LD_AS_NEEDED=1 all referenced/tested symbols
from any of the libraries end up being undefined. This fools
AC_LINK_IFELSE to consider the test a failure and always choose the
else branch. rpmbuild always sets LD_AS_NEEDED to 1. To work around
this save, unset and restore LD_AS_NEEDED for the duration of the
AC_LINK_IFELSE tests.
m4/websockets.m4