]>
Commit | Line | Data |
---|---|---|
e8d35284 | 1 | dnl -*- Autoconf -*- test for either zlib or bzlib. |
24169646 RM |
2 | dnl Defines --with-$1 argument, $2 automake conditional, |
3 | dnl and sets AC_DEFINE(USE_$2) and LIBS. | |
7a647878 | 4 | |
e8d35284 | 5 | AC_DEFUN([eu_ZIPLIB], [dnl |
24169646 | 6 | AC_ARG_WITH([[$1]], |
9a363700 | 7 | AS_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),, |
24169646 RM |
8 | [with_[$1]=default]) |
9 | if 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]])]) | |
7a647878 | 13 | fi |
24169646 RM |
14 | AM_CONDITIONAL([$2], test $with_[$1] = yes) |
15 | if test $with_[$1] = yes; then | |
16 | AC_DEFINE(USE_[$2]) | |
7702a3c1 MW |
17 | else |
18 | with_[$1]=no | |
7a647878 | 19 | fi |
24169646 | 20 | AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])]) |