From b869350ddda84d0d6953339843bebd25d18b8fba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Sat, 29 May 2010 01:39:16 +0200 Subject: [PATCH] s3: add m4 macro to check if stderr is empty or not --- source3/m4/aclocal.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4 index 77224874f34..f7f3497a236 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]) -- 2.11.4.GIT