diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:28:08 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-19 18:28:08 (GMT) |
commit | 6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b (patch) | |
tree | 9d02930f4051f5668db352fee9d06a934ed7fca7 /acinclude.m4 | |
download | blt-6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b.zip blt-6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b.tar.gz blt-6c75f0dc676d73c4cbcdca5a9cf05c6797a2ac0b.tar.bz2 |
Squashed 'libxml2/' content from commit 56a6e1a
git-subtree-dir: libxml2
git-subtree-split: 56a6e1aebed937941d2960cc5012665a5ca0115e
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..7ad8630 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,28 @@ +dnl Like AC_TRY_EVAL but also errors out if the compiler generates +dnl _any_ output. Some compilers might issue warnings which we want +dnl to catch. +AC_DEFUN([AC_TRY_EVAL2], +[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AS_MESSAGE_LOG_FD; dnl +(eval [$]$1) 2>&AS_MESSAGE_LOG_FD; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }]) + +dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL +AC_DEFUN([AC_TRY_COMPILE2], +[cat > conftest.$ac_ext <<EOF +[#]line __oline__ "configure" +#include "confdefs.h" +[$1] +int main(void) { +[$2] +; return 0; } +EOF +if AC_TRY_EVAL2(ac_compile); then + ifelse([$3], , :, [rm -rf conftest* + $3]) +else + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD +ifelse([$4], , , [ rm -rf conftest* + $4 +])dnl +fi +rm -f conftest*]) |