1
From: Julian Blanche <jblache@debian.org>
2
Subject: avoid building libraries if configure-stamp exists
4
The build script should not build the libraries if configure-stamp exists
5
debian/rules takes care of that.
7
Do not link unneeded libraries:
8
- -lutil is only needed if legacy PTYs are used
9
- -ltiff is not needed at all (pulled in for spandsp, but
10
tiff-dependent code in spandsp is not used by iaxmodem and not
11
linked in the final binary)
12
- Move libraries to end of link command: fixes ld --as-needed (Matthias Klose)
15
diff -urNad iaxmodem-1.2.0~dfsg~/build iaxmodem-1.2.0~dfsg/build
16
--- iaxmodem-1.2.0~dfsg~/build 2009-02-21 19:57:52.000000000 +0100
17
+++ iaxmodem-1.2.0~dfsg/build 2009-02-22 11:41:49.107062425 +0100
21
PTYUSE="-DUSE_UNIX98_PTY"
23
if [ "$1" = "-bsdptys" ]; then
30
if [ "`uname`" = "SunOS" ]; then
31
PATH=$PATH:/usr/sfw/bin; export PATH
32
MAKE="gmake"; export MAKE
36
if [ "$1" = "static" ]; then
38
- ./configure --disable-shared && \
41
- ./configure --disable-shared && \
42
- if [ "`uname`" = "SunOS" ]; then
43
- grep -v HAVE_TGMATH_H src/config.h > src/config.h.new && \
44
- mv -f src/config.h.new src/config.h && \
45
- grep -v HAVE_TGMATH_H config-h.in > config-h.in.new && \
46
- mv -f config-h.in.new config-h.in
50
+ if [ ! -e configure-stamp ]; then
52
+ ./configure --disable-shared && \
55
+ ./configure --disable-shared && \
61
gcc -Wall -g $PTYUSE $CFLAGS -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS \
62
-std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \
63
- gcc -lm $LLIBS -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
64
+ gcc -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a -lm $LLIBS
67
gcc -Wall -g $PTYUSE -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \