wok-next view autoconf213/stuff/patches/autoconf-2.13-consolidated_fixes-1.patch @ rev 21051
Small updates.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 30 01:34:53 2018 +0200 (2018-11-30) |
parents | |
children |
line source
1 Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
2 Date: 2016-06-11
3 Initial Package Version: 2.13
4 Upstream Status: Version is historic and unmaintained.
5 Origin: Found at fedora, plus fixes for LFS.
6 Description: All of the patches currently used by fedora, except for
7 the patch which ensures gawk is used in preference to mawk (we do not
8 install mawk). For LFS: we put mktemp in /usr/bin not /bin, remove
9 the install-info target because that will overwrite standards.info
10 with an old version (fedora always use a DESTDIR), and change the
11 man and info dirs to ${datadir}/ i.e. /usr/share (an empty /usr/info
12 will otherwise be created).
14 diff -Naur a/acgeneral.m4 b/acgeneral.m4
15 --- a/acgeneral.m4 1999-01-05 13:27:37.000000000 +0000
16 +++ b/acgeneral.m4 2016-06-11 00:18:24.429043947 +0100
17 @@ -1817,10 +1817,6 @@
18 [cat > conftest.$ac_ext <<EOF
19 [#]line __oline__ "configure"
20 #include "confdefs.h"
21 -ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
22 -extern "C" void exit(int);
23 -#endif
24 -])dnl
25 [$1]
26 EOF
27 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
28 @@ -1988,12 +1984,12 @@
29 AC_MSG_CHECKING(size of $1)
30 AC_CACHE_VAL(AC_CV_NAME,
31 [AC_TRY_RUN([#include <stdio.h>
32 -main()
33 +int main()
34 {
35 FILE *f=fopen("conftestval", "w");
36 - if (!f) exit(1);
37 + if (!f) return(1);
38 fprintf(f, "%d\n", sizeof($1));
39 - exit(0);
40 + return(0);
41 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
42 AC_MSG_RESULT($AC_CV_NAME)
43 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
44 @@ -2160,20 +2156,38 @@
45 dnl AC_OUTPUT_MAKE_DEFS()
46 define(AC_OUTPUT_MAKE_DEFS,
47 [# Transform confdefs.h into DEFS.
48 -dnl Using a here document instead of a string reduces the quoting nightmare.
49 # Protect against shell expansion while executing Makefile rules.
50 # Protect against Makefile macro expansion.
51 -cat > conftest.defs <<\EOF
52 +#
53 +# If the first sed substitution is executed (which looks for macros that
54 +# take arguments), then we branch to the quote section. Otherwise,
55 +# look for a macro that doesn't take arguments.
56 +cat >confdef2opt.sed <<\_ACEOF
57 changequote(<<, >>)dnl
58 -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
59 -s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
60 -s%\[%\\&%g
61 -s%\]%\\&%g
62 -s%\$%$$%g
63 +t clear
64 +: clear
65 +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
66 +t quote
67 +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
68 +t quote
69 +d
70 +: quote
71 +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
72 +s,\[,\\&,g
73 +s,\],\\&,g
74 +s,\$,$$,g
75 +p
76 changequote([, ])dnl
77 -EOF
78 -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
79 -rm -f conftest.defs
80 +_ACEOF
81 +# We use echo to avoid assuming a particular line-breaking character.
82 +# The extra dot is to prevent the shell from consuming trailing
83 +# line-breaks from the sub-command output. A line-break within
84 +# single-quotes doesn't work because, if this script is created in a
85 +# platform that uses two characters for line-breaks (e.g., DOS), tr
86 +# would break.
87 +ac_LF_and_DOT=`echo; echo .`
88 +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
89 +rm -f confdef2opt.sed
90 ])
92 dnl Do the variable substitutions to create the Makefiles or whatever.
93 diff -Naur a/acspecific.m4 b/acspecific.m4
94 --- a/acspecific.m4 1999-01-05 13:27:52.000000000 +0000
95 +++ b/acspecific.m4 2016-06-11 00:18:17.533078644 +0100
96 @@ -152,8 +152,41 @@
97 CXXFLAGS=
98 fi
99 fi
100 +
101 +AC_PROG_CXX_EXIT_DECLARATION
102 ])
104 +
105 +# AC_PROG_CXX_EXIT_DECLARATION
106 +# -----------------------------
107 +# Find a valid prototype for exit and declare it in confdefs.h.
108 +AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
109 +[for ac_declaration in \
110 + ''\
111 + '#include <stdlib.h>' \
112 + 'extern "C" void std::exit (int) throw (); using std::exit;' \
113 + 'extern "C" void std::exit (int); using std::exit;' \
114 + 'extern "C" void exit (int) throw ();' \
115 + 'extern "C" void exit (int);' \
116 + 'void exit (int);'
117 +do
118 + AC_TRY_COMPILE([#include <stdlib.h>
119 +$ac_declaration],
120 + [exit (42);],
121 + [],
122 + [continue])
123 + AC_TRY_COMPILE([$ac_declaration],
124 + [exit (42);],
125 + [break])
126 +done
127 +if test -n "$ac_declaration"; then
128 + echo '#ifdef __cplusplus' >>confdefs.h
129 + echo $ac_declaration >>confdefs.h
130 + echo '#endif' >>confdefs.h
131 +fi
132 +])# AC_PROG_CXX_EXIT_DECLARATION
133 +
134 +
135 dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
136 dnl in the environment, check for `g77', `f77' and `f2c', in that order.
137 dnl Set the output variable `F77' to the name of the compiler found.
138 @@ -1010,7 +1043,7 @@
139 ])
141 AC_DEFUN(AC_FUNC_MMAP,
142 -[AC_CHECK_HEADERS(unistd.h)
143 +[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
144 AC_CHECK_FUNCS(getpagesize)
145 AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
146 [AC_TRY_RUN([
147 @@ -1039,11 +1072,24 @@
148 #include <fcntl.h>
149 #include <sys/mman.h>
151 +#if HAVE_SYS_TYPES_H
152 +# include <sys/types.h>
153 +#endif
154 +
155 +#if HAVE_STDLIB_H
156 +# include <stdlib.h>
157 +#endif
158 +
159 +#if HAVE_SYS_STAT_H
160 +# include <sys/stat.h>
161 +#endif
162 +
163 +#if HAVE_UNISTD_H
164 +# include <unistd.h>
165 +#endif
166 +
167 /* This mess was copied from the GNU getpagesize.h. */
168 #ifndef HAVE_GETPAGESIZE
169 -# ifdef HAVE_UNISTD_H
170 -# include <unistd.h>
171 -# endif
173 /* Assume that all systems that can run configure have sys/param.h. */
174 # ifndef HAVE_SYS_PARAM_H
175 @@ -1373,6 +1419,8 @@
176 r.ru_majflt = r.ru_minflt = 0;
177 switch (fork()) {
178 case 0: /* Child. */
179 + /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
180 + if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
181 sleep(1); /* Give up the CPU. */
182 _exit(0);
183 case -1: _exit(0); /* What can we do? */
184 diff -Naur a/autoconf.sh b/autoconf.sh
185 --- a/autoconf.sh 1999-01-05 13:27:53.000000000 +0000
186 +++ b/autoconf.sh 2016-06-11 00:22:17.351872133 +0100
187 @@ -45,20 +45,20 @@
188 esac
190 : ${TMPDIR=/tmp}
191 -tmpout=${TMPDIR}/acout.$$
192 +tmpout=`/usr/bin/mktemp ${TMPDIR}/acout.XXXXXX`
193 localdir=
194 show_version=no
196 while test $# -gt 0 ; do
197 case "${1}" in
198 -h | --help | --h* )
199 - echo "${usage}" 1>&2; exit 0 ;;
200 + echo "${usage}" 1>&2; rm -f $tmpout ; exit 0 ;;
201 --localdir=* | --l*=* )
202 localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
203 shift ;;
204 -l | --localdir | --l*)
205 shift
206 - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
207 + test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
208 localdir="${1}"
209 shift ;;
210 --macrodir=* | --m*=* )
211 @@ -66,7 +66,7 @@
212 shift ;;
213 -m | --macrodir | --m* )
214 shift
215 - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
216 + test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
217 AC_MACRODIR="${1}"
218 shift ;;
219 --version | --v* )
220 @@ -76,7 +76,7 @@
221 - ) # Use stdin as input.
222 break ;;
223 -* )
224 - echo "${usage}" 1>&2; exit 1 ;;
225 + echo "${usage}" 1>&2; rm -f $tmpout; exit 1 ;;
226 * )
227 break ;;
228 esac
229 @@ -86,23 +86,25 @@
230 version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
231 $AC_MACRODIR/acgeneral.m4`
232 echo "Autoconf version $version"
233 + rm -f $tmpout
234 exit 0
235 fi
237 case $# in
238 0) infile=configure.in ;;
239 1) infile="$1" ;;
240 - *) echo "$usage" >&2; exit 1 ;;
241 + *) echo "$usage" >&2; rm -f $tmpout; exit 1 ;;
242 esac
244 trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
246 -tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
247 +tmpin=`/usr/bin/mktemp ${TMPDIR}/acin.XXXXXX`
248 +# Always set this, to avoid bogus errors from some rm's.
249 if test z$infile = z-; then
250 infile=$tmpin
251 - cat > $infile
252 elif test ! -r "$infile"; then
253 echo "autoconf: ${infile}: No such file or directory" >&2
254 + rm -f $tmpin $tmpout
255 exit 1
256 fi
258 @@ -111,6 +113,8 @@
259 else
260 use_localdir=
261 fi
262 +# Make sure we don't leave those around - they are annoying
263 +trap 'rm -f $tmpin $tmpout' 0
265 # Use the frozen version of Autoconf if available.
266 r= f=
267 @@ -118,7 +122,7 @@
268 case `$M4 --help < /dev/null 2>&1` in
269 *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
270 *traditional*) ;;
271 -*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
272 +*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin $tmpout; exit 1 ;;
273 esac
275 $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
276 @@ -154,6 +158,6 @@
277 /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
278 ' >&4
280 -rm -f $tmpout
281 +rm -f $tmpout $tmpin
283 exit $status
284 diff -Naur a/autoconf.texi b/autoconf.texi
285 --- a/autoconf.texi 1999-01-05 13:28:37.000000000 +0000
286 +++ b/autoconf.texi 2016-06-11 00:18:46.360933604 +0100
287 @@ -1,7 +1,7 @@
288 \input texinfo @c -*-texinfo-*-
289 @c %**start of header
290 -@setfilename autoconf.info
291 -@settitle Autoconf
292 +@setfilename autoconf213.info
293 +@settitle Autoconf-2.13
294 @c For double-sided printing, uncomment:
295 @c @setchapternewpage odd
296 @c %**end of header
297 @@ -17,7 +17,8 @@
298 @ifinfo
299 @format
300 START-INFO-DIR-ENTRY
301 -* Autoconf: (autoconf). Create source code configuration scripts.
302 +* Autoconf213: (autoconf213). Create source code configuration scripts.
303 + This is a legacy version of autoconf.
304 END-INFO-DIR-ENTRY
305 @end format
307 diff -Naur a/autoheader.sh b/autoheader.sh
308 --- a/autoheader.sh 1999-01-05 13:28:39.000000000 +0000
309 +++ b/autoheader.sh 2016-06-11 00:22:17.351872133 +0100
310 @@ -194,9 +194,9 @@
311 # Some fgrep's have limits on the number of lines that can be in the
312 # pattern on the command line, so use a temporary file containing the
313 # pattern.
314 - (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
315 + (fgrep_tmp=`/usr/bin/mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
316 trap "rm -f $fgrep_tmp; exit 1" 1 2 15
317 - cat > $fgrep_tmp <<EOF
318 + cat >> $fgrep_tmp <<EOF
319 $syms
320 EOF
321 fgrep -f $fgrep_tmp
322 diff -Naur a/autoupdate.sh b/autoupdate.sh
323 --- a/autoupdate.sh 1999-01-05 13:28:42.000000000 +0000
324 +++ b/autoupdate.sh 2016-06-11 00:23:19.151561252 +0100
325 @@ -26,7 +26,7 @@
326 Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
327 [--version] [template-file]"
329 -sedtmp=/tmp/acups.$$
330 +sedtmp=`/usr/bin/mktemp /tmp/acups.XXXXXX`
331 # For debugging.
332 #sedtmp=/tmp/acups
333 show_version=no
334 @@ -35,13 +35,13 @@
335 while test $# -gt 0 ; do
336 case "${1}" in
337 -h | --help | --h* )
338 - echo "${usage}" 1>&2; exit 0 ;;
339 + echo "${usage}" 1>&2; rm -f $sedtmp; exit 0 ;;
340 --macrodir=* | --m*=* )
341 AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
342 shift ;;
343 -m | --macrodir | --m* )
344 shift
345 - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
346 + test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $sedtmp; exit 1; }
347 AC_MACRODIR="${1}"
348 shift ;;
349 --version | --versio | --versi | --vers)
350 @@ -51,7 +51,7 @@
351 - ) # Use stdin as input.
352 break ;;
353 -* )
354 - echo "${usage}" 1>&2; exit 1 ;;
355 + echo "${usage}" 1>&2; rm -f $sedtmp; exit 1 ;;
356 * )
357 break ;;
358 esac
359 @@ -61,6 +61,7 @@
360 version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
361 $AC_MACRODIR/acgeneral.m4`
362 echo "Autoconf version $version"
363 + rm -f $sedtmp
364 exit 0
365 fi
367 @@ -68,6 +69,7 @@
369 tmpout=acupo.$$
370 trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
371 +trap 'rm -f $sedtmp' 0
372 case $# in
373 0) infile=configure.in; out="> $tmpout"
374 # Make sure $infile can be read, and $tmpout has the same permissions.
375 diff -Naur a/configure b/configure
376 --- a/configure 1999-01-05 13:28:57.000000000 +0000
377 +++ b/configure 2016-06-11 00:50:57.771231914 +0100
378 @@ -43,8 +43,8 @@
379 libdir='${exec_prefix}/lib'
380 includedir='${prefix}/include'
381 oldincludedir='/usr/include'
382 -infodir='${prefix}/info'
383 -mandir='${prefix}/man'
384 +infodir='${datadir}/info'
385 +mandir='${datadir}/man'
387 # Initialize some other variables.
388 subdirs=
389 diff -Naur a/Makefile.in b/Makefile.in
390 --- a/Makefile.in 1999-01-05 13:27:16.000000000 +0000
391 +++ b/Makefile.in 2016-06-11 00:29:34.005678107 +0100
392 @@ -49,7 +49,7 @@
394 # Directory in which to install library files.
395 datadir = @datadir@
396 -acdatadir = $(datadir)/autoconf
397 +acdatadir = $(datadir)/autoconf-2.13
399 # Directory in which to install documentation info files.
400 infodir = @infodir@
401 @@ -68,8 +68,8 @@
402 DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
403 Makefile.in NEWS README TODO $(M4FILES) \
404 acconfig.h acfunctions acheaders acidentifiers \
405 - acmakevars acprograms autoconf.info* \
406 - autoconf.sh autoconf.texi install.texi \
407 + acmakevars acprograms autoconf213.info* \
408 + autoconf.sh autoconf213.texi install.texi \
409 autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
410 config.guess config.sub configure configure.in \
411 install-sh mkinstalldirs texinfo.tex \
412 @@ -106,11 +106,11 @@
413 autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
414 autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
416 -info: autoconf.info @standards_info@ INSTALL
417 +info: autoconf213.info @standards_info@ INSTALL
419 # Use --no-split to avoid creating filenames > 14 chars.
420 -autoconf.info: autoconf.texi install.texi
421 - $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
422 +autoconf213.info: autoconf213.texi install.texi
423 + $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf213.texi --no-split --output=$@
425 INSTALL: install.texi
426 $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
427 @@ -121,8 +121,8 @@
429 dvi: autoconf.dvi @standards_dvi@
431 -autoconf.dvi: autoconf.texi
432 - $(TEXI2DVI) $(srcdir)/autoconf.texi
433 +autoconf.dvi: autoconf213.texi
434 + $(TEXI2DVI) $(srcdir)/autoconf213.texi
436 standards.dvi: standards.texi make-stds.texi
437 $(TEXI2DVI) $(srcdir)/standards.texi
438 @@ -137,35 +137,35 @@
439 cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
441 installdirs:
442 - $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
443 + $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
445 -install: all $(M4FILES) acconfig.h installdirs install-info
446 +install: all $(M4FILES) acconfig.h installdirs
447 for p in $(ASCRIPTS); do \
448 - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
449 + $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
450 done
451 for i in $(M4FROZEN); do \
452 - $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
453 + $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
454 done
455 for i in $(M4FILES) acconfig.h; do \
456 - $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
457 + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
458 done
459 -if test -f autoscan; then \
460 - $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
461 + $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
462 for i in acfunctions acheaders acidentifiers acprograms \
463 acmakevars; do \
464 - $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
465 + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
466 done; \
467 else :; fi
469 # Don't cd, to avoid breaking install-sh references.
470 install-info: info installdirs
471 - if test -f autoconf.info; then \
472 + if test -f autoconf213.info; then \
473 for i in *.info*; do \
474 - $(INSTALL_DATA) $$i $(infodir)/$$i; \
475 + $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
476 done; \
477 else \
478 for i in $(srcdir)/*.info*; do \
479 - $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
480 + $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
481 done; \
482 fi
484 @@ -174,7 +174,7 @@
485 rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
486 done
487 rm -fr $(acdatadir)
488 - cd $(infodir) && rm -f autoconf.info*
489 + cd $(infodir) && rm -f autoconf213.info*
490 if test -f standards.info || test -f $(srcdir)/standards.info; \
491 then cd $(infodir) && rm -f standards.info*; fi
493 diff -Naur a/testsuite/autoconf.s/syntax.exp b/testsuite/autoconf.s/syntax.exp
494 --- a/testsuite/autoconf.s/syntax.exp 1999-01-05 13:29:54.000000000 +0000
495 +++ b/testsuite/autoconf.s/syntax.exp 2016-06-11 00:18:51.996905247 +0100
496 @@ -2,7 +2,7 @@
498 send_user "Checking for syntax errors in the specific tests...\n"
499 set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
500 -set macros [exec sed -n $script $srcdir/../acspecific.m4]
501 +set macros [exec sed -n $script $srcdir/../acspecific.m4 | grep -v -e AC_FUNC_GETLOADAVG -e F77]
503 foreach mac $macros {
504 send_user "$mac\n"