---
 doc/cln.tex |   53 +++++++++++++++++++++--------------------------------
 1 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/doc/cln.tex b/doc/cln.tex
index 78c721d..7b908b5 100644
--- a/doc/cln.tex
+++ b/doc/cln.tex
@@ -3365,42 +3365,31 @@ need special flags for compiling. The library has been 
installed to a
 public directory as well (normally @code{/usr/local/lib}), hence when
 linking a CLN application it is sufficient to give the flag @code{-lcln}.
 
-Since CLN version 1.1, there are two tools to make the creation of
-software packages that use CLN easier:
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED]
[EMAIL PROTECTED] @code{cln-config}
[EMAIL PROTECTED] is a shell script that you can use to determine the
-compiler and linker command line options required to compile and link a
-program with CLN.  Start it with @code{--help} to learn about its options
-or consult the manpage that comes with it.
[EMAIL PROTECTED]
[EMAIL PROTECTED] @code{AC_PATH_CLN}
[EMAIL PROTECTED] is for packages configured using GNU automake.
-The synopsis is:
+To make the creation of software packages that use CLN easier 
[EMAIL PROTECTED] utility can be used. CLN provides necessary information
+in cln.pc (installed in @code{/usr/local/lib/pkgconfig} by default).
+A program using CLN can be compiled and linked as 
[EMAIL PROTECTED] you installed CLN to non-standard location @var{prefix},
+you need to set the @env{PKG_CONFIG_PATH} environment variable to 
[EMAIL PROTECTED]/lib/pkgconfig for this to work}
[EMAIL PROTECTED] 
+g++ `pkg-config --libs cln` `pkg-config --cflags cln` prog.cc -o prog
[EMAIL PROTECTED] example
+
+Software using GNU autoconf can check for CLN with the 
[EMAIL PROTECTED] macro supplied with @code{pkg-config}.
 @example
[EMAIL PROTECTED]([EMAIL PROTECTED], [EMAIL PROTECTED] [, 
@var{ACTION-IF-NOT-FOUND}]]])}
+PKG_CHECK_MODULES([CLN], [cln >= @var{MIN-VERSION}])
 @end example
-This macro determines the location of CLN using @code{cln-config}, which
-is either found in the user's path, or from the environment variable
[EMAIL PROTECTED]  It tests the installed libraries to make sure that
-their version is not earlier than @var{MIN-VERSION} (a default version
-will be used if not specified). If the required version was found, sets
-the @env{CLN_CPPFLAGS} and the @env{CLN_LIBS} variables. This
-macro is in the file @file{cln.m4} which is installed in
[EMAIL PROTECTED]/aclocal}. Note that if automake was installed with a
-different @samp{--prefix} than CLN, you will either have to manually
-move @file{cln.m4} to automake's @file{$datadir/aclocal}, or give
-aclocal the @samp{-I} option when running it. Here is a possible example
-to be included in your package's @file{configure.ac}:
+This will check for CLN version at least @var{MIN-VERSION} (surprise?).
+If requiered version was found, @var{CLN_CFLAGS} and @var{CLN_LIBS}
+variables are set. Otherwise the configure script will abort. If this
+is not desired behaviour, use the following code instead 
[EMAIL PROTECTED] the @code{pkg-config} documentation for more details} 
 @example
-AC_PATH_CLN(1.1.0, [
-  LIBS="$LIBS $CLN_LIBS"
-  CPPFLAGS="$CPPFLAGS $CLN_CPPFLAGS"
-], AC_MSG_ERROR([No suitable installed version of CLN could be found.]))
+PKG_CHECK_MODULES([CLN], [cln >= @var{MIN-VERSION}], [],
+ [AC_MSG_WARNING([No suitable version of CLN can be found])])
 @end example
[EMAIL PROTECTED] itemize
-
 
 @section Compatibility to old CLN versions
 @cindex namespace
-- 
1.4.4.4

-- 
All science is either physics or stamp collecting.

Attachment: signature.asc
Description: Digital signature

Reply via email to