mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
check if LD_AS_NEEDED breaks linking with libreadline fixes #7209
Signed-off-by: Simo Sorce <idra@samba.org>
This commit is contained in:
parent
c65eb4852c
commit
7aa8af144e
@ -1800,6 +1800,7 @@ fi
|
|||||||
|
|
||||||
AC_MSG_RESULT($BLDSHARED)
|
AC_MSG_RESULT($BLDSHARED)
|
||||||
|
|
||||||
|
saved_before_as_needed_ldflags="$LDFLAGS"
|
||||||
for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
|
for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
|
||||||
saved_ldflags="$LDFLAGS"
|
saved_ldflags="$LDFLAGS"
|
||||||
AC_MSG_CHECKING([if $flags works])
|
AC_MSG_CHECKING([if $flags works])
|
||||||
@ -1813,6 +1814,25 @@ for flags in "-Wl,--as-needed" "-Wl,-z,ignore" "-z ignore" ; do
|
|||||||
test x"$ld_as_needed_flag_found" = xyes && break
|
test x"$ld_as_needed_flag_found" = xyes && break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# check if we have to disable LD_AS_NEEDED_FLAG:
|
||||||
|
# On some systems for a veriety of reasons linking with
|
||||||
|
# -Wl,--as-needed -lreadline -lncurses fails
|
||||||
|
# we have to retest, if these combination is detected before.
|
||||||
|
# Bugzilla #7209
|
||||||
|
|
||||||
|
if test x$ac_cv_lib_readline_rl_callback_handler_install = xyes ; then
|
||||||
|
if test x$ld_as_needed_flag_found = xyes ; then
|
||||||
|
AC_MSG_CHECKING([if $LD_AS_NEEDED_FLAG works with readline])
|
||||||
|
# try if check no fails
|
||||||
|
save_LIBS=$LIBS
|
||||||
|
LIBS="$LIBS $TERMLIBS"
|
||||||
|
AC_TRY_LINK([], [rl_callback_handler_install();], [AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no]); LDFLAGS="$saved_before_as_needed_ldflags"])
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# for historical reasons almost all linkers don't complain about unresolved
|
# for historical reasons almost all linkers don't complain about unresolved
|
||||||
# symbols in shared libs. Except for the internal samba modules we want to get
|
# symbols in shared libs. Except for the internal samba modules we want to get
|
||||||
# errors when we produce a shared lib with unresolved symbols. On some
|
# errors when we produce a shared lib with unresolved symbols. On some
|
||||||
|
Loading…
Reference in New Issue
Block a user