diff options
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in index 93de38dcc8..7e4ae87757 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1706,6 +1706,23 @@ fi AC_MSG_RESULT($BLDSHARED) +if test x"${ac_cv_prog_gnu_ld}" = x"yes"; then + saved_ldflags="$LDFLAGS" + AC_MSG_CHECKING([if --as-needed works]) + LDFLAGS="--as-needed $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LD_AS_NEEDED_FLAG=--as-needed], + AC_MSG_RESULT([no])) + AC_MSG_CHECKING([if -Wl,--as-needed works]) + LDFLAGS="-Wl,--as-needed $saved_ldflags" + AC_TRY_LINK([],[], + [AC_MSG_RESULT([yes]) + LD_AS_NEEDED_FLAG=-Wl,--as-needed], + AC_MSG_RESULT([no])) + LDFLAGS="$LD_AS_NEEDED_FLAG $saved_ldflags" +fi + AC_MSG_CHECKING([LDFLAGS]) AC_MSG_RESULT([$LDFLAGS]) AC_MSG_CHECKING([DYNEXP]) |