Squashed 'third_party/elfutils/' content from commit 555e15e
Change-Id: I61cde98949e47e5c8c09c33260de17f30921be79
git-subtree-dir: third_party/elfutils
git-subtree-split: 555e15ebe8bf1eb33d00747173cfc80cc65648a4
diff --git a/m4/zip.m4 b/m4/zip.m4
new file mode 100644
index 0000000..ab6fd57
--- /dev/null
+++ b/m4/zip.m4
@@ -0,0 +1,20 @@
+dnl -*- Autoconf -*- test for either zlib or bzlib.
+dnl Defines --with-$1 argument, $2 automake conditional,
+dnl and sets AC_DEFINE(USE_$2) and LIBS.
+
+AC_DEFUN([eu_ZIPLIB], [dnl
+AC_ARG_WITH([[$1]],
+AC_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),,
+ [with_[$1]=default])
+if test $with_[$1] != no; then
+ AC_SEARCH_LIBS([$4], [$3], [with_[$1]=yes],
+ [test $with_[$1] = default ||
+ AC_MSG_ERROR([missing -l[$3] for --with-[$1]])])
+fi
+AM_CONDITIONAL([$2], test $with_[$1] = yes)
+if test $with_[$1] = yes; then
+ AC_DEFINE(USE_[$2])
+else
+ with_[$1]=no
+fi
+AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])])