0007-Add-configure-argument-to-make-the-libxml2-dependenc.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From 7107511fd209f08f9a96f8938041ae48f3295895 Mon Sep 17 00:00:00 2001
  2. From: Christopher Larson <chris_larson@mentor.com>
  3. Date: Tue, 15 Aug 2017 16:17:49 +0800
  4. Subject: [PATCH 07/11] Add configure argument to make the libxml2 dependency
  5. explicit and determinisitic.
  6. Upstream-Status: Pending
  7. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
  8. Rebase to 4.3.6
  9. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
  10. ---
  11. configure.ac | 11 +++++++++++
  12. 1 file changed, 11 insertions(+)
  13. Index: dhcp-4.4.3/configure.ac
  14. ===================================================================
  15. --- dhcp-4.4.3.orig/configure.ac
  16. +++ dhcp-4.4.3/configure.ac
  17. @@ -633,6 +633,17 @@ if test "$have_nanosleep" = "rt"; then
  18. LIBS="-lrt $LIBS"
  19. fi
  20. +AC_ARG_WITH(libxml2,
  21. + AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
  22. + with_libxml2="$withval", with_libxml2="no")
  23. +
  24. +if test x$with_libxml2 != xno; then
  25. + AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
  26. + [if test x$with_libxml2 != xauto; then
  27. + AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
  28. + fi])
  29. +fi
  30. +
  31. # check for /dev/random (declares ISC_PATH_RANDOMDEV)
  32. AC_MSG_CHECKING(for random device)
  33. AC_ARG_WITH(randomdev,
  34. Index: dhcp-4.4.3/configure.ac+lt
  35. ===================================================================
  36. --- dhcp-4.4.3.orig/configure.ac+lt
  37. +++ dhcp-4.4.3/configure.ac+lt
  38. @@ -900,6 +900,18 @@ elif test "$want_libtool" = "yes" -a "$u
  39. fi
  40. AM_CONDITIONAL(INSTALL_BIND, test "$want_install_bind" = "yes")
  41. +AC_ARG_WITH(libxml2,
  42. + AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
  43. + with_libxml2="$withval", with_libxml2="no")
  44. +
  45. +if test x$with_libxml2 != xno; then
  46. + AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],,
  47. + [if test x$with_libxml2 != xauto; then
  48. + AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
  49. + fi])
  50. +fi
  51. +
  52. +
  53. # OpenLDAP support.
  54. AC_ARG_WITH(ldap,
  55. AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),