Hi Charles, On Sun, Jan 25, 2009 at 11:00:19AM -0500, Charles Lepple wrote: > practically speaking, you probably only need to check for the > libupsclient.pc - there are not many people out there who would have > the library built properly, but who would have libupsclient-config > instead of libupsclient.pc.
I agree that `pkg-config' is the way to go, but I want to write programs that work for everybody, not just ``most people''. I'll have to check using both methods anyway, so never mind. > In particular, I think libupsclient was not built on older versions > of the Debian package, so people would either need to rebuild NUT > from source with the library enabled, or find a backport. It's okay to optimize for the most common use-case, but you should still make if *possible* for other users to use your library. > I think we were in the process of deprecating libupsclient-config. > Arnaud, is this still the case? Why? Just because you and I are using `pkg-config' doesn't mean everybody else should *have to*. What problems does installing `libupsclient-config' bring, that I'm not aware of? Maybe the attached patch is more to your liking: It adds a new option / conditional so you can en-/disable libupsclient-config separately from the .pc file. By default, it is disabled. Regards, -octo -- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/
diff -pur nut-2.2.2-orig/configure.in nut-2.2.2-octo/configure.in
--- nut-2.2.2-orig/configure.in 2009-01-26 11:22:26.959805623 +0100
+++ nut-2.2.2-octo/configure.in 2009-01-26 11:40:58.090804277 +0100
@@ -681,6 +681,21 @@ else
fi
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
+AC_MSG_CHECKING(whether to install libupsclient-config)
+AC_ARG_WITH(libupsclient-config,
+ AC_HELP_STRING([--with-libupsclient-config], [create and install libupsclient-config (no)]),
+ [
+ if test "x$withval" = "xyes"; then
+ with_libupsclient_config="yes"
+ else
+ with_libupsclient_config="no"
+ fi
+ ],
+ [with_libupsclient_config="no"])
+AC_MSG_RESULT([$with_libupsclient_config])
+AM_CONDITIONAL(WITH_LIBUPSCLIENT_CONFIG, test "x$with_libupsclient_config" = "xyes")
+
+
AC_MSG_CHECKING(whether to install hotplug rules)
AC_ARG_WITH(hotplug-dir,
AC_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
diff -pur nut-2.2.2-orig/lib/Makefile.am nut-2.2.2-octo/lib/Makefile.am
--- nut-2.2.2-orig/lib/Makefile.am 2009-01-26 11:22:26.954805298 +0100
+++ nut-2.2.2-octo/lib/Makefile.am 2009-01-26 11:40:14.326805699 +0100
@@ -3,7 +3,8 @@
if WITH_DEV
if WITH_PKG_CONFIG
pkgconfig_DATA = libupsclient.pc
-else
+endif
+if WITH_LIBUPSCLIENT_CONFIG
bin_SCRIPTS = libupsclient-config
endif
endif
signature.asc
Description: Digital signature
_______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
