Browse Source

Auto-detect the availability of Netlink

develop
Damien Goutte-Gattat 9 years ago
parent
commit
fd572cee14
  1. 7
      configure.ac
  2. 2
      src/Makefile.am

7
configure.ac

@ -18,6 +18,12 @@ AC_PROG_INSTALL
dnl Check for some non-ubituitous functions
ICP_CHECK_NOTCH_FUNCS
dnl Check for possible mechanism, default is /proc
backend="/proc"
AC_CHECK_HEADERS([linux/netlink.h],
[backend=Netlink])
AM_CONDITIONAL([HAVE_NETLINK], [test x$ac_cv_header_linux_netlink_h = xyes])
dnl Output files
AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile])
AC_OUTPUT
@ -30,4 +36,5 @@ Configuration complete
Prefix: '${prefix}'
Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
Operation mode: '${backend}'
"

2
src/Makefile.am

@ -6,5 +6,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib
AM_LDFLAGS = -L$(top_builddir)/lib
LDADD = -lwait4
if HAVE_NETLINK
install-exec-hook:
chmod 4755 $(DESTDIR)$(bindir)/wait4$(EXEEXT)
endif

Loading…
Cancel
Save