summaryrefslogtreecommitdiff
path: root/net/freewais-sf/patches/patch-ad
blob: 330c7f9ce7ae43c488b68a810565719da3468f8b (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
$NetBSD: patch-ad,v 1.1.1.1 1999/05/11 13:56:53 bad Exp $

--- lib/Makefile.SH.orig	Fri Apr 16 11:59:24 1999
+++ lib/Makefile.SH	Sun May  9 23:54:32 1999
@@ -39,7 +39,7 @@
 # Parameters set by Configure -- edit config.sh if changes are needed
 
 AR = ar rc
-CC = $cc
+CC = \$(LIBTOOL) $cc
 CTAGS = ctags
 MAKE = make
 MKDEP = $mkdep \$(DPFLAGS) --
@@ -58,9 +58,9 @@
 EMBED = $embed_ldopts
 CFLAGS = $ccflags $optimize $mccflags
 SO = $so
-REV = $baserev.$patchlevel
+REV = $baserev
 PRIVLIB = $installprivlib
-PRIVINC = `echo $installprivlib | sed -e s:/lib/:/include/:`
+PRIVINC = `echo $installprivlib | sed -e s:/lib:/include:`
 USRINC = $usrinc
 SUBDIRS = \$(SUBDIRS)
 
@@ -111,7 +111,7 @@
 SRCS    = cutil.c ustubs.c panic.c futil.c
 OBJS    = cutil.o ustubs.o panic.o futil.o
 
-all:: libwais.a wais.h
+all:: libwais.la wais.h
 
 $(CTYPEOBJ) $(REGEXPOBJ) $(FTWOBJS) $(IROBJS): subdirs
 
@@ -151,15 +151,14 @@
 
 ALLOBJ = $(CTYPEOBJ) $(REGEXPOBJ) $(OBJS) $(FTWOBJS) $(IROBJS)
 
-libwais.a: $(OBJS) subdirs
+libwais.la: $(OBJS) subdirs
 	$(RM) $@
-	$(AR) $@ $(ALLOBJ)
-	$(RANLIB) $@
+	${LIBTOOL} --mode=link cc -o ${.TARGET:.a=.la} ${ALLOBJ:.o=.lo} -rpath ${PREFIX}/lib -version-info `echo $(REV) | tr . :`
 
-install:: libwais.a
-	$(INSTALL) -c -m 644 libwais.a $(PRIVLIB)
-	$(RANLIB) $(PRIVLIB)/libwais.a
-	chmod 444 $(PRIVLIB)/libwais.a
+
+install::
+	$(LIBTOOL) --mode=install $(INSTALL) -c -m 444 libwais.la $(PRIVLIB)
+	$(LIBTOOL) --finish $(PRIVLIB)
 
 deinstall::
 	$(RM) $(PRIVLIB)/libwais.a
@@ -188,7 +187,7 @@
 install:: wais.h
 	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
 	for i in wais.h; do \
-	(set -x; $(INSTALL) -c -m 664 $$i $(PRIVINC)); \
+	(set -x; $(INSTALL) -c -m 444 $$i $(PRIVINC)); \
 	done
 
 deinstall::