Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## rpm-config -- OpenPKG RPM Library Build Utility
3 ## Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
4 ##
5 ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
6 ## All rights reserved. Licenses which grant limited permission to use,
7 ## copy, modify and distribute this software are available from the
8 ## OpenPKG GmbH.
9 ##
10 ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
23 ## rpm-config.pod: manual page
24 ##
26 =pod
28 =head1 NAME
30 B<rpm-config> - OpenPKG RPM library build utility
32 =head1 VERSION
34 OpenPKG RPM RPM_VERSION
36 =head1 SYNOPSIS
38 B<rpm-config>
39 [B<--help>]
40 [B<--version>]
41 [B<--cc>]
42 [B<--cppflags>]
43 [B<--cflags>]
44 [B<--ldflags>]
45 [B<--libs>]
47 =head1 DESCRIPTION
49 The B<rpm-config> program is a little helper utility for easy
50 configuring and building applications based on the OpenPKG RPM library.
51 It can be used to query the C compiler and linker flags which are
52 required to correctly compile and link the application against the
53 RPM library.
55 =head1 OPTIONS
57 B<rpm-config> accepts the following options:
59 =over 4
61 =item B<--help>
63 Prints the short usage information.
65 =item B<--version>
67 Prints the version number and date of the installed RPM library.
69 =item B<--cc>
71 =item B<--cppflags>
73 Prints the C pre-processor flags (C<-I>) which are needed to compile the
74 RPM-based application. The output is usually added to the C<CPPFLAGS>
75 variable of the applications C<Makefile>.
77 =item B<--cflags>
79 Prints the C compiler flags which are needed to compile the RPM-based
80 application. The output is usually added to the C<CFLAGS> variable of the
81 applications C<Makefile>.
83 =item B<--ldflags>
85 Prints the linker flags (C<-L>) which are needed to link the application with
86 the RPM library. The output is usually added to the C<LDFLAGS> variable of
87 the applications C<Makefile>.
89 =item B<--libs>
91 Prints the library flags (C<-l>) which are needed to link the application with
92 the RPM library. The output is usually added to the C<LIBS> variable of the
93 applications C<Makefile>.
95 =back
97 =head1 EXAMPLE
99 CC = `rpm-config --cc`
100 CPPFLAGS = `rpm-config --cppflags`
101 CFLAGS = `rpm-config --cflags`
102 LDFLAGS = `rpm-config --ldflags`
103 LIBS = `rpm-config --libs`
105 all: foo
107 foo: foo.o
108 $(CC) $(LDFLAGS) -o foo foo.o $(LIBS)
110 foo.o: foo.c
111 $(CC) $(CPPFLAGS) $(CFLAGS) -o foo.o -c foo.c
113 =head1 SEE ALSO
115 rpm(1), cc(1).
117 =head1 AUTHOR
119 Ralf S. Engelschall
120 rse@engelschall.com
121 www.engelschall.com
123 =cut