OK, these patches (danw/ndpfix branch) make it not install libndp when
building it from source, and make it possible to use a system libndp
instead.
>From c89acbdc8f80455023a924ab6fae1acf12434a13 Mon Sep 17 00:00:00 2001
From: Dan Winship <[email protected]>
Date: Thu, 13 Jun 2013 09:34:09 -0300
Subject: [PATCH 1/2] build: don't install libndp
---
Makefile.am | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 3fcc135..be6c49a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,6 @@ SUBDIRS = \
libnm-util \
libnm-glib \
introspection \
- libndp \
src \
callouts \
cli \
@@ -20,6 +19,8 @@ SUBDIRS = \
examples \
vapi
+DIST_SUBDIRS = $(SUBDIRS) libndp
+
@GNOME_CODE_COVERAGE_RULES@
EXTRA_DIST = \
@@ -52,7 +53,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
CLEANFILES = cscope.in.out cscope.out cscope.po.out
-.PHONY: cscope
cscope:
cscope -b -q -R -Iinclude -ssrc -slibnm-glib -slibnm-util -scli/src;
@@ -61,3 +61,12 @@ libgsystem_cflags := $(GLIB_CFLAGS) -I$(srcdir)/libgsystem
libgsystem_libs = $(GLIB_LIBS)
include libgsystem/Makefile-libgsystem.am
noinst_LTLIBRARIES = libgsystem.la
+
+noinst_DATA = libndp
+libndp:
+ (cd libndp && $(MAKE))
+
+clean-local:
+ (cd libndp && $(MAKE) clean)
+
+.PHONY: cscope libndp
--
1.8.1.4
>From c347ac21234b61cd797427de3d18fe047d3db06c Mon Sep 17 00:00:00 2001
From: Dan Winship <[email protected]>
Date: Thu, 13 Jun 2013 10:05:40 -0300
Subject: [PATCH 2/2] build: allow building against system libndp
---
Makefile.am | 2 ++
configure.ac | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index be6c49a..ced0b4f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,11 +62,13 @@ libgsystem_libs = $(GLIB_LIBS)
include libgsystem/Makefile-libgsystem.am
noinst_LTLIBRARIES = libgsystem.la
+if BUILD_LIBNDP
noinst_DATA = libndp
libndp:
(cd libndp && $(MAKE))
clean-local:
(cd libndp && $(MAKE) clean)
+endif
.PHONY: cscope libndp
diff --git a/configure.ac b/configure.ac
index 51f4aec..ed37286 100644
--- a/configure.ac
+++ b/configure.ac
@@ -596,6 +596,30 @@ else
fi
AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes")
+dnl libndp
+AC_ARG_WITH(system-libndp, AS_HELP_STRING([--with-system-libndp=yes|no|auto], [use system libndp rather than bundled one (default: auto)]),
+ [with_system_libndp=${withval}], [with_system_libndp=auto])
+if test "$with_system_libndp" = yes; then
+ PKG_CHECK_MODULES(LIBNDP, [libndp])
+elif test "$with_system_libndp" = auto; then
+ PKG_CHECK_MODULES(LIBNDP, [libndp], [build_libndp=no],[build_libndp=yes])
+else
+ build_libndp=yes
+fi
+AM_CONDITIONAL(BUILD_LIBNDP, test "${build_libndp}" = yes)
+if test "$build_libndp" = yes; then
+ LIBNDP_CFLAGS='-I$(top_srcdir)/libndp/include'
+ LIBNDP_LIBS='$(top_builddir)/libndp/libndp/libndp.la'
+ AC_SUBST(LIBNDP_CFLAGS)
+ AC_SUBST(LIBNDP_LIBS)
+ libndp_location=bundled
+else
+ # temporary bug workaround
+ LIBNDP_CFLAGS=`echo $LIBNDP_CFLAGS | sed -e 's:/ndp.h::'`
+ libndp_location=system
+fi
+
+
NM_COMPILER_WARNINGS
dnl -------------------------
@@ -751,6 +775,7 @@ echo " wimax: $enable_wimax"
echo " ppp: $enable_ppp"
echo " modemmanager-1: $with_modem_manager_1"
echo " concheck: $enable_concheck"
+echo " libndp: $libndp_location"
echo
echo "Configuration plugins"
--
1.8.1.4
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list