radvd/radvd-1.8.5-Use-pkg-config-to-discover-libdaemon.patch
2012-04-12 15:58:28 +02:00

67 lines
1.5 KiB
Diff

From 1cda2ef33f505be34e690d1b7a1e5eac632819af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 11 Apr 2012 13:52:24 +0200
Subject: [PATCH] Use pkg-config to discover libdaemon
---
Makefile.am | 6 +++++-
README | 2 ++
configure.ac | 6 +-----
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4b76a97..04b834b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,8 +59,12 @@ EXTRA_radvd_SOURCES = \
netlink.h \
privsep-linux.c
+radvd_CPPFLAGS = \
+ @DAEMON_CFLAGS@
+
radvd_LDADD = \
- @CONDITIONAL_SOURCES@
+ @CONDITIONAL_SOURCES@ \
+ @DAEMON_LIBS@
radvd_DEPENDENCIES = \
@CONDITIONAL_SOURCES@
diff --git a/README b/README
index 5192c52..efa3154 100644
--- a/README
+++ b/README
@@ -2,6 +2,8 @@
Installation:
=============
+Install 'pkg-config' and 'libdaemon'.
+
Run configure, e.g.
./configure --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/share/man
diff --git a/configure.ac b/configure.ac
index b3f0a19..3ab6667 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,15 +137,11 @@ AC_CHECK_LIB(c, inet_ntop,,
# prevent caching
unset ac_cv_lib_inet6_inet_ntop
-AC_CHECK_LIB([daemon], [daemon_fork], ,
- AC_MSG_ERROR([Could not use libdaemon library])
-)
+PKG_CHECK_MODULES([DAEMON], libdaemon)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
- libdaemon/dfork.h \
- libdaemon/dpid.h \
getopt.h \
ifaddrs.h \
machine/limits.h \
--
1.7.7.6