aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-10-15 21:43:03 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-10-15 21:43:03 +0000
commit5edcc93658a4c168fa85c0bc7704e1a1f8e1bc32 (patch)
tree8a497b47662a6757a37d85beb172cbb6beee6d15 /acinclude.m4
parentab8500d7947f4bde7a3041086a54a2c1fe993755 (diff)
downloadandroid_external_libxml2-5edcc93658a4c168fa85c0bc7704e1a1f8e1bc32.tar.gz
android_external_libxml2-5edcc93658a4c168fa85c0bc7704e1a1f8e1bc32.tar.bz2
android_external_libxml2-5edcc93658a4c168fa85c0bc7704e1a1f8e1bc32.zip
Auto* still annoying peoples, commiting result :-(, Daniel.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..2634dc9c
--- /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>&AC_FD_CC; dnl
+(eval [$]$1) 2>&AC_FD_CC; _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() {
+[$2]
+; return 0; }
+EOF
+if AC_TRY_EVAL2(ac_compile); then
+ ifelse([$3], , :, [rm -rf conftest*
+ $3])
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ifelse([$4], , , [ rm -rf conftest*
+ $4
+])dnl
+fi
+rm -f conftest*])