blob: 8e4d545c0c9f1a77fe7b4e9905748e4994c7e8f3 [file] [log] [blame]
Roland McGrathe8d35282009-02-01 14:24:46 -08001dnl -*- Autoconf -*- test for either zlib or bzlib.
Roland McGrath24169642009-08-26 02:26:34 -07002dnl Defines --with-$1 argument, $2 automake conditional,
3dnl and sets AC_DEFINE(USE_$2) and LIBS.
Roland McGrath7a647872009-01-08 19:22:35 -08004
Roland McGrathe8d35282009-02-01 14:24:46 -08005AC_DEFUN([eu_ZIPLIB], [dnl
Roland McGrath24169642009-08-26 02:26:34 -07006AC_ARG_WITH([[$1]],
7AC_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),,
8 [with_[$1]=default])
9if test $with_[$1] != no; then
10 AC_SEARCH_LIBS([$4], [$3], [with_[$1]=yes],
11 [test $with_[$1] = default ||
12 AC_MSG_ERROR([missing -l[$3] for --with-[$1]])])
Roland McGrath7a647872009-01-08 19:22:35 -080013fi
Roland McGrath24169642009-08-26 02:26:34 -070014AM_CONDITIONAL([$2], test $with_[$1] = yes)
15if test $with_[$1] = yes; then
16 AC_DEFINE(USE_[$2])
Roland McGrath7a647872009-01-08 19:22:35 -080017fi
Roland McGrath24169642009-08-26 02:26:34 -070018AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])])