diff options
author | Björn Jacke <bj@sernet.de> | 2010-05-29 01:39:16 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-06-18 08:33:31 +0200 |
commit | fa0617bca326e69aa51a6046adecdfde9829cd06 (patch) | |
tree | d578f3a199551ec60a9838db0f3f23c73d9eb6e4 | |
parent | e35985f96c7c04cbf0a5128e6da275a09aa8e5f6 (diff) | |
download | samba-fa0617bca326e69aa51a6046adecdfde9829cd06.tar.gz |
s3: add m4 macro to check if stderr is empty or not
(cherry picked from commit 6f2bf6cf9d2b5ed3ca2992e26f442035764e0762)
-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 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]) |