From 3d3ec7c11e50cb277bb6809756eeed17ab1f8a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Sat, 29 May 2010 01:39:16 +0200 Subject: [PATCH 5/9] s3: add m4 macro to check if stderr is empty or not --- 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 7722487..f7f3497 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]) -- 1.7.1