]> git.draconx.ca Git - gentoo-draconx.git/blob - net-nds/ypbind/files/ypbind-2.4-fix-systemd-configuration.patch
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / files / ypbind-2.4-fix-systemd-configuration.patch
1 From e6c29b08a141cb6c8967b6cdfc9283b6aef9dda7 Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3
4 ---
5  configure.ac | 14 +++++++++++---
6  1 file changed, 11 insertions(+), 3 deletions(-)
7
8 diff --git a/configure.ac b/configure.ac
9 index 2856c5e8f854..69d97dae0577 100644
10 --- a/configure.ac
11 +++ b/configure.ac
12 @@ -24,9 +24,17 @@ dnl Checks for libraries.
13  dnl AC_CHECK_LIB(nsl, yp_get_default_domain)
14  AC_CHECK_LIB(pthread, pthread_create)
15  
16 -PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])
17 -AC_SUBST(USE_SD_NOTIFY)
18 -#PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL_LIBS="-lnsl"],[LIBNSL_LIBS=""])])
19 +AC_ARG_WITH([systemd],
20 +  [AS_HELP_STRING([--with-systemd], [build against libsystemd])])
21 +
22 +USE_SD_NOTIFY=0
23 +AS_IF([test x"$with_systemd" != x"no"],
24 +  [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
25 +    [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])])
26 +AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"],
27 +  [AC_MSG_ERROR([systemd requested but libsystemd not found])])
28 +AC_SUBST([USE_SD_NOTIFY])
29 +
30  PKG_CHECK_MODULES([NSL], [libnsl])
31  PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [TIRPC_LIBS=""])
32  if test -n "$TIRPC_LIBS"; then
33 -- 
34 2.16.4
35