File lrzsz-autotools.patch of Package rzsz
xxxxxxxxxx
1
Index: lrzsz-0.12.21rc/acinclude.m4
2
===================================================================
3
--- lrzsz-0.12.21rc.orig/acinclude.m4
4
+++ lrzsz-0.12.21rc/acinclude.m4
5
6
lrzsz_cv_decl_errno=yes, lrzsz_cv_decl_errno=no)])
7
AC_MSG_RESULT($lrzsz_cv_decl_errno)
8
if test $lrzsz_cv_decl_errno = yes; then
9
- AC_DEFINE([HAVE_ERRNO_DECLARATION])
10
+ AC_DEFINE([HAVE_ERRNO_DECLARATION], 1, [[HAVE_ERRNO_DECLARATION]])
11
fi
12
])
13
14
15
], ac_cv_type_speed_t=yes, ac_cv_type_speed_t=no)])dnl
16
AC_MSG_RESULT($ac_cv_type_speed_t)
17
if test $ac_cv_type_speed_t = no; then
18
- AC_DEFINE([speed_t],long)
19
+ AC_DEFINE([speed_t],long, [speed_t])
20
fi
21
])
22
23
24
#include <sys/select.h>],
25
[struct tm *tp;], lrzsz_cv_header_sys_select=yes, lrzsz_cv_header_sys_select=no)])
26
if test $lrzsz_cv_header_sys_select = no; then
27
- AC_DEFINE(SYS_TIME_WITHOUT_SYS_SELECT)
28
+ AC_DEFINE(SYS_TIME_WITHOUT_SYS_SELECT, 1, [SYS_TIME_WITHOUT_SYS_SELECT])
29
fi
30
])
31
32
33
cat >> confdefs.h <<\EOF
34
#define socklen_t int
35
EOF
36
- AC_DEFINE([socklen_t],int)
37
+ AC_DEFINE([socklen_t],int, [socklen_t])
38
fi
39
]) dnl DEFUN
40
Index: lrzsz-0.12.21rc/configure.in
41
===================================================================
42
--- lrzsz-0.12.21rc.orig/configure.in
43
+++ lrzsz-0.12.21rc/configure.in
44
45
AC_SUBST(PACKAGE)
46
AC_SUBST(VERSION)
47
48
+GT_YES="#"
49
+GT_NO=""
50
+AC_SUBST(GT_YES)
51
+AC_SUBST(GT_NO)
52
+
53
changequote(,)dnl
54
case $VERSION in
55
[0-9]*.[0-9]*.[0-9]*) README_ALPHA="README-alpha";;
56
57
[if test "$enableval" = "no" ; then
58
:
59
else
60
- AC_DEFINE(ENABLE_TIMESYNC)
61
+ AC_DEFINE(ENABLE_TIMESYNC, 1, [ENABLE_TIMESYNC])
62
fi],
63
- [AC_DEFINE(ENABLE_TIMESYNC)])
64
+ [AC_DEFINE(ENABLE_TIMESYNC, 1, [ENABLE_TIMESYNC])])
65
AC_SUBST(ENABLE_TIMESYNC)
66
AC_ARG_ENABLE(pubdir,
67
[--enable-pubdir=/path include support for a public writeable directory],
68
[if test "$enableval" = "no" ; then
69
:
70
else
71
- AC_DEFINE_UNQUOTED(PUBDIR,"$enableval")
72
+ AC_DEFINE_UNQUOTED(PUBDIR,"$enableval", [PUBDIR])
73
fi])
74
AC_ARG_ENABLE(mkdir,
75
[--disable-mkdir disable support for creating directories (lrz)],
76
[if test "$enableval" = "no" ; then
77
:
78
else
79
- AC_DEFINE(ENABLE_MKDIR)
80
+ AC_DEFINE(ENABLE_MKDIR, 1, [ENABLE_MKDIR])
81
fi],
82
- [AC_DEFINE(ENABLE_MKDIR)])
83
+ [AC_DEFINE(ENABLE_MKDIR, 1, [ENABLE_MKDIR])])
84
AC_ARG_ENABLE(syslog,
85
[--enable-syslog=FACILITY,{force,default,optional} include syslogsupport],
86
[
87
88
*,*)
89
level=`echo $enableval|sed -e 's/^.*,//'`
90
fac=`echo $enableval|sed -e 's/,.*$//'`
91
- AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$fac)
92
+ AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$fac, [ENABLE_SYSLOG])
93
;;
94
*)
95
lookup_facility=LOG_UUCP
96
97
;;
98
esac
99
if test "$level" = "force" ; then
100
- AC_DEFINE(ENABLE_SYSLOG_FORCE)
101
+ AC_DEFINE(ENABLE_SYSLOG_FORCE, 1, [ENABLE_SYSLOG_FORCE])
102
else
103
if test "$level" = "optional" ; then
104
:
105
else
106
- AC_DEFINE(ENABLE_SYSLOG_DEFAULT)
107
+ AC_DEFINE(ENABLE_SYSLOG_DEFAULT, 1, [ENABLE_SYSLOG_DEFAULT])
108
fi
109
fi
110
fi],[
111
- AC_DEFINE(ENABLE_SYSLOG_DEFAULT)
112
+ AC_DEFINE(ENABLE_SYSLOG_DEFAULT, 1, [ENABLE_SYSLOG_DEFAULT])
113
lookup_facility=LOG_UUCP
114
])
115
116
117
dnl AC_PROG_MAKE_SET included in AM_INIT_AUTOMAKE
118
AC_PROG_RANLIB
119
AC_ISC_POSIX
120
-AC_AIX
121
-AC_MINIX
122
+AC_USE_SYSTEM_EXTENSIONS
123
+AM_GNU_GETTEXT
124
AM_C_PROTOTYPES
125
AC_C_CONST
126
AC_C_INLINE
127
128
fi
129
case "$CFLAGS" in
130
*-Wstrict-prototypes*)
131
- AC_DEFINE(STRICT_PROTOTYPES)
132
+ AC_DEFINE(STRICT_PROTOTYPES, 1, [STRICT_PROTOTYPES])
133
;;
134
esac
135
136
137
LRZSZ_HEADERS_TERM_IO
138
AC_CHECK_HEADERS(termios.h sys/termios.h termio.h sys/termio.h sgtty.h)
139
AC_CHECK_HEADERS(sys/mman.h utime.h syslog.h sys/syslog.h sys/param.h)
140
-AC_CHECK_HEADERS(sys/select.h strings.h arpa/inet.h)
141
+AC_CHECK_HEADERS(sys/select.h strings.h locale.h arpa/inet.h)
142
143
dnl Checks for typedefs, structures, and compiler characteristics.
144
AC_TYPE_SIZE_T
145
146
dnl AC_FUNC_UTIME_NULL
147
AC_FUNC_MMAP
148
AC_FUNC_ALLOCA
149
-AC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
150
+AC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [HAVE_STRUCT_UTIMBUF]))
151
+
152
153
AC_CHECK_FUNCS(gettimeofday settimeofday)
154
AC_CHECK_FUNCS(strchr memcpy select vprintf)
155
156
AC_REPLACE_GNU_GETOPT
157
158
dnl for lib/error.c
159
-AC_DEFINE(HAVE_STRERROR)
160
+AC_DEFINE(HAVE_STRERROR, 1, HAVE_STRERROR)
161
162
163
dnl special tests
164
165
lrzsz_cv_sys_ftime_ok=no,
166
lrzsz_cv_sys_ftime_ok=runtime)])
167
case $lrzsz_cv_sys_ftime_ok in
168
-yes) AC_DEFINE(HAVE_FTIME) AC_MSG_RESULT(yes) ;;
169
+yes) AC_DEFINE(HAVE_FTIME, 1, [HAVE_FTIME]) AC_MSG_RESULT(yes) ;;
170
no) AC_MSG_RESULT(no)
171
AC_MSG_WARN(ftime seems to be buggy) ;;
172
-runtime) AC_DEFINE(HAVE_FTIME)
173
+runtime) AC_DEFINE(HAVE_FTIME, 1, [HAVE_FTIME])
174
AC_MSG_RESULT(will check at run time) ;;
175
esac
176
])
177
178
])
179
if test $libquark_cv_var_timezone = yes ; then
180
AC_MSG_RESULT(yes)
181
- AC_DEFINE(HAVE_TIMEZONE_VAR)
182
+ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [HAVE_TIMEZONE_VAR])
183
else
184
AC_MSG_RESULT(no)
185
fi
186
187
])
188
if test $lrzsz_cv_lookup_facility = yes ; then
189
AC_MSG_RESULT(yes)
190
- AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$lookup_facility)
191
+ AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$lookup_facility, [ENABLE_SYSLOG])
192
else
193
- AC_DEFINE(ENABLE_SYSLOG,LOG_USER)
194
+ AC_DEFINE(ENABLE_SYSLOG,LOG_USER, [ENABLE_SYSLOG])
195
AC_MSG_RESULT(no)
196
fi
197
fi
198
199
AC_SUBST(LDFLAGS)
200
AC_SUBST(LIBS)
201
202
-AM_GNU_GETTEXT
203
-
204
-AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
205
+AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME", [LOCALEDIR])
206
dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
207
208
AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
209
Index: lrzsz-0.12.21rc/lib/Makefile.am
210
===================================================================
211
--- lrzsz-0.12.21rc.orig/lib/Makefile.am
212
+++ lrzsz-0.12.21rc/lib/Makefile.am
213
214
noinst_LIBRARIES=libzmodem.a
215
-CFLAGS=@CFLAGS@
216
AUTOMAKE_OPTIONS=ansi2knr
217
218
EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
219
Index: lrzsz-0.12.21rc/po/Makefile.in.in
220
===================================================================
221
--- lrzsz-0.12.21rc.orig/po/Makefile.in.in
222
+++ lrzsz-0.12.21rc/po/Makefile.in.in
223
224
225
POTFILES = \
226
227
-CATALOGS = @CATALOGS@
228
+CATALOGS = de.gmo
229
CATOBJEXT = @CATOBJEXT@
230
INSTOBJEXT = @INSTOBJEXT@
231
232
233
for cat in $$catalogs; do \
234
cat=`basename $$cat`; \
235
case "$$cat" in \
236
- *.gmo) destdir=$(gnulocaledir);; \
237
- *) destdir=$(localedir);; \
238
+ *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
239
+ *) destdir=$(DESTDIR)$(localedir);; \
240
esac; \
241
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
242
dir=$$destdir/$$lang/LC_MESSAGES; \
243
Index: lrzsz-0.12.21rc/src/Makefile.am
244
===================================================================
245
--- lrzsz-0.12.21rc.orig/src/Makefile.am
246
+++ lrzsz-0.12.21rc/src/Makefile.am
247
248
noinst_HEADERS = timing.h zglobal.h zmodem.h
249
datadir = $(prefix)/@DATADIRNAME@
250
localedir = $(datadir)/locale
251
-CFLAGS=@CFLAGS@
252
DISTCLEAN_FILES=lrzszbug
253
254
LDADD = ../lib/libzmodem.a @INTLLIBS@
255
256
#DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
257
DEFS = -DNFGVMIN @DEFS@ -DLOCALEDIR=\"$(localedir)\"
258
259
-install-exec-local:
260
- rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
261
- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
262
- $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
263
- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
264
- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
265
- $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'`
266
- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
267
- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
268
- $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'`
269
- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
270
- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
271
- $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'`
272
-# rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`
273
-# ln $(bindir)/`echo lrzszbug |sed -e '$(transform)'` \
274
-# $(bindir)/`echo lrzszbug |sed -e '$(transform)'`
275
+# Caveat: program name transformation is ignored here.
276
+$(DESTDIR)$(bindir)/lsz $(DESTDIR)$(bindir)/lrz: install-binPROGRAMS
277
+
278
+$(DESTDIR)$(bindir)/lsb $(DESTDIR)$(bindir)/lsx: $(DESTDIR)$(bindir)/lsz
279
+ rm -f $@ ; ln -s `basename $<` $@
280
+
281
+$(DESTDIR)$(bindir)/lrb $(DESTDIR)$(bindir)/lrx: $(DESTDIR)$(bindir)/lrz
282
+ rm -f $@ ; ln -s `basename $<` $@
283
+
284
+install-exec-local: $(DESTDIR)$(bindir)/lsb $(DESTDIR)$(bindir)/lsx $(DESTDIR)$(bindir)/lrb $(DESTDIR)$(bindir)/lrx
285
286
uninstall-local:
287
rm -f $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
288