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

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