aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp/0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch
blob: feb0754fff480805543e4169975c59da4a9d1bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 7107511fd209f08f9a96f8938041ae48f3295895 Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Tue, 15 Aug 2017 16:17:49 +0800
Subject: [PATCH 07/11] Add configure argument to make the libxml2 dependency
 explicit and determinisitic.

Upstream-Status: Pending

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

Rebase to 4.3.6

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 configure.ac | 11 +++++++++++
 1 file changed, 11 insertions(+)

Index: dhcp-4.4.1/configure.ac
===================================================================
--- dhcp-4.4.1.orig/configure.ac
+++ dhcp-4.4.1/configure.ac
@@ -642,6 +642,17 @@ if test "$have_nanosleep" = "rt"; then
 	LIBS="-lrt $LIBS"
 fi
 
+AC_ARG_WITH(libxml2,
+	AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
+	with_libxml2="$withval", with_libxml2="no")
+
+if test x$with_libxml2 != xno; then
+	AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
+		[if test x$with_libxml2 != xauto; then
+			AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
+		fi])
+fi
+
 # check for /dev/random (declares HAVE_DEV_RANDOM)
 AC_MSG_CHECKING(for random device)
 AC_ARG_WITH(randomdev,
Index: dhcp-4.4.1/configure.ac+lt
===================================================================
--- dhcp-4.4.1.orig/configure.ac+lt
+++ dhcp-4.4.1/configure.ac+lt
@@ -909,6 +909,18 @@ elif test "$want_libtool" = "yes" -a "$u
 fi
 AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
 
+AC_ARG_WITH(libxml2,
+	AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
+	with_libxml2="$withval", with_libxml2="no")
+
+if test x$with_libxml2 != xno; then
+	AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
+		[if test x$with_libxml2 != xauto; then
+			AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
+		fi])
+fi
+
+
 # OpenLDAP support.
 AC_ARG_WITH(ldap,
     AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),