Mercurial > hg > octave-lyh
comparison flibs.sh @ 1176:fe5f25f61865
[project @ 1995-03-21 20:48:14 by jwe]
author | jwe |
---|---|
date | Tue, 21 Mar 1995 20:48:14 +0000 |
parents | 1347a762f3a7 |
children |
comparison
equal
deleted
inserted
replaced
1175:b4cc62d98068 | 1176:fe5f25f61865 |
---|---|
52 # so we don't have to examine it. | 52 # so we don't have to examine it. |
53 want_arg= | 53 want_arg= |
54 | 54 |
55 for arg in $foutput | 55 for arg in $foutput |
56 do | 56 do |
57 if test -z "$want_arg" | 57 old_want_arg=$want_arg |
58 then | 58 want_arg= |
59 case $arg in | 59 case "$old_want_arg" in |
60 /*.a | /*values-X*.o) | 60 '') |
61 exists=false | 61 case $arg in |
62 for f in $lflags | 62 /*.a | /*values-X*.o) |
63 do | 63 exists=false |
64 if test x$arg = x$f | 64 for f in $lflags |
65 then | 65 do |
66 exists=true | 66 if test x$arg = x$f |
67 fi | 67 then |
68 done | 68 exists=true |
69 if $exists | 69 fi |
70 then | 70 done |
71 if $exists | |
72 then | |
73 arg= | |
74 else | |
75 lflags="$lflags $arg" | |
76 fi | |
77 ;; | |
78 -lang*) | |
71 arg= | 79 arg= |
72 else | 80 ;; |
73 lflags="$lflags $arg" | 81 -[lLR]) |
74 fi | 82 want_arg=$arg |
75 ;; | |
76 -lang*) | |
77 arg= | |
78 ;; | |
79 -[lL]*) | |
80 exists=false | |
81 for f in $lflags | |
82 do | |
83 if test x$arg = x$f | |
84 then | |
85 exists=true | |
86 fi | |
87 done | |
88 if $exists || test x$arg = x-lm -o x$arg = x-lc | |
89 then | |
90 arg= | 83 arg= |
91 else | 84 ;; |
92 lflags="$lflags $arg" | 85 -[lLR]*) |
93 fi | 86 exists=false |
94 ;; | 87 for f in $lflags |
95 -u) | 88 do |
96 want_arg=$arg | 89 if test x$arg = x$f |
97 ;; | 90 then |
98 -Y) | 91 exists=true |
99 want_arg=$arg | 92 fi |
100 arg= | 93 done |
101 ;; | 94 if $exists || test x$arg = x-lm -o x$arg = x-lc |
102 *) | 95 then |
103 arg= | 96 arg= |
104 ;; | 97 else |
105 esac | 98 lflags="$lflags $arg" |
106 else | 99 fi |
107 if test x$want_arg = x-Y | 100 ;; |
108 then | 101 -u) |
102 want_arg=$arg | |
103 ;; | |
104 -Y) | |
105 want_arg=$arg | |
106 arg= | |
107 ;; | |
108 *) | |
109 arg= | |
110 ;; | |
111 esac | |
112 ;; | |
113 -[lLR]) | |
114 arg="$old_want_arg $arg" | |
115 ;; | |
116 -Y) | |
109 | 117 |
110 # Should probably try to ensure unique directory options here too. | 118 # Should probably try to ensure unique directory options here too. |
111 # This probably only applies to Solaris systems, and then will only | 119 # This probably only applies to Solaris systems, and then will only |
112 # work with gcc... | 120 # work with gcc... |
113 | 121 |
115 SAVE_IFS=$IFS | 123 SAVE_IFS=$IFS |
116 IFS=: | 124 IFS=: |
117 list= | 125 list= |
118 for elt in $arg | 126 for elt in $arg |
119 do | 127 do |
120 list="$list -L $elt" | 128 list="$list -L $elt" |
121 done | 129 done |
122 IFS=$SAVE_IFS | 130 IFS=$SAVE_IFS |
123 arg="$list" | 131 arg="$list" |
124 fi | 132 ;; |
125 want_arg= | 133 esac |
126 fi | |
127 | 134 |
128 if test -n "$arg" | 135 if test -n "$arg" |
129 then | 136 then |
130 flibs="$flibs $arg" | 137 flibs="$flibs $arg" |
131 fi | 138 fi |