diff options
author | Björn Jacke <bj@sernet.de> | 2010-05-29 01:39:16 +0200 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2010-05-30 16:25:28 +0200 |
commit | b869350ddda84d0d6953339843bebd25d18b8fba (patch) | |
tree | 11ee11224036630c1e0257f8906069c3f60f560a /source3 | |
parent | 55df7606e3f47e03255e6ff1cdead458a8bc6160 (diff) | |
download | samba-b869350ddda84d0d6953339843bebd25d18b8fba.tar.gz samba-b869350ddda84d0d6953339843bebd25d18b8fba.tar.bz2 samba-b869350ddda84d0d6953339843bebd25d18b8fba.zip |
s3: add m4 macro to check if stderr is empty or not
Diffstat (limited to 'source3')
-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]) |