Roland McGrath | e8d3528 | 2009-02-01 14:24:46 -0800 | [diff] [blame] | 1 | dnl -*- Autoconf -*- test for either zlib or bzlib. |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 2 | dnl Defines --with-$1 argument, $2 automake conditional, |
| 3 | dnl and sets AC_DEFINE(USE_$2) and LIBS. |
Roland McGrath | 7a64787 | 2009-01-08 19:22:35 -0800 | [diff] [blame] | 4 | |
Roland McGrath | e8d3528 | 2009-02-01 14:24:46 -0800 | [diff] [blame] | 5 | AC_DEFUN([eu_ZIPLIB], [dnl |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 6 | AC_ARG_WITH([[$1]], |
| 7 | AC_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),, |
| 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]])]) |
Roland McGrath | 7a64787 | 2009-01-08 19:22:35 -0800 | [diff] [blame] | 13 | fi |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 14 | AM_CONDITIONAL([$2], test $with_[$1] = yes) |
| 15 | if test $with_[$1] = yes; then |
| 16 | AC_DEFINE(USE_[$2]) |
Roland McGrath | 7a64787 | 2009-01-08 19:22:35 -0800 | [diff] [blame] | 17 | fi |
Roland McGrath | 2416964 | 2009-08-26 02:26:34 -0700 | [diff] [blame] | 18 | AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])]) |