Commit 0cd1e5ed authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Disable LD_WRAP tests when libtool is disabled

parent 14a4a799
Pipeline #18220 passed with stages
in 12 minutes and 18 seconds
......@@ -375,7 +375,6 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_check_link_flag.m4])
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
......
This diff is collapsed.
......@@ -2210,24 +2210,25 @@ AC_SUBST([KYUA])
# Check for -Wl,--wrap= support
#
AX_SAVE_FLAGS([wrap])
LDFLAGS="-Wl,-wrap,exit"
LD_WRAP_TESTS=false
AC_MSG_CHECKING([for linker support for --wrap option])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <stdlib.h>
void __real_exit (int status);
void __wrap_exit (int status) { __real_exit (status); }
]],
[[exit (1);]])],
[LD_WRAP_TESTS=true
AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AC_SUBST([LD_WRAP_TESTS])
AS_IF([test "$use_libtool" = yes],
[AX_SAVE_FLAGS([wrap])
LDFLAGS="-Wl,-wrap,exit"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <stdlib.h>
void __real_exit (int status);
void __wrap_exit (int status) { __real_exit (status); }
]],
[[exit (1);]])],
[LD_WRAP_TESTS=true
AC_DEFINE([LD_WRAP], [1], [define if the linker supports --wrap option])
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
AX_RESTORE_FLAGS([wrap])],
[AC_MSG_RESULT([no, libtool required])])
AX_RESTORE_FLAGS([wrap])
AC_SUBST([LD_WRAP_TESTS])
#
# Check for i18n
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment