diff options
-rw-r--r-- | source3/m4/aclocal.m4 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4 index 77224874f3..f7f3497a23 100644 --- a/source3/m4/aclocal.m4 +++ b/source3/m4/aclocal.m4 @@ -609,6 +609,19 @@ AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) +dnl AC_TRY_COMMAND_NO_STDERR - also fail if there is output on stderr +AC_DEFUN( [AC_TRY_COMMAND_NO_STDERR], +[ + { OUT=`($1) 3>&AS_MESSAGE_LOG_FD 2>&1 1>&3` + RC=$? + echo "\$?=$RC" >&AS_MESSAGE_LOG_FD + if test x"$OUT" != x ; then + echo "stderr:" >&AS_MESSAGE_LOG_FD + echo "$OUT" >&AS_MESSAGE_LOG_FD + fi + test $RC -eq 0 -a x"$OUT" = x ; } +]) + dnl AC_TRY_RUN_STRICT(PROGRAM,CFLAGS,CPPFLAGS,LDFLAGS, dnl [ACTION-IF-TRUE],[ACTION-IF-FALSE], dnl [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) |