[patch]' make --with-dhcdbd work too



my last patch to add --with-dhcdbd to configure did not work at all,
attached a version that works, so dhcdbd is not needed to build
NetworkManager.

it also makes the use of DHCDBD_BINARY_PATH cleaner, since it now is 
defined using AC_DEFINE_UNQUOTED, that way in config.h and removes the
need to add it in src/dhcp-manager/Makefile.am again.

j
diff -ur NetworkManger.orig/configure.in NetworkManger/configure.in
--- NetworkManger.orig/configure.in	2005-08-27 17:07:35.000000000 +0200
+++ NetworkManger/configure.in	2005-08-27 17:07:51.000000000 +0200
@@ -197,13 +197,16 @@
 AC_DEFINE_UNQUOTED(NM_NAMED_DATA_DIR, "$with_named_dir", [Define to path of named data directory])
 AC_DEFINE_UNQUOTED(NM_NAMED_USER, "$with_named_user", [Define to named username])
 
-AC_ARG_WITH(DHCDBD_BINARY_PATH, AC_HELP_STRING([--with-dhcdbd=/path/to/dhcdbd], [path to dhcdbd])) 
-if test "x${DHCDBD_BINARY_PATH}" = x; then
+AC_ARG_WITH(dhcdbd, AC_HELP_STRING([--with-dhcdbd=/path/to/dhcdbd], [path to dhcdbd])) 
+if test "x${with_dhcdbd}" = x; then
   AC_PATH_PROG(DHCDBD_BINARY_PATH, dhcdbd, [], $PATH:/sbin:/usr/sbin)
   if ! test -x "$DHCDBD_BINARY_PATH"; then
 	AC_MSG_ERROR(dhcdbd was not installed.  See http://people.redhat.com/jvdias/dhcdbd)
   fi
+else
+  DHCDBD_BINARY_PATH="$with_dhcdbd"
 fi
+AC_DEFINE_UNQUOTED(DHCDBD_BINARY_PATH, "$DHCDBD_BINARY_PATH", [Define to path of dhcdbd binary])
 AC_SUBST(DHCDBD_BINARY_PATH)
 
 #### find the actual value for $prefix that we'll end up with
diff -ur NetworkManger.orig/src/dhcp-manager/Makefile.am NetworkManger/src/dhcp-manager/Makefile.am
--- NetworkManger.orig/src/dhcp-manager/Makefile.am	2005-08-27 17:07:38.000000000 +0200
+++ NetworkManger/src/dhcp-manager/Makefile.am	2005-08-27 17:07:53.000000000 +0200
@@ -8,7 +8,6 @@
 libdhcp_manager_la_CPPFLAGS =	$(DBUS_CFLAGS)					\
 						$(GTHREAD_CFLAGS)				\
 						$(HAL_CFLAGS)					\
-						-DDHCDBD_BINARY_PATH=\"$(DHCDBD_BINARY_PATH)\" \
 						-g							\
 						-Wall						\
 						-DDBUS_API_SUBJECT_TO_CHANGE		\


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]