yazpp-config no longer returns zoom library by default
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 8 Nov 2012 14:10:32 +0000 (15:10 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 8 Nov 2012 14:10:32 +0000 (15:10 +0100)
The yazpp-config command no longer returns -lzoompp by default.
Only if "zoom" is passed to yazpp-config it is returned.

doc/yazpp-config-man.xml
yazpp-config.in

index ab758e3..544d872 100644 (file)
@@ -1,5 +1,5 @@
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN" 
- "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" 
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
 [ ]>
 <refentry id="yazpp-config">
 
@@ -7,18 +7,18 @@
   <productname>yazpp</productname>
   <info><orgname>Index Data</orgname></info>
  </refentryinfo>
+
  <refmeta>
   <refentrytitle>yazpp-config</refentrytitle>
   <manvolnum>1</manvolnum>
   <refmiscinfo class="manual">Commands</refmiscinfo>
  </refmeta>
+
  <refnamediv>
   <refname>yazpp-config</refname>
   <refpurpose>Script to get information about YAZ++.</refpurpose>
  </refnamediv>
+
  <refsynopsisdiv>
   <cmdsynopsis>
    <command>yazpp-config</command>
    <arg choice="opt"><option>--libs</option></arg>
    <arg choice="opt"><option>--lalibs</option></arg>
    <arg choice="opt"><option>--cflags</option></arg>
-   <!-- <arg choice="opt"><option>- -comp</option></arg> -->
-   <!-- <arg choice="opt" rep="repeat">libraries</arg> -->
+   <arg choice="opt" rep="repeat">libraries</arg>
   </cmdsynopsis>
  </refsynopsisdiv>
+
  <refsect1><title>DESCRIPTION</title>
   <para>
    <command>yazpp-config</command> is a script that returns information
    that your own software should use to build software that uses YAZ++.
   </para>
 
-  <!--
   <para>
    The following libraries are supported:
   </para>
 
   <variablelist>
    <varlistentry>
-    <term>threads</term>
+    <term>zoom</term>
     <listitem><para>
-      Use the threaded version of YAZ.
+      Report the zoompp library rather than yazpp.
      </para></listitem>
    </varlistentry>
   </variablelist>
-  -->
  </refsect1>
+
  <refsect1><title>OPTIONS</title>
-  
+
   <variablelist>
    <varlistentry>
     <term>--prefix[=<replaceable>DIR</replaceable>]</term>
    <varlistentry>
     <term>--cflags</term>
     <listitem><para>
-      Return C Compiler flags.
+      Return C++ Compiler flags.
      </para></listitem>
    </varlistentry>
-   
+
 
    <!--<varlistentry>
     <term>- -comp</term>
 
   </variablelist>
  </refsect1>
+
  <refsect1><title>FILES</title>
   <para>
    <filename><replaceable>prefix</replaceable>/bin/yazpp-config</filename>
index 0b37a82..61a532c 100644 (file)
@@ -9,6 +9,7 @@ echo_help=no
 echo_tabs=no
 echo_source=yes
 echo_lalibs=no
+echo_zoom=no
 src_root=@abs_top_srcdir@
 build_root=@abs_top_builddir@
 yazlibs="@YAZLIB@ @LIBS@"
@@ -62,6 +63,9 @@ while test $# -gt 0; do
        --lalibs)
            echo_lalibs=yes
            ;;
+       zoom)
+           echo_zoom=yes
+           ;;
        -*)
            echo_help=yes
            ;;
@@ -69,25 +73,28 @@ while test $# -gt 0; do
     shift
 done
 
-libs_short="-lyazpp -lzoompp"
-
 YAZPPINC="@YAZINC@"
+YAZPPLALIB="$yazlalibs"
+YAZPPLIB="$yazlibs"
 
 if test "$echo_source" = "yes"; then
-    YAZPPLIB="-L${build_root}/src/.libs -lyazpp"
-    YAZPPLIB="$YAZPPLIB -L${build_root}/zoom/.libs -lzoompp"
-    YAZPPLIB="$YAZPPLIB $yazlibs"
-    YAZPPLALIB="${build_root}/src/libyazpp.la $yazlalibs"
-    YAZPPINC="-I${src_root}/include $YAZPPINC"
+    YAZPPLIB="-L${build_root}/src/.libs -lyazpp $YAZPPLIB"
+    YAZPPLALIB="${build_root}/src/libyazpp.la $YAZPPLALIB"
+    YAZPPINC="$YAZPPINC -I${src_root}/include"
 else
+    if test "$echo_zoom" = "yes"; then
+       libs_short="-lzoompp"
+    else
+       libs_short="-lyazpp"
+    fi
     if test "$prefix" = "/usr"; then
-       YAZPPLIB="${libs_short} $yazlibs"
+       YAZPPLIB="${libs_short} $YAZPPLIB"
     else
-       YAZPPLIB="-L${libdir} ${libs_short} $yazlibs"
+       YAZPPLIB="-L${libdir} ${libs_short} $YAZPPLIB"
     fi
     YAZPPLALIB=$YAZPPLIB
     if test "$prefix" != "/usr"; then
-       YAZPPINC="-I${includedir} $YAZPPINC"
+       YAZPPINC="$YAZPPINC -I${includedir}"
     fi
 fi