ossp-pkg/shtool/sh.slo 1.23 -> 1.24
--- sh.slo 2004/01/01 16:54:20 1.23
+++ sh.slo 2004/02/12 16:06:27 1.24
@@ -1,7 +1,6 @@
##
## slo -- Separate linker options by library class
## Copyright (c) 1998-2004 Ralf S. Engelschall <rse@engelschall.com>
-## Originally written for Apache
##
## This file is part of shtool and free software; you can redistribute
## it and/or modify it under the terms of the GNU General Public
@@ -178,3 +177,88 @@
echo "${opt_p}${var}=\"${val}\""
done
+shtool_exit 0
+
+##
+## manual page
+##
+
+=pod
+
+=head1 NAME
+
+B<shtool slo> - B<GNU shtool> separate linker options by library class
+
+=head1 SYNOPSIS
+
+B<shtool slo>
+[B<-p>|B<--prefix> I<str>]
+--
+B<-L>I<dir>
+B<-l>I<lib>
+[B<-L>I<dir> B<-l>I<lib> ...]
+
+=head1 DESCRIPTION
+
+This command separates the linker options ``B<-L>'' and ``B<-l>'' by library
+class. It's argument line can actually be an arbitrary command line where those
+options are contained. B<slo> parses these two options only and ignores the
+remaining contents. The result is a trivial shell script on C<stdout> which
+defines six variables containing the ``B<-L>'' and ``B<-l>'' options sorted by
+class:
+
+``C<SLO_DIRS_OBJ>'' and ``C<SLO_LIBS_OBJ>'' contains the ``B<-L>'' and
+``B<-l>'' options of static libraries, ``C<SLO_DIRS_PIC>'' and
+``C<SLO_LIBS_PIC>'' contains the ``B<-L>'' and ``B<-l>'' options of static
+libraries containing PIC ("Position Independent Code") and
+``C<SLO_DIRS_DSO>'' and ``C<SLO_LIBS_DSO>'' contains the ``B<-L>'' and
+``B<-l>'' options of shared libraries. The B<-p> option can be used to
+change the default variable prefix from "C<SLO_>" to I<str>.
+
+The intent of this separation is to provide a way between static and shared
+libraries which is important if one wants to link custom DSOs against
+libraries, because not all platforms all one to link these DSOs against shared
+libraries. So one first has to separate out the shared libraries and link the
+DSO only against the static libraries. One can use this command also to just
+sort the options.
+
+=head1 OPTIONS
+
+The following command line options are available.
+
+=over 4
+
+=item B<-p>, B<--prefix> I<str>
+
+ FIXME
+
+=item B<-L>I<dir>
+
+Directory where libraries are searched in.
+
+=item B<-l>I<lib>
+
+Library to search for.
+
+=back
+
+=head1 EXAMPLE
+
+ # configure.in
+ LINK_STD="$LDFLAGS $LIBS"
+ eval `shtool slo $LINK_STD`
+ LINK_DSO="$SLO_DIRS_OBJ $SLO_LIBS_OBJ $SLO_DIRS_PIC $SLO_LIBS_PIC"
+ :
+
+=head1 HISTORY
+
+The B<GNU shtool> B<slo> command was originally written by Ralf S.
+Engelschall E<lt>rse@engelschall.comE<gt> in 1998 for B<Apache>.
+It was later taken over into B<GNU shtool>.
+
+=head1 SEE ALSO
+
+shtool(1), ld(1).
+
+=cut
+
|
|