[AC_MSG_RESULT([no])]
)
+saved_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS -Wl,--wrap=exit"
+AC_MSG_CHECKING([linker supports --wrap])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ void exit(int);
+ void __real_exit(int);
+ void __wrap_exit(int i) {
+ __real_exit(i);
+ }
+ ]],
+ [[
+ exit(0);
+ ]]
+ )],
+ [
+ AC_MSG_RESULT([yes])
+ have_ld_wrap_support=yes
+ ],
+ [AC_MSG_RESULT([no])],
+)
+LDFLAGS="$saved_LDFLAGS"
+
dnl We emulate signals in Windows
AC_CHECK_DECLS(
[SIGHUP],
AM_CONDITIONAL([ENABLE_PLUGIN_AUTH_PAM], [test "${enable_plugin_auth_pam}" = "yes"])
AM_CONDITIONAL([ENABLE_PLUGIN_DOWN_ROOT], [test "${enable_plugin_down_root}" = "yes"])
AM_CONDITIONAL([ENABLE_CRYPTO], [test "${enable_crypto}" = "yes"])
+AM_CONDITIONAL([HAVE_LD_WRAP_SUPPORT], [test "${have_ld_wrap_support}" = "yes"])
plugindir="${with_plugindir}"
sampledir="\$(docdir)/sample"
AUTOMAKE_OPTIONS = foreign
-check_PROGRAMS = argv_testdriver buffer_testdriver
+check_PROGRAMS=
+
+if HAVE_LD_WRAP_SUPPORT
+check_PROGRAMS += argv_testdriver buffer_testdriver
+endif
if ENABLE_CRYPTO
check_PROGRAMS += tls_crypt_testdriver