1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
systemd/m4/acx_libwrap.m4
Lucas De Marchi c18514440d build-sys: fix AC_COMPILE_IFELSE tests
This removes some warnings when bootstrapping. The warnings were introduced
in autoconf 2.68. Reference:

http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html

The following code

	AC_COMPILE_IFELSE([
		<MY C CODE HERE>
		], ...)

is changed to

	AC_COMPILE_IFELSE(
		[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
		<MY C CODE HERE>
		])], ...)
2011-02-08 12:11:53 +01:00

20 lines
459 B
Plaintext

AC_DEFUN([ACX_LIBWRAP], [
LIBWRAP_LIBS=
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap"
AC_MSG_CHECKING([for tcpwrap library and headers])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <tcpd.h>
#include <syslog.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
[struct request_info *req;
return hosts_access (req);])],
[AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
LIBWRAP_LIBS="-lwrap"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
LIBS="$saved_LIBS"
])