summaryrefslogtreecommitdiff
path: root/devel/cfitsio/patches/patch-aa
blob: 7194d9e12db2e764667d9842ec49037325832ed3 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
$NetBSD: patch-aa,v 1.2 2004/09/08 13:32:31 wiz Exp $

--- Makefile.in.orig	2003-06-19 21:34:17.000000000 +0200
+++ Makefile.in
@@ -23,11 +23,12 @@ CFITSIO_INCLUDE =	@CFITSIO_PREFIX@/inclu
 
 SHELL =		/bin/sh
 RANLIB =	@RANLIB@
-CC =		@CC@
+CC =		${LIBTOOL} --mode=compile @CC@
+LD =		${LIBTOOL} --mode=link @CC@
 CFLAGS =	@CFLAGS@
 FC =		@FC@
 LDFLAGS =	$(CFLAGS)
-DEFS =		@DEFS@
+DEFS =		@DEFS@ -Dunix
 LIBS =		@LIBS@
 FLEX =		flex
 BISON =		bison
@@ -73,46 +74,41 @@ all:
 all-nofitsio:
 		${MAKE} stand_alone "FITSIO_SRC="
 
-stand_alone:	libcfitsio.a
+stand_alone:	libcfitsio.la
+
+libcfitsio.la:	${OBJECTS}
+		${LIBTOOL} --mode=link @CC@ -o $@ ${OBJECTS:.o=.lo} -rpath ${PREFIX}/lib -version-info 2:0
 
-libcfitsio.a:	${OBJECTS}
-		ar rv libcfitsio.a ${OBJECTS}; \
-		${RANLIB} libcfitsio.a;
 
 shared: libcfitsio${SHLIB_SUFFIX}
 
 libcfitsio${SHLIB_SUFFIX}: ${OBJECTS}
 		${SHLIB_LD} -o $@ ${OBJECTS}
 
-install:	libcfitsio.a ${CFITSIO_LIB} ${CFITSIO_INCLUDE}
-		@if [ -f libcfitsio.a ]; then \
-			/bin/mv libcfitsio.a ${CFITSIO_LIB}; \
-		fi; \
-		if [ -f libcfitsio${SHLIB_SUFFIX} ]; then \
-			/bin/mv libcfitsio${SHLIB_SUFFIX} ${CFITSIO_LIB}; \
-		fi; \
-		/bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}/
-
-smem:		smem.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm
-
-testprog:	testprog.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o testprog testprog.o -L. -lcfitsio -lm ${LIBS}
-
-fitscopy:	fitscopy.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS}
-
-speed:		speed.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o speed speed.o -L. -lcfitsio -lm ${LIBS}
+install:	libcfitsio.la ${CFITSIO_LIB} ${CFITSIO_INCLUDE}
+		${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libcfitsio.la ${CFITSIO_LIB}
+		${BSD_INSTALL_DATA} fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}/
+
+smem:		smem.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm
+
+testprog:	testprog.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o testprog testprog.o libcfitsio.la -lm ${LIBS}
+
+fitscopy:	fitscopy.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS}
+
+speed:		speed.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o speed speed.o -L. -lcfitsio -lm ${LIBS}
 
-imcopy:		imcopy.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o imcopy imcopy.o -L. -lcfitsio -lm ${LIBS}
+imcopy:		imcopy.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o imcopy imcopy.o -L. -lcfitsio -lm ${LIBS}
 
-listhead:	listhead.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o listhead listhead.o -L. -lcfitsio -lm ${LIBS}
+listhead:	listhead.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o listhead listhead.o -L. -lcfitsio -lm ${LIBS}
 
-cookbook:	cookbook.o libcfitsio.a ${OBJECTS}
-		${CC} $(CFLAGS) $(DEFS) -o cookbook cookbook.o -L. -lcfitsio -lm ${LIBS}
+cookbook:	cookbook.o libcfitsio.la ${OBJECTS}
+		${LD} $(CFLAGS) $(DEFS) -o cookbook cookbook.o -L. -lcfitsio -lm ${LIBS}
 
 eval:		# Rebuild eval_* files from flex/bison source
 		$(FLEX) -t eval.l > eval_l.c1
@@ -124,7 +120,7 @@ eval:		# Rebuild eval_* files from flex/
 		/bin/rm -f y.tab.c y.tab.h
 
 clean:
-	-	/bin/rm -f *.o libcfitsio.a libcfitsio${SHLIB_SUFFIX} \
+	-	/bin/rm -f *.o libcfitsio.la libcfitsio${SHLIB_SUFFIX} \
 			smem testprog y.output
 
 distclean:	clean