summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-01-08 19:22:35 -0800
committerRoland McGrath <roland@redhat.com>2009-01-08 19:22:35 -0800
commit7a647878b28ec3dee77c76cccc76330c1a05e58d (patch)
treef4fba60b20b6c405289c83da5b1f94fedac0548b /m4
parente06762c31cdc3c5dcabe586e613984bbe9ae6284 (diff)
Move eu_ZIPLIB macro to m4/zip.am, new file.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog5
-rw-r--r--m4/Makefile.am4
-rw-r--r--m4/zip.m417
3 files changed, 24 insertions, 2 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index e285a0e4..eea78ff0 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-08 Roland McGrath <roland@redhat.com>
+
+ * zip.am: New file.
+ * Makefile.am (EXTRA_DIST): Add it.
+
2007-06-05 Ulrich Drepper <drepper@redhat.com>
* gettext.m4: Update from gettext 0.16.1.
diff --git a/m4/Makefile.am b/m4/Makefile.am
index dd955e68..156010c7 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
##
-## Copyright (C) 2000, 2001, 2002, 2004, 2005 Red Hat, Inc.
+## Copyright (C) 2000-2009 Red Hat, Inc.
## This file is part of Red Hat elfutils.
##
## Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -26,4 +26,4 @@
##
##m4-files-begin
-EXTRA_DIST = codeset.m4 gettext.m4 iconv.m4 lcmessage.m4 progtest.m4
+EXTRA_DIST = codeset.m4 gettext.m4 iconv.m4 lcmessage.m4 progtest.m4 zip.m4
diff --git a/m4/zip.m4 b/m4/zip.m4
new file mode 100644
index 00000000..398d1be5
--- /dev/null
+++ b/m4/zip.m4
@@ -0,0 +1,17 @@
+dnl Test for either zlib or bzlib.
+dnl Defines --with-$1lib argument, $2LIB automake conditional,
+dnl and sets AC_DEFINE(USE_$2LIB) and LIBS.
+
+AC_DEFUN([eu_ZIPLIB], [with_[$1]lib=default
+AC_ARG_WITH([[$1]lib],
+AC_HELP_STRING([--with-[$1]lib], [support g[$1]ip compression in libdwfl]))
+if test $with_[$1]lib != no; then
+ AC_SEARCH_LIBS([$4], [$3], [with_[$1]lib=yes],
+ [test $with_[$1]lib = default ||
+ AC_MSG_ERROR([missing -l[$3] for --with-[$1]lib])])
+fi
+AM_CONDITIONAL([$2]LIB, test $with_[$1]lib = yes)
+if test $with_[$1]lib = yes; then
+ AC_DEFINE(USE_[$2]LIB)
+fi
+AH_TEMPLATE(USE_[$2]LIB, [Support $5 decompression via -l$3.])])