diff options
author | Max Kellermann <max@duempel.org> | 2010-01-20 21:23:43 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-01-20 21:42:43 +0100 |
commit | 7a24e496d557782b58dd7d178b6bb134bff3d611 (patch) | |
tree | 543159baed500ae594885e1f66b3f4536da66de3 /m4 | |
parent | 7a62818ffdfbdef76784acb8b2e90e7cc14333f0 (diff) |
configure.ac: new libwrap autoconf test
Use MPD_AUTO_RESULT(). Don't force libwrap by default.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/libwrap.m4 | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/m4/libwrap.m4 b/m4/libwrap.m4 index 000b0bab2..5ad3df19b 100644 --- a/m4/libwrap.m4 +++ b/m4/libwrap.m4 @@ -3,35 +3,12 @@ dnl Usage: dnl AC_CHECK_LIBWRAP([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl -AC_DEFUN([AC_CHECK_LIBWRAP], - [dnl start - - AC_ARG_ENABLE([libwrap], - [AS_HELP_STRING([--disable-libwrap], - [use libwrap (default enabled)])], , - [ - AC_CHECK_HEADERS([tcpd.h], - [], - [AC_MSG_ERROR([tpcd.h libwrap header not found])] - $3) - - AC_CHECK_LIB([wrap], - [request_init], - [], - [AC_MSG_ERROR([libwrap not found !])] - $3) - - AC_DEFINE(HAVE_LIBWRAP, 1, [define to enable libwrap library]) - - LIBWRAP_CFLAGS="" - LIBWRAP_LDFLAGS="-lwrap" - - AC_SUBST([LIBWRAP_CFLAGS]) - AC_SUBST([LIBWRAP_LDFLAGS]) - - dnl ACTION-IF-FOUND - $2 - - ]) dnl AC_ARG_ENABLE - -]) dnl AC_DEFUN +AC_DEFUN([AC_CHECK_LIBWRAP],[ + AC_CHECK_HEADERS([tcpd.h], + AC_CHECK_LIB([wrap], [request_init], + [LIBWRAP_CFLAGS="" + LIBWRAP_LDFLAGS="-lwrap" + $1], + $2), + $2) +]) |