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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
* Respect LDFLAGS
* Fix bashisms in configure
* Don't pre-compress manpages
--- a/Makefile.in
+++ b/Makefile.in
@@ -129,22 +129,22 @@ install: src
$(INSTALL) -d $(DESTDIR)${libdir}/fitsh/lfit
$(INSTALL) -m 0644 ./src/linear.$(DLEXT) $(DESTDIR)${libdir}/fitsh/lfit
$(INSTALL) -d $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fiarith.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/ficalib.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/ficombine.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/ficonv.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fiheader.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fiign.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fiinfo.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fiphot.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/firandom.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fistar.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/fitrans.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/grcollect.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/grmatch.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/grtrans.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/gropt.1.gz $(DESTDIR)${mandir}/man1
- $(INSTALL) -m 0644 ./man/lfit.1.gz $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fiarith.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/ficalib.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/ficombine.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/ficonv.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fiheader.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fiign.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fiinfo.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fiphot.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/firandom.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fistar.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/fitrans.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/grcollect.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/grmatch.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/grtrans.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/gropt.1 $(DESTDIR)${mandir}/man1
+ $(INSTALL) -m 0644 ./man/lfit.1 $(DESTDIR)${mandir}/man1
uninstall:
rm -f ${bindir}/fiarith
@@ -164,32 +164,32 @@ uninstall:
rm -f ${bindir}/gropt
rm -f ${bindir}/lfit
rm -f ${libdir}/fitsh/lfit/linear.$(DLEXT)
- rm -f ${mandir}/man1/fiarith.1.gz
- rm -f ${mandir}/man1/ficalib.1.gz
- rm -f ${mandir}/man1/ficombine.1.gz
- rm -f ${mandir}/man1/ficonv.1.gz
- rm -f ${mandir}/man1/fiheader.1.gz
- rm -f ${mandir}/man1/fiign.1.gz
- rm -f ${mandir}/man1/fiinfo.1.gz
- rm -f ${mandir}/man1/fiphot.1.gz
- rm -f ${mandir}/man1/firandom.1.gz
- rm -f ${mandir}/man1/fistar.1.gz
- rm -f ${mandir}/man1/fitrans.1.gz
- rm -f ${mandir}/man1/grcollect.1.gz
- rm -f ${mandir}/man1/grmatch.1.gz
- rm -f ${mandir}/man1/grtrans.1.gz
- rm -f ${mandir}/man1/gropt.1.gz
- rm -f ${mandir}/man1/lfit.1.gz
+ rm -f ${mandir}/man1/fiarith
+ rm -f ${mandir}/man1/ficalib
+ rm -f ${mandir}/man1/ficombine
+ rm -f ${mandir}/man1/ficonv
+ rm -f ${mandir}/man1/fiheader
+ rm -f ${mandir}/man1/fiign
+ rm -f ${mandir}/man1/fiinfo
+ rm -f ${mandir}/man1/fiphot
+ rm -f ${mandir}/man1/firandom
+ rm -f ${mandir}/man1/fistar
+ rm -f ${mandir}/man1/fitrans
+ rm -f ${mandir}/man1/grcollect
+ rm -f ${mandir}/man1/grmatch
+ rm -f ${mandir}/man1/grtrans
+ rm -f ${mandir}/man1/gropt
+ rm -f ${mandir}/man1/lfit
HELP2MAN_LIST=fiarith ficalib ficombine ficonv fiheader fiign fiinfo fiphot firandom fistar fitrans grcollect grmatch grtrans gropt lfit
help2man: src
mkdir -p ./doc/help2man
- cat ./doc/man.brief | while read b name; do $(HELP2MAN) -n "$$name" -N -h --long-help ./src/$$b > ./doc/help2man/$$b.1; $(GZIP) -f ./doc/help2man/$$b.1; done
+ cat ./doc/man.brief | while read b name; do $(HELP2MAN) -n "$$name" -N -h --long-help ./src/$$b > ./doc/help2man/$$b.1; done
man: help2man
mkdir -p $(MAN)
- for b in $(HELP2MAN_LIST); do cp -p ./doc/help2man/$$b.1.gz $(MAN); done
+ for b in $(HELP2MAN_LIST); do cp -p ./doc/help2man/$$b $(MAN); done
dist:
rm -f -r $(DIST)
@@ -244,7 +244,7 @@ dist:
mkdir $(DIST)/src/psn
cp -p src/psn/*.[ch] src/psn/Makefile.in $(DIST)/src/psn
mkdir $(DIST)/man
- cp -p man/*.1.gz $(DIST)/man
+ cp -p man/* $(DIST)/man
mkdir $(DIST)/misc
mkdir $(DIST)/misc/deb
cp -p misc/deb/fitsh.control misc/deb/fitsh.list $(DIST)/misc/deb
@@ -264,9 +264,7 @@ deb-fitsh: src help2man
cp $$file $(DEB)/fitsh/$$target ; \
done
cp README $(DEB)/fitsh/usr/share/doc/fitsh/
- gzip $(DEB)/fitsh/usr/share/doc/fitsh/README
cp AUTHORS $(DEB)/fitsh/usr/share/doc/fitsh/
- gzip $(DEB)/fitsh/usr/share/doc/fitsh/AUTHORS
cat $(DEB)/fitsh.control | \
sed -e "s/__ARCH__/$(DEB_ARCH)/" \
-e "s/__VERSION__/$(DEB_VERSION)/" \
--- a/configure.ac
+++ b/configure.ac
@@ -232,17 +232,17 @@ dynamic_extensions=yes
# our default $(CFLAGS) are:
if test -n "$CFLAGS" ; then
cflags_default=no
-elif test "${ac_cv_env_host_alias_value}" == "win32" ; then
+elif test "${ac_cv_env_host_alias_value}" = "win32" ; then
HOST=win32
CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHOST_WIN32"
cflags_default=yes
dynamic_extensions=no
-elif test "${ac_cv_env_host_alias_value}" == "win64" ; then
+elif test "${ac_cv_env_host_alias_value}" = "win64" ; then
HOST=win64
CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHOST_WIN32 -DHOST_WIN64"
cflags_default=yes
dynamic_extensions=no
-elif test "${CC}" == "tcc"; then
+elif test "${CC}" = "tcc"; then
CFLAGS="-Wall -pedantic -O3 -Wno-strict-aliasing -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
cflags_default=yes
else
@@ -358,19 +358,19 @@ AC_CHECK_LIB(dl,dlclose)
ax_cflags_gcc_no_overlength_strings=no
AX_CFLAGS_GCC_OPTION(-Wno-overlength-strings,[],[ax_cflags_gcc_no_overlength_strings=yes])
-if test $cflags_default == yes && test $ax_cflags_gcc_no_overlength_strings == yes ; then
+if test $cflags_default = yes && test $ax_cflags_gcc_no_overlength_strings = yes ; then
CFLAGS="$CFLAGS -Wno-overlength-strings"
fi
ax_cflags_gcc_no_long_long=no
AX_CFLAGS_GCC_OPTION(-Wno-long-long,[],[ax_cflags_gcc_no_long_long=yes])
-if test $cflags_default == yes && test $ax_cflags_gcc_no_long_long == yes ; then
+if test $cflags_default = yes && test $ax_cflags_gcc_no_long_long = yes ; then
CFLAGS="$CFLAGS -Wno-long-long"
fi
ax_cflags_gcc_no_unused_result=no
AX_CFLAGS_GCC_OPTION(-Wno-unused-result,[],[ax_cflags_gcc_no_unused_result=yes])
-if test $cflags_default == yes && test $ax_cflags_gcc_no_unused_result == yes ; then
+if test $cflags_default = yes && test $ax_cflags_gcc_no_unused_result = yes ; then
CFLAGS="$CFLAGS -Wno-unused-result"
fi
@@ -450,7 +450,7 @@ AC_MSG_RESULT([$PAPERSIZE: ${PAPER_WIDTH}x${PAPER_HEIGHT}])
ARCH=`uname -m`
AC_MSG_CHECKING([dynamic library extensions (HOST=$HOST)])
-if test `uname` == Darwin; then
+if test `uname` = Darwin; then
OSX_VERSION=`sw_vers -productVersion`
DLEXT=dylib
DLSWC="-dylib -arch $ARCH -macosx_version_min $OSX_VERSION"
@@ -459,19 +459,19 @@ if test `uname` == Darwin; then
DL_TARGETS=linear.dylib
AC_MSG_RESULT([dylib])
AC_MSG_NOTICE([OSX linker flags: $DLSWC])
-elif test "$HOST" == win32; then
+elif test "$HOST" = win32; then
DLEXT=
DLSWC=
DLDYN=
DLLIB=
AC_MSG_RESULT([not supported])
-elif test "$HOST" == win64; then
+elif test "$HOST" = win64; then
DLEXT=
DLSWC=
DLDYN=
DLLIB=
AC_MSG_RESULT([not supported])
-elif test `uname` == NetBSD; then
+elif test `uname` = NetBSD; then
DLEXT=so
DLSWC=-shared
DLDYN=-rdynamic
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -556,22 +556,22 @@ optcalc.o: optcalc.c optcalc.h
###############################################################################
fiarith: fiarith.c fitsh.h $(DEP_FIARITH) $(MOD_FIARITH)
- $(CC) $(CFLAGS) -o fiarith fiarith.c $(DEP_FIARITH) $(MOD_FIARITH) $(LIB_FIARITH)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fiarith fiarith.c $(DEP_FIARITH) $(MOD_FIARITH) $(LIB_FIARITH)
ficalib: ficalib.c fitsh.h $(DEP_FICALIB) $(MOD_FICALIB)
- $(CC) $(CFLAGS) -o ficalib ficalib.c $(DEP_FICALIB) $(MOD_FICALIB) $(LIB_FICALIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o ficalib ficalib.c $(DEP_FICALIB) $(MOD_FICALIB) $(LIB_FICALIB)
ficombine: ficombine.c fitsh.h $(DEP_FICOMBINE) $(MOD_FICOMBINE)
- $(CC) $(CFLAGS) -o ficombine ficombine.c $(DEP_FICOMBINE) $(MOD_FICOMBINE) $(LIB_FICOMBINE)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o ficombine ficombine.c $(DEP_FICOMBINE) $(MOD_FICOMBINE) $(LIB_FICOMBINE)
ficonv: ficonv.c fitsh.h $(DEP_FICONV) $(MOD_FICONV)
- $(CC) $(CFLAGS) -o ficonv ficonv.c $(DEP_FICONV) $(MOD_FICONV) $(LIB_FICONV)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o ficonv ficonv.c $(DEP_FICONV) $(MOD_FICONV) $(LIB_FICONV)
fiheader: fiheader.c fitsh.h $(DEP_FIHEADER) $(MOD_FIHEADER)
- $(CC) $(CFLAGS) -o fiheader fiheader.c $(DEP_FIHEADER) $(MOD_FIHEADER) $(LIB_FIHEADER)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fiheader fiheader.c $(DEP_FIHEADER) $(MOD_FIHEADER) $(LIB_FIHEADER)
fiign: fiign.c fitsh.h $(DEP_FIIGN) $(MOD_FIIGN)
- $(CC) $(CFLAGS) -o fiign fiign.c $(DEP_FIIGN) $(MOD_FIIGN) $(LIB_FIIGN)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fiign fiign.c $(DEP_FIIGN) $(MOD_FIIGN) $(LIB_FIIGN)
fiinfo-image.o: fiinfo-image.c fiinfo.h
$(CC) $(CFLAGS) -c fiinfo-image.c
@@ -580,40 +580,40 @@ fiinfo-pnm.o: fiinfo-pnm.c fiinfo.h
$(CC) $(CFLAGS) -c fiinfo-pnm.c
fiinfo: fiinfo.c fiinfo.h fitsh.h $(DEP_FIINFO) $(MOD_FIINFO)
- $(CC) $(CFLAGS) -o fiinfo fiinfo.c $(DEP_FIINFO) $(MOD_FIINFO) $(LIB_FIINFO)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fiinfo fiinfo.c $(DEP_FIINFO) $(MOD_FIINFO) $(LIB_FIINFO)
firandom-eval.o: firandom-eval.c firandom.h
$(CC) $(CFLAGS) -c firandom-eval.c
firandom: firandom.c fitsh.h $(DEP_FIRANDOM) $(MOD_FIRANDOM)
- $(CC) $(CFLAGS) -o firandom firandom.c $(DEP_FIRANDOM) $(MOD_FIRANDOM) $(LIB_FIRANDOM)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o firandom firandom.c $(DEP_FIRANDOM) $(MOD_FIRANDOM) $(LIB_FIRANDOM)
fiphot-io.o: fiphot-io.c fiphot.h
$(CC) $(CFLAGS) -c fiphot-io.c
fiphot: fiphot.c fitsh.h $(DEP_FIPHOT) $(MOD_FIPHOT)
- $(CC) $(CFLAGS) -o fiphot fiphot.c $(DEP_FIPHOT) $(MOD_FIPHOT) $(LIB_FIPHOT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fiphot fiphot.c $(DEP_FIPHOT) $(MOD_FIPHOT) $(LIB_FIPHOT)
fistar-io.o: fistar-io.c fistar.h
$(CC) $(CFLAGS) -c fistar-io.c
fistar: fistar.c fitsh.h $(DEP_FISTAR) $(MOD_FISTAR) fistar.h
- $(CC) $(CFLAGS) -o fistar fistar.c $(DEP_FISTAR) $(MOD_FISTAR) $(LIB_FISTAR)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fistar fistar.c $(DEP_FISTAR) $(MOD_FISTAR) $(LIB_FISTAR)
fitrans: fitrans.c fitsh.h $(DEP_FITRANS) $(MOD_FITRANS)
- $(CC) $(CFLAGS) -o fitrans fitrans.c $(DEP_FITRANS) $(MOD_FITRANS) $(LIB_FITRANS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fitrans fitrans.c $(DEP_FITRANS) $(MOD_FITRANS) $(LIB_FITRANS)
grcollect: grcollect.c fitsh.h $(DEP_GRCOLLECT) $(MOD_GRCOLLECT)
- $(CC) $(CFLAGS) -o grcollect grcollect.c $(DEP_GRCOLLECT) $(MOD_GRCOLLECT) $(LIB_GRCOLLECT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o grcollect grcollect.c $(DEP_GRCOLLECT) $(MOD_GRCOLLECT) $(LIB_GRCOLLECT)
grmatch: grmatch.c fitsh.h $(DEP_GRMATCH) $(MOD_GRMATCH)
- $(CC) $(CFLAGS) -o grmatch grmatch.c $(DEP_GRMATCH) $(MOD_GRMATCH) $(LIB_GRMATCH)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o grmatch grmatch.c $(DEP_GRMATCH) $(MOD_GRMATCH) $(LIB_GRMATCH)
grtrans: grtrans.c fitsh.h $(DEP_GRTRANS) $(MOD_GRTRANS)
- $(CC) $(CFLAGS) -o grtrans grtrans.c $(DEP_GRTRANS) $(MOD_GRTRANS) $(LIB_GRTRANS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o grtrans grtrans.c $(DEP_GRTRANS) $(MOD_GRTRANS) $(LIB_GRTRANS)
gropt: gropt.c fitsh.h $(DEP_GROPT) $(MOD_GROPT)
- $(CC) $(CFLAGS) -o gropt gropt.c $(DEP_GROPT) $(MOD_GROPT) $(LIB_GROPT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o gropt gropt.c $(DEP_GROPT) $(MOD_GROPT) $(LIB_GROPT)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -627,7 +627,7 @@ lfit-info.o: lfit-info.c lfit-info.h
$(CC) $(CFLAGS) -c lfit-info.c
lfit: lfit.c $(DEP_LFIT) $(MOD_LFIT)
- $(CC) $(CFLAGS) -o lfit lfit.c $(DEP_LFIT) $(MOD_LFIT) $(DLDYN) $(LIB_LFIT)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o lfit lfit.c $(DEP_LFIT) $(MOD_LFIT) $(DLDYN) $(LIB_LFIT)
linear.o: linear.c
$(CC) $(CFLAGS) -c linear.c
@@ -639,7 +639,7 @@ linear.$(DLEXT): linear.o
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
fic_mpstack: fic_mpstack.c fitsh.h $(DEP_FIC_MPSTACK)
- $(CC) $(CFLAGS) -o fic_mpstack fic_mpstack.c $(DEP_FIC_MPSTACK) $(MOD_FIC_MPSTACK) $(LIB_FIC_MPSTACK)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o fic_mpstack fic_mpstack.c $(DEP_FIC_MPSTACK) $(MOD_FIC_MPSTACK) $(LIB_FIC_MPSTACK)
###############################################################################
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -633,7 +633,7 @@ linear.o: linear.c
$(CC) $(CFLAGS) -c linear.c
linear.$(DLEXT): linear.o
- $(LD) -o linear.$(DLEXT) linear.o $(DLSWC) -lc
+ $(CC) $(LDFLAGS) -o linear.$(DLEXT) linear.o $(DLSWC) -lc
chmod 644 linear.$(DLEXT)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|