summaryrefslogtreecommitdiff
path: root/audio/portaudio/patches/patch-ac
blob: f8a42b6433fb7d35755c20e348e66be13c5b763b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$NetBSD: patch-ac,v 1.5 2007/07/01 21:00:15 heinz Exp $

--- Makefile.in.orig	2003-02-11 23:24:56.000000000 +0100
+++ Makefile.in
@@ -5,14 +5,14 @@
 #
 
 PREFIX = @prefix@
-CC = @CC@
+CC = ${LIBTOOL} --mode=compile @CC@
 CFLAGS = @CFLAGS@ -Ipa_common
-LIBS = @LIBS@
+LIBS = ${LIBOSSAUDIO} -L@prefix@/lib ${COMPILER_RPATH_FLAG}@prefix@/lib @LIBS@
 AR = @AR@
 RANLIB = @RANLIB@
 INSTALL = @INSTALL@
 SHARED_FLAGS = @SHARED_FLAGS@
-DLL_LIBS = @DLL_LIBS@
+DLL_LIBS = @DLL_LIBS@ ${LIBOSSAUDIO}
 
 OTHER_OBJS = @OTHER_OBJS@
 
@@ -57,20 +57,17 @@ all: lib/$(PALIB) lib/$(PADLLV) tests
 tests: bin/ $(TESTS)
 
 lib/$(PALIB): lib/ $(OBJS) Makefile $(PAINC)
-	$(AR) ruv lib/$(PALIB) $(OBJS)
-	$(RANLIB) lib/$(PALIB)
+	${LIBTOOL} --mode=link @CC@ -o lib/${PALIB:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:18:0 $(DLL_LIBS)
 
 lib/$(PADLLV): lib/ $(OBJS) Makefile $(PAINC)
-	$(CC) $(SHARED_FLAGS) -o lib/$(PADLLV) $(OBJS) $(DLL_LIBS)
 
 $(TESTS): bin/%: lib/$(PALIB) Makefile $(PAINC) pa_tests/%.c
-	$(CC) -o $@ $(CFLAGS) pa_tests/$*.c lib/$(PALIB) $(LIBS)
+	${LIBTOOL} --mode=link @CC@ -o $@ $(CFLAGS) pa_tests/$*.c lib/${PALIB:.a=.la} $(LIBS)
 
 install: lib/$(PALIB) lib/$(PADLLV)
-	$(INSTALL) -m 644 lib/$(PADLLV) $(PREFIX)/lib/$(PADLLV)
-	$(INSTALL) -m 644 lib/$(PALIB) $(PREFIX)/lib/$(PALIB)
-	cd $(PREFIX)/lib && rm -f $(PADLL) && ln -s $(PADLLV) $(PADLL)
-	$(INSTALL) -m 644 pa_common/portaudio.h $(PREFIX)/include/portaudio.h
+	${LIBTOOL} --mode=install $(INSTALL) -m 644 lib/${PALIB:.a=.la} $(DESTDIR)$(PREFIX)/lib/
+	cd $(DESTDIR)$(PREFIX)/lib && rm -f $(PADLL) && ln -s $(PADLLV) $(PADLL)
+	$(INSTALL) -m 644 pa_common/portaudio.h $(DESTDIR)$(PREFIX)/include/portaudio.h
 	@echo ""
 	@echo "------------------------------------------------------------"
 	@echo "PortAudio was successfully installed."