New upstream snapshot.
Debian Janitor
2 years ago
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.4 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
180 | 180 | unique=`for i in $$list; do \ |
181 | 181 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
182 | 182 | done | $(am__uniquify_input)` |
183 | ETAGS = etags | |
184 | CTAGS = ctags | |
185 | CSCOPE = cscope | |
186 | 183 | DIST_SUBDIRS = $(SUBDIRS) |
187 | 184 | am__DIST_COMMON = $(srcdir)/Makefile.in COPYING ChangeLog NEWS README \ |
188 | 185 | compile config.guess config.rpath config.sub install-sh \ |
225 | 222 | DIST_ARCHIVES = $(distdir).tar.gz |
226 | 223 | GZIP_ENV = --best |
227 | 224 | DIST_TARGETS = dist-gzip |
225 | # Exists only to be overridden by the user if desired. | |
226 | AM_DISTCHECK_DVI_TARGET = dvi | |
228 | 227 | distuninstallcheck_listfiles = find . -type f -print |
229 | 228 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ |
230 | 229 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' |
242 | 241 | CHECKATARI = @CHECKATARI@ |
243 | 242 | CPP = @CPP@ |
244 | 243 | CPPFLAGS = @CPPFLAGS@ |
244 | CSCOPE = @CSCOPE@ | |
245 | CTAGS = @CTAGS@ | |
245 | 246 | CYGPATH_W = @CYGPATH_W@ |
246 | 247 | DEFS = @DEFS@ |
247 | 248 | DEPDIR = @DEPDIR@ |
249 | 250 | ECHO_N = @ECHO_N@ |
250 | 251 | ECHO_T = @ECHO_T@ |
251 | 252 | EGREP = @EGREP@ |
253 | ETAGS = @ETAGS@ | |
252 | 254 | EXEEXT = @EXEEXT@ |
253 | 255 | GREP = @GREP@ |
254 | 256 | INSTALL = @INSTALL@ |
506 | 508 | distclean-tags: |
507 | 509 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
508 | 510 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files |
509 | ||
510 | 511 | distdir: $(BUILT_SOURCES) |
511 | 512 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
512 | 513 | |
590 | 591 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz |
591 | 592 | $(am__post_remove_distdir) |
592 | 593 | |
594 | dist-zstd: distdir | |
595 | tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst | |
596 | $(am__post_remove_distdir) | |
597 | ||
593 | 598 | dist-tarZ: distdir |
594 | 599 | @echo WARNING: "Support for distribution archives compressed with" \ |
595 | 600 | "legacy program 'compress' is deprecated." >&2 |
632 | 637 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ |
633 | 638 | *.zip*) \ |
634 | 639 | unzip $(distdir).zip ;;\ |
640 | *.tar.zst*) \ | |
641 | zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ | |
635 | 642 | esac |
636 | 643 | chmod -R a-w $(distdir) |
637 | 644 | chmod u+w $(distdir) |
647 | 654 | $(DISTCHECK_CONFIGURE_FLAGS) \ |
648 | 655 | --srcdir=../.. --prefix="$$dc_install_base" \ |
649 | 656 | && $(MAKE) $(AM_MAKEFLAGS) \ |
650 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | |
657 | && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ | |
651 | 658 | && $(MAKE) $(AM_MAKEFLAGS) check \ |
652 | 659 | && $(MAKE) $(AM_MAKEFLAGS) install \ |
653 | 660 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ |
811 | 818 | am--refresh check check-am clean clean-cscope clean-generic \ |
812 | 819 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ |
813 | 820 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ |
814 | distcheck distclean distclean-generic distclean-tags \ | |
821 | dist-zstd distcheck distclean distclean-generic distclean-tags \ | |
815 | 822 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ |
816 | 823 | html-am info info-am install install-am install-data \ |
817 | 824 | install-data-am install-dist_docDATA install-dvi \ |
0 | # generated automatically by aclocal 1.16.1 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
0 | # generated automatically by aclocal 1.16.4 -*- Autoconf -*- | |
1 | ||
2 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
3 | 3 | |
4 | 4 | # This file is free software; the Free Software Foundation |
5 | 5 | # gives unlimited permission to copy and/or distribute it, |
19 | 19 | If you have problems, you may need to regenerate the build system entirely. |
20 | 20 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
21 | 21 | |
22 | # iconv.m4 serial 19 (gettext-0.18.2) | |
23 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. | |
22 | # host-cpu-c-abi.m4 serial 13 | |
23 | dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. | |
24 | dnl This file is free software; the Free Software Foundation | |
25 | dnl gives unlimited permission to copy and/or distribute it, | |
26 | dnl with or without modifications, as long as this notice is preserved. | |
27 | ||
28 | dnl From Bruno Haible and Sam Steingold. | |
29 | ||
30 | dnl Sets the HOST_CPU variable to the canonical name of the CPU. | |
31 | dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its | |
32 | dnl C language ABI (application binary interface). | |
33 | dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in | |
34 | dnl config.h. | |
35 | dnl | |
36 | dnl This canonical name can be used to select a particular assembly language | |
37 | dnl source file that will interoperate with C code on the given host. | |
38 | dnl | |
39 | dnl For example: | |
40 | dnl * 'i386' and 'sparc' are different canonical names, because code for i386 | |
41 | dnl will not run on SPARC CPUs and vice versa. They have different | |
42 | dnl instruction sets. | |
43 | dnl * 'sparc' and 'sparc64' are different canonical names, because code for | |
44 | dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code | |
45 | dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit | |
46 | dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit | |
47 | dnl mode, but not both. | |
48 | dnl * 'mips' and 'mipsn32' are different canonical names, because they use | |
49 | dnl different argument passing and return conventions for C functions, and | |
50 | dnl although the instruction set of 'mips' is a large subset of the | |
51 | dnl instruction set of 'mipsn32'. | |
52 | dnl * 'mipsn32' and 'mips64' are different canonical names, because they use | |
53 | dnl different sizes for the C types like 'int' and 'void *', and although | |
54 | dnl the instruction sets of 'mipsn32' and 'mips64' are the same. | |
55 | dnl * The same canonical name is used for different endiannesses. You can | |
56 | dnl determine the endianness through preprocessor symbols: | |
57 | dnl - 'arm': test __ARMEL__. | |
58 | dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. | |
59 | dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. | |
60 | dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 | |
61 | dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because | |
62 | dnl - Instructions that do not exist on all of these CPUs (cmpxchg, | |
63 | dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your | |
64 | dnl assembly language source files use such instructions, you will | |
65 | dnl need to make the distinction. | |
66 | dnl - Speed of execution of the common instruction set is reasonable across | |
67 | dnl the entire family of CPUs. If you have assembly language source files | |
68 | dnl that are optimized for particular CPU types (like GNU gmp has), you | |
69 | dnl will need to make the distinction. | |
70 | dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>. | |
71 | AC_DEFUN([gl_HOST_CPU_C_ABI], | |
72 | [ | |
73 | AC_REQUIRE([AC_CANONICAL_HOST]) | |
74 | AC_REQUIRE([gl_C_ASM]) | |
75 | AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], | |
76 | [case "$host_cpu" in | |
77 | ||
78 | changequote(,)dnl | |
79 | i[34567]86 ) | |
80 | changequote([,])dnl | |
81 | gl_cv_host_cpu_c_abi=i386 | |
82 | ;; | |
83 | ||
84 | x86_64 ) | |
85 | # On x86_64 systems, the C compiler may be generating code in one of | |
86 | # these ABIs: | |
87 | # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. | |
88 | # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 | |
89 | # with native Windows (mingw, MSVC). | |
90 | # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. | |
91 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. | |
92 | AC_COMPILE_IFELSE( | |
93 | [AC_LANG_SOURCE( | |
94 | [[#if (defined __x86_64__ || defined __amd64__ \ | |
95 | || defined _M_X64 || defined _M_AMD64) | |
96 | int ok; | |
97 | #else | |
98 | error fail | |
99 | #endif | |
100 | ]])], | |
101 | [AC_COMPILE_IFELSE( | |
102 | [AC_LANG_SOURCE( | |
103 | [[#if defined __ILP32__ || defined _ILP32 | |
104 | int ok; | |
105 | #else | |
106 | error fail | |
107 | #endif | |
108 | ]])], | |
109 | [gl_cv_host_cpu_c_abi=x86_64-x32], | |
110 | [gl_cv_host_cpu_c_abi=x86_64])], | |
111 | [gl_cv_host_cpu_c_abi=i386]) | |
112 | ;; | |
113 | ||
114 | changequote(,)dnl | |
115 | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) | |
116 | changequote([,])dnl | |
117 | gl_cv_host_cpu_c_abi=alpha | |
118 | ;; | |
119 | ||
120 | arm* | aarch64 ) | |
121 | # Assume arm with EABI. | |
122 | # On arm64 systems, the C compiler may be generating code in one of | |
123 | # these ABIs: | |
124 | # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. | |
125 | # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. | |
126 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. | |
127 | AC_COMPILE_IFELSE( | |
128 | [AC_LANG_SOURCE( | |
129 | [[#ifdef __aarch64__ | |
130 | int ok; | |
131 | #else | |
132 | error fail | |
133 | #endif | |
134 | ]])], | |
135 | [AC_COMPILE_IFELSE( | |
136 | [AC_LANG_SOURCE( | |
137 | [[#if defined __ILP32__ || defined _ILP32 | |
138 | int ok; | |
139 | #else | |
140 | error fail | |
141 | #endif | |
142 | ]])], | |
143 | [gl_cv_host_cpu_c_abi=arm64-ilp32], | |
144 | [gl_cv_host_cpu_c_abi=arm64])], | |
145 | [# Don't distinguish little-endian and big-endian arm, since they | |
146 | # don't require different machine code for simple operations and | |
147 | # since the user can distinguish them through the preprocessor | |
148 | # defines __ARMEL__ vs. __ARMEB__. | |
149 | # But distinguish arm which passes floating-point arguments and | |
150 | # return values in integer registers (r0, r1, ...) - this is | |
151 | # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which | |
152 | # passes them in float registers (s0, s1, ...) and double registers | |
153 | # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer | |
154 | # sets the preprocessor defines __ARM_PCS (for the first case) and | |
155 | # __ARM_PCS_VFP (for the second case), but older GCC does not. | |
156 | echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c | |
157 | # Look for a reference to the register d0 in the .s file. | |
158 | AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 | |
159 | if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then | |
160 | gl_cv_host_cpu_c_abi=armhf | |
161 | else | |
162 | gl_cv_host_cpu_c_abi=arm | |
163 | fi | |
164 | rm -f conftest* | |
165 | ]) | |
166 | ;; | |
167 | ||
168 | hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) | |
169 | # On hppa, the C compiler may be generating 32-bit code or 64-bit | |
170 | # code. In the latter case, it defines _LP64 and __LP64__. | |
171 | AC_COMPILE_IFELSE( | |
172 | [AC_LANG_SOURCE( | |
173 | [[#ifdef __LP64__ | |
174 | int ok; | |
175 | #else | |
176 | error fail | |
177 | #endif | |
178 | ]])], | |
179 | [gl_cv_host_cpu_c_abi=hppa64], | |
180 | [gl_cv_host_cpu_c_abi=hppa]) | |
181 | ;; | |
182 | ||
183 | ia64* ) | |
184 | # On ia64 on HP-UX, the C compiler may be generating 64-bit code or | |
185 | # 32-bit code. In the latter case, it defines _ILP32. | |
186 | AC_COMPILE_IFELSE( | |
187 | [AC_LANG_SOURCE( | |
188 | [[#ifdef _ILP32 | |
189 | int ok; | |
190 | #else | |
191 | error fail | |
192 | #endif | |
193 | ]])], | |
194 | [gl_cv_host_cpu_c_abi=ia64-ilp32], | |
195 | [gl_cv_host_cpu_c_abi=ia64]) | |
196 | ;; | |
197 | ||
198 | mips* ) | |
199 | # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this | |
200 | # at 32. | |
201 | AC_COMPILE_IFELSE( | |
202 | [AC_LANG_SOURCE( | |
203 | [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) | |
204 | int ok; | |
205 | #else | |
206 | error fail | |
207 | #endif | |
208 | ]])], | |
209 | [gl_cv_host_cpu_c_abi=mips64], | |
210 | [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but | |
211 | # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32. | |
212 | # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but | |
213 | # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32. | |
214 | AC_COMPILE_IFELSE( | |
215 | [AC_LANG_SOURCE( | |
216 | [[#if (_MIPS_SIM == _ABIN32) | |
217 | int ok; | |
218 | #else | |
219 | error fail | |
220 | #endif | |
221 | ]])], | |
222 | [gl_cv_host_cpu_c_abi=mipsn32], | |
223 | [gl_cv_host_cpu_c_abi=mips])]) | |
224 | ;; | |
225 | ||
226 | powerpc* ) | |
227 | # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. | |
228 | # No need to distinguish them here; the caller may distinguish | |
229 | # them based on the OS. | |
230 | # On powerpc64 systems, the C compiler may still be generating | |
231 | # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may | |
232 | # be generating 64-bit code. | |
233 | AC_COMPILE_IFELSE( | |
234 | [AC_LANG_SOURCE( | |
235 | [[#if defined __powerpc64__ || defined _ARCH_PPC64 | |
236 | int ok; | |
237 | #else | |
238 | error fail | |
239 | #endif | |
240 | ]])], | |
241 | [# On powerpc64, there are two ABIs on Linux: The AIX compatible | |
242 | # one and the ELFv2 one. The latter defines _CALL_ELF=2. | |
243 | AC_COMPILE_IFELSE( | |
244 | [AC_LANG_SOURCE( | |
245 | [[#if defined _CALL_ELF && _CALL_ELF == 2 | |
246 | int ok; | |
247 | #else | |
248 | error fail | |
249 | #endif | |
250 | ]])], | |
251 | [gl_cv_host_cpu_c_abi=powerpc64-elfv2], | |
252 | [gl_cv_host_cpu_c_abi=powerpc64]) | |
253 | ], | |
254 | [gl_cv_host_cpu_c_abi=powerpc]) | |
255 | ;; | |
256 | ||
257 | rs6000 ) | |
258 | gl_cv_host_cpu_c_abi=powerpc | |
259 | ;; | |
260 | ||
261 | riscv32 | riscv64 ) | |
262 | # There are 2 architectures (with variants): rv32* and rv64*. | |
263 | AC_COMPILE_IFELSE( | |
264 | [AC_LANG_SOURCE( | |
265 | [[#if __riscv_xlen == 64 | |
266 | int ok; | |
267 | #else | |
268 | error fail | |
269 | #endif | |
270 | ]])], | |
271 | [cpu=riscv64], | |
272 | [cpu=riscv32]) | |
273 | # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. | |
274 | # Size of 'long' and 'void *': | |
275 | AC_COMPILE_IFELSE( | |
276 | [AC_LANG_SOURCE( | |
277 | [[#if defined __LP64__ | |
278 | int ok; | |
279 | #else | |
280 | error fail | |
281 | #endif | |
282 | ]])], | |
283 | [main_abi=lp64], | |
284 | [main_abi=ilp32]) | |
285 | # Float ABIs: | |
286 | # __riscv_float_abi_double: | |
287 | # 'float' and 'double' are passed in floating-point registers. | |
288 | # __riscv_float_abi_single: | |
289 | # 'float' are passed in floating-point registers. | |
290 | # __riscv_float_abi_soft: | |
291 | # No values are passed in floating-point registers. | |
292 | AC_COMPILE_IFELSE( | |
293 | [AC_LANG_SOURCE( | |
294 | [[#if defined __riscv_float_abi_double | |
295 | int ok; | |
296 | #else | |
297 | error fail | |
298 | #endif | |
299 | ]])], | |
300 | [float_abi=d], | |
301 | [AC_COMPILE_IFELSE( | |
302 | [AC_LANG_SOURCE( | |
303 | [[#if defined __riscv_float_abi_single | |
304 | int ok; | |
305 | #else | |
306 | error fail | |
307 | #endif | |
308 | ]])], | |
309 | [float_abi=f], | |
310 | [float_abi='']) | |
311 | ]) | |
312 | gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" | |
313 | ;; | |
314 | ||
315 | s390* ) | |
316 | # On s390x, the C compiler may be generating 64-bit (= s390x) code | |
317 | # or 31-bit (= s390) code. | |
318 | AC_COMPILE_IFELSE( | |
319 | [AC_LANG_SOURCE( | |
320 | [[#if defined __LP64__ || defined __s390x__ | |
321 | int ok; | |
322 | #else | |
323 | error fail | |
324 | #endif | |
325 | ]])], | |
326 | [gl_cv_host_cpu_c_abi=s390x], | |
327 | [gl_cv_host_cpu_c_abi=s390]) | |
328 | ;; | |
329 | ||
330 | sparc | sparc64 ) | |
331 | # UltraSPARCs running Linux have `uname -m` = "sparc64", but the | |
332 | # C compiler still generates 32-bit code. | |
333 | AC_COMPILE_IFELSE( | |
334 | [AC_LANG_SOURCE( | |
335 | [[#if defined __sparcv9 || defined __arch64__ | |
336 | int ok; | |
337 | #else | |
338 | error fail | |
339 | #endif | |
340 | ]])], | |
341 | [gl_cv_host_cpu_c_abi=sparc64], | |
342 | [gl_cv_host_cpu_c_abi=sparc]) | |
343 | ;; | |
344 | ||
345 | *) | |
346 | gl_cv_host_cpu_c_abi="$host_cpu" | |
347 | ;; | |
348 | esac | |
349 | ]) | |
350 | ||
351 | dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. | |
352 | HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` | |
353 | HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" | |
354 | AC_SUBST([HOST_CPU]) | |
355 | AC_SUBST([HOST_CPU_C_ABI]) | |
356 | ||
357 | # This was | |
358 | # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) | |
359 | # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) | |
360 | # earlier, but KAI C++ 3.2d doesn't like this. | |
361 | sed -e 's/-/_/g' >> confdefs.h <<EOF | |
362 | #ifndef __${HOST_CPU}__ | |
363 | #define __${HOST_CPU}__ 1 | |
364 | #endif | |
365 | #ifndef __${HOST_CPU_C_ABI}__ | |
366 | #define __${HOST_CPU_C_ABI}__ 1 | |
367 | #endif | |
368 | EOF | |
369 | AH_TOP([/* CPU and C ABI indicator */ | |
370 | #ifndef __i386__ | |
371 | #undef __i386__ | |
372 | #endif | |
373 | #ifndef __x86_64_x32__ | |
374 | #undef __x86_64_x32__ | |
375 | #endif | |
376 | #ifndef __x86_64__ | |
377 | #undef __x86_64__ | |
378 | #endif | |
379 | #ifndef __alpha__ | |
380 | #undef __alpha__ | |
381 | #endif | |
382 | #ifndef __arm__ | |
383 | #undef __arm__ | |
384 | #endif | |
385 | #ifndef __armhf__ | |
386 | #undef __armhf__ | |
387 | #endif | |
388 | #ifndef __arm64_ilp32__ | |
389 | #undef __arm64_ilp32__ | |
390 | #endif | |
391 | #ifndef __arm64__ | |
392 | #undef __arm64__ | |
393 | #endif | |
394 | #ifndef __hppa__ | |
395 | #undef __hppa__ | |
396 | #endif | |
397 | #ifndef __hppa64__ | |
398 | #undef __hppa64__ | |
399 | #endif | |
400 | #ifndef __ia64_ilp32__ | |
401 | #undef __ia64_ilp32__ | |
402 | #endif | |
403 | #ifndef __ia64__ | |
404 | #undef __ia64__ | |
405 | #endif | |
406 | #ifndef __m68k__ | |
407 | #undef __m68k__ | |
408 | #endif | |
409 | #ifndef __mips__ | |
410 | #undef __mips__ | |
411 | #endif | |
412 | #ifndef __mipsn32__ | |
413 | #undef __mipsn32__ | |
414 | #endif | |
415 | #ifndef __mips64__ | |
416 | #undef __mips64__ | |
417 | #endif | |
418 | #ifndef __powerpc__ | |
419 | #undef __powerpc__ | |
420 | #endif | |
421 | #ifndef __powerpc64__ | |
422 | #undef __powerpc64__ | |
423 | #endif | |
424 | #ifndef __powerpc64_elfv2__ | |
425 | #undef __powerpc64_elfv2__ | |
426 | #endif | |
427 | #ifndef __riscv32__ | |
428 | #undef __riscv32__ | |
429 | #endif | |
430 | #ifndef __riscv64__ | |
431 | #undef __riscv64__ | |
432 | #endif | |
433 | #ifndef __riscv32_ilp32__ | |
434 | #undef __riscv32_ilp32__ | |
435 | #endif | |
436 | #ifndef __riscv32_ilp32f__ | |
437 | #undef __riscv32_ilp32f__ | |
438 | #endif | |
439 | #ifndef __riscv32_ilp32d__ | |
440 | #undef __riscv32_ilp32d__ | |
441 | #endif | |
442 | #ifndef __riscv64_ilp32__ | |
443 | #undef __riscv64_ilp32__ | |
444 | #endif | |
445 | #ifndef __riscv64_ilp32f__ | |
446 | #undef __riscv64_ilp32f__ | |
447 | #endif | |
448 | #ifndef __riscv64_ilp32d__ | |
449 | #undef __riscv64_ilp32d__ | |
450 | #endif | |
451 | #ifndef __riscv64_lp64__ | |
452 | #undef __riscv64_lp64__ | |
453 | #endif | |
454 | #ifndef __riscv64_lp64f__ | |
455 | #undef __riscv64_lp64f__ | |
456 | #endif | |
457 | #ifndef __riscv64_lp64d__ | |
458 | #undef __riscv64_lp64d__ | |
459 | #endif | |
460 | #ifndef __s390__ | |
461 | #undef __s390__ | |
462 | #endif | |
463 | #ifndef __s390x__ | |
464 | #undef __s390x__ | |
465 | #endif | |
466 | #ifndef __sh__ | |
467 | #undef __sh__ | |
468 | #endif | |
469 | #ifndef __sparc__ | |
470 | #undef __sparc__ | |
471 | #endif | |
472 | #ifndef __sparc64__ | |
473 | #undef __sparc64__ | |
474 | #endif | |
475 | ]) | |
476 | ||
477 | ]) | |
478 | ||
479 | ||
480 | dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI | |
481 | dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit | |
482 | dnl one, or to 'unknown' if unknown. | |
483 | dnl This is a simplified variant of gl_HOST_CPU_C_ABI. | |
484 | AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT], | |
485 | [ | |
486 | AC_REQUIRE([AC_CANONICAL_HOST]) | |
487 | AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit], | |
488 | [if test -n "$gl_cv_host_cpu_c_abi"; then | |
489 | case "$gl_cv_host_cpu_c_abi" in | |
490 | i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) | |
491 | gl_cv_host_cpu_c_abi_32bit=yes ;; | |
492 | x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) | |
493 | gl_cv_host_cpu_c_abi_32bit=no ;; | |
494 | *) | |
495 | gl_cv_host_cpu_c_abi_32bit=unknown ;; | |
496 | esac | |
497 | else | |
498 | case "$host_cpu" in | |
499 | ||
500 | # CPUs that only support a 32-bit ABI. | |
501 | arc \ | |
502 | | bfin \ | |
503 | | cris* \ | |
504 | | csky \ | |
505 | | epiphany \ | |
506 | | ft32 \ | |
507 | | h8300 \ | |
508 | | m68k \ | |
509 | | microblaze | microblazeel \ | |
510 | | nds32 | nds32le | nds32be \ | |
511 | | nios2 | nios2eb | nios2el \ | |
512 | | or1k* \ | |
513 | | or32 \ | |
514 | | sh | sh[1234] | sh[1234]e[lb] \ | |
515 | | tic6x \ | |
516 | | xtensa* ) | |
517 | gl_cv_host_cpu_c_abi_32bit=yes | |
518 | ;; | |
519 | ||
520 | # CPUs that only support a 64-bit ABI. | |
521 | changequote(,)dnl | |
522 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | |
523 | | mmix ) | |
524 | changequote([,])dnl | |
525 | gl_cv_host_cpu_c_abi_32bit=no | |
526 | ;; | |
527 | ||
528 | changequote(,)dnl | |
529 | i[34567]86 ) | |
530 | changequote([,])dnl | |
531 | gl_cv_host_cpu_c_abi_32bit=yes | |
532 | ;; | |
533 | ||
534 | x86_64 ) | |
535 | # On x86_64 systems, the C compiler may be generating code in one of | |
536 | # these ABIs: | |
537 | # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. | |
538 | # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 | |
539 | # with native Windows (mingw, MSVC). | |
540 | # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. | |
541 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. | |
542 | AC_COMPILE_IFELSE( | |
543 | [AC_LANG_SOURCE( | |
544 | [[#if (defined __x86_64__ || defined __amd64__ \ | |
545 | || defined _M_X64 || defined _M_AMD64) \ | |
546 | && !(defined __ILP32__ || defined _ILP32) | |
547 | int ok; | |
548 | #else | |
549 | error fail | |
550 | #endif | |
551 | ]])], | |
552 | [gl_cv_host_cpu_c_abi_32bit=no], | |
553 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
554 | ;; | |
555 | ||
556 | arm* | aarch64 ) | |
557 | # Assume arm with EABI. | |
558 | # On arm64 systems, the C compiler may be generating code in one of | |
559 | # these ABIs: | |
560 | # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. | |
561 | # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. | |
562 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. | |
563 | AC_COMPILE_IFELSE( | |
564 | [AC_LANG_SOURCE( | |
565 | [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) | |
566 | int ok; | |
567 | #else | |
568 | error fail | |
569 | #endif | |
570 | ]])], | |
571 | [gl_cv_host_cpu_c_abi_32bit=no], | |
572 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
573 | ;; | |
574 | ||
575 | hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) | |
576 | # On hppa, the C compiler may be generating 32-bit code or 64-bit | |
577 | # code. In the latter case, it defines _LP64 and __LP64__. | |
578 | AC_COMPILE_IFELSE( | |
579 | [AC_LANG_SOURCE( | |
580 | [[#ifdef __LP64__ | |
581 | int ok; | |
582 | #else | |
583 | error fail | |
584 | #endif | |
585 | ]])], | |
586 | [gl_cv_host_cpu_c_abi_32bit=no], | |
587 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
588 | ;; | |
589 | ||
590 | ia64* ) | |
591 | # On ia64 on HP-UX, the C compiler may be generating 64-bit code or | |
592 | # 32-bit code. In the latter case, it defines _ILP32. | |
593 | AC_COMPILE_IFELSE( | |
594 | [AC_LANG_SOURCE( | |
595 | [[#ifdef _ILP32 | |
596 | int ok; | |
597 | #else | |
598 | error fail | |
599 | #endif | |
600 | ]])], | |
601 | [gl_cv_host_cpu_c_abi_32bit=yes], | |
602 | [gl_cv_host_cpu_c_abi_32bit=no]) | |
603 | ;; | |
604 | ||
605 | mips* ) | |
606 | # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this | |
607 | # at 32. | |
608 | AC_COMPILE_IFELSE( | |
609 | [AC_LANG_SOURCE( | |
610 | [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) | |
611 | int ok; | |
612 | #else | |
613 | error fail | |
614 | #endif | |
615 | ]])], | |
616 | [gl_cv_host_cpu_c_abi_32bit=no], | |
617 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
618 | ;; | |
619 | ||
620 | powerpc* ) | |
621 | # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. | |
622 | # No need to distinguish them here; the caller may distinguish | |
623 | # them based on the OS. | |
624 | # On powerpc64 systems, the C compiler may still be generating | |
625 | # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may | |
626 | # be generating 64-bit code. | |
627 | AC_COMPILE_IFELSE( | |
628 | [AC_LANG_SOURCE( | |
629 | [[#if defined __powerpc64__ || defined _ARCH_PPC64 | |
630 | int ok; | |
631 | #else | |
632 | error fail | |
633 | #endif | |
634 | ]])], | |
635 | [gl_cv_host_cpu_c_abi_32bit=no], | |
636 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
637 | ;; | |
638 | ||
639 | rs6000 ) | |
640 | gl_cv_host_cpu_c_abi_32bit=yes | |
641 | ;; | |
642 | ||
643 | riscv32 | riscv64 ) | |
644 | # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. | |
645 | # Size of 'long' and 'void *': | |
646 | AC_COMPILE_IFELSE( | |
647 | [AC_LANG_SOURCE( | |
648 | [[#if defined __LP64__ | |
649 | int ok; | |
650 | #else | |
651 | error fail | |
652 | #endif | |
653 | ]])], | |
654 | [gl_cv_host_cpu_c_abi_32bit=no], | |
655 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
656 | ;; | |
657 | ||
658 | s390* ) | |
659 | # On s390x, the C compiler may be generating 64-bit (= s390x) code | |
660 | # or 31-bit (= s390) code. | |
661 | AC_COMPILE_IFELSE( | |
662 | [AC_LANG_SOURCE( | |
663 | [[#if defined __LP64__ || defined __s390x__ | |
664 | int ok; | |
665 | #else | |
666 | error fail | |
667 | #endif | |
668 | ]])], | |
669 | [gl_cv_host_cpu_c_abi_32bit=no], | |
670 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
671 | ;; | |
672 | ||
673 | sparc | sparc64 ) | |
674 | # UltraSPARCs running Linux have `uname -m` = "sparc64", but the | |
675 | # C compiler still generates 32-bit code. | |
676 | AC_COMPILE_IFELSE( | |
677 | [AC_LANG_SOURCE( | |
678 | [[#if defined __sparcv9 || defined __arch64__ | |
679 | int ok; | |
680 | #else | |
681 | error fail | |
682 | #endif | |
683 | ]])], | |
684 | [gl_cv_host_cpu_c_abi_32bit=no], | |
685 | [gl_cv_host_cpu_c_abi_32bit=yes]) | |
686 | ;; | |
687 | ||
688 | *) | |
689 | gl_cv_host_cpu_c_abi_32bit=unknown | |
690 | ;; | |
691 | esac | |
692 | fi | |
693 | ]) | |
694 | ||
695 | HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" | |
696 | ]) | |
697 | ||
698 | # iconv.m4 serial 21 | |
699 | dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation, | |
700 | dnl Inc. | |
24 | 701 | dnl This file is free software; the Free Software Foundation |
25 | 702 | dnl gives unlimited permission to copy and/or distribute it, |
26 | 703 | dnl with or without modifications, as long as this notice is preserved. |
188 | 865 | #endif |
189 | 866 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is |
190 | 867 | provided. */ |
191 | if (/* Try standardized names. */ | |
192 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | |
193 | /* Try IRIX, OSF/1 names. */ | |
194 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | |
195 | /* Try AIX names. */ | |
196 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | |
197 | /* Try HP-UX names. */ | |
198 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | |
199 | result |= 16; | |
868 | { | |
869 | /* Try standardized names. */ | |
870 | iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); | |
871 | /* Try IRIX, OSF/1 names. */ | |
872 | iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); | |
873 | /* Try AIX names. */ | |
874 | iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); | |
875 | /* Try HP-UX names. */ | |
876 | iconv_t cd4 = iconv_open ("utf8", "eucJP"); | |
877 | if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) | |
878 | && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) | |
879 | result |= 16; | |
880 | if (cd1 != (iconv_t)(-1)) | |
881 | iconv_close (cd1); | |
882 | if (cd2 != (iconv_t)(-1)) | |
883 | iconv_close (cd2); | |
884 | if (cd3 != (iconv_t)(-1)) | |
885 | iconv_close (cd3); | |
886 | if (cd4 != (iconv_t)(-1)) | |
887 | iconv_close (cd4); | |
888 | } | |
200 | 889 | return result; |
201 | 890 | ]])], |
202 | 891 | [am_cv_func_iconv_works=yes], , |
279 | 968 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
280 | 969 | AC_MSG_RESULT([ |
281 | 970 | $am_cv_proto_iconv]) |
282 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | |
283 | [Define as const if the declaration of iconv() needs const.]) | |
284 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | |
285 | m4_ifdef([gl_ICONV_H_DEFAULTS], | |
286 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | |
287 | if test -n "$am_cv_proto_iconv_arg1"; then | |
288 | ICONV_CONST="const" | |
289 | fi | |
290 | ]) | |
971 | else | |
972 | dnl When compiling GNU libiconv on a system that does not have iconv yet, | |
973 | dnl pick the POSIX compliant declaration without 'const'. | |
974 | am_cv_proto_iconv_arg1="" | |
291 | 975 | fi |
976 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | |
977 | [Define as const if the declaration of iconv() needs const.]) | |
978 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | |
979 | m4_ifdef([gl_ICONV_H_DEFAULTS], | |
980 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | |
981 | if test -n "$am_cv_proto_iconv_arg1"; then | |
982 | ICONV_CONST="const" | |
983 | fi | |
984 | ]) | |
292 | 985 | ]) |
293 | 986 | |
294 | # lib-ld.m4 serial 6 | |
295 | dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. | |
987 | # lib-ld.m4 serial 9 | |
988 | dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. | |
296 | 989 | dnl This file is free software; the Free Software Foundation |
297 | 990 | dnl gives unlimited permission to copy and/or distribute it, |
298 | 991 | dnl with or without modifications, as long as this notice is preserved. |
340 | 1033 | } |
341 | 1034 | fi |
342 | 1035 | |
343 | ac_prog=ld | |
344 | if test "$GCC" = yes; then | |
345 | # Check if gcc -print-prog-name=ld gives a path. | |
1036 | if test -n "$LD"; then | |
1037 | AC_MSG_CHECKING([for ld]) | |
1038 | elif test "$GCC" = yes; then | |
346 | 1039 | AC_MSG_CHECKING([for ld used by $CC]) |
347 | case $host in | |
348 | *-*-mingw*) | |
349 | # gcc leaves a trailing carriage return which upsets mingw | |
350 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
351 | *) | |
352 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
353 | esac | |
354 | case $ac_prog in | |
355 | # Accept absolute paths. | |
356 | [[\\/]]* | ?:[[\\/]]*) | |
357 | re_direlt='/[[^/]][[^/]]*/\.\./' | |
358 | # Canonicalize the pathname of ld | |
359 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | |
360 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | |
361 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
362 | done | |
363 | test -z "$LD" && LD="$ac_prog" | |
364 | ;; | |
365 | "") | |
366 | # If it fails, then pretend we aren't using GCC. | |
367 | ac_prog=ld | |
368 | ;; | |
369 | *) | |
370 | # If it is relative, then search for the first ld in PATH. | |
371 | with_gnu_ld=unknown | |
372 | ;; | |
373 | esac | |
374 | 1040 | elif test "$with_gnu_ld" = yes; then |
375 | 1041 | AC_MSG_CHECKING([for GNU ld]) |
376 | 1042 | else |
377 | 1043 | AC_MSG_CHECKING([for non-GNU ld]) |
378 | 1044 | fi |
379 | AC_CACHE_VAL([acl_cv_path_LD], | |
380 | [if test -z "$LD"; then | |
381 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
382 | for ac_dir in $PATH; do | |
383 | IFS="$acl_save_ifs" | |
384 | test -z "$ac_dir" && ac_dir=. | |
385 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
386 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
387 | # Check to see if the program is GNU ld. I'd rather use --version, | |
388 | # but apparently some variants of GNU ld only accept -v. | |
389 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
390 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | |
391 | *GNU* | *'with BFD'*) | |
392 | test "$with_gnu_ld" != no && break | |
393 | ;; | |
394 | *) | |
395 | test "$with_gnu_ld" != yes && break | |
396 | ;; | |
1045 | if test -n "$LD"; then | |
1046 | # Let the user override the test with a path. | |
1047 | : | |
1048 | else | |
1049 | AC_CACHE_VAL([acl_cv_path_LD], | |
1050 | [ | |
1051 | acl_cv_path_LD= # Final result of this test | |
1052 | ac_prog=ld # Program to search in $PATH | |
1053 | if test "$GCC" = yes; then | |
1054 | # Check if gcc -print-prog-name=ld gives a path. | |
1055 | case $host in | |
1056 | *-*-mingw*) | |
1057 | # gcc leaves a trailing carriage return which upsets mingw | |
1058 | acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
1059 | *) | |
1060 | acl_output=`($CC -print-prog-name=ld) 2>&5` ;; | |
1061 | esac | |
1062 | case $acl_output in | |
1063 | # Accept absolute paths. | |
1064 | [[\\/]]* | ?:[[\\/]]*) | |
1065 | re_direlt='/[[^/]][[^/]]*/\.\./' | |
1066 | # Canonicalize the pathname of ld | |
1067 | acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` | |
1068 | while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do | |
1069 | acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` | |
1070 | done | |
1071 | # Got the pathname. No search in PATH is needed. | |
1072 | acl_cv_path_LD="$acl_output" | |
1073 | ac_prog= | |
1074 | ;; | |
1075 | "") | |
1076 | # If it fails, then pretend we aren't using GCC. | |
1077 | ;; | |
1078 | *) | |
1079 | # If it is relative, then search for the first ld in PATH. | |
1080 | with_gnu_ld=unknown | |
1081 | ;; | |
397 | 1082 | esac |
398 | 1083 | fi |
399 | done | |
400 | IFS="$acl_save_ifs" | |
401 | else | |
402 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
403 | fi]) | |
404 | LD="$acl_cv_path_LD" | |
1084 | if test -n "$ac_prog"; then | |
1085 | # Search for $ac_prog in $PATH. | |
1086 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1087 | for ac_dir in $PATH; do | |
1088 | IFS="$acl_save_ifs" | |
1089 | test -z "$ac_dir" && ac_dir=. | |
1090 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
1091 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
1092 | # Check to see if the program is GNU ld. I'd rather use --version, | |
1093 | # but apparently some variants of GNU ld only accept -v. | |
1094 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
1095 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | |
1096 | *GNU* | *'with BFD'*) | |
1097 | test "$with_gnu_ld" != no && break | |
1098 | ;; | |
1099 | *) | |
1100 | test "$with_gnu_ld" != yes && break | |
1101 | ;; | |
1102 | esac | |
1103 | fi | |
1104 | done | |
1105 | IFS="$acl_save_ifs" | |
1106 | fi | |
1107 | case $host in | |
1108 | *-*-aix*) | |
1109 | AC_COMPILE_IFELSE( | |
1110 | [AC_LANG_SOURCE( | |
1111 | [[#if defined __powerpc64__ || defined _ARCH_PPC64 | |
1112 | int ok; | |
1113 | #else | |
1114 | error fail | |
1115 | #endif | |
1116 | ]])], | |
1117 | [# The compiler produces 64-bit code. Add option '-b64' so that the | |
1118 | # linker groks 64-bit object files. | |
1119 | case "$acl_cv_path_LD " in | |
1120 | *" -b64 "*) ;; | |
1121 | *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; | |
1122 | esac | |
1123 | ], []) | |
1124 | ;; | |
1125 | sparc64-*-netbsd*) | |
1126 | AC_COMPILE_IFELSE( | |
1127 | [AC_LANG_SOURCE( | |
1128 | [[#if defined __sparcv9 || defined __arch64__ | |
1129 | int ok; | |
1130 | #else | |
1131 | error fail | |
1132 | #endif | |
1133 | ]])], | |
1134 | [], | |
1135 | [# The compiler produces 32-bit code. Add option '-m elf32_sparc' | |
1136 | # so that the linker groks 32-bit object files. | |
1137 | case "$acl_cv_path_LD " in | |
1138 | *" -m elf32_sparc "*) ;; | |
1139 | *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; | |
1140 | esac | |
1141 | ]) | |
1142 | ;; | |
1143 | esac | |
1144 | ]) | |
1145 | LD="$acl_cv_path_LD" | |
1146 | fi | |
405 | 1147 | if test -n "$LD"; then |
406 | 1148 | AC_MSG_RESULT([$LD]) |
407 | 1149 | else |
408 | 1150 | AC_MSG_RESULT([no]) |
1151 | AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
409 | 1152 | fi |
410 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
411 | 1153 | AC_LIB_PROG_LD_GNU |
412 | 1154 | ]) |
413 | 1155 | |
414 | # lib-link.m4 serial 26 (gettext-0.18.2) | |
415 | dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. | |
1156 | # lib-link.m4 serial 31 | |
1157 | dnl Copyright (C) 2001-2020 Free Software Foundation, Inc. | |
416 | 1158 | dnl This file is free software; the Free Software Foundation |
417 | 1159 | dnl gives unlimited permission to copy and/or distribute it, |
418 | 1160 | dnl with or without modifications, as long as this notice is preserved. |
419 | 1161 | |
420 | 1162 | dnl From Bruno Haible. |
421 | 1163 | |
422 | AC_PREREQ([2.54]) | |
1164 | AC_PREREQ([2.61]) | |
423 | 1165 | |
424 | 1166 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
425 | 1167 | dnl the libraries corresponding to explicit and implicit dependencies. |
537 | 1279 | dnl acl_hardcode_minus_L. |
538 | 1280 | AC_DEFUN([AC_LIB_RPATH], |
539 | 1281 | [ |
540 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. | |
541 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) | |
1282 | dnl Complain if config.rpath is missing. | |
1283 | AC_REQUIRE_AUX_FILE([config.rpath]) | |
542 | 1284 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS |
543 | 1285 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
544 | 1286 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
600 | 1342 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], |
601 | 1343 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
602 | 1344 | pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) |
603 | dnl Autoconf >= 2.61 supports dots in --with options. | |
604 | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) | |
605 | 1345 | dnl By default, look in $includedir and $libdir. |
606 | 1346 | use_additional=yes |
607 | 1347 | AC_LIB_WITH_FINAL_PREFIX([ |
608 | 1348 | eval additional_includedir=\"$includedir\" |
609 | 1349 | eval additional_libdir=\"$libdir\" |
1350 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
1351 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
610 | 1352 | ]) |
611 | AC_ARG_WITH(P_A_C_K[-prefix], | |
612 | [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib | |
613 | --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], | |
1353 | AC_ARG_WITH(PACK[-prefix], | |
1354 | [[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib | |
1355 | --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], | |
614 | 1356 | [ |
615 | 1357 | if test "X$withval" = "Xno"; then |
616 | 1358 | use_additional=no |
619 | 1361 | AC_LIB_WITH_FINAL_PREFIX([ |
620 | 1362 | eval additional_includedir=\"$includedir\" |
621 | 1363 | eval additional_libdir=\"$libdir\" |
1364 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
1365 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
622 | 1366 | ]) |
623 | 1367 | else |
624 | 1368 | additional_includedir="$withval/include" |
625 | 1369 | additional_libdir="$withval/$acl_libdirstem" |
626 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | |
627 | && ! test -d "$withval/$acl_libdirstem"; then | |
628 | additional_libdir="$withval/$acl_libdirstem2" | |
629 | fi | |
1370 | additional_libdir2="$withval/$acl_libdirstem2" | |
1371 | additional_libdir3="$withval/$acl_libdirstem3" | |
630 | 1372 | fi |
631 | 1373 | fi |
632 | 1374 | ]) |
1375 | if test "X$additional_libdir2" = "X$additional_libdir"; then | |
1376 | additional_libdir2= | |
1377 | fi | |
1378 | if test "X$additional_libdir3" = "X$additional_libdir"; then | |
1379 | additional_libdir3= | |
1380 | fi | |
633 | 1381 | dnl Search the library and its dependencies in $additional_libdir and |
634 | 1382 | dnl $LDFLAGS. Using breadth-first-seach. |
635 | 1383 | LIB[]NAME= |
685 | 1433 | shrext= |
686 | 1434 | fi |
687 | 1435 | if test $use_additional = yes; then |
688 | dir="$additional_libdir" | |
689 | dnl The same code as in the loop below: | |
690 | dnl First look for a shared library. | |
691 | if test -n "$acl_shlibext"; then | |
692 | if test -f "$dir/$libname$shrext"; then | |
693 | found_dir="$dir" | |
694 | found_so="$dir/$libname$shrext" | |
695 | else | |
696 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
697 | ver=`(cd "$dir" && \ | |
698 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
699 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
700 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
701 | | sed 1q ) 2>/dev/null` | |
702 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
703 | found_dir="$dir" | |
704 | found_so="$dir/$libname$shrext.$ver" | |
705 | fi | |
706 | else | |
707 | eval library_names=\"$acl_library_names_spec\" | |
708 | for f in $library_names; do | |
709 | if test -f "$dir/$f"; then | |
710 | found_dir="$dir" | |
711 | found_so="$dir/$f" | |
712 | break | |
713 | fi | |
714 | done | |
715 | fi | |
716 | fi | |
717 | fi | |
718 | dnl Then look for a static library. | |
719 | if test "X$found_dir" = "X"; then | |
720 | if test -f "$dir/$libname.$acl_libext"; then | |
721 | found_dir="$dir" | |
722 | found_a="$dir/$libname.$acl_libext" | |
723 | fi | |
724 | fi | |
725 | if test "X$found_dir" != "X"; then | |
726 | if test -f "$dir/$libname.la"; then | |
727 | found_la="$dir/$libname.la" | |
728 | fi | |
729 | fi | |
730 | fi | |
731 | if test "X$found_dir" = "X"; then | |
732 | for x in $LDFLAGS $LTLIB[]NAME; do | |
733 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
734 | case "$x" in | |
735 | -L*) | |
736 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
1436 | for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do | |
1437 | if test "X$found_dir" = "X"; then | |
1438 | eval dir=\$$additional_libdir_variable | |
1439 | if test -n "$dir"; then | |
1440 | dnl The same code as in the loop below: | |
737 | 1441 | dnl First look for a shared library. |
738 | 1442 | if test -n "$acl_shlibext"; then |
739 | if test -f "$dir/$libname$shrext"; then | |
1443 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
740 | 1444 | found_dir="$dir" |
741 | 1445 | found_so="$dir/$libname$shrext" |
742 | 1446 | else |
746 | 1450 | | sed -e "s,^$libname$shrext\\\\.,," \ |
747 | 1451 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
748 | 1452 | | sed 1q ) 2>/dev/null` |
749 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
1453 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
750 | 1454 | found_dir="$dir" |
751 | 1455 | found_so="$dir/$libname$shrext.$ver" |
752 | 1456 | fi |
753 | 1457 | else |
754 | 1458 | eval library_names=\"$acl_library_names_spec\" |
755 | 1459 | for f in $library_names; do |
756 | if test -f "$dir/$f"; then | |
1460 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
757 | 1461 | found_dir="$dir" |
758 | 1462 | found_so="$dir/$f" |
759 | 1463 | break |
764 | 1468 | fi |
765 | 1469 | dnl Then look for a static library. |
766 | 1470 | if test "X$found_dir" = "X"; then |
767 | if test -f "$dir/$libname.$acl_libext"; then | |
1471 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
1472 | found_dir="$dir" | |
1473 | found_a="$dir/$libname.$acl_libext" | |
1474 | fi | |
1475 | fi | |
1476 | if test "X$found_dir" != "X"; then | |
1477 | if test -f "$dir/$libname.la"; then | |
1478 | found_la="$dir/$libname.la" | |
1479 | fi | |
1480 | fi | |
1481 | fi | |
1482 | fi | |
1483 | done | |
1484 | fi | |
1485 | if test "X$found_dir" = "X"; then | |
1486 | for x in $LDFLAGS $LTLIB[]NAME; do | |
1487 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | |
1488 | case "$x" in | |
1489 | -L*) | |
1490 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
1491 | dnl First look for a shared library. | |
1492 | if test -n "$acl_shlibext"; then | |
1493 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
1494 | found_dir="$dir" | |
1495 | found_so="$dir/$libname$shrext" | |
1496 | else | |
1497 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
1498 | ver=`(cd "$dir" && \ | |
1499 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
1500 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
1501 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
1502 | | sed 1q ) 2>/dev/null` | |
1503 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
1504 | found_dir="$dir" | |
1505 | found_so="$dir/$libname$shrext.$ver" | |
1506 | fi | |
1507 | else | |
1508 | eval library_names=\"$acl_library_names_spec\" | |
1509 | for f in $library_names; do | |
1510 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
1511 | found_dir="$dir" | |
1512 | found_so="$dir/$f" | |
1513 | break | |
1514 | fi | |
1515 | done | |
1516 | fi | |
1517 | fi | |
1518 | fi | |
1519 | dnl Then look for a static library. | |
1520 | if test "X$found_dir" = "X"; then | |
1521 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
768 | 1522 | found_dir="$dir" |
769 | 1523 | found_a="$dir/$libname.$acl_libext" |
770 | 1524 | fi |
790 | 1544 | dnl standard /usr/lib. |
791 | 1545 | if test "$enable_rpath" = no \ |
792 | 1546 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ |
793 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | |
1547 | || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ | |
1548 | || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then | |
794 | 1549 | dnl No hardcoding is needed. |
795 | 1550 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
796 | 1551 | else |
890 | 1645 | fi |
891 | 1646 | additional_includedir="$basedir/include" |
892 | 1647 | ;; |
1648 | */$acl_libdirstem3 | */$acl_libdirstem3/) | |
1649 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` | |
1650 | if test "$name" = '$1'; then | |
1651 | LIB[]NAME[]_PREFIX="$basedir" | |
1652 | fi | |
1653 | additional_includedir="$basedir/include" | |
1654 | ;; | |
893 | 1655 | esac |
894 | 1656 | if test "X$additional_includedir" != "X"; then |
895 | 1657 | dnl Potentially add $additional_includedir to $INCNAME. |
940 | 1702 | for dep in $dependency_libs; do |
941 | 1703 | case "$dep" in |
942 | 1704 | -L*) |
943 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
944 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | |
1705 | dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
1706 | dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. | |
945 | 1707 | dnl But don't add it |
946 | 1708 | dnl 1. if it's the standard /usr/lib, |
947 | 1709 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, |
948 | 1710 | dnl 3. if it's already present in $LDFLAGS or the already |
949 | 1711 | dnl constructed $LIBNAME, |
950 | 1712 | dnl 4. if it doesn't exist as a directory. |
951 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ | |
952 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | |
1713 | if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ | |
1714 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ | |
1715 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then | |
953 | 1716 | haveit= |
954 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ | |
955 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | |
1717 | if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ | |
1718 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ | |
1719 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then | |
956 | 1720 | if test -n "$GCC"; then |
957 | 1721 | case $host_os in |
958 | 1722 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
963 | 1727 | haveit= |
964 | 1728 | for x in $LDFLAGS $LIB[]NAME; do |
965 | 1729 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
966 | if test "X$x" = "X-L$additional_libdir"; then | |
1730 | if test "X$x" = "X-L$dependency_libdir"; then | |
967 | 1731 | haveit=yes |
968 | 1732 | break |
969 | 1733 | fi |
970 | 1734 | done |
971 | 1735 | if test -z "$haveit"; then |
972 | if test -d "$additional_libdir"; then | |
973 | dnl Really add $additional_libdir to $LIBNAME. | |
974 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | |
1736 | if test -d "$dependency_libdir"; then | |
1737 | dnl Really add $dependency_libdir to $LIBNAME. | |
1738 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" | |
975 | 1739 | fi |
976 | 1740 | fi |
977 | 1741 | haveit= |
978 | 1742 | for x in $LDFLAGS $LTLIB[]NAME; do |
979 | 1743 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) |
980 | if test "X$x" = "X-L$additional_libdir"; then | |
1744 | if test "X$x" = "X-L$dependency_libdir"; then | |
981 | 1745 | haveit=yes |
982 | 1746 | break |
983 | 1747 | fi |
984 | 1748 | done |
985 | 1749 | if test -z "$haveit"; then |
986 | if test -d "$additional_libdir"; then | |
987 | dnl Really add $additional_libdir to $LTLIBNAME. | |
988 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | |
1750 | if test -d "$dependency_libdir"; then | |
1751 | dnl Really add $dependency_libdir to $LTLIBNAME. | |
1752 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" | |
989 | 1753 | fi |
990 | 1754 | fi |
991 | 1755 | fi |
1083 | 1847 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
1084 | 1848 | done |
1085 | 1849 | fi |
1086 | popdef([P_A_C_K]) | |
1087 | 1850 | popdef([PACKLIBS]) |
1088 | 1851 | popdef([PACKUP]) |
1089 | 1852 | popdef([PACK]) |
1134 | 1897 | dir="$next" |
1135 | 1898 | dnl No need to hardcode the standard /usr/lib. |
1136 | 1899 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
1137 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | |
1900 | && test "X$dir" != "X/usr/$acl_libdirstem2" \ | |
1901 | && test "X$dir" != "X/usr/$acl_libdirstem3"; then | |
1138 | 1902 | rpathdirs="$rpathdirs $dir" |
1139 | 1903 | fi |
1140 | 1904 | next= |
1144 | 1908 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
1145 | 1909 | dnl No need to hardcode the standard /usr/lib. |
1146 | 1910 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
1147 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | |
1911 | && test "X$dir" != "X/usr/$acl_libdirstem2" \ | |
1912 | && test "X$dir" != "X/usr/$acl_libdirstem3"; then | |
1148 | 1913 | rpathdirs="$rpathdirs $dir" |
1149 | 1914 | fi |
1150 | 1915 | next= ;; |
1189 | 1954 | AC_SUBST([$1]) |
1190 | 1955 | ]) |
1191 | 1956 | |
1192 | # lib-prefix.m4 serial 7 (gettext-0.18) | |
1193 | dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. | |
1957 | # lib-prefix.m4 serial 17 | |
1958 | dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. | |
1194 | 1959 | dnl This file is free software; the Free Software Foundation |
1195 | 1960 | dnl gives unlimited permission to copy and/or distribute it, |
1196 | 1961 | dnl with or without modifications, as long as this notice is preserved. |
1197 | 1962 | |
1198 | 1963 | dnl From Bruno Haible. |
1199 | ||
1200 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | |
1201 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | |
1202 | dnl require excessive bracketing. | |
1203 | ifdef([AC_HELP_STRING], | |
1204 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], | |
1205 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) | |
1206 | 1964 | |
1207 | 1965 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed |
1208 | 1966 | dnl to access previously installed libraries. The basic assumption is that |
1223 | 1981 | eval additional_includedir=\"$includedir\" |
1224 | 1982 | eval additional_libdir=\"$libdir\" |
1225 | 1983 | ]) |
1226 | AC_LIB_ARG_WITH([lib-prefix], | |
1227 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | |
1228 | --without-lib-prefix don't search for libraries in includedir and libdir], | |
1984 | AC_ARG_WITH([lib-prefix], | |
1985 | [[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | |
1986 | --without-lib-prefix don't search for libraries in includedir and libdir]], | |
1229 | 1987 | [ |
1230 | 1988 | if test "X$withval" = "Xno"; then |
1231 | 1989 | use_additional=no |
1345 | 2103 | ]) |
1346 | 2104 | |
1347 | 2105 | dnl AC_LIB_PREPARE_MULTILIB creates |
1348 | dnl - a variable acl_libdirstem, containing the basename of the libdir, either | |
1349 | dnl "lib" or "lib64" or "lib/64", | |
1350 | dnl - a variable acl_libdirstem2, as a secondary possible value for | |
1351 | dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or | |
1352 | dnl "lib/amd64". | |
2106 | dnl - a function acl_is_expected_elfclass, that tests whether standard input | |
2107 | dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, | |
2108 | dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing | |
2109 | dnl the basename of the libdir to try in turn, either "lib" or "lib64" or | |
2110 | dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. | |
1353 | 2111 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
1354 | 2112 | [ |
1355 | dnl There is no formal standard regarding lib and lib64. | |
1356 | dnl On glibc systems, the current practice is that on a system supporting | |
2113 | dnl There is no formal standard regarding lib, lib32, and lib64. | |
2114 | dnl On most glibc systems, the current practice is that on a system supporting | |
1357 | 2115 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
1358 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine | |
1359 | dnl the compiler's default mode by looking at the compiler's library search | |
1360 | dnl path. If at least one of its elements ends in /lib64 or points to a | |
1361 | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. | |
1362 | dnl Otherwise we use the default, namely "lib". | |
2116 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on | |
2117 | dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go | |
2118 | dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. | |
2119 | dnl We determine the compiler's default mode by looking at the compiler's | |
2120 | dnl library search path. If at least one of its elements ends in /lib64 or | |
2121 | dnl points to a directory whose absolute pathname ends in /lib64, we use that | |
2122 | dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, | |
2123 | dnl namely "lib". | |
1363 | 2124 | dnl On Solaris systems, the current practice is that on a system supporting |
1364 | 2125 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
1365 | 2126 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
1366 | 2127 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
1367 | 2128 | AC_REQUIRE([AC_CANONICAL_HOST]) |
1368 | acl_libdirstem=lib | |
1369 | acl_libdirstem2= | |
1370 | case "$host_os" in | |
1371 | solaris*) | |
1372 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | |
1373 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. | |
1374 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | |
1375 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | |
1376 | dnl symlink is missing, so we set acl_libdirstem2 too. | |
1377 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | |
1378 | [AC_EGREP_CPP([sixtyfour bits], [ | |
1379 | #ifdef _LP64 | |
1380 | sixtyfour bits | |
1381 | #endif | |
1382 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | |
1383 | ]) | |
1384 | if test $gl_cv_solaris_64bit = yes; then | |
1385 | acl_libdirstem=lib/64 | |
1386 | case "$host_cpu" in | |
1387 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | |
1388 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | |
1389 | esac | |
1390 | fi | |
1391 | ;; | |
1392 | *) | |
1393 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
1394 | if test -n "$searchpath"; then | |
1395 | acl_save_IFS="${IFS= }"; IFS=":" | |
1396 | for searchdir in $searchpath; do | |
1397 | if test -d "$searchdir"; then | |
1398 | case "$searchdir" in | |
1399 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | |
1400 | */../ | */.. ) | |
1401 | # Better ignore directories of this form. They are misleading. | |
1402 | ;; | |
1403 | *) searchdir=`cd "$searchdir" && pwd` | |
1404 | case "$searchdir" in | |
1405 | */lib64 ) acl_libdirstem=lib64 ;; | |
1406 | esac ;; | |
1407 | esac | |
1408 | fi | |
1409 | done | |
1410 | IFS="$acl_save_IFS" | |
1411 | fi | |
1412 | ;; | |
1413 | esac | |
1414 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | |
2129 | AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) | |
2130 | ||
2131 | AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], | |
2132 | [AC_EGREP_CPP([Extensible Linking Format], | |
2133 | [#ifdef __ELF__ | |
2134 | Extensible Linking Format | |
2135 | #endif | |
2136 | ], | |
2137 | [gl_cv_elf=yes], | |
2138 | [gl_cv_elf=no]) | |
2139 | ]) | |
2140 | if test $gl_cv_elf; then | |
2141 | # Extract the ELF class of a file (5th byte) in decimal. | |
2142 | # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header | |
2143 | if od -A x < /dev/null >/dev/null 2>/dev/null; then | |
2144 | # Use POSIX od. | |
2145 | func_elfclass () | |
2146 | { | |
2147 | od -A n -t d1 -j 4 -N 1 | |
2148 | } | |
2149 | else | |
2150 | # Use BSD hexdump. | |
2151 | func_elfclass () | |
2152 | { | |
2153 | dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' | |
2154 | echo | |
2155 | } | |
2156 | fi | |
2157 | changequote(,)dnl | |
2158 | case $HOST_CPU_C_ABI_32BIT in | |
2159 | yes) | |
2160 | # 32-bit ABI. | |
2161 | acl_is_expected_elfclass () | |
2162 | { | |
2163 | test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 | |
2164 | } | |
2165 | ;; | |
2166 | no) | |
2167 | # 64-bit ABI. | |
2168 | acl_is_expected_elfclass () | |
2169 | { | |
2170 | test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 | |
2171 | } | |
2172 | ;; | |
2173 | *) | |
2174 | # Unknown. | |
2175 | acl_is_expected_elfclass () | |
2176 | { | |
2177 | : | |
2178 | } | |
2179 | ;; | |
2180 | esac | |
2181 | changequote([,])dnl | |
2182 | else | |
2183 | acl_is_expected_elfclass () | |
2184 | { | |
2185 | : | |
2186 | } | |
2187 | fi | |
2188 | ||
2189 | dnl Allow the user to override the result by setting acl_cv_libdirstems. | |
2190 | AC_CACHE_CHECK([for the common suffixes of directories in the library search path], | |
2191 | [acl_cv_libdirstems], | |
2192 | [dnl Try 'lib' first, because that's the default for libdir in GNU, see | |
2193 | dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>. | |
2194 | acl_libdirstem=lib | |
2195 | acl_libdirstem2= | |
2196 | acl_libdirstem3= | |
2197 | case "$host_os" in | |
2198 | solaris*) | |
2199 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | |
2200 | dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>. | |
2201 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | |
2202 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | |
2203 | dnl symlink is missing, so we set acl_libdirstem2 too. | |
2204 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
2205 | acl_libdirstem2=lib/64 | |
2206 | case "$host_cpu" in | |
2207 | sparc*) acl_libdirstem3=lib/sparcv9 ;; | |
2208 | i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; | |
2209 | esac | |
2210 | fi | |
2211 | ;; | |
2212 | *) | |
2213 | dnl If $CC generates code for a 32-bit ABI, the libraries are | |
2214 | dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. | |
2215 | dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries | |
2216 | dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. | |
2217 | dnl Find the compiler's search path. However, non-system compilers | |
2218 | dnl sometimes have odd library search paths. But we can't simply invoke | |
2219 | dnl '/usr/bin/gcc -print-search-dirs' because that would not take into | |
2220 | dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. | |
2221 | searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | |
2222 | | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
2223 | if test $HOST_CPU_C_ABI_32BIT != no; then | |
2224 | # 32-bit or unknown ABI. | |
2225 | if test -d /usr/lib32; then | |
2226 | acl_libdirstem2=lib32 | |
2227 | fi | |
2228 | fi | |
2229 | if test $HOST_CPU_C_ABI_32BIT != yes; then | |
2230 | # 64-bit or unknown ABI. | |
2231 | if test -d /usr/lib64; then | |
2232 | acl_libdirstem3=lib64 | |
2233 | fi | |
2234 | fi | |
2235 | if test -n "$searchpath"; then | |
2236 | acl_save_IFS="${IFS= }"; IFS=":" | |
2237 | for searchdir in $searchpath; do | |
2238 | if test -d "$searchdir"; then | |
2239 | case "$searchdir" in | |
2240 | */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; | |
2241 | */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; | |
2242 | */../ | */.. ) | |
2243 | # Better ignore directories of this form. They are misleading. | |
2244 | ;; | |
2245 | *) searchdir=`cd "$searchdir" && pwd` | |
2246 | case "$searchdir" in | |
2247 | */lib32 ) acl_libdirstem2=lib32 ;; | |
2248 | */lib64 ) acl_libdirstem3=lib64 ;; | |
2249 | esac ;; | |
2250 | esac | |
2251 | fi | |
2252 | done | |
2253 | IFS="$acl_save_IFS" | |
2254 | if test $HOST_CPU_C_ABI_32BIT = yes; then | |
2255 | # 32-bit ABI. | |
2256 | acl_libdirstem3= | |
2257 | fi | |
2258 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
2259 | # 64-bit ABI. | |
2260 | acl_libdirstem2= | |
2261 | fi | |
2262 | fi | |
2263 | ;; | |
2264 | esac | |
2265 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | |
2266 | test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" | |
2267 | acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" | |
2268 | ]) | |
2269 | dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and | |
2270 | dnl acl_libdirstem3. | |
2271 | changequote(,)dnl | |
2272 | acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` | |
2273 | acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` | |
2274 | acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` | |
2275 | changequote([,])dnl | |
1415 | 2276 | ]) |
1416 | 2277 | |
1417 | # Copyright (C) 2002-2018 Free Software Foundation, Inc. | |
2278 | # Copyright (C) 2002-2021 Free Software Foundation, Inc. | |
1418 | 2279 | # |
1419 | 2280 | # This file is free software; the Free Software Foundation |
1420 | 2281 | # gives unlimited permission to copy and/or distribute it, |
1429 | 2290 | [am__api_version='1.16' |
1430 | 2291 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
1431 | 2292 | dnl require some minimum version. Point them to the right macro. |
1432 | m4_if([$1], [1.16.1], [], | |
2293 | m4_if([$1], [1.16.4], [], | |
1433 | 2294 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
1434 | 2295 | ]) |
1435 | 2296 | |
1445 | 2306 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
1446 | 2307 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
1447 | 2308 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
1448 | [AM_AUTOMAKE_VERSION([1.16.1])dnl | |
2309 | [AM_AUTOMAKE_VERSION([1.16.4])dnl | |
1449 | 2310 | m4_ifndef([AC_AUTOCONF_VERSION], |
1450 | 2311 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
1451 | 2312 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
1452 | 2313 | |
1453 | 2314 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
1454 | 2315 | |
1455 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2316 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
1456 | 2317 | # |
1457 | 2318 | # This file is free software; the Free Software Foundation |
1458 | 2319 | # gives unlimited permission to copy and/or distribute it, |
1504 | 2365 | |
1505 | 2366 | # AM_CONDITIONAL -*- Autoconf -*- |
1506 | 2367 | |
1507 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. | |
2368 | # Copyright (C) 1997-2021 Free Software Foundation, Inc. | |
1508 | 2369 | # |
1509 | 2370 | # This file is free software; the Free Software Foundation |
1510 | 2371 | # gives unlimited permission to copy and/or distribute it, |
1535 | 2396 | Usually this means the macro was only invoked conditionally.]]) |
1536 | 2397 | fi])]) |
1537 | 2398 | |
1538 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
2399 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
1539 | 2400 | # |
1540 | 2401 | # This file is free software; the Free Software Foundation |
1541 | 2402 | # gives unlimited permission to copy and/or distribute it, |
1726 | 2587 | |
1727 | 2588 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
1728 | 2589 | |
1729 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
2590 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
1730 | 2591 | # |
1731 | 2592 | # This file is free software; the Free Software Foundation |
1732 | 2593 | # gives unlimited permission to copy and/or distribute it, |
1765 | 2626 | done |
1766 | 2627 | if test $am_rc -ne 0; then |
1767 | 2628 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments |
1768 | for automatic dependency tracking. Try re-running configure with the | |
2629 | for automatic dependency tracking. If GNU make was not used, consider | |
2630 | re-running the configure script with MAKE="gmake" (or whatever is | |
2631 | necessary). You can also try re-running configure with the | |
1769 | 2632 | '--disable-dependency-tracking' option to at least be able to build |
1770 | 2633 | the package (albeit without support for automatic dependency tracking).]) |
1771 | 2634 | fi |
1792 | 2655 | |
1793 | 2656 | # Do all the work for Automake. -*- Autoconf -*- |
1794 | 2657 | |
1795 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
2658 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
1796 | 2659 | # |
1797 | 2660 | # This file is free software; the Free Software Foundation |
1798 | 2661 | # gives unlimited permission to copy and/or distribute it, |
1856 | 2719 | [_AM_SET_OPTIONS([$1])dnl |
1857 | 2720 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
1858 | 2721 | m4_if( |
1859 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | |
2722 | m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), | |
1860 | 2723 | [ok:ok],, |
1861 | 2724 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
1862 | 2725 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
1908 | 2771 | [m4_define([AC_PROG_OBJCXX], |
1909 | 2772 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl |
1910 | 2773 | ]) |
2774 | # Variables for tags utilities; see am/tags.am | |
2775 | if test -z "$CTAGS"; then | |
2776 | CTAGS=ctags | |
2777 | fi | |
2778 | AC_SUBST([CTAGS]) | |
2779 | if test -z "$ETAGS"; then | |
2780 | ETAGS=etags | |
2781 | fi | |
2782 | AC_SUBST([ETAGS]) | |
2783 | if test -z "$CSCOPE"; then | |
2784 | CSCOPE=cscope | |
2785 | fi | |
2786 | AC_SUBST([CSCOPE]) | |
2787 | ||
1911 | 2788 | AC_REQUIRE([AM_SILENT_RULES])dnl |
1912 | 2789 | dnl The testsuite driver may need to know about EXEEXT, so add the |
1913 | 2790 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
1989 | 2866 | done |
1990 | 2867 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
1991 | 2868 | |
1992 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2869 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
1993 | 2870 | # |
1994 | 2871 | # This file is free software; the Free Software Foundation |
1995 | 2872 | # gives unlimited permission to copy and/or distribute it, |
2010 | 2887 | fi |
2011 | 2888 | AC_SUBST([install_sh])]) |
2012 | 2889 | |
2013 | # Copyright (C) 2003-2018 Free Software Foundation, Inc. | |
2890 | # Copyright (C) 2003-2021 Free Software Foundation, Inc. | |
2014 | 2891 | # |
2015 | 2892 | # This file is free software; the Free Software Foundation |
2016 | 2893 | # gives unlimited permission to copy and/or distribute it, |
2031 | 2908 | |
2032 | 2909 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
2033 | 2910 | |
2034 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2911 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
2035 | 2912 | # |
2036 | 2913 | # This file is free software; the Free Software Foundation |
2037 | 2914 | # gives unlimited permission to copy and/or distribute it, |
2074 | 2951 | |
2075 | 2952 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
2076 | 2953 | |
2077 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. | |
2954 | # Copyright (C) 1997-2021 Free Software Foundation, Inc. | |
2078 | 2955 | # |
2079 | 2956 | # This file is free software; the Free Software Foundation |
2080 | 2957 | # gives unlimited permission to copy and/or distribute it, |
2095 | 2972 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
2096 | 2973 | AC_REQUIRE_AUX_FILE([missing])dnl |
2097 | 2974 | if test x"${MISSING+set}" != xset; then |
2098 | case $am_aux_dir in | |
2099 | *\ * | *\ *) | |
2100 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2101 | *) | |
2102 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2103 | esac | |
2975 | MISSING="\${SHELL} '$am_aux_dir/missing'" | |
2104 | 2976 | fi |
2105 | 2977 | # Use eval to expand $SHELL |
2106 | 2978 | if eval "$MISSING --is-lightweight"; then |
2113 | 2985 | |
2114 | 2986 | # Helper functions for option handling. -*- Autoconf -*- |
2115 | 2987 | |
2116 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2988 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
2117 | 2989 | # |
2118 | 2990 | # This file is free software; the Free Software Foundation |
2119 | 2991 | # gives unlimited permission to copy and/or distribute it, |
2142 | 3014 | AC_DEFUN([_AM_IF_OPTION], |
2143 | 3015 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
2144 | 3016 | |
2145 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
3017 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
2146 | 3018 | # |
2147 | 3019 | # This file is free software; the Free Software Foundation |
2148 | 3020 | # gives unlimited permission to copy and/or distribute it, |
2189 | 3061 | # For backward compatibility. |
2190 | 3062 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
2191 | 3063 | |
2192 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
3064 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
2193 | 3065 | # |
2194 | 3066 | # This file is free software; the Free Software Foundation |
2195 | 3067 | # gives unlimited permission to copy and/or distribute it, |
2208 | 3080 | |
2209 | 3081 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
2210 | 3082 | |
2211 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
3083 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
2212 | 3084 | # |
2213 | 3085 | # This file is free software; the Free Software Foundation |
2214 | 3086 | # gives unlimited permission to copy and/or distribute it, |
2289 | 3161 | rm -f conftest.file |
2290 | 3162 | ]) |
2291 | 3163 | |
2292 | # Copyright (C) 2009-2018 Free Software Foundation, Inc. | |
3164 | # Copyright (C) 2009-2021 Free Software Foundation, Inc. | |
2293 | 3165 | # |
2294 | 3166 | # This file is free software; the Free Software Foundation |
2295 | 3167 | # gives unlimited permission to copy and/or distribute it, |
2349 | 3221 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
2350 | 3222 | ]) |
2351 | 3223 | |
2352 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
3224 | # Copyright (C) 2001-2021 Free Software Foundation, Inc. | |
2353 | 3225 | # |
2354 | 3226 | # This file is free software; the Free Software Foundation |
2355 | 3227 | # gives unlimited permission to copy and/or distribute it, |
2377 | 3249 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
2378 | 3250 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
2379 | 3251 | |
2380 | # Copyright (C) 2006-2018 Free Software Foundation, Inc. | |
3252 | # Copyright (C) 2006-2021 Free Software Foundation, Inc. | |
2381 | 3253 | # |
2382 | 3254 | # This file is free software; the Free Software Foundation |
2383 | 3255 | # gives unlimited permission to copy and/or distribute it, |
2396 | 3268 | |
2397 | 3269 | # Check how to create a tarball. -*- Autoconf -*- |
2398 | 3270 | |
2399 | # Copyright (C) 2004-2018 Free Software Foundation, Inc. | |
3271 | # Copyright (C) 2004-2021 Free Software Foundation, Inc. | |
2400 | 3272 | # |
2401 | 3273 | # This file is free software; the Free Software Foundation |
2402 | 3274 | # gives unlimited permission to copy and/or distribute it, |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
6 | 6 | # Written by Tom Tromey <tromey@cygnus.com>. |
7 | 7 | # |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
52 | 52 | MINGW*) |
53 | 53 | file_conv=mingw |
54 | 54 | ;; |
55 | CYGWIN*) | |
55 | CYGWIN* | MSYS*) | |
56 | 56 | file_conv=cygwin |
57 | 57 | ;; |
58 | 58 | *) |
66 | 66 | mingw/*) |
67 | 67 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` |
68 | 68 | ;; |
69 | cygwin/*) | |
69 | cygwin/* | msys/*) | |
70 | 70 | file=`cygpath -m "$file" || echo "$file"` |
71 | 71 | ;; |
72 | 72 | wine/*) |
1 | 1 | # Output a system dependent set of variables, describing how to set the |
2 | 2 | # run time search path of shared libraries in an executable. |
3 | 3 | # |
4 | # Copyright 1996-2016 Free Software Foundation, Inc. | |
4 | # Copyright 1996-2020 Free Software Foundation, Inc. | |
5 | 5 | # Taken from GNU libtool, 2001 |
6 | 6 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
7 | 7 | # |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for dosfstools 4.2. | |
2 | # Generated by GNU Autoconf 2.69 for dosfstools 4.2+git. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
576 | 576 | # Identity of this package. |
577 | 577 | PACKAGE_NAME='dosfstools' |
578 | 578 | PACKAGE_TARNAME='dosfstools' |
579 | PACKAGE_VERSION='4.2' | |
580 | PACKAGE_STRING='dosfstools 4.2' | |
579 | PACKAGE_VERSION='4.2+git' | |
580 | PACKAGE_STRING='dosfstools 4.2+git' | |
581 | 581 | PACKAGE_BUGREPORT='' |
582 | 582 | PACKAGE_URL='' |
583 | 583 | |
661 | 661 | AM_DEFAULT_VERBOSITY |
662 | 662 | AM_DEFAULT_V |
663 | 663 | AM_V |
664 | CSCOPE | |
665 | ETAGS | |
666 | CTAGS | |
664 | 667 | am__untar |
665 | 668 | am__tar |
666 | 669 | AMTAR |
1297 | 1300 | # Omit some internal or obsolete options to make the list less imposing. |
1298 | 1301 | # This message is too long to be a string in the A/UX 3.1 sh. |
1299 | 1302 | cat <<_ACEOF |
1300 | \`configure' configures dosfstools 4.2 to adapt to many kinds of systems. | |
1303 | \`configure' configures dosfstools 4.2+git to adapt to many kinds of systems. | |
1301 | 1304 | |
1302 | 1305 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1303 | 1306 | |
1368 | 1371 | |
1369 | 1372 | if test -n "$ac_init_help"; then |
1370 | 1373 | case $ac_init_help in |
1371 | short | recursive ) echo "Configuration of dosfstools 4.2:";; | |
1374 | short | recursive ) echo "Configuration of dosfstools 4.2+git:";; | |
1372 | 1375 | esac |
1373 | 1376 | cat <<\_ACEOF |
1374 | 1377 | |
1474 | 1477 | test -n "$ac_init_help" && exit $ac_status |
1475 | 1478 | if $ac_init_version; then |
1476 | 1479 | cat <<\_ACEOF |
1477 | dosfstools configure 4.2 | |
1480 | dosfstools configure 4.2+git | |
1478 | 1481 | generated by GNU Autoconf 2.69 |
1479 | 1482 | |
1480 | 1483 | Copyright (C) 2012 Free Software Foundation, Inc. |
1885 | 1888 | This file contains any messages produced by compilers while |
1886 | 1889 | running configure, to aid debugging if configure makes a mistake. |
1887 | 1890 | |
1888 | It was created by dosfstools $as_me 4.2, which was | |
1891 | It was created by dosfstools $as_me 4.2+git, which was | |
1889 | 1892 | generated by GNU Autoconf 2.69. Invocation command line was |
1890 | 1893 | |
1891 | 1894 | $ $0 $@ |
2440 | 2443 | am_aux_dir=`cd "$ac_aux_dir" && pwd` |
2441 | 2444 | |
2442 | 2445 | if test x"${MISSING+set}" != xset; then |
2443 | case $am_aux_dir in | |
2444 | *\ * | *\ *) | |
2445 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
2446 | *) | |
2447 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
2448 | esac | |
2446 | MISSING="\${SHELL} '$am_aux_dir/missing'" | |
2449 | 2447 | fi |
2450 | 2448 | # Use eval to expand $SHELL |
2451 | 2449 | if eval "$MISSING --is-lightweight"; then |
2750 | 2748 | |
2751 | 2749 | # Define the identity of the package. |
2752 | 2750 | PACKAGE='dosfstools' |
2753 | VERSION='4.2' | |
2751 | VERSION='4.2+git' | |
2754 | 2752 | |
2755 | 2753 | |
2756 | 2754 | cat >>confdefs.h <<_ACEOF |
2798 | 2796 | |
2799 | 2797 | |
2800 | 2798 | |
2799 | ||
2800 | ||
2801 | # Variables for tags utilities; see am/tags.am | |
2802 | if test -z "$CTAGS"; then | |
2803 | CTAGS=ctags | |
2804 | fi | |
2805 | ||
2806 | if test -z "$ETAGS"; then | |
2807 | ETAGS=etags | |
2808 | fi | |
2809 | ||
2810 | if test -z "$CSCOPE"; then | |
2811 | CSCOPE=cscope | |
2812 | fi | |
2801 | 2813 | |
2802 | 2814 | |
2803 | 2815 | |
5512 | 5524 | } |
5513 | 5525 | fi |
5514 | 5526 | |
5515 | ac_prog=ld | |
5516 | if test "$GCC" = yes; then | |
5517 | # Check if gcc -print-prog-name=ld gives a path. | |
5527 | if test -n "$LD"; then | |
5528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 | |
5529 | $as_echo_n "checking for ld... " >&6; } | |
5530 | elif test "$GCC" = yes; then | |
5518 | 5531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 |
5519 | 5532 | $as_echo_n "checking for ld used by $CC... " >&6; } |
5520 | case $host in | |
5521 | *-*-mingw*) | |
5522 | # gcc leaves a trailing carriage return which upsets mingw | |
5523 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
5524 | *) | |
5525 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
5526 | esac | |
5527 | case $ac_prog in | |
5528 | # Accept absolute paths. | |
5529 | [\\/]* | ?:[\\/]*) | |
5530 | re_direlt='/[^/][^/]*/\.\./' | |
5531 | # Canonicalize the pathname of ld | |
5532 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | |
5533 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | |
5534 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
5535 | done | |
5536 | test -z "$LD" && LD="$ac_prog" | |
5537 | ;; | |
5538 | "") | |
5539 | # If it fails, then pretend we aren't using GCC. | |
5540 | ac_prog=ld | |
5541 | ;; | |
5542 | *) | |
5543 | # If it is relative, then search for the first ld in PATH. | |
5544 | with_gnu_ld=unknown | |
5545 | ;; | |
5546 | esac | |
5547 | 5533 | elif test "$with_gnu_ld" = yes; then |
5548 | 5534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
5549 | 5535 | $as_echo_n "checking for GNU ld... " >&6; } |
5551 | 5537 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
5552 | 5538 | $as_echo_n "checking for non-GNU ld... " >&6; } |
5553 | 5539 | fi |
5554 | if ${acl_cv_path_LD+:} false; then : | |
5540 | if test -n "$LD"; then | |
5541 | # Let the user override the test with a path. | |
5542 | : | |
5543 | else | |
5544 | if ${acl_cv_path_LD+:} false; then : | |
5555 | 5545 | $as_echo_n "(cached) " >&6 |
5556 | 5546 | else |
5557 | if test -z "$LD"; then | |
5558 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
5559 | for ac_dir in $PATH; do | |
5560 | IFS="$acl_save_ifs" | |
5561 | test -z "$ac_dir" && ac_dir=. | |
5562 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
5563 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
5564 | # Check to see if the program is GNU ld. I'd rather use --version, | |
5565 | # but apparently some variants of GNU ld only accept -v. | |
5566 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
5567 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | |
5568 | *GNU* | *'with BFD'*) | |
5569 | test "$with_gnu_ld" != no && break | |
5570 | ;; | |
5571 | *) | |
5572 | test "$with_gnu_ld" != yes && break | |
5573 | ;; | |
5547 | ||
5548 | acl_cv_path_LD= # Final result of this test | |
5549 | ac_prog=ld # Program to search in $PATH | |
5550 | if test "$GCC" = yes; then | |
5551 | # Check if gcc -print-prog-name=ld gives a path. | |
5552 | case $host in | |
5553 | *-*-mingw*) | |
5554 | # gcc leaves a trailing carriage return which upsets mingw | |
5555 | acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
5556 | *) | |
5557 | acl_output=`($CC -print-prog-name=ld) 2>&5` ;; | |
5558 | esac | |
5559 | case $acl_output in | |
5560 | # Accept absolute paths. | |
5561 | [\\/]* | ?:[\\/]*) | |
5562 | re_direlt='/[^/][^/]*/\.\./' | |
5563 | # Canonicalize the pathname of ld | |
5564 | acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` | |
5565 | while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do | |
5566 | acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` | |
5567 | done | |
5568 | # Got the pathname. No search in PATH is needed. | |
5569 | acl_cv_path_LD="$acl_output" | |
5570 | ac_prog= | |
5571 | ;; | |
5572 | "") | |
5573 | # If it fails, then pretend we aren't using GCC. | |
5574 | ;; | |
5575 | *) | |
5576 | # If it is relative, then search for the first ld in PATH. | |
5577 | with_gnu_ld=unknown | |
5578 | ;; | |
5574 | 5579 | esac |
5575 | 5580 | fi |
5576 | done | |
5577 | IFS="$acl_save_ifs" | |
5578 | else | |
5579 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
5580 | fi | |
5581 | fi | |
5582 | ||
5583 | LD="$acl_cv_path_LD" | |
5581 | if test -n "$ac_prog"; then | |
5582 | # Search for $ac_prog in $PATH. | |
5583 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
5584 | for ac_dir in $PATH; do | |
5585 | IFS="$acl_save_ifs" | |
5586 | test -z "$ac_dir" && ac_dir=. | |
5587 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
5588 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
5589 | # Check to see if the program is GNU ld. I'd rather use --version, | |
5590 | # but apparently some variants of GNU ld only accept -v. | |
5591 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
5592 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | |
5593 | *GNU* | *'with BFD'*) | |
5594 | test "$with_gnu_ld" != no && break | |
5595 | ;; | |
5596 | *) | |
5597 | test "$with_gnu_ld" != yes && break | |
5598 | ;; | |
5599 | esac | |
5600 | fi | |
5601 | done | |
5602 | IFS="$acl_save_ifs" | |
5603 | fi | |
5604 | case $host in | |
5605 | *-*-aix*) | |
5606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5607 | /* end confdefs.h. */ | |
5608 | #if defined __powerpc64__ || defined _ARCH_PPC64 | |
5609 | int ok; | |
5610 | #else | |
5611 | error fail | |
5612 | #endif | |
5613 | ||
5614 | _ACEOF | |
5615 | if ac_fn_c_try_compile "$LINENO"; then : | |
5616 | # The compiler produces 64-bit code. Add option '-b64' so that the | |
5617 | # linker groks 64-bit object files. | |
5618 | case "$acl_cv_path_LD " in | |
5619 | *" -b64 "*) ;; | |
5620 | *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; | |
5621 | esac | |
5622 | ||
5623 | fi | |
5624 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5625 | ;; | |
5626 | sparc64-*-netbsd*) | |
5627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5628 | /* end confdefs.h. */ | |
5629 | #if defined __sparcv9 || defined __arch64__ | |
5630 | int ok; | |
5631 | #else | |
5632 | error fail | |
5633 | #endif | |
5634 | ||
5635 | _ACEOF | |
5636 | if ac_fn_c_try_compile "$LINENO"; then : | |
5637 | ||
5638 | else | |
5639 | # The compiler produces 32-bit code. Add option '-m elf32_sparc' | |
5640 | # so that the linker groks 32-bit object files. | |
5641 | case "$acl_cv_path_LD " in | |
5642 | *" -m elf32_sparc "*) ;; | |
5643 | *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; | |
5644 | esac | |
5645 | ||
5646 | fi | |
5647 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5648 | ;; | |
5649 | esac | |
5650 | ||
5651 | fi | |
5652 | ||
5653 | LD="$acl_cv_path_LD" | |
5654 | fi | |
5584 | 5655 | if test -n "$LD"; then |
5585 | 5656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
5586 | 5657 | $as_echo "$LD" >&6; } |
5587 | 5658 | else |
5588 | 5659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5589 | 5660 | $as_echo "no" >&6; } |
5590 | fi | |
5591 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
5661 | as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
5662 | fi | |
5592 | 5663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
5593 | 5664 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } |
5594 | 5665 | if ${acl_cv_prog_gnu_ld+:} false; then : |
5645 | 5716 | |
5646 | 5717 | |
5647 | 5718 | |
5648 | acl_libdirstem=lib | |
5649 | acl_libdirstem2= | |
5650 | case "$host_os" in | |
5651 | solaris*) | |
5652 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 | |
5653 | $as_echo_n "checking for 64-bit host... " >&6; } | |
5654 | if ${gl_cv_solaris_64bit+:} false; then : | |
5719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 | |
5720 | $as_echo_n "checking 32-bit host C ABI... " >&6; } | |
5721 | if ${gl_cv_host_cpu_c_abi_32bit+:} false; then : | |
5722 | $as_echo_n "(cached) " >&6 | |
5723 | else | |
5724 | if test -n "$gl_cv_host_cpu_c_abi"; then | |
5725 | case "$gl_cv_host_cpu_c_abi" in | |
5726 | i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) | |
5727 | gl_cv_host_cpu_c_abi_32bit=yes ;; | |
5728 | x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) | |
5729 | gl_cv_host_cpu_c_abi_32bit=no ;; | |
5730 | *) | |
5731 | gl_cv_host_cpu_c_abi_32bit=unknown ;; | |
5732 | esac | |
5733 | else | |
5734 | case "$host_cpu" in | |
5735 | ||
5736 | # CPUs that only support a 32-bit ABI. | |
5737 | arc \ | |
5738 | | bfin \ | |
5739 | | cris* \ | |
5740 | | csky \ | |
5741 | | epiphany \ | |
5742 | | ft32 \ | |
5743 | | h8300 \ | |
5744 | | m68k \ | |
5745 | | microblaze | microblazeel \ | |
5746 | | nds32 | nds32le | nds32be \ | |
5747 | | nios2 | nios2eb | nios2el \ | |
5748 | | or1k* \ | |
5749 | | or32 \ | |
5750 | | sh | sh1234 | sh1234elb \ | |
5751 | | tic6x \ | |
5752 | | xtensa* ) | |
5753 | gl_cv_host_cpu_c_abi_32bit=yes | |
5754 | ;; | |
5755 | ||
5756 | # CPUs that only support a 64-bit ABI. | |
5757 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | |
5758 | | mmix ) | |
5759 | gl_cv_host_cpu_c_abi_32bit=no | |
5760 | ;; | |
5761 | ||
5762 | i[34567]86 ) | |
5763 | gl_cv_host_cpu_c_abi_32bit=yes | |
5764 | ;; | |
5765 | ||
5766 | x86_64 ) | |
5767 | # On x86_64 systems, the C compiler may be generating code in one of | |
5768 | # these ABIs: | |
5769 | # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. | |
5770 | # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 | |
5771 | # with native Windows (mingw, MSVC). | |
5772 | # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. | |
5773 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. | |
5774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5775 | /* end confdefs.h. */ | |
5776 | #if (defined __x86_64__ || defined __amd64__ \ | |
5777 | || defined _M_X64 || defined _M_AMD64) \ | |
5778 | && !(defined __ILP32__ || defined _ILP32) | |
5779 | int ok; | |
5780 | #else | |
5781 | error fail | |
5782 | #endif | |
5783 | ||
5784 | _ACEOF | |
5785 | if ac_fn_c_try_compile "$LINENO"; then : | |
5786 | gl_cv_host_cpu_c_abi_32bit=no | |
5787 | else | |
5788 | gl_cv_host_cpu_c_abi_32bit=yes | |
5789 | fi | |
5790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5791 | ;; | |
5792 | ||
5793 | arm* | aarch64 ) | |
5794 | # Assume arm with EABI. | |
5795 | # On arm64 systems, the C compiler may be generating code in one of | |
5796 | # these ABIs: | |
5797 | # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. | |
5798 | # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. | |
5799 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. | |
5800 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5801 | /* end confdefs.h. */ | |
5802 | #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) | |
5803 | int ok; | |
5804 | #else | |
5805 | error fail | |
5806 | #endif | |
5807 | ||
5808 | _ACEOF | |
5809 | if ac_fn_c_try_compile "$LINENO"; then : | |
5810 | gl_cv_host_cpu_c_abi_32bit=no | |
5811 | else | |
5812 | gl_cv_host_cpu_c_abi_32bit=yes | |
5813 | fi | |
5814 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5815 | ;; | |
5816 | ||
5817 | hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) | |
5818 | # On hppa, the C compiler may be generating 32-bit code or 64-bit | |
5819 | # code. In the latter case, it defines _LP64 and __LP64__. | |
5820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5821 | /* end confdefs.h. */ | |
5822 | #ifdef __LP64__ | |
5823 | int ok; | |
5824 | #else | |
5825 | error fail | |
5826 | #endif | |
5827 | ||
5828 | _ACEOF | |
5829 | if ac_fn_c_try_compile "$LINENO"; then : | |
5830 | gl_cv_host_cpu_c_abi_32bit=no | |
5831 | else | |
5832 | gl_cv_host_cpu_c_abi_32bit=yes | |
5833 | fi | |
5834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5835 | ;; | |
5836 | ||
5837 | ia64* ) | |
5838 | # On ia64 on HP-UX, the C compiler may be generating 64-bit code or | |
5839 | # 32-bit code. In the latter case, it defines _ILP32. | |
5840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5841 | /* end confdefs.h. */ | |
5842 | #ifdef _ILP32 | |
5843 | int ok; | |
5844 | #else | |
5845 | error fail | |
5846 | #endif | |
5847 | ||
5848 | _ACEOF | |
5849 | if ac_fn_c_try_compile "$LINENO"; then : | |
5850 | gl_cv_host_cpu_c_abi_32bit=yes | |
5851 | else | |
5852 | gl_cv_host_cpu_c_abi_32bit=no | |
5853 | fi | |
5854 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5855 | ;; | |
5856 | ||
5857 | mips* ) | |
5858 | # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this | |
5859 | # at 32. | |
5860 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5861 | /* end confdefs.h. */ | |
5862 | #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) | |
5863 | int ok; | |
5864 | #else | |
5865 | error fail | |
5866 | #endif | |
5867 | ||
5868 | _ACEOF | |
5869 | if ac_fn_c_try_compile "$LINENO"; then : | |
5870 | gl_cv_host_cpu_c_abi_32bit=no | |
5871 | else | |
5872 | gl_cv_host_cpu_c_abi_32bit=yes | |
5873 | fi | |
5874 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5875 | ;; | |
5876 | ||
5877 | powerpc* ) | |
5878 | # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. | |
5879 | # No need to distinguish them here; the caller may distinguish | |
5880 | # them based on the OS. | |
5881 | # On powerpc64 systems, the C compiler may still be generating | |
5882 | # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may | |
5883 | # be generating 64-bit code. | |
5884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5885 | /* end confdefs.h. */ | |
5886 | #if defined __powerpc64__ || defined _ARCH_PPC64 | |
5887 | int ok; | |
5888 | #else | |
5889 | error fail | |
5890 | #endif | |
5891 | ||
5892 | _ACEOF | |
5893 | if ac_fn_c_try_compile "$LINENO"; then : | |
5894 | gl_cv_host_cpu_c_abi_32bit=no | |
5895 | else | |
5896 | gl_cv_host_cpu_c_abi_32bit=yes | |
5897 | fi | |
5898 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5899 | ;; | |
5900 | ||
5901 | rs6000 ) | |
5902 | gl_cv_host_cpu_c_abi_32bit=yes | |
5903 | ;; | |
5904 | ||
5905 | riscv32 | riscv64 ) | |
5906 | # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. | |
5907 | # Size of 'long' and 'void *': | |
5908 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5909 | /* end confdefs.h. */ | |
5910 | #if defined __LP64__ | |
5911 | int ok; | |
5912 | #else | |
5913 | error fail | |
5914 | #endif | |
5915 | ||
5916 | _ACEOF | |
5917 | if ac_fn_c_try_compile "$LINENO"; then : | |
5918 | gl_cv_host_cpu_c_abi_32bit=no | |
5919 | else | |
5920 | gl_cv_host_cpu_c_abi_32bit=yes | |
5921 | fi | |
5922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5923 | ;; | |
5924 | ||
5925 | s390* ) | |
5926 | # On s390x, the C compiler may be generating 64-bit (= s390x) code | |
5927 | # or 31-bit (= s390) code. | |
5928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5929 | /* end confdefs.h. */ | |
5930 | #if defined __LP64__ || defined __s390x__ | |
5931 | int ok; | |
5932 | #else | |
5933 | error fail | |
5934 | #endif | |
5935 | ||
5936 | _ACEOF | |
5937 | if ac_fn_c_try_compile "$LINENO"; then : | |
5938 | gl_cv_host_cpu_c_abi_32bit=no | |
5939 | else | |
5940 | gl_cv_host_cpu_c_abi_32bit=yes | |
5941 | fi | |
5942 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5943 | ;; | |
5944 | ||
5945 | sparc | sparc64 ) | |
5946 | # UltraSPARCs running Linux have `uname -m` = "sparc64", but the | |
5947 | # C compiler still generates 32-bit code. | |
5948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5949 | /* end confdefs.h. */ | |
5950 | #if defined __sparcv9 || defined __arch64__ | |
5951 | int ok; | |
5952 | #else | |
5953 | error fail | |
5954 | #endif | |
5955 | ||
5956 | _ACEOF | |
5957 | if ac_fn_c_try_compile "$LINENO"; then : | |
5958 | gl_cv_host_cpu_c_abi_32bit=no | |
5959 | else | |
5960 | gl_cv_host_cpu_c_abi_32bit=yes | |
5961 | fi | |
5962 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5963 | ;; | |
5964 | ||
5965 | *) | |
5966 | gl_cv_host_cpu_c_abi_32bit=unknown | |
5967 | ;; | |
5968 | esac | |
5969 | fi | |
5970 | ||
5971 | fi | |
5972 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 | |
5973 | $as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } | |
5974 | ||
5975 | HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" | |
5976 | ||
5977 | ||
5978 | ||
5979 | ||
5980 | ||
5981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 | |
5982 | $as_echo_n "checking for ELF binary format... " >&6; } | |
5983 | if ${gl_cv_elf+:} false; then : | |
5655 | 5984 | $as_echo_n "(cached) " >&6 |
5656 | 5985 | else |
5657 | 5986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5658 | 5987 | /* end confdefs.h. */ |
5659 | ||
5660 | #ifdef _LP64 | |
5661 | sixtyfour bits | |
5662 | #endif | |
5988 | #ifdef __ELF__ | |
5989 | Extensible Linking Format | |
5990 | #endif | |
5663 | 5991 | |
5664 | 5992 | _ACEOF |
5665 | 5993 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
5666 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : | |
5667 | gl_cv_solaris_64bit=yes | |
5668 | else | |
5669 | gl_cv_solaris_64bit=no | |
5994 | $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : | |
5995 | gl_cv_elf=yes | |
5996 | else | |
5997 | gl_cv_elf=no | |
5670 | 5998 | fi |
5671 | 5999 | rm -f conftest* |
5672 | 6000 | |
5673 | 6001 | |
5674 | 6002 | fi |
5675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 | |
5676 | $as_echo "$gl_cv_solaris_64bit" >&6; } | |
5677 | if test $gl_cv_solaris_64bit = yes; then | |
5678 | acl_libdirstem=lib/64 | |
5679 | case "$host_cpu" in | |
5680 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | |
5681 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | |
5682 | esac | |
5683 | fi | |
5684 | ;; | |
5685 | *) | |
5686 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
5687 | if test -n "$searchpath"; then | |
5688 | acl_save_IFS="${IFS= }"; IFS=":" | |
5689 | for searchdir in $searchpath; do | |
5690 | if test -d "$searchdir"; then | |
5691 | case "$searchdir" in | |
5692 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | |
5693 | */../ | */.. ) | |
5694 | # Better ignore directories of this form. They are misleading. | |
5695 | ;; | |
5696 | *) searchdir=`cd "$searchdir" && pwd` | |
5697 | case "$searchdir" in | |
5698 | */lib64 ) acl_libdirstem=lib64 ;; | |
5699 | esac ;; | |
5700 | esac | |
5701 | fi | |
5702 | done | |
5703 | IFS="$acl_save_IFS" | |
5704 | fi | |
5705 | ;; | |
5706 | esac | |
5707 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | |
5708 | ||
6003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 | |
6004 | $as_echo "$gl_cv_elf" >&6; } | |
6005 | if test $gl_cv_elf; then | |
6006 | # Extract the ELF class of a file (5th byte) in decimal. | |
6007 | # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header | |
6008 | if od -A x < /dev/null >/dev/null 2>/dev/null; then | |
6009 | # Use POSIX od. | |
6010 | func_elfclass () | |
6011 | { | |
6012 | od -A n -t d1 -j 4 -N 1 | |
6013 | } | |
6014 | else | |
6015 | # Use BSD hexdump. | |
6016 | func_elfclass () | |
6017 | { | |
6018 | dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' | |
6019 | echo | |
6020 | } | |
6021 | fi | |
6022 | case $HOST_CPU_C_ABI_32BIT in | |
6023 | yes) | |
6024 | # 32-bit ABI. | |
6025 | acl_is_expected_elfclass () | |
6026 | { | |
6027 | test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 | |
6028 | } | |
6029 | ;; | |
6030 | no) | |
6031 | # 64-bit ABI. | |
6032 | acl_is_expected_elfclass () | |
6033 | { | |
6034 | test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 | |
6035 | } | |
6036 | ;; | |
6037 | *) | |
6038 | # Unknown. | |
6039 | acl_is_expected_elfclass () | |
6040 | { | |
6041 | : | |
6042 | } | |
6043 | ;; | |
6044 | esac | |
6045 | else | |
6046 | acl_is_expected_elfclass () | |
6047 | { | |
6048 | : | |
6049 | } | |
6050 | fi | |
6051 | ||
6052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 | |
6053 | $as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } | |
6054 | if ${acl_cv_libdirstems+:} false; then : | |
6055 | $as_echo_n "(cached) " >&6 | |
6056 | else | |
6057 | acl_libdirstem=lib | |
6058 | acl_libdirstem2= | |
6059 | acl_libdirstem3= | |
6060 | case "$host_os" in | |
6061 | solaris*) | |
6062 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
6063 | acl_libdirstem2=lib/64 | |
6064 | case "$host_cpu" in | |
6065 | sparc*) acl_libdirstem3=lib/sparcv9 ;; | |
6066 | i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; | |
6067 | esac | |
6068 | fi | |
6069 | ;; | |
6070 | *) | |
6071 | searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | |
6072 | | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
6073 | if test $HOST_CPU_C_ABI_32BIT != no; then | |
6074 | # 32-bit or unknown ABI. | |
6075 | if test -d /usr/lib32; then | |
6076 | acl_libdirstem2=lib32 | |
6077 | fi | |
6078 | fi | |
6079 | if test $HOST_CPU_C_ABI_32BIT != yes; then | |
6080 | # 64-bit or unknown ABI. | |
6081 | if test -d /usr/lib64; then | |
6082 | acl_libdirstem3=lib64 | |
6083 | fi | |
6084 | fi | |
6085 | if test -n "$searchpath"; then | |
6086 | acl_save_IFS="${IFS= }"; IFS=":" | |
6087 | for searchdir in $searchpath; do | |
6088 | if test -d "$searchdir"; then | |
6089 | case "$searchdir" in | |
6090 | */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; | |
6091 | */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; | |
6092 | */../ | */.. ) | |
6093 | # Better ignore directories of this form. They are misleading. | |
6094 | ;; | |
6095 | *) searchdir=`cd "$searchdir" && pwd` | |
6096 | case "$searchdir" in | |
6097 | */lib32 ) acl_libdirstem2=lib32 ;; | |
6098 | */lib64 ) acl_libdirstem3=lib64 ;; | |
6099 | esac ;; | |
6100 | esac | |
6101 | fi | |
6102 | done | |
6103 | IFS="$acl_save_IFS" | |
6104 | if test $HOST_CPU_C_ABI_32BIT = yes; then | |
6105 | # 32-bit ABI. | |
6106 | acl_libdirstem3= | |
6107 | fi | |
6108 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
6109 | # 64-bit ABI. | |
6110 | acl_libdirstem2= | |
6111 | fi | |
6112 | fi | |
6113 | ;; | |
6114 | esac | |
6115 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | |
6116 | test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" | |
6117 | acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" | |
6118 | ||
6119 | fi | |
6120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 | |
6121 | $as_echo "$acl_cv_libdirstems" >&6; } | |
6122 | acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` | |
6123 | acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` | |
6124 | acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` | |
5709 | 6125 | |
5710 | 6126 | |
5711 | 6127 | |
5726 | 6142 | |
5727 | 6143 | eval additional_includedir=\"$includedir\" |
5728 | 6144 | eval additional_libdir=\"$libdir\" |
6145 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
6146 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
5729 | 6147 | |
5730 | 6148 | exec_prefix="$acl_save_exec_prefix" |
5731 | 6149 | prefix="$acl_save_prefix" |
5746 | 6164 | |
5747 | 6165 | eval additional_includedir=\"$includedir\" |
5748 | 6166 | eval additional_libdir=\"$libdir\" |
6167 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
6168 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
5749 | 6169 | |
5750 | 6170 | exec_prefix="$acl_save_exec_prefix" |
5751 | 6171 | prefix="$acl_save_prefix" |
5753 | 6173 | else |
5754 | 6174 | additional_includedir="$withval/include" |
5755 | 6175 | additional_libdir="$withval/$acl_libdirstem" |
5756 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | |
5757 | && ! test -d "$withval/$acl_libdirstem"; then | |
5758 | additional_libdir="$withval/$acl_libdirstem2" | |
5759 | fi | |
6176 | additional_libdir2="$withval/$acl_libdirstem2" | |
6177 | additional_libdir3="$withval/$acl_libdirstem3" | |
5760 | 6178 | fi |
5761 | 6179 | fi |
5762 | 6180 | |
5763 | 6181 | fi |
5764 | 6182 | |
6183 | if test "X$additional_libdir2" = "X$additional_libdir"; then | |
6184 | additional_libdir2= | |
6185 | fi | |
6186 | if test "X$additional_libdir3" = "X$additional_libdir"; then | |
6187 | additional_libdir3= | |
6188 | fi | |
5765 | 6189 | LIBICONV= |
5766 | 6190 | LTLIBICONV= |
5767 | 6191 | INCICONV= |
5807 | 6231 | shrext= |
5808 | 6232 | fi |
5809 | 6233 | if test $use_additional = yes; then |
5810 | dir="$additional_libdir" | |
5811 | if test -n "$acl_shlibext"; then | |
5812 | if test -f "$dir/$libname$shrext"; then | |
5813 | found_dir="$dir" | |
5814 | found_so="$dir/$libname$shrext" | |
5815 | else | |
5816 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
5817 | ver=`(cd "$dir" && \ | |
5818 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
5819 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
5820 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
5821 | | sed 1q ) 2>/dev/null` | |
5822 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
5823 | found_dir="$dir" | |
5824 | found_so="$dir/$libname$shrext.$ver" | |
5825 | fi | |
5826 | else | |
5827 | eval library_names=\"$acl_library_names_spec\" | |
5828 | for f in $library_names; do | |
5829 | if test -f "$dir/$f"; then | |
5830 | found_dir="$dir" | |
5831 | found_so="$dir/$f" | |
5832 | break | |
5833 | fi | |
5834 | done | |
5835 | fi | |
5836 | fi | |
5837 | fi | |
5838 | if test "X$found_dir" = "X"; then | |
5839 | if test -f "$dir/$libname.$acl_libext"; then | |
5840 | found_dir="$dir" | |
5841 | found_a="$dir/$libname.$acl_libext" | |
5842 | fi | |
5843 | fi | |
5844 | if test "X$found_dir" != "X"; then | |
5845 | if test -f "$dir/$libname.la"; then | |
5846 | found_la="$dir/$libname.la" | |
5847 | fi | |
5848 | fi | |
5849 | fi | |
5850 | if test "X$found_dir" = "X"; then | |
5851 | for x in $LDFLAGS $LTLIBICONV; do | |
5852 | ||
5853 | acl_save_prefix="$prefix" | |
5854 | prefix="$acl_final_prefix" | |
5855 | acl_save_exec_prefix="$exec_prefix" | |
5856 | exec_prefix="$acl_final_exec_prefix" | |
5857 | eval x=\"$x\" | |
5858 | exec_prefix="$acl_save_exec_prefix" | |
5859 | prefix="$acl_save_prefix" | |
5860 | ||
5861 | case "$x" in | |
5862 | -L*) | |
5863 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
5864 | if test -n "$acl_shlibext"; then | |
5865 | if test -f "$dir/$libname$shrext"; then | |
6234 | for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do | |
6235 | if test "X$found_dir" = "X"; then | |
6236 | eval dir=\$$additional_libdir_variable | |
6237 | if test -n "$dir"; then | |
6238 | if test -n "$acl_shlibext"; then | |
6239 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
5866 | 6240 | found_dir="$dir" |
5867 | 6241 | found_so="$dir/$libname$shrext" |
5868 | 6242 | else |
5872 | 6246 | | sed -e "s,^$libname$shrext\\\\.,," \ |
5873 | 6247 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ |
5874 | 6248 | | sed 1q ) 2>/dev/null` |
5875 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | |
6249 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
5876 | 6250 | found_dir="$dir" |
5877 | 6251 | found_so="$dir/$libname$shrext.$ver" |
5878 | 6252 | fi |
5879 | 6253 | else |
5880 | 6254 | eval library_names=\"$acl_library_names_spec\" |
5881 | 6255 | for f in $library_names; do |
5882 | if test -f "$dir/$f"; then | |
6256 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
5883 | 6257 | found_dir="$dir" |
5884 | 6258 | found_so="$dir/$f" |
5885 | 6259 | break |
5889 | 6263 | fi |
5890 | 6264 | fi |
5891 | 6265 | if test "X$found_dir" = "X"; then |
5892 | if test -f "$dir/$libname.$acl_libext"; then | |
6266 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
6267 | found_dir="$dir" | |
6268 | found_a="$dir/$libname.$acl_libext" | |
6269 | fi | |
6270 | fi | |
6271 | if test "X$found_dir" != "X"; then | |
6272 | if test -f "$dir/$libname.la"; then | |
6273 | found_la="$dir/$libname.la" | |
6274 | fi | |
6275 | fi | |
6276 | fi | |
6277 | fi | |
6278 | done | |
6279 | fi | |
6280 | if test "X$found_dir" = "X"; then | |
6281 | for x in $LDFLAGS $LTLIBICONV; do | |
6282 | ||
6283 | acl_save_prefix="$prefix" | |
6284 | prefix="$acl_final_prefix" | |
6285 | acl_save_exec_prefix="$exec_prefix" | |
6286 | exec_prefix="$acl_final_exec_prefix" | |
6287 | eval x=\"$x\" | |
6288 | exec_prefix="$acl_save_exec_prefix" | |
6289 | prefix="$acl_save_prefix" | |
6290 | ||
6291 | case "$x" in | |
6292 | -L*) | |
6293 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
6294 | if test -n "$acl_shlibext"; then | |
6295 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
6296 | found_dir="$dir" | |
6297 | found_so="$dir/$libname$shrext" | |
6298 | else | |
6299 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
6300 | ver=`(cd "$dir" && \ | |
6301 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
6302 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
6303 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
6304 | | sed 1q ) 2>/dev/null` | |
6305 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
6306 | found_dir="$dir" | |
6307 | found_so="$dir/$libname$shrext.$ver" | |
6308 | fi | |
6309 | else | |
6310 | eval library_names=\"$acl_library_names_spec\" | |
6311 | for f in $library_names; do | |
6312 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
6313 | found_dir="$dir" | |
6314 | found_so="$dir/$f" | |
6315 | break | |
6316 | fi | |
6317 | done | |
6318 | fi | |
6319 | fi | |
6320 | fi | |
6321 | if test "X$found_dir" = "X"; then | |
6322 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
5893 | 6323 | found_dir="$dir" |
5894 | 6324 | found_a="$dir/$libname.$acl_libext" |
5895 | 6325 | fi |
5911 | 6341 | if test "X$found_so" != "X"; then |
5912 | 6342 | if test "$enable_rpath" = no \ |
5913 | 6343 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ |
5914 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | |
6344 | || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ | |
6345 | || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then | |
5915 | 6346 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" |
5916 | 6347 | else |
5917 | 6348 | haveit= |
5990 | 6421 | fi |
5991 | 6422 | additional_includedir="$basedir/include" |
5992 | 6423 | ;; |
6424 | */$acl_libdirstem3 | */$acl_libdirstem3/) | |
6425 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` | |
6426 | if test "$name" = 'iconv'; then | |
6427 | LIBICONV_PREFIX="$basedir" | |
6428 | fi | |
6429 | additional_includedir="$basedir/include" | |
6430 | ;; | |
5993 | 6431 | esac |
5994 | 6432 | if test "X$additional_includedir" != "X"; then |
5995 | 6433 | if test "X$additional_includedir" != "X/usr/include"; then |
6035 | 6473 | for dep in $dependency_libs; do |
6036 | 6474 | case "$dep" in |
6037 | 6475 | -L*) |
6038 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
6039 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ | |
6040 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | |
6476 | dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
6477 | if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ | |
6478 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ | |
6479 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then | |
6041 | 6480 | haveit= |
6042 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ | |
6043 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | |
6481 | if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ | |
6482 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ | |
6483 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then | |
6044 | 6484 | if test -n "$GCC"; then |
6045 | 6485 | case $host_os in |
6046 | 6486 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
6059 | 6499 | exec_prefix="$acl_save_exec_prefix" |
6060 | 6500 | prefix="$acl_save_prefix" |
6061 | 6501 | |
6062 | if test "X$x" = "X-L$additional_libdir"; then | |
6502 | if test "X$x" = "X-L$dependency_libdir"; then | |
6063 | 6503 | haveit=yes |
6064 | 6504 | break |
6065 | 6505 | fi |
6066 | 6506 | done |
6067 | 6507 | if test -z "$haveit"; then |
6068 | if test -d "$additional_libdir"; then | |
6069 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
6508 | if test -d "$dependency_libdir"; then | |
6509 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" | |
6070 | 6510 | fi |
6071 | 6511 | fi |
6072 | 6512 | haveit= |
6080 | 6520 | exec_prefix="$acl_save_exec_prefix" |
6081 | 6521 | prefix="$acl_save_prefix" |
6082 | 6522 | |
6083 | if test "X$x" = "X-L$additional_libdir"; then | |
6523 | if test "X$x" = "X-L$dependency_libdir"; then | |
6084 | 6524 | haveit=yes |
6085 | 6525 | break |
6086 | 6526 | fi |
6087 | 6527 | done |
6088 | 6528 | if test -z "$haveit"; then |
6089 | if test -d "$additional_libdir"; then | |
6090 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
6529 | if test -d "$dependency_libdir"; then | |
6530 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" | |
6091 | 6531 | fi |
6092 | 6532 | fi |
6093 | 6533 | fi |
6165 | 6605 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" |
6166 | 6606 | done |
6167 | 6607 | fi |
6168 | ||
6169 | 6608 | |
6170 | 6609 | |
6171 | 6610 | |
6377 | 6816 | #endif |
6378 | 6817 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is |
6379 | 6818 | provided. */ |
6380 | if (/* Try standardized names. */ | |
6381 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | |
6382 | /* Try IRIX, OSF/1 names. */ | |
6383 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | |
6384 | /* Try AIX names. */ | |
6385 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | |
6386 | /* Try HP-UX names. */ | |
6387 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | |
6388 | result |= 16; | |
6819 | { | |
6820 | /* Try standardized names. */ | |
6821 | iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); | |
6822 | /* Try IRIX, OSF/1 names. */ | |
6823 | iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); | |
6824 | /* Try AIX names. */ | |
6825 | iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); | |
6826 | /* Try HP-UX names. */ | |
6827 | iconv_t cd4 = iconv_open ("utf8", "eucJP"); | |
6828 | if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) | |
6829 | && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) | |
6830 | result |= 16; | |
6831 | if (cd1 != (iconv_t)(-1)) | |
6832 | iconv_close (cd1); | |
6833 | if (cd2 != (iconv_t)(-1)) | |
6834 | iconv_close (cd2); | |
6835 | if (cd3 != (iconv_t)(-1)) | |
6836 | iconv_close (cd3); | |
6837 | if (cd4 != (iconv_t)(-1)) | |
6838 | iconv_close (cd4); | |
6839 | } | |
6389 | 6840 | return result; |
6390 | 6841 | |
6391 | 6842 | ; |
6475 | 6926 | $am_cv_proto_iconv" >&5 |
6476 | 6927 | $as_echo " |
6477 | 6928 | $am_cv_proto_iconv" >&6; } |
6929 | else | |
6930 | am_cv_proto_iconv_arg1="" | |
6931 | fi | |
6478 | 6932 | |
6479 | 6933 | cat >>confdefs.h <<_ACEOF |
6480 | 6934 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
6481 | 6935 | _ACEOF |
6482 | 6936 | |
6483 | 6937 | |
6484 | fi | |
6485 | 6938 | |
6486 | 6939 | fi |
6487 | 6940 | |
7115 | 7568 | # report actual input values of CONFIG_FILES etc. instead of their |
7116 | 7569 | # values after options handling. |
7117 | 7570 | ac_log=" |
7118 | This file was extended by dosfstools $as_me 4.2, which was | |
7571 | This file was extended by dosfstools $as_me 4.2+git, which was | |
7119 | 7572 | generated by GNU Autoconf 2.69. Invocation command line was |
7120 | 7573 | |
7121 | 7574 | CONFIG_FILES = $CONFIG_FILES |
7172 | 7625 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
7173 | 7626 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
7174 | 7627 | ac_cs_version="\\ |
7175 | dosfstools config.status 4.2 | |
7628 | dosfstools config.status 4.2+git | |
7176 | 7629 | configured by $0, generated by GNU Autoconf 2.69, |
7177 | 7630 | with options \\"\$ac_cs_config\\" |
7178 | 7631 | |
7810 | 8263 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
7811 | 8264 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
7812 | 8265 | as_fn_error $? "Something went wrong bootstrapping makefile fragments |
7813 | for automatic dependency tracking. Try re-running configure with the | |
8266 | for automatic dependency tracking. If GNU make was not used, consider | |
8267 | re-running the configure script with MAKE=\"gmake\" (or whatever is | |
8268 | necessary). You can also try re-running configure with the | |
7814 | 8269 | '--disable-dependency-tracking' option to at least be able to build |
7815 | 8270 | the package (albeit without support for automatic dependency tracking). |
7816 | 8271 | See \`config.log' for more details" "$LINENO" 5; } |
13 | 13 | # You should have received a copy of the GNU General Public License |
14 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 | AC_INIT([dosfstools], [4.2]) | |
16 | AC_INIT([dosfstools], [4.2+git]) | |
17 | 17 | AC_SUBST([RELEASE_DATE], [2021-01-31]) |
18 | 18 | AM_INIT_AUTOMAKE([1.11 foreign subdir-objects parallel-tests]) |
19 | 19 |
0 | dosfstools (4.2+git20210612.1.f414e32-1) UNRELEASED; urgency=low | |
1 | ||
2 | * New upstream snapshot. | |
3 | ||
4 | -- Debian Janitor <janitor@jelmer.uk> Wed, 18 Aug 2021 18:02:21 -0000 | |
5 | ||
0 | 6 | dosfstools (4.2-1) unstable; urgency=medium |
1 | 7 | |
2 | 8 | [ Andreas Bombe ] |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1999-2021 Free Software Foundation, Inc. | |
6 | 6 | |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
0 | 0 | #!/bin/sh |
1 | 1 | # install - install a program, script, or datafile |
2 | 2 | |
3 | scriptversion=2018-03-11.20; # UTC | |
3 | scriptversion=2020-11-14.01; # UTC | |
4 | 4 | |
5 | 5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was |
6 | 6 | # later released in X11R6 (xc/config/util/install.sh) with the |
68 | 68 | # Desired mode of installed file. |
69 | 69 | mode=0755 |
70 | 70 | |
71 | # Create dirs (including intermediate dirs) using mode 755. | |
72 | # This is like GNU 'install' as of coreutils 8.32 (2020). | |
73 | mkdir_umask=22 | |
74 | ||
75 | backupsuffix= | |
71 | 76 | chgrpcmd= |
72 | 77 | chmodcmd=$chmodprog |
73 | 78 | chowncmd= |
98 | 103 | --version display version info and exit. |
99 | 104 | |
100 | 105 | -c (ignored) |
101 | -C install only if different (preserve the last data modification time) | |
106 | -C install only if different (preserve data modification time) | |
102 | 107 | -d create directories instead of installing files. |
103 | 108 | -g GROUP $chgrpprog installed files to GROUP. |
104 | 109 | -m MODE $chmodprog installed files to MODE. |
105 | 110 | -o USER $chownprog installed files to USER. |
111 | -p pass -p to $cpprog. | |
106 | 112 | -s $stripprog installed files. |
113 | -S SUFFIX attempt to back up existing files, with suffix SUFFIX. | |
107 | 114 | -t DIRECTORY install into DIRECTORY. |
108 | 115 | -T report an error if DSTFILE is a directory. |
109 | 116 | |
110 | 117 | Environment variables override the default commands: |
111 | 118 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG |
112 | 119 | RMPROG STRIPPROG |
120 | ||
121 | By default, rm is invoked with -f; when overridden with RMPROG, | |
122 | it's up to you to specify -f if you want it. | |
123 | ||
124 | If -S is not specified, no backups are attempted. | |
125 | ||
126 | Email bug reports to bug-automake@gnu.org. | |
127 | Automake home page: https://www.gnu.org/software/automake/ | |
113 | 128 | " |
114 | 129 | |
115 | 130 | while test $# -ne 0; do |
136 | 151 | -o) chowncmd="$chownprog $2" |
137 | 152 | shift;; |
138 | 153 | |
154 | -p) cpprog="$cpprog -p";; | |
155 | ||
139 | 156 | -s) stripcmd=$stripprog;; |
157 | ||
158 | -S) backupsuffix="$2" | |
159 | shift;; | |
140 | 160 | |
141 | 161 | -t) |
142 | 162 | is_target_a_directory=always |
254 | 274 | dstdir=$dst |
255 | 275 | test -d "$dstdir" |
256 | 276 | dstdir_status=$? |
277 | # Don't chown directories that already exist. | |
278 | if test $dstdir_status = 0; then | |
279 | chowncmd="" | |
280 | fi | |
257 | 281 | else |
258 | 282 | |
259 | 283 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command |
300 | 324 | if test $dstdir_status != 0; then |
301 | 325 | case $posix_mkdir in |
302 | 326 | '') |
303 | # Create intermediate dirs using mode 755 as modified by the umask. | |
304 | # This is like FreeBSD 'install' as of 1997-10-28. | |
305 | umask=`umask` | |
306 | case $stripcmd.$umask in | |
307 | # Optimize common cases. | |
308 | *[2367][2367]) mkdir_umask=$umask;; | |
309 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
310 | ||
311 | *[0-7]) | |
312 | mkdir_umask=`expr $umask + 22 \ | |
313 | - $umask % 100 % 40 + $umask % 20 \ | |
314 | - $umask % 10 % 4 + $umask % 2 | |
315 | `;; | |
316 | *) mkdir_umask=$umask,go-w;; | |
317 | esac | |
318 | ||
319 | 327 | # With -d, create the new directory with the user-specified mode. |
320 | 328 | # Otherwise, rely on $mkdir_umask. |
321 | 329 | if test -n "$dir_arg"; then |
325 | 333 | fi |
326 | 334 | |
327 | 335 | posix_mkdir=false |
328 | case $umask in | |
329 | *[123567][0-7][0-7]) | |
330 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
331 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
332 | ;; | |
333 | *) | |
334 | # Note that $RANDOM variable is not portable (e.g. dash); Use it | |
335 | # here however when possible just to lower collision chance. | |
336 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
337 | ||
338 | trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
339 | ||
340 | # Because "mkdir -p" follows existing symlinks and we likely work | |
341 | # directly in world-writeable /tmp, make sure that the '$tmpdir' | |
342 | # directory is successfully created first before we actually test | |
343 | # 'mkdir -p' feature. | |
344 | if (umask $mkdir_umask && | |
345 | $mkdirprog $mkdir_mode "$tmpdir" && | |
346 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 | |
347 | then | |
348 | if test -z "$dir_arg" || { | |
349 | # Check for POSIX incompatibilities with -m. | |
350 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
351 | # other-writable bit of parent directory when it shouldn't. | |
352 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
353 | test_tmpdir="$tmpdir/a" | |
354 | ls_ld_tmpdir=`ls -ld "$test_tmpdir"` | |
355 | case $ls_ld_tmpdir in | |
356 | d????-?r-*) different_mode=700;; | |
357 | d????-?--*) different_mode=755;; | |
358 | *) false;; | |
359 | esac && | |
360 | $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { | |
361 | ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` | |
362 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
363 | } | |
364 | } | |
365 | then posix_mkdir=: | |
366 | fi | |
367 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" | |
368 | else | |
369 | # Remove any dirs left behind by ancient mkdir implementations. | |
370 | rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null | |
371 | fi | |
372 | trap '' 0;; | |
373 | esac;; | |
336 | # The $RANDOM variable is not portable (e.g., dash). Use it | |
337 | # here however when possible just to lower collision chance. | |
338 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
339 | ||
340 | trap ' | |
341 | ret=$? | |
342 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null | |
343 | exit $ret | |
344 | ' 0 | |
345 | ||
346 | # Because "mkdir -p" follows existing symlinks and we likely work | |
347 | # directly in world-writeable /tmp, make sure that the '$tmpdir' | |
348 | # directory is successfully created first before we actually test | |
349 | # 'mkdir -p'. | |
350 | if (umask $mkdir_umask && | |
351 | $mkdirprog $mkdir_mode "$tmpdir" && | |
352 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 | |
353 | then | |
354 | if test -z "$dir_arg" || { | |
355 | # Check for POSIX incompatibilities with -m. | |
356 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
357 | # other-writable bit of parent directory when it shouldn't. | |
358 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
359 | test_tmpdir="$tmpdir/a" | |
360 | ls_ld_tmpdir=`ls -ld "$test_tmpdir"` | |
361 | case $ls_ld_tmpdir in | |
362 | d????-?r-*) different_mode=700;; | |
363 | d????-?--*) different_mode=755;; | |
364 | *) false;; | |
365 | esac && | |
366 | $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { | |
367 | ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` | |
368 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
369 | } | |
370 | } | |
371 | then posix_mkdir=: | |
372 | fi | |
373 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" | |
374 | else | |
375 | # Remove any dirs left behind by ancient mkdir implementations. | |
376 | rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null | |
377 | fi | |
378 | trap '' 0;; | |
374 | 379 | esac |
375 | 380 | |
376 | 381 | if |
381 | 386 | then : |
382 | 387 | else |
383 | 388 | |
384 | # The umask is ridiculous, or mkdir does not conform to POSIX, | |
389 | # mkdir does not conform to POSIX, | |
385 | 390 | # or it failed possibly due to a race condition. Create the |
386 | 391 | # directory the slow way, step by step, checking for races as we go. |
387 | 392 | |
410 | 415 | prefixes= |
411 | 416 | else |
412 | 417 | if $posix_mkdir; then |
413 | (umask=$mkdir_umask && | |
418 | (umask $mkdir_umask && | |
414 | 419 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break |
415 | 420 | # Don't fail if two instances are running concurrently. |
416 | 421 | test -d "$prefix" || exit 1 |
450 | 455 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 |
451 | 456 | |
452 | 457 | # Copy the file name to the temp name. |
453 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
458 | (umask $cp_umask && | |
459 | { test -z "$stripcmd" || { | |
460 | # Create $dsttmp read-write so that cp doesn't create it read-only, | |
461 | # which would cause strip to fail. | |
462 | if test -z "$doit"; then | |
463 | : >"$dsttmp" # No need to fork-exec 'touch'. | |
464 | else | |
465 | $doit touch "$dsttmp" | |
466 | fi | |
467 | } | |
468 | } && | |
469 | $doit_exec $cpprog "$src" "$dsttmp") && | |
454 | 470 | |
455 | 471 | # and set any options; do chmod last to preserve setuid bits. |
456 | 472 | # |
476 | 492 | then |
477 | 493 | rm -f "$dsttmp" |
478 | 494 | else |
495 | # If $backupsuffix is set, and the file being installed | |
496 | # already exists, attempt a backup. Don't worry if it fails, | |
497 | # e.g., if mv doesn't support -f. | |
498 | if test -n "$backupsuffix" && test -f "$dst"; then | |
499 | $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null | |
500 | fi | |
501 | ||
479 | 502 | # Rename the file to the real destination. |
480 | 503 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || |
481 | 504 | |
490 | 513 | # file should still install successfully. |
491 | 514 | { |
492 | 515 | test ! -f "$dst" || |
493 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
516 | $doit $rmcmd "$dst" 2>/dev/null || | |
494 | 517 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && |
495 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
518 | { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } | |
496 | 519 | } || |
497 | 520 | { echo "$0: cannot unlink or rename $dst" >&2 |
498 | 521 | (exit 1); exit 1 |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.4 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
178 | 178 | CHECKATARI = @CHECKATARI@ |
179 | 179 | CPP = @CPP@ |
180 | 180 | CPPFLAGS = @CPPFLAGS@ |
181 | CSCOPE = @CSCOPE@ | |
182 | CTAGS = @CTAGS@ | |
181 | 183 | CYGPATH_W = @CYGPATH_W@ |
182 | 184 | DEFS = @DEFS@ |
183 | 185 | DEPDIR = @DEPDIR@ |
185 | 187 | ECHO_N = @ECHO_N@ |
186 | 188 | ECHO_T = @ECHO_T@ |
187 | 189 | EGREP = @EGREP@ |
190 | ETAGS = @ETAGS@ | |
188 | 191 | EXEEXT = @EXEEXT@ |
189 | 192 | GREP = @GREP@ |
190 | 193 | INSTALL = @INSTALL@ |
355 | 358 | |
356 | 359 | cscope cscopelist: |
357 | 360 | |
358 | ||
359 | 361 | distdir: $(BUILT_SOURCES) |
360 | 362 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
361 | 363 |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 1996-2021 Free Software Foundation, Inc. | |
6 | 6 | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
7 | 7 | |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.4 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
220 | 220 | unique=`for i in $$list; do \ |
221 | 221 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
222 | 222 | done | $(am__uniquify_input)` |
223 | ETAGS = etags | |
224 | CTAGS = ctags | |
225 | 223 | am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.h.in \ |
226 | 224 | $(top_srcdir)/depcomp |
227 | 225 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
238 | 236 | CHECKATARI = @CHECKATARI@ |
239 | 237 | CPP = @CPP@ |
240 | 238 | CPPFLAGS = @CPPFLAGS@ |
239 | CSCOPE = @CSCOPE@ | |
240 | CTAGS = @CTAGS@ | |
241 | 241 | CYGPATH_W = @CYGPATH_W@ |
242 | 242 | DEFS = @DEFS@ |
243 | 243 | DEPDIR = @DEPDIR@ |
245 | 245 | ECHO_N = @ECHO_N@ |
246 | 246 | ECHO_T = @ECHO_T@ |
247 | 247 | EGREP = @EGREP@ |
248 | ETAGS = @ETAGS@ | |
248 | 249 | EXEEXT = @EXEEXT@ |
249 | 250 | GREP = @GREP@ |
250 | 251 | INSTALL = @INSTALL@ |
710 | 711 | |
711 | 712 | distclean-tags: |
712 | 713 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
713 | ||
714 | 714 | distdir: $(BUILT_SOURCES) |
715 | 715 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
716 | 716 |
181 | 181 | } |
182 | 182 | |
183 | 183 | |
184 | static void usage(int error, int usage_only) | |
184 | static void usage(char *name, int error, int usage_only) | |
185 | 185 | { |
186 | 186 | FILE *f = error ? stderr : stdout; |
187 | 187 | int status = error ? 1 : 0; |
188 | 188 | |
189 | fprintf(f, "Usage: fatlabel [OPTIONS] DEVICE [NEW]\n"); | |
189 | fprintf(f, "fatlabel " VERSION " (" VERSION_DATE ")\n"); | |
190 | fprintf(f, "Usage: %s [OPTIONS] DEVICE [NEW]\n", name); | |
190 | 191 | if (usage_only) |
191 | 192 | exit(status); |
192 | 193 | |
239 | 240 | codepage = strtol(optarg, &tmp, 10); |
240 | 241 | if (!*optarg || isspace(*optarg) || *tmp || errno || codepage < 0 || codepage > INT_MAX) { |
241 | 242 | fprintf(stderr, "Invalid codepage : %s\n", optarg); |
242 | usage(1, 0); | |
243 | usage(argv[0], 1, 0); | |
243 | 244 | } |
244 | 245 | if (!set_dos_codepage(codepage)) |
245 | usage(1, 0); | |
246 | usage(argv[0], 1, 0); | |
246 | 247 | break; |
247 | 248 | |
248 | 249 | case 'V': |
251 | 252 | break; |
252 | 253 | |
253 | 254 | case 'h': |
254 | usage(0, 0); | |
255 | usage(argv[0], 0, 0); | |
255 | 256 | break; |
256 | 257 | |
257 | 258 | case '?': |
258 | usage(1, 0); | |
259 | usage(argv[0], 1, 0); | |
259 | 260 | exit(1); |
260 | 261 | |
261 | 262 | default: |
273 | 274 | } else if (optind == argc - 1) { |
274 | 275 | change = false; |
275 | 276 | } else { |
276 | usage(1, 1); | |
277 | usage(argv[0], 1, 1); | |
277 | 278 | } |
278 | 279 | |
279 | 280 | if (change || reset) |
123 | 123 | rw = interactive = 1; |
124 | 124 | check_atari(); |
125 | 125 | |
126 | printf("fsck.fat " VERSION " (" VERSION_DATE ")\n"); | |
127 | ||
126 | 128 | while ((c = getopt_long(argc, argv, "Aac:d:bfF:lnprStu:UvVwy", |
127 | 129 | long_options, NULL)) != -1) |
128 | 130 | switch (c) { |
227 | 229 | if (optind != argc - 1) |
228 | 230 | usage(argv[0], 2); |
229 | 231 | |
230 | printf("fsck.fat " VERSION " (" VERSION_DATE ")\n"); | |
231 | 232 | fs_open(argv[optind], rw); |
232 | 233 | |
233 | 234 | read_boot(&fs); |
1094 | 1094 | partition[3] = 0; |
1095 | 1095 | |
1096 | 1096 | /* Partition type */ |
1097 | if (le16toh(bs.heads) > 254 || le16toh(bs.secs_track) > 63) { /* CHS values are out of range for MBR, use LBA */ | |
1097 | if (le16toh(bs.heads) > 255 || le16toh(bs.secs_track) > 63) { /* CHS values are out of range for MBR, use LBA */ | |
1098 | 1098 | if (size_fat != 32) |
1099 | 1099 | partition[4] = 0x0E; /* BIG FAT16 (LBA) */ |
1100 | 1100 | else |
1111 | 1111 | partition[4] = 0x0C; /* FAT32 (LBA) */ |
1112 | 1112 | |
1113 | 1113 | /* CHS address of the last sector */ |
1114 | if (le16toh(bs.heads) > 254 || le16toh(bs.secs_track) > 63 || num_sectors >= le16toh(bs.secs_track) * le16toh(bs.heads) * 1024) { | |
1114 | if (le16toh(bs.heads) > 255 || le16toh(bs.secs_track) > 63 || num_sectors >= le16toh(bs.secs_track) * le16toh(bs.heads) * 1024) { | |
1115 | 1115 | /* If CHS address is too large use tuple (1023, 254, 63) */ |
1116 | 1116 | partition[5] = 254; |
1117 | 1117 | partition[6] = 255; |
1215 | 1215 | device_name, le16toh(bs.heads), |
1216 | 1216 | (le16toh(bs.heads) != 1) ? "s" : "", le16toh(bs.secs_track), |
1217 | 1217 | (le16toh(bs.secs_track) != 1) ? "s" : ""); |
1218 | printf("hidden sectors 0x%04x;\n", hidden_sectors); | |
1218 | printf("hidden sectors %u;\n", hidden_sectors); | |
1219 | 1219 | printf("logical sector size is %d,\n", sector_size); |
1220 | 1220 | printf("using 0x%02x media descriptor, with %u sectors;\n", |
1221 | 1221 | (int)(bs.media), (unsigned)num_sectors); |
2 | 2 | |
3 | 3 | scriptversion=2018-03-07.03; # UTC |
4 | 4 | |
5 | # Copyright (C) 2011-2018 Free Software Foundation, Inc. | |
5 | # Copyright (C) 2011-2021 Free Software Foundation, Inc. | |
6 | 6 | # |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
41 | 41 | { |
42 | 42 | cat <<END |
43 | 43 | Usage: |
44 | test-driver --test-name=NAME --log-file=PATH --trs-file=PATH | |
45 | [--expect-failure={yes|no}] [--color-tests={yes|no}] | |
46 | [--enable-hard-errors={yes|no}] [--] | |
44 | test-driver --test-name NAME --log-file PATH --trs-file PATH | |
45 | [--expect-failure {yes|no}] [--color-tests {yes|no}] | |
46 | [--enable-hard-errors {yes|no}] [--] | |
47 | 47 | TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] |
48 | ||
48 | 49 | The '--test-name', '--log-file' and '--trs-file' options are mandatory. |
50 | See the GNU Automake documentation for information. | |
49 | 51 | END |
50 | 52 | } |
51 | 53 | |
102 | 104 | trap "st=141; $do_exit" 13 |
103 | 105 | trap "st=143; $do_exit" 15 |
104 | 106 | |
105 | # Test script is run here. | |
106 | "$@" >$log_file 2>&1 | |
107 | # Test script is run here. We create the file first, then append to it, | |
108 | # to ameliorate tests themselves also writing to the log file. Our tests | |
109 | # don't, but others can (automake bug#35762). | |
110 | : >"$log_file" | |
111 | "$@" >>"$log_file" 2>&1 | |
107 | 112 | estatus=$? |
108 | 113 | |
109 | 114 | if test $enable_hard_errors = no && test $estatus -eq 99; then |
125 | 130 | # know whether the test passed or failed simply by looking at the '.log' |
126 | 131 | # file, without the need of also peaking into the corresponding '.trs' |
127 | 132 | # file (automake bug#11814). |
128 | echo "$res $test_name (exit status: $estatus)" >>$log_file | |
133 | echo "$res $test_name (exit status: $estatus)" >>"$log_file" | |
129 | 134 | |
130 | 135 | # Report outcome to console. |
131 | 136 | echo "${col}${res}${std}: $test_name" |
0 | # Makefile.in generated by automake 1.16.1 from Makefile.am. | |
0 | # Makefile.in generated by automake 1.16.4 from Makefile.am. | |
1 | 1 | # @configure_input@ |
2 | 2 | |
3 | # Copyright (C) 1994-2018 Free Software Foundation, Inc. | |
3 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This Makefile.in is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
298 | 298 | bases='$(TEST_LOGS)'; \ |
299 | 299 | bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ |
300 | 300 | bases=`echo $$bases` |
301 | AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' | |
301 | 302 | RECHECK_LOGS = $(TEST_LOGS) |
302 | 303 | AM_RECURSIVE_TARGETS = check recheck |
303 | 304 | TEST_SUITE_LOG = test-suite.log |
340 | 341 | CHECKATARI = @CHECKATARI@ |
341 | 342 | CPP = @CPP@ |
342 | 343 | CPPFLAGS = @CPPFLAGS@ |
344 | CSCOPE = @CSCOPE@ | |
345 | CTAGS = @CTAGS@ | |
343 | 346 | CYGPATH_W = @CYGPATH_W@ |
344 | 347 | DEFS = @DEFS@ |
345 | 348 | DEPDIR = @DEPDIR@ |
347 | 350 | ECHO_N = @ECHO_N@ |
348 | 351 | ECHO_T = @ECHO_T@ |
349 | 352 | EGREP = @EGREP@ |
353 | ETAGS = @ETAGS@ | |
350 | 354 | EXEEXT = @EXEEXT@ |
351 | 355 | GREP = @GREP@ |
352 | 356 | INSTALL = @INSTALL@ |
708 | 712 | test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ |
709 | 713 | fi; \ |
710 | 714 | echo "$${col}$$br$${std}"; \ |
711 | echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ | |
715 | echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ | |
712 | 716 | echo "$${col}$$br$${std}"; \ |
713 | 717 | create_testsuite_report --maybe-color; \ |
714 | 718 | echo "$$col$$br$$std"; \ |
784 | 788 | @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ |
785 | 789 | @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_LABEL_LOG_DRIVER_FLAGS) $(LABEL_LOG_DRIVER_FLAGS) -- $(LABEL_LOG_COMPILE) \ |
786 | 790 | @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) |
787 | ||
788 | 791 | distdir: $(BUILT_SOURCES) |
789 | 792 | $(MAKE) $(AM_MAKEFLAGS) distdir-am |
790 | 793 |