Blame SOURCES/libsodium-1.0.18/m4/ld-output-def.m4

ca16be
# ld-output-def.m4 serial 2
ca16be
dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
ca16be
dnl This file is free software; the Free Software Foundation
ca16be
dnl gives unlimited permission to copy and/or distribute it,
ca16be
dnl with or without modifications, as long as this notice is preserved.
ca16be
ca16be
dnl From Simon Josefsson
ca16be
ca16be
# gl_LD_OUTPUT_DEF()
ca16be
# -------------
ca16be
# Check if linker supports -Wl,--output-def and define automake
ca16be
# conditional HAVE_LD_OUTPUT_DEF if it is.
ca16be
AC_DEFUN([gl_LD_OUTPUT_DEF],
ca16be
[
ca16be
  AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def],
ca16be
    [gl_cv_ld_output_def],
ca16be
    [if test "$enable_shared" = no; then
ca16be
       gl_cv_ld_output_def="not needed, shared libraries are disabled"
ca16be
     else
ca16be
       gl_ldflags_save=$LDFLAGS
ca16be
       LDFLAGS="-Wl,--output-def,conftest.def"
ca16be
       AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
ca16be
                   [gl_cv_ld_output_def=yes],
ca16be
                   [gl_cv_ld_output_def=no])
ca16be
       rm -f conftest.def
ca16be
       LDFLAGS="$gl_ldflags_save"
ca16be
     fi])
ca16be
  AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes")
ca16be
])