libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / m4 / ld-output-def.m4
blob59895bc24492a7e91b1c900595ba2d62da5cdcfa
1 # ld-output-def.m4 serial 2
2 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 dnl From Simon Josefsson
9 # gl_LD_OUTPUT_DEF()
10 # -------------
11 # Check if linker supports -Wl,--output-def and define automake
12 # conditional HAVE_LD_OUTPUT_DEF if it is.
13 AC_DEFUN([gl_LD_OUTPUT_DEF],
15   AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def],
16     [gl_cv_ld_output_def],
17     [if test "$enable_shared" = no; then
18        gl_cv_ld_output_def="not needed, shared libraries are disabled"
19      else
20        gl_ldflags_save=$LDFLAGS
21        LDFLAGS="-Wl,--output-def,conftest.def"
22        AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
23                    [gl_cv_ld_output_def=yes],
24                    [gl_cv_ld_output_def=no])
25        rm -f conftest.def
26        LDFLAGS="$gl_ldflags_save"
27      fi])
28   AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes")