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.9 PTH_1_0b7:1.9 PTH_1_0b6:1.9 PTH_1_0b5:1.9 PTH_1_0b4:1.9 PTH_1_0b3:1.6 PTH_1_0b2:1.5 PTH_1_0b1:1.4 PTH_0_9_21:1.4 PTH_0_9_20:1.4 PTH_0_9_19:1.4 PTH_0_9_18:1.4 PTH_0_9_17:1.4 PTH_0_9_16:1.4 PTH_0_9_15:1.4 PTH_0_9_14:1.4 PTH_0_9_13:1.4 PTH_0_9_12:1.3 PTH_0_9_11:1.3 PTH_0_9_10:1.3 PTH_0_9_9:1.3 PTH_0_9_8:1.3 PTH_0_9_7:1.2 PTH_0_9_6:1.2 PTH_0_9_5:1.1.1.1 PTH_0_9_4:1.1.1.1 PTH_0_9_3:1.1.1.1 PTH_0_9_2:1.1.1.1 PTH_0_9_1:1.1.1.1 PTH_0_9_0:1.1.1.1 RSE:1.1.1; locks; strict; comment @# @; 1.25 date 2007.01.01.18.23.52; author rse; state Exp; branches; next 1.24; commitid 9DhdiirNzQPBIP0s; 1.24 date 2006.06.08.17.54.51; author rse; state Exp; branches; next 1.23; commitid x8N3mLVdQgkbdeAr; 1.23 date 2004.12.31.19.34.44; author rse; state Exp; branches; next 1.22; 1.22 date 2004.07.13.10.50.49; author rse; state Exp; branches; next 1.21; 1.21 date 2003.01.01.15.49.11; author rse; state Exp; branches; next 1.20; 1.20 date 2002.01.27.11.03.40; author rse; state Exp; branches; next 1.19; 1.19 date 2001.03.24.14.51.04; author rse; state Exp; branches; next 1.18; 1.18 date 2000.01.27.19.13.37; author rse; state Exp; branches; next 1.17; 1.17 date 99.12.30.21.58.59; author rse; state Exp; branches; next 1.16; 1.16 date 99.11.09.08.11.30; author rse; state Exp; branches; next 1.15; 1.15 date 99.11.03.12.02.19; author rse; state Exp; branches; next 1.14; 1.14 date 99.11.03.11.55.11; author rse; state Exp; branches; next 1.13; 1.13 date 99.11.03.10.19.26; author rse; state Exp; branches; next 1.12; 1.12 date 99.11.01.10.27.18; author rse; state Exp; branches; next 1.11; 1.11 date 99.10.31.11.46.11; author rse; state Exp; branches 1.11.2.1; next 1.10; 1.10 date 99.09.17.08.01.54; author rse; state Exp; branches; next 1.9; 1.9 date 99.07.08.10.34.00; author rse; state Exp; branches; next 1.8; 1.8 date 99.07.08.10.27.47; author rse; state Exp; branches; next 1.7; 1.7 date 99.07.08.10.19.10; author rse; state Exp; branches; next 1.6; 1.6 date 99.07.04.15.41.53; author rse; state Exp; branches; next 1.5; 1.5 date 99.07.04.12.05.34; author rse; state Exp; branches; next 1.4; 1.4 date 99.06.01.09.55.26; author rse; state Exp; branches; next 1.3; 1.3 date 99.05.24.07.58.13; author rse; state Exp; branches; next 1.2; 1.2 date 99.05.22.14.37.52; author rse; state Exp; branches; next 1.1; 1.1 date 99.05.13.12.18.16; author rse; state Exp; branches 1.1.1.1; next ; 1.11.2.1 date 99.11.01.10.24.58; author rse; state Exp; branches; next ; 1.1.1.1 date 99.05.13.12.18.16; author rse; state Exp; branches; next ; desc @@ 1.25 log @Adjusted all copyright messages for new year 2007. @ text @## ## GNU Pth - The GNU Portable Threads ## Copyright (c) 1999-2007 Ralf S. Engelschall ## ## This file is part of GNU Pth, a non-preemptive thread scheduling ## library which can be found at http://www.gnu.org/software/pth/. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2.1 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public ## License along with this library; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ## USA, or contact Ralf S. Engelschall . ## ## pth-config.pod: Pth library build utility manual page ## =pod =head1 NAME B - Pth library build utility =head1 VERSION GNU Pth PTH_VERSION_STR =head1 SYNOPSIS B [B<--help>] [B<--version>] [B<--all>] [B<--prefix>] [B<--exec-prefix>] [B<--bindir>] [B<--libdir>] [B<--includedir>] [B<--mandir>] [B<--datadir>] [B<--acdir>] [B<--cflags>] [B<--ldflags>] [B<--libs>] =head1 DESCRIPTION The B program is a little helper utility for easy configuring and building applications based on the pth(3) library. It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the pth(3) library. =head1 OPTIONS B accepts the following options: =over 4 =item B<--help> Prints the short usage information. =item B<--version> Prints the version number and date of the installed pth(3) library. =item B<--all> Forces the output of all flags, that is, including extra flags which are not B specific. =item B<--prefix> Prints the installation prefix of architecture independent files =item B<--exec-prefix> Prints the installation prefix of architecture dependent files. =item B<--bindir> Prints the installation directory of binaries. =item B<--libdir> Prints the installation directory of libraries. =item B<--includedir> Prints the installation directory of include headers. =item B<--mandir> Prints the installation directory of manual pages. =item B<--datadir> Prints the installation directory of shared data. =item B<--acdir> Prints the installation directory of B data. =item B<--cflags> Prints the C compiler flags which are needed to compile the pth(3)-based application. The output is usually added to the C variable of the applications C. =item B<--ldflags> Prints the linker flags (C<-L>) which are needed to link the application with the pth(3) library. The output is usually added to the C variable of the applications C. =item B<--libs> Prints the library flags (C<-l>) which are needed to link the application with the pth(3) library. The output is usually added to the C variable of the applications C. =back =head1 EXAMPLE CC = cc CFLAGS = -O `pth-config --cflags` LDFLAGS = `pth-config --ldflags` LIBS = -lm `pth-config --libs` all: foo foo: foo.o $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) foo.o: foo.c $(CC) $(CFLAGS) -c foo.c =head1 SEE ALSO pth(3), cc(1). =head1 AUTHOR Ralf S. Engelschall rse@@engelschall.com www.engelschall.com =cut @ 1.24 log @Adjusted all copyright messages for new year 2006 @ text @d3 1 a3 1 ## Copyright (c) 1999-2006 Ralf S. Engelschall @ 1.23 log @Adjusted all copyright messages for new year 2005. @ text @d3 1 a3 1 ## Copyright (c) 1999-2005 Ralf S. Engelschall @ 1.22 log @Adjusted all copyright messages for new year 2004. @ text @d3 1 a3 1 ## Copyright (c) 1999-2004 Ralf S. Engelschall @ 1.21 log @Adjusted all copyright messages for new year 2003. @ text @d3 1 a3 1 ## Copyright (c) 1999-2003 Ralf S. Engelschall @ 1.20 log @bump copyright year @ text @d3 1 a3 1 ## Copyright (c) 1999-2002 Ralf S. Engelschall @ 1.19 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999-2001 Ralf S. Engelschall @ 1.18 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999-2000 Ralf S. Engelschall @ 1.17 log @*** empty log message *** @ text @d147 1 a147 1 pth(3). @ 1.16 log @*** empty log message *** @ text @d3 1 a3 1 ## Copyright (c) 1999 Ralf S. Engelschall @ 1.15 log @*** empty log message *** @ text @d38 1 a38 1 B d59 1 a59 1 the application against the pth(3) library. d138 1 a138 1 @ 1.14 log @*** empty log message *** @ text @d41 9 d74 37 @ 1.13 log @*** empty log message *** @ text @a87 6 =head2 Simple: Manual Build Environment As a first example, assume we have a B based program living in the source file C. Then we can create a simple build environment with the following C. a97 70 This incorporates the necessary compiler and linker flags on-the-fly and works fine for small projects. =head2 Advanced: Autoconf Build Environment First, to speed up things it would be nice to not expand the compiler and linker flags every time the compiler is started. Second, it would be nice to also be able to build against an uninstalled B. Third, it would be useful to check the B version to make sure it is at least a minimum required version. And finally, it would be also great to make sure B works correctly by first performing some sanity checks. All this can be done if one uses GNU B and the C macro provided by B. For this we establish the following three files: First again the C, but this time with B placeholders and we rename it to C: CC = @@CC@@ CFLAGS = @@CFLAGS@@ LDFLAGS = @@LDFLAGS@@ LIBS = @@LIBS@@ all: foo foo: foo.o $(CC) $(LDFLAGS) -o foo foo.o $(LIBS) foo.o: foo.c $(CC) $(CFLAGS) -c foo.c Then we write a (minimalistic) B script named C: AC_INIT(Makefile.in) AC_CHECK_PTH(1.2.0) AC_OUTPUT(Makefile) Then we let B's C program generate an C file for us with the contents of B's C macro and finally we generate the C script out of this C file and the C file: $ aclocal --acdir=`pth-config --acdir` $ autoconf After this the working directory should look similar to this: -rw-r--r-- 1 rse users 176 Nov 3 11:11 Makefile.in -rw-r--r-- 1 rse users 15314 Nov 3 11:16 aclocal.m4 -rwxr-xr-x 1 rse users 52045 Nov 3 11:16 configure -rw-r--r-- 1 rse users 63 Nov 3 11:11 configure.in -rw-r--r-- 1 rse users 4227 Nov 3 11:11 foo.c If we now run C we get a correct C which immediately can be used to build C: $ ./configure creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for GNU Pth... version 1.2.0, installed under /usr/local updating cache ./config.cache creating ./config.status creating Makefile rse@@en1:/e/gnu/pth/ac $ make gcc -g -O2 -I/sw/pkg/pth/include -c foo.c gcc -L/sw/pkg/pth/lib -o foo foo.o -lpth @ 1.12 log @*** empty log message *** @ text @d88 10 a97 4 CC=cc CFLAGS=-O `pth-config --cflags` LDFLAGS=`pth-config --ldflags` LIBS=-lm `pth-config --libs` d104 70 @ 1.11 log @*** empty log message *** @ text @d2 1 a2 2 ## pth-config -- Pth library build utility manual page ## d22 2 @ 1.11.2.1 log @*** empty log message *** @ text @d2 2 a3 1 ## GNU Pth - The GNU Portable Threads a22 2 ## ## pth-config.pod: Pth library build utility manual page @ 1.10 log @*** empty log message *** @ text @d12 1 a12 1 ## version 2 of the License, or (at your option) any later version. @ 1.9 log @*** empty log message *** @ text @d10 1 a10 1 ## modify it under the terms of the GNU Library General Public d17 1 a17 1 ## Library General Public License for more details. d19 1 a19 1 ## You should have received a copy of the GNU Library General Public @ 1.8 log @*** empty log message *** @ text @d2 1 a2 1 ## pth-config -- PTH library build utility manual page d29 1 a29 1 B - PTH library build utility @ 1.7 log @*** empty log message *** @ text @d33 1 a33 1 GNU pth PTH_VERSION_STR @ 1.6 log @*** empty log message *** @ text @d6 2 a7 2 ## This file is part of PTH, a non-preemptive thread scheduling library ## which can be found at http://www.gnu.org/software/pth/. @ 1.5 log @*** empty log message *** @ text @d33 1 a33 1 PTH PTH_VERSION_STR @ 1.4 log @*** empty log message *** @ text @d7 1 a7 1 ## which can be found at http://www.engelschall.com/sw/pth/. @ 1.3 log @*** empty log message *** @ text @d20 1 a20 1 ## License along with this library; if not, write to the Free @ 1.2 log @*** empty log message *** @ text @d6 1 a6 1 ## This file is part of PTH, a non-preemtive thread scheduling library @ 1.1 log @Initial revision @ text @a0 2 ## ==================================================================== ## Copyright (c) 1999 Ralf S. Engelschall. All rights reserved. d2 6 a7 36 ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## ## 1. Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## ## 2. Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in ## the documentation and/or other materials provided with the ## distribution. ## ## 3. All advertising materials mentioning features or use of this ## software must display the following acknowledgment: ## "This product includes software developed by ## Ralf S. Engelschall ." ## ## 4. Redistributions of any form whatsoever must retain the following ## acknowledgment: ## "This product includes software developed by ## Ralf S. Engelschall ." ## ## THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``AS IS'' AND ANY ## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RALF S. ENGELSCHALL OR ## ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ## STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED ## OF THE POSSIBILITY OF SUCH DAMAGE. ## ==================================================================== d9 14 a22 1 ## pth-config.pod -- Manpage d29 1 a29 1 B - PTH library configuration/build utility @ 1.1.1.1 log @Import of PTH into CVS @ text @@