summaryrefslogtreecommitdiff
path: root/math/scilab/patches/patch-af
blob: 5822780206e25d57eecea0d0ad87c0f0f9e11491 (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
$NetBSD: patch-af,v 1.5 2001/12/22 00:03:26 dmcmahill Exp $

libtool needs a tag for f77/f2c
also be sure to link the fortran libs
also allow FCTMEX to be empty.

--- Makemex.in.orig	Tue May  9 06:46:04 2000
+++ Makemex.in	Sun Apr  1 21:44:35 2001
@@ -20,4 +20,5 @@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
+FLIBS = @FLIBS@
 
 INCLUDES= -I$(SCIDIR)/routines 
@@ -30,7 +31,7 @@
 
 LTCOMPILE = $(LIBTOOL) --mode=compile $(QUIET) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-FLTCOMPILE = $(LIBTOOL) --mode=compile $(QUIET) $(FC) $(FFLAGS)
+FLTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(QUIET) $(FC) $(FFLAGS)
 
-LINK = $(LIBTOOL) --mode=link $(QUIET)  $(CC) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(QUIET)  $(CC) $(CFLAGS) $(LDFLAGS) $(FLIBS) -o $@
 
 OBJECTS = $(LIBRARY)_gateway.lo $(OTHEROBJECTS:.o=.lo)
@@ -85,16 +86,16 @@
 	@echo "------------------------------------------";
 	@echo "To load the function(s): ";
-	@for i in $(FCTMEX) ;\
+	@if test "X$(FCTMEX)" != "X"; then for i in $(FCTMEX) ;\
 	do (\
 	name=`dirname $$i`; \
 	echo "              $$name; " \
 	); \
-	done
-	@for i in $(FORTRANFCTMEX) ;\
+	done ; fi
+	@if test "X$(FORTRANFCTMEX)" != "X"; then for i in $(FORTRANFCTMEX) ;\
 	do (\
 	name=`dirname $$i`; \
 	echo "              $$name; " \
 	); \
-	done
+	done ; fi
 	@echo " at Scilab prompt, enter:";
 	@echo "-->exec $(LIBRARY).sce";
@@ -118,5 +119,5 @@
 
 GATEWAYS:
-	@for f in $(FCTMEX); \
+	@if test "X$(FCTMEX)" != "X"; then for f in $(FCTMEX); \
 	do \
 	obj=`basename $$f .c`; \
@@ -124,6 +125,6 @@
 	make $$obj.o MEX=mex_$$mex ; \
 	make $$obj.lo MEX=mex_$$mex ; \
-	done;
-	@for f in $(FORTRANFCTMEX); \
+	done; fi
+	@if test "X$(FORTRANFCTMEX)" != "X"; then for f in $(FORTRANFCTMEX); \
 	do \
 	obj=`basename $$f .F`; \
@@ -131,5 +132,5 @@
 	make $$obj.o MEX=mex$$mex ; \
 	make $$obj.lo MEX=mex$$mex ; \
-	done;
+	done; fi
 
 .c.o: