Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
f2243e5f
Commit
f2243e5f
authored
Jun 14, 2018
by
Ondřej Surý
Committed by
Mark Andrews
Nov 12, 2018
Browse files
Add --wrap linker option detection
(cherry picked from commit
10535d1c
)
parent
f28f971e
Changes
3
Hide whitespace changes
Inline
Side-by-side
config.h.in
View file @
f2243e5f
...
...
@@ -563,6 +563,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to allow building of objects for dlopen(). */
#undef ISC_DLZ_DLOPEN
/* define if the linker supports --wrap option */
#undef LD_WRAP
/* have __attribute__s used in librpz.h */
#undef LIBRPZ_HAVE_ATTR
...
...
configure
View file @
f2243e5f
...
...
@@ -681,6 +681,7 @@ UNITTESTS
ATFLIBS
ATFBIN
ATFBUILD
LD_WRAP_TESTS
CMOCKA_LIBS
CMOCKA_CFLAGS
LIBIDN2_LIBS
...
...
@@ -23358,6 +23359,47 @@ esac
#
# Check for -Wl,--wrap= support
#
save_LDFLAGS=$LDFLAGS
LDFLAGS="--wrap=printf"
LD_WRAP_TESTS=false
enable_ld_wrap=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker support for --wrap option" >&5
$as_echo_n "checking for linker support for --wrap option... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
main ()
{
__wrap_printf("success"); return (0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
enable_ld_wrap=yes
LD_WRAP_TESTS=true
$as_echo "#define LD_WRAP 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
# AM_CONDITIONAL([LD_WRAP], [test $enable_ld_wrap = yes])
LDFLAGS=$save_LDFLAGS
#
# Check whether to build Automated Test Framework unit tests
#
...
...
configure.ac
View file @
f2243e5f
...
...
@@ -4821,6 +4821,28 @@ AS_CASE([$with_cmocka],
AC_SUBST([CMOCKA_CFLAGS])
AC_SUBST([CMOCKA_LIBS])
#
# Check for -Wl,--wrap= support
#
save_LDFLAGS=$LDFLAGS
LDFLAGS="--wrap=printf"
LD_WRAP_TESTS=false
enable_ld_wrap=no
AC_MSG_CHECKING([for linker support for --wrap option])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <stdio.h>], [__wrap_printf("success"); return (0);])],
[enable_ld_wrap=yes
LD_WRAP_TESTS=true
AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
# AM_CONDITIONAL([LD_WRAP], [test $enable_ld_wrap = yes])
AC_SUBST([LD_WRAP_TESTS])
LDFLAGS=$save_LDFLAGS
#
# Check whether to build Automated Test Framework unit tests
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment