diff options
116 files changed, 13772 insertions, 9931 deletions
diff --git a/B/dos16/bc.bat b/B/dos16/bc.bat index 16b668d..a0b1bd0 100644 --- a/B/dos16/bc.bat +++ b/B/dos16/bc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Borland C/C++
diff --git a/B/dos16/bc_286.bat b/B/dos16/bc_286.bat index d34231c..5f1b1cd 100644 --- a/B/dos16/bc_286.bat +++ b/B/dos16/bc_286.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Borland C/C++ + Pharlap 286DOS-Extender
diff --git a/B/dos16/bc_pp.bat b/B/dos16/bc_pp.bat index 7ba09e2..224f705 100644 --- a/B/dos16/bc_pp.bat +++ b/B/dos16/bc_pp.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Borland C/C++ + Borland PowerPack 1.0 (DPMI16)
diff --git a/B/dos16/dm.bat b/B/dos16/dm.bat index 504effa..d1e0a42 100644 --- a/B/dos16/dm.bat +++ b/B/dos16/dm.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Digital Mars C/C++
diff --git a/B/dos16/mc.bat b/B/dos16/mc.bat index af2d995..1ceb8db 100644 --- a/B/dos16/mc.bat +++ b/B/dos16/mc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Microsoft C/C++
diff --git a/B/dos16/sc.bat b/B/dos16/sc.bat index fec82ce..6280a0a 100644 --- a/B/dos16/sc.bat +++ b/B/dos16/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Symantec C/C++
diff --git a/B/dos16/tc.bat b/B/dos16/tc.bat index 580d016..7311cbe 100644 --- a/B/dos16/tc.bat +++ b/B/dos16/tc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Turbo C/C++
diff --git a/B/dos16/vc.bat b/B/dos16/vc.bat index 365f09c..3510f2a 100644 --- a/B/dos16/vc.bat +++ b/B/dos16/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Microsoft Visual C/C++
diff --git a/B/dos16/wc.bat b/B/dos16/wc.bat index cb49f61..fdf56a7 100644 --- a/B/dos16/wc.bat +++ b/B/dos16/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 16-bit
@echo // Watcom C/C++
diff --git a/B/dos32/dj2.bat b/B/dos32/dj2.bat index a3f17ba..3d2e3c3 100644 --- a/B/dos32/dj2.bat +++ b/B/dos32/dj2.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // djgpp2 + gcc
diff --git a/B/dos32/dm.bat b/B/dos32/dm.bat index 81adeaa..9359852 100644 --- a/B/dos32/dm.bat +++ b/B/dos32/dm.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Digital Mars C/C++
diff --git a/B/dos32/emx.bat b/B/dos32/emx.bat index a90be62..009bf52 100644 --- a/B/dos32/emx.bat +++ b/B/dos32/emx.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // emx + gcc
diff --git a/B/dos32/highc.bat b/B/dos32/highc.bat index 576da9b..5283372 100644 --- a/B/dos32/highc.bat +++ b/B/dos32/highc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // MetaWare High C/C++ (using Pharlap DOS extender)
diff --git a/B/dos32/ndp.bat b/B/dos32/ndp.bat index a4cf4d4..e6a326f 100644 --- a/B/dos32/ndp.bat +++ b/B/dos32/ndp.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Microway NDP C/C++
diff --git a/B/dos32/sc.bat b/B/dos32/sc.bat index 7364340..36d973b 100644 --- a/B/dos32/sc.bat +++ b/B/dos32/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Symantec C/C++
diff --git a/B/dos32/wc.bat b/B/dos32/wc.bat index 5b6cfe5..beeb90c 100644 --- a/B/dos32/wc.bat +++ b/B/dos32/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Watcom C/C++ (using DOS/4G extender)
diff --git a/B/dos32/wc_c.bat b/B/dos32/wc_c.bat index 1895c70..65b9a4d 100644 --- a/B/dos32/wc_c.bat +++ b/B/dos32/wc_c.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Watcom C/C++ (using CauseWay extender)
diff --git a/B/dos32/wc_d.bat b/B/dos32/wc_d.bat index 28ec9e8..9b1f48c 100644 --- a/B/dos32/wc_d.bat +++ b/B/dos32/wc_d.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Watcom C/C++ (using DOS/32 Advanced extender)
diff --git a/B/dos32/wc_p.bat b/B/dos32/wc_p.bat index 6438851..2cddbd5 100644 --- a/B/dos32/wc_p.bat +++ b/B/dos32/wc_p.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Watcom C/C++ (using PMODE/W extender)
diff --git a/B/dos32/zc.bat b/B/dos32/zc.bat index e1666eb..de0107b 100644 --- a/B/dos32/zc.bat +++ b/B/dos32/zc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // DOS 32-bit
@echo // Zortech C/C++
diff --git a/B/generic/build.sh b/B/generic/build.sh index 6706109..bbbb8a5 100755 --- a/B/generic/build.sh +++ b/B/generic/build.sh @@ -1,7 +1,7 @@ #! /bin/sh -# vi:ts=4:et +## vim:set ts=4 sw=4 et: set -e -echo "// Copyright (C) 1996-2010 Markus F.X.J. Oberhumer" +echo "// Copyright (C) 1996-2017 Markus F.X.J. Oberhumer" echo "//" echo "// Generic Posix/Unix system" echo "// Generic C compiler" diff --git a/B/generic/build_gcc.sh b/B/generic/build_gcc.sh index 8640614..cf7a148 100755 --- a/B/generic/build_gcc.sh +++ b/B/generic/build_gcc.sh @@ -1,5 +1,5 @@ #! /bin/sh -# vi:ts=4:et +## vim:set ts=4 sw=4 et: set -e echo "// Using GNU C compiler." echo "//" @@ -12,13 +12,4 @@ CC="gcc -static" CC="gcc" CFLAGS="-Wall -O2 -fomit-frame-pointer" -# delete the next line to disable assembler support -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -case $UNAME_MACHINE in - i[34567]86) - CC="$CC -m32" - CPPFLAGS="-DLZO_USE_ASM_1" - ;; -esac - . $top_srcdir/B/generic/build.sh diff --git a/B/generic/clean.sh b/B/generic/clean.sh index 35a1063..8966c05 100755 --- a/B/generic/clean.sh +++ b/B/generic/clean.sh @@ -1,6 +1,6 @@ #! /bin/sh -# vi:ts=4:et -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer +## vim:set ts=4 sw=4 et: +# Copyright (C) 1996-2017 Markus F.X.J. Oberhumer rm -f *.o lzop.out diff --git a/B/os2/bc.cmd b/B/os2/bc.cmd index aefe3c1..d3d7f76 100644 --- a/B/os2/bc.cmd +++ b/B/os2/bc.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Borland C/C++
diff --git a/B/os2/emx.bat b/B/os2/emx.bat index 1aa3c14..698e3d1 100644 --- a/B/os2/emx.bat +++ b/B/os2/emx.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // emx + gcc
diff --git a/B/os2/emx.cmd b/B/os2/emx.cmd index 00fc74f..594f599 100644 --- a/B/os2/emx.cmd +++ b/B/os2/emx.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // emx + gcc
diff --git a/B/os2/va.cmd b/B/os2/va.cmd index e193e95..d1fcae3 100644 --- a/B/os2/va.cmd +++ b/B/os2/va.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // IBM Visual Age C/C++
diff --git a/B/os2/wc.bat b/B/os2/wc.bat index 30425d7..30274b1 100644 --- a/B/os2/wc.bat +++ b/B/os2/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Watcom C/C++
diff --git a/B/os2/wc.cmd b/B/os2/wc.cmd index c4667af..eb6d371 100644 --- a/B/os2/wc.cmd +++ b/B/os2/wc.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Watcom C/C++
diff --git a/B/os2/zc.bat b/B/os2/zc.bat index da64a8b..f1e44bf 100644 --- a/B/os2/zc.bat +++ b/B/os2/zc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 32-bit
@echo // Zortech C/C++
diff --git a/B/os2_16/mc.bat b/B/os2_16/mc.bat index 56ef9b4..81483bc 100644 --- a/B/os2_16/mc.bat +++ b/B/os2_16/mc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 16-bit
@echo // Microsoft C/C++
diff --git a/B/os2_16/sc.cmd b/B/os2_16/sc.cmd index 01aae28..928dd9c 100644 --- a/B/os2_16/sc.cmd +++ b/B/os2_16/sc.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 16-bit
@echo // Symantec C/C++
diff --git a/B/os2_16/wc.bat b/B/os2_16/wc.bat index 89b980d..0df66fd 100644 --- a/B/os2_16/wc.bat +++ b/B/os2_16/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 16-bit
@echo // Watcom C/C++
diff --git a/B/os2_16/wc.cmd b/B/os2_16/wc.cmd index 5cc64e7..a92dbf1 100644 --- a/B/os2_16/wc.cmd +++ b/B/os2_16/wc.cmd @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // OS/2 16-bit
@echo // Watcom C/C++
diff --git a/B/win16/bc.bat b/B/win16/bc.bat index 6ed8345..8dda0f2 100644 --- a/B/win16/bc.bat +++ b/B/win16/bc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 16-bit
@echo // Borland C/C++
diff --git a/B/win16/sc.bat b/B/win16/sc.bat index 4f209ed..114fe9e 100644 --- a/B/win16/sc.bat +++ b/B/win16/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 16-bit
@echo // Symantec C/C++ (using WINIO)
diff --git a/B/win16/vc.bat b/B/win16/vc.bat index 0e8e299..e7c903d 100644 --- a/B/win16/vc.bat +++ b/B/win16/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 16-bit
@echo // Microsoft Visual C/C++ (using QuickWin)
diff --git a/B/win16/wc.bat b/B/win16/wc.bat index fa73175..621ee61 100644 --- a/B/win16/wc.bat +++ b/B/win16/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 16-bit
@echo // Watcom C/C++
diff --git a/B/win32/bc.bat b/B/win32/bc.bat index bd8556e..bbf43c2 100644 --- a/B/win32/bc.bat +++ b/B/win32/bc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Borland C/C++
diff --git a/B/win32/cygwin.bat b/B/win32/cygwin.bat index c23970f..285c1d9 100644 --- a/B/win32/cygwin.bat +++ b/B/win32/cygwin.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // cygwin + gcc
diff --git a/B/win32/dm.bat b/B/win32/dm.bat index 4c4c29e..883efcb 100644 --- a/B/win32/dm.bat +++ b/B/win32/dm.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Digital Mars C/C++
diff --git a/B/win32/ic.bat b/B/win32/ic.bat index 95f8f98..eb33f89 100644 --- a/B/win32/ic.bat +++ b/B/win32/ic.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Intel C/C++
@@ -7,7 +7,7 @@ @if "%BECHO%"=="n" echo off
-icl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+icl -nologo -MT -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
@if errorlevel 1 goto error
diff --git a/B/win32/lccwin32.bat b/B/win32/lccwin32.bat index 9483519..7898508 100644 --- a/B/win32/lccwin32.bat +++ b/B/win32/lccwin32.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // lcc-win32
diff --git a/B/win32/mingw.bat b/B/win32/mingw.bat index 5080124..dd804a6 100644 --- a/B/win32/mingw.bat +++ b/B/win32/mingw.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // MinGW + gcc
diff --git a/B/win32/pellesc.bat b/B/win32/pellesc.bat index f24768c..06ca498 100644 --- a/B/win32/pellesc.bat +++ b/B/win32/pellesc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Pelles C
diff --git a/B/win32/pgi.bat b/B/win32/pgi.bat index ffc98af..5f8a212 100644 --- a/B/win32/pgi.bat +++ b/B/win32/pgi.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Portland Group PGI C/C++
diff --git a/B/win32/pw32.bat b/B/win32/pw32.bat index 148d550..1bab7c1 100644 --- a/B/win32/pw32.bat +++ b/B/win32/pw32.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // PW32 + gcc
diff --git a/B/win32/rsxnt.bat b/B/win32/rsxnt.bat index 10a6805..1b43bc3 100644 --- a/B/win32/rsxnt.bat +++ b/B/win32/rsxnt.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // rsxnt + gcc
diff --git a/B/win32/sc.bat b/B/win32/sc.bat index 781c7b6..3beb205 100644 --- a/B/win32/sc.bat +++ b/B/win32/sc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Symantec C/C++
diff --git a/B/win32/vc.bat b/B/win32/vc.bat index d32083b..5354732 100644 --- a/B/win32/vc.bat +++ b/B/win32/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Microsoft Visual C/C++
@@ -7,7 +7,7 @@ @if "%BECHO%"=="n" echo off
-cl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+cl -nologo -MT -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
@if errorlevel 1 goto error
diff --git a/B/win32/wc.bat b/B/win32/wc.bat index 7febea0..2876af3 100644 --- a/B/win32/wc.bat +++ b/B/win32/wc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 32-bit
@echo // Watcom C/C++
diff --git a/B/win64/ic.bat b/B/win64/ic.bat index 8c07921..aae23c8 100644 --- a/B/win64/ic.bat +++ b/B/win64/ic.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (Itanium)
@echo // Intel C/C++
@@ -7,7 +7,7 @@ @if "%BECHO%"=="n" echo off
-icl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+icl -nologo -MT -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
@if errorlevel 1 goto error
diff --git a/B/win64/vc.bat b/B/win64/vc.bat index 02cf45e..4c84008 100644 --- a/B/win64/vc.bat +++ b/B/win64/vc.bat @@ -1,4 +1,4 @@ -@echo // Copyright (C) 1996-2010 Markus F.X.J. Oberhumer
+@echo // Copyright (C) 1996-2017 Markus F.X.J. Oberhumer
@echo //
@echo // Windows 64-bit (AMD64 or Itanium)
@echo // Microsoft Visual C/C++
@@ -7,7 +7,7 @@ @if "%BECHO%"=="n" echo off
-cl -nologo -MD -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
+cl -nologo -MT -O2 -GF -W3 %CFI% -Fe%BEXE% @b\src.rsp %BLDLIBS% /link /map:%BNAME%.map
@if errorlevel 1 goto error
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0364dd9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,207 @@ +# +# CMakeLists.txt --- a "CMake" file for building lzop +# +# This file is part of the lzop file compressor. +# http://www.oberhumer.com/opensource/lzop/ +# +# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer +# All Rights Reserved. +# + +cmake_minimum_required(VERSION 3.0 FATAL_ERROR) + +# +# simple usage example (Unix): +# mkdir -p build && cd build && cmake .. && make +# +# simple usage example (Windows MSVC): +# md build +# cd build +# cmake .. -G "NMake Makefiles" +# nmake +# +# another usage example (Unix): +# mkdir -p build/release-i686 +# cd build/release-i686 +# cmake ../.. \ +# -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS="-m32 -march=i686" \ +# -DCMAKE_INSTALL_PREFIX=/opt/local/prefix-i686 +# make VERBOSE=1 +# make install +# +# see http://www.cmake.org/ for more info +# + +# /*********************************************************************** +# // init +# ************************************************************************/ + +# Disallow in-source builds. Note that you will still have to manually +# clean up a few files if you accidentally try an in-source build. +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},") + message(FATAL_ERROR "ERROR: In-source builds are not allowed.") +endif() + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) +endif() + +project(lzop VERSION 1.04 LANGUAGES C) + +# install directories +if(NOT CMAKE_INSTALL_PREFIX) + message(FATAL_ERROR "ERROR: CMAKE_INSTALL_PREFIX is not defined.") +endif() +include(GNUInstallDirs) + +# FindLZO +include(FindPkgConfig QUIET) +pkg_check_modules(LZO lzo2) +if(NOT LZO_INCLUDE_DIRS) + #set(LZO_INCLUDE_DIRS /usr/local/include) +endif() +if(NOT LZO_LIBRARIES) + set(LZO_LIBRARIES lzo2) +endif() + +# /*********************************************************************** +# // targets +# ************************************************************************/ + +file(GLOB lzop_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") +list(SORT lzop_SOURCES) + +add_executable(lzop ${lzop_SOURCES}) +target_include_directories(lzop PRIVATE ${LZO_INCLUDE_DIRS}) +target_link_libraries(lzop ${LZO_LIBRARIES}) + +# /*********************************************************************** +# // compilation flags +# // this section currently mostly matches the Autoconf version +# ************************************************************************/ + +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckTypeSize) +include(TestBigEndian) + +if(MSVC) + # disable silly warnings about using "deprecated" POSIX functions like fopen() + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() + +# Checks for header files +macro(mfx_check_include_file f var) + check_include_file("${f}" "mfx_${var}") + if(NOT ",${mfx_${var}}," STREQUAL ",,") + add_definitions(-D${var}=1) + set(mfx_${var} 1) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_HEADERS +set(l assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_include_file("${f}" "HAVE_${var}") +endforeach() + +# Checks for typedefs and structures +macro(mfx_check_type_size type var) + check_type_size("${type}" "mfx_${var}") + if("${mfx_${var}}" MATCHES "^[1-9][0-9]*$") + add_definitions(-D${var}=${mfx_${var}}) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_SIZEOF + mfx_CHECK_SIZEOF +set(l short int long "long long" __int16 __int32 __int64 "void *" size_t ptrdiff_t intmax_t uintmax_t intptr_t uintptr_t float double "long double" dev_t fpos_t mode_t off_t ssize_t time_t) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE " \\*" "_P" var "${var}") + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_type_size("${f}" "SIZEOF_${var}") +endforeach() + +# Checks for library functions +macro(mfx_check_function_exists func var) + check_function_exists("${func}" "mfx_${var}") + if(NOT ",${mfx_${var}}," STREQUAL ",,") + add_definitions(-D${var}=1) + set(mfx_${var} 1) + else() + set(mfx_${var} 0) + endif() +endmacro() +# mfx_ACC_CHECK_FUNCS +set(l access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) +foreach(f ${l}) + string(TOUPPER "${f}" var) + string(REGEX REPLACE "[^0-9A-Z_]" "_" var "${var}") + mfx_check_function_exists("${f}" "HAVE_${var}") +endforeach() + +# mfx_ACC_CHECK_ENDIAN +TEST_BIG_ENDIAN(big_endian) +if ("${big_endian}" MATCHES "^1$") + add_definitions(-DACC_ABI_BIG_ENDIAN=1) +elseif ("${big_endian}" MATCHES "^0$") + add_definitions(-DACC_ABI_LITTLE_ENDIAN=1) +else() + message(FATAL_ERROR "ERROR: TEST_BIG_ENDIAN failed with result '${big_endian}'.") +endif() + +# LZOP_HAVE_CONFIG_H +add_definitions(-DACC_CFG_NO_CONFIG_HEADER=1) + +# warnings +foreach(t lzop) + if(CMAKE_C_COMPILER_ID MATCHES "^(Clang|GNU)$") + target_compile_options(${t} PRIVATE -Wall -W -Wcast-qual) + endif() +endforeach() + +# /*********************************************************************** +# // "make test" +# ************************************************************************/ + +include(CTest) +add_test(NAME lzoptest-01 COMMAND lzop "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" -o "COPYING.lzo") + +# /*********************************************************************** +# // "make install" +# ************************************************************************/ + +if(DEFINED CMAKE_INSTALL_FULL_LIBDIR) + +install(TARGETS lzop DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}") + +set(f AUTHORS COPYING NEWS README THANKS doc/lzop.html doc/lzop.man doc/lzop.pod doc/lzop.ps doc/lzop.tex doc/lzop.txt) +install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}") +install(FILES doc/lzop.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1") + +endif() # CMAKE_INSTALL_FULL_LIBDIR + +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.maint.txt") +include("${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.maint.txt") +endif() + +# finally print some info about the build-type +if(CMAKE_CONFIGURATION_TYPES) +message(STATUS "CMAKE_CONFIGURATION_TYPES = ${CMAKE_CONFIGURATION_TYPES}") +endif() +if(CMAKE_BUILD_TYPE) +message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") +endif() + +# vim:set ft=cmake ts=4 sw=4 tw=0 et: @@ -1,8 +1,8 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> + Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. @@ -13,7 +13,7 @@ Introduction export CPPFLAGS=-I/home/user/src/lzo-2.01/include export LDFLAGS=-L/home/user/src/lzo-2.01/src/.libs - [ Note that you must use _absolute_ paths in these envrionment vars. ] + [ Note that you must use _absolute_ paths in these environment vars. ] Then run the usual commands: ./configure diff --git a/Makefile.am b/Makefile.am index cefd5ce..eb64825 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,99 @@ -## Process this file with automake to produce Makefile.in +## Process this file with automake to create Makefile.in # -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer +# Makefile --- Makefile for building lzop # +# This file is part of the lzop file compressor. +# http://www.oberhumer.com/opensource/lzop/ +# +# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer +# All Rights Reserved. +# + +dist_doc_DATA = +dist_man1_MANS = +EXTRA_DIST = +CLEANFILES = +DISTCLEANFILES = +SUFFIXES = .1 .html .man .pod .ps .tex .txt + +##/*********************************************************************** +##// TOPDIR +##************************************************************************/ + +dist_doc_DATA += AUTHORS COPYING NEWS README THANKS +EXTRA_DIST += CMakeLists.txt autoconf/shtool + +dist-hook: dist-hook-1 +dist-hook-1: + cp -pR '$(srcdir)/B/' '$(distdir)/' +.PHONY: dist-hook-1 + +##/*********************************************************************** +##// SUBDIR src +##************************************************************************/ + +bin_PROGRAMS = src/lzop + +src_lzop_SOURCES = \ + src/c_ansic.c src/c_ansim.c src/c_init.c src/c_none.c src/c_screen.c \ + src/compress.c src/djgpp2.c src/filter.c src/frames.c src/help.c \ + src/lzop.c src/mblock.c src/p_lzo.c src/s_curses.c src/s_djgpp2.c \ + src/s_object.c src/s_vcsa.c src/util.c + +EXTRA_DIST += \ + src/conf.h src/console.h src/frames.h src/miniacc.h src/screen.h \ + src/version.h + +##/*********************************************************************** +##// SUBDIR doc +##************************************************************************/ + +built_docs = doc/lzop.html doc/lzop.man doc/lzop.ps doc/lzop.tex doc/lzop.txt +built_mans = doc/lzop.1 + +dist_doc_DATA += $(built_docs) doc/lzop.pod +dist_man1_MANS += $(built_mans) +EXTRA_DIST += doc/magic +DISTCLEANFILES += doc/$(am__dirstamp) +DOCCLEANFILES = + +doc/$(am__dirstamp): + @$(MKDIR_P) doc + @: > doc/$(am__dirstamp) + +doc-clean: + -test -z "$(DOCCLEANFILES)" || rm -f $(DOCCLEANFILES) +.PHONY: doc-clean + +if MAINTAINER_MODE + +CLEANFILES += $(built_docs) $(built_mans) +DOCCLEANFILES += $(built_docs) $(built_mans) + +$(built_docs) $(built_mans) : doc/$(am__dirstamp) +.DELETE_ON_ERROR: $(built_docs) $(built_mans) + +## rules begin +.pod.1: + pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="2017-08-10" $< > $@ + +.pod.html: + pod2html --noindex $< > $@ + -rm -f pod2htm* + +.pod.tex: + pod2latex -out $@ $< + +.pod.txt: + pod2text < $< > $@ + +.1.man: + nroff -man $< > $@ -SUBDIRS = src doc +.1.ps: + groff -man $< > $@ +## rules end -dist-hook: - -rm -rf $(distdir)/autoconf/ - cp -pR $(srcdir)/B/ $(srcdir)/autoconf/ $(distdir)/ - find $(distdir)/ -type l -print0 | xargs -0r rm -f +endif # MAINTAINER_MODE @MAINT@-include $(top_srcdir)/Makefile.maint diff --git a/Makefile.in b/Makefile.in index 2405dd1..6d6c85e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,9 +15,72 @@ @SET_MAKE@ # -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer +# Makefile --- Makefile for building lzop +# +# This file is part of the lzop file compressor. +# http://www.oberhumer.com/opensource/lzop/ # +# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer +# All Rights Reserved. +# + + VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,83 +100,154 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +bin_PROGRAMS = src/lzop$(EXEEXT) +@MAINTAINER_MODE_TRUE@am__append_1 = $(built_docs) $(built_mans) +@MAINTAINER_MODE_TRUE@am__append_2 = $(built_docs) $(built_mans) subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.hin \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - THANKS autoconf/compile autoconf/config.guess \ - autoconf/config.rpath autoconf/config.sub autoconf/depcomp \ - autoconf/install-sh autoconf/ltmain.sh autoconf/mdate-sh \ - autoconf/missing autoconf/mkinstalldirs autoconf/py-compile \ - autoconf/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/autoconf/local.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(docdir)" +PROGRAMS = $(bin_PROGRAMS) +am__dirstamp = $(am__leading_dot)dirstamp +am_src_lzop_OBJECTS = src/c_ansic.$(OBJEXT) src/c_ansim.$(OBJEXT) \ + src/c_init.$(OBJEXT) src/c_none.$(OBJEXT) \ + src/c_screen.$(OBJEXT) src/compress.$(OBJEXT) \ + src/djgpp2.$(OBJEXT) src/filter.$(OBJEXT) src/frames.$(OBJEXT) \ + src/help.$(OBJEXT) src/lzop.$(OBJEXT) src/mblock.$(OBJEXT) \ + src/p_lzo.$(OBJEXT) src/s_curses.$(OBJEXT) \ + src/s_djgpp2.$(OBJEXT) src/s_object.$(OBJEXT) \ + src/s_vcsa.$(OBJEXT) src/util.$(OBJEXT) +src_lzop_OBJECTS = $(am_src_lzop_OBJECTS) +src_lzop_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(src_lzop_SOURCES) +DIST_SOURCES = $(src_lzop_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(dist_man1_MANS) +DATA = $(dist_doc_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.hin +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/config.hin $(top_srcdir)/autoconf/compile \ + $(top_srcdir)/autoconf/config.guess \ + $(top_srcdir)/autoconf/config.sub \ + $(top_srcdir)/autoconf/depcomp \ + $(top_srcdir)/autoconf/install-sh \ + $(top_srcdir)/autoconf/missing \ + $(top_srcdir)/autoconf/mkinstalldirs AUTHORS COPYING ChangeLog \ + INSTALL NEWS README THANKS autoconf/ar-lib autoconf/compile \ + autoconf/config.guess autoconf/config.rpath \ + autoconf/config.sub autoconf/depcomp autoconf/install-sh \ + autoconf/ltmain.sh autoconf/mdate-sh autoconf/missing \ + autoconf/mkinstalldirs autoconf/py-compile autoconf/ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -124,6 +257,9 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ @@ -179,8 +315,6 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ -configure_CFLAGS = @configure_CFLAGS@ -configure_CPPFLAGS = @configure_CPPFLAGS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -218,12 +352,30 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = src doc +dist_doc_DATA = AUTHORS COPYING NEWS README THANKS $(built_docs) \ + doc/lzop.pod +dist_man1_MANS = $(built_mans) +EXTRA_DIST = CMakeLists.txt autoconf/shtool src/conf.h src/console.h \ + src/frames.h src/miniacc.h src/screen.h src/version.h \ + doc/magic +CLEANFILES = $(am__append_1) +DISTCLEANFILES = doc/$(am__dirstamp) +SUFFIXES = .1 .html .man .pod .ps .tex .txt +src_lzop_SOURCES = \ + src/c_ansic.c src/c_ansim.c src/c_init.c src/c_none.c src/c_screen.c \ + src/compress.c src/djgpp2.c src/filter.c src/frames.c src/help.c \ + src/lzop.c src/mblock.c src/p_lzo.c src/s_curses.c src/s_djgpp2.c \ + src/s_object.c src/s_vcsa.c src/util.c + +built_docs = doc/lzop.html doc/lzop.man doc/lzop.ps doc/lzop.tex doc/lzop.txt +built_mans = doc/lzop.1 +DOCCLEANFILES = $(am__append_2) all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -am--refresh: +.SUFFIXES: .1 .html .man .pod .ps .tex .txt .c .o .obj +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -238,7 +390,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -259,10 +410,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status @rm -f stamp-h1 @@ -274,110 +423,204 @@ $(srcdir)/config.hin: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +src/$(am__dirstamp): + @$(MKDIR_P) src + @: > src/$(am__dirstamp) +src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) src/$(DEPDIR) + @: > src/$(DEPDIR)/$(am__dirstamp) +src/c_ansic.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/c_ansim.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/c_init.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/c_none.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/c_screen.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/compress.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/djgpp2.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/filter.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/frames.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/help.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/lzop.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/mblock.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/p_lzo.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/s_curses.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/s_djgpp2.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/s_object.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/s_vcsa.$(OBJEXT): src/$(am__dirstamp) \ + src/$(DEPDIR)/$(am__dirstamp) +src/util.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) + +src/lzop$(EXEEXT): $(src_lzop_OBJECTS) $(src_lzop_DEPENDENCIES) $(EXTRA_src_lzop_DEPENDENCIES) src/$(am__dirstamp) + @rm -f src/lzop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(src_lzop_OBJECTS) $(src_lzop_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f src/*.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/c_ansic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/c_ansim.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/c_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/c_none.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/c_screen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/compress.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/djgpp2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/frames.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/help.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/lzop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mblock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/p_lzo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/s_curses.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/s_djgpp2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/s_object.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/s_vcsa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/util.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man1_MANS)'; \ + list2=''; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-dist_docDATA: $(dist_doc_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +uninstall-dist_docDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -389,15 +632,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -406,9 +645,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -442,34 +703,6 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook @@ -482,36 +715,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -522,8 +761,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -533,17 +772,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -566,13 +807,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -589,128 +838,179 @@ distcleancheck: distclean $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am -check: check-recursive -all-am: Makefile config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-recursive +installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f src/$(DEPDIR)/$(am__dirstamp) + -rm -f src/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive +clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am -distclean: distclean-recursive +distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf src/$(DEPDIR) -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr distclean-tags +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags -dvi: dvi-recursive +dvi: dvi-am dvi-am: -html: html-recursive +html: html-am html-am: -info: info-recursive +info: info-am info-am: -install-data-am: +install-data-am: install-dist_docDATA install-man -install-dvi: install-dvi-recursive +install-dvi: install-dvi-am install-dvi-am: -install-exec-am: +install-exec-am: install-binPROGRAMS -install-html: install-html-recursive +install-html: install-html-am install-html-am: -install-info: install-info-recursive +install-info: install-info-am install-info-am: -install-man: +install-man: install-man1 -install-pdf: install-pdf-recursive +install-pdf: install-pdf-am install-pdf-am: -install-ps: install-ps-recursive +install-ps: install-ps-am install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-recursive +maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf src/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-recursive +mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-compile mostlyclean-generic -pdf: pdf-recursive +pdf: pdf-am pdf-am: -ps: ps-recursive +ps: ps-am ps-am: -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - - -dist-hook: - -rm -rf $(distdir)/autoconf/ - cp -pR $(srcdir)/B/ $(srcdir)/autoconf/ $(distdir)/ - find $(distdir)/ -type l -print0 | xargs -0r rm -f +uninstall-am: uninstall-binPROGRAMS uninstall-dist_docDATA \ + uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-cscope clean-generic cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ + install-data-am install-dist_docDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-dist_docDATA uninstall-man \ + uninstall-man1 + +.PRECIOUS: Makefile + + +dist-hook: dist-hook-1 +dist-hook-1: + cp -pR '$(srcdir)/B/' '$(distdir)/' +.PHONY: dist-hook-1 + +doc/$(am__dirstamp): + @$(MKDIR_P) doc + @: > doc/$(am__dirstamp) + +doc-clean: + -test -z "$(DOCCLEANFILES)" || rm -f $(DOCCLEANFILES) +.PHONY: doc-clean + +@MAINTAINER_MODE_TRUE@$(built_docs) $(built_mans) : doc/$(am__dirstamp) +@MAINTAINER_MODE_TRUE@.DELETE_ON_ERROR: $(built_docs) $(built_mans) + +@MAINTAINER_MODE_TRUE@.pod.1: +@MAINTAINER_MODE_TRUE@ pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="2017-08-10" $< > $@ + +@MAINTAINER_MODE_TRUE@.pod.html: +@MAINTAINER_MODE_TRUE@ pod2html --noindex $< > $@ +@MAINTAINER_MODE_TRUE@ -rm -f pod2htm* + +@MAINTAINER_MODE_TRUE@.pod.tex: +@MAINTAINER_MODE_TRUE@ pod2latex -out $@ $< + +@MAINTAINER_MODE_TRUE@.pod.txt: +@MAINTAINER_MODE_TRUE@ pod2text < $< > $@ + +@MAINTAINER_MODE_TRUE@.1.man: +@MAINTAINER_MODE_TRUE@ nroff -man $< > $@ + +@MAINTAINER_MODE_TRUE@.1.ps: +@MAINTAINER_MODE_TRUE@ groff -man $< > $@ @MAINT@-include $(top_srcdir)/Makefile.maint @@ -2,6 +2,11 @@ User visible changes for lzop -- a very fast file compressor ================================================================== +Changes in 1.04 (10 Aug 2017) + * Happy 20th anniversary release! + * Added CMake build support. + * Assorted minor updates. + Changes in 1.03 (01 Nov 2010) * Assorted minor updates. @@ -9,7 +14,7 @@ Changes in 1.02rc1 (25 Jul 2005) * Made lzop compile with LZO v2. * Under Windows files are now opened using the _O_SEQUENTIAL flag, which results in a major speedup when (de)compressing large files. - * Under MacOS X, the configure script now will use the '-no-cpp-precomp' + * Under Mac OS X, the configure script now will use the '-no-cpp-precomp' compiler option in order to work around bugs in Apple's native "smart" preprocessor. * File sizes > 2GB are correctly displayed. @@ -19,10 +24,10 @@ Changes in 1.01 (27 Apr 2003) the Autoconf build system, enable Autoconf large file support. * Warn about a compressed file's trailing zero bytes only if in verbose mode (for compatibility with recent versions of GNU tar). - * Don't be to strict in favoring stdin - using '--no-stdin' should not + * Don't be too strict in favoring stdin - using '--no-stdin' should not be necessary any longer in cron jobs. * Added option '-P' to save/restore the path name of a compressed file. - * Added option '--crc32' to use a crc32 instead of a adler32 checksum. + * Added option '--crc32' to use a crc32 instead of an adler32 checksum. * Fixed an assertion that could trigger in very rare cases. Changes in 1.00 (27 Apr 1998) @@ -5,8 +5,8 @@ lzop -- a very fast file compressor Author : Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzop/ -Version : 1.03 -Date : 01-Nov-2010 +Version : 1.04 +Date : 10-Aug-2017 Introduction @@ -30,13 +30,13 @@ See the file NEWS for a list of major changes in the current release. See the file INSTALL for compilation and installation instructions. -General functionality and behaviour has been modelled very closely +General functionality and behavior has been modelled very closely after gzip. The main differences between lzop and gzip are: - Files compressed by lzop will have the suffix '.lzo' -- lzop does not delete the input file(s) by default. - You have to use the option '-U' if you want this behaviour. +- lzop does not delete the input file(s) by default. But you can + use the option '-U' to achieve that. lzop uses the LZO data compression library for compression @@ -45,8 +45,8 @@ services. See http://www.oberhumer.com/opensource/lzo/ . Directory overview: ------------------- -acconfig Autoconf configuration files (UNIX specific) -B various support files for DOS, Windows, OS/2, ... +autoconf Autoconf configuration files (UNIX specific) +B various build support files for DOS, Windows, OS/2, ... doc documentation in various formats src source code @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,408 +11,16 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# /*********************************************************************** -# // standard ACC macros -# ************************************************************************/ - -AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ -AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) -])# - -AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ -AC_HEADER_TIME -AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) -])# - -AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ -AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) -])# - - -AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) - -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(__int16) -AC_CHECK_SIZEOF(__int32) -AC_CHECK_SIZEOF(__int64) - -AC_CHECK_SIZEOF(void *) -AC_CHECK_SIZEOF(size_t) -AC_CHECK_SIZEOF(ptrdiff_t) -])# - - -# /*********************************************************************** -# // Check for ACC_conformance -# ************************************************************************/ - -AC_DEFUN([mfx_ACC_ACCCHK], [ -mfx_tmp=$1 -mfx_save_CPPFLAGS=$CPPFLAGS -dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" - -AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) - -AC_LANG_CONFTEST([AC_LANG_PROGRAM( -[[#define ACC_CONFIG_NO_HEADER 1 -#include "acc/acc.h" -#include "acc/acc_incd.h" -#undef ACCCHK_ASSERT -#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -#include "acc/acc_chk.ch" -#undef ACCCHK_ASSERT -static void test_acc_compile_time_assert(void) { -#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -#include "acc/acc_chk.ch" -#undef ACCCHK_ASSERT -} -#undef NDEBUG -#include <assert.h> -static int test_acc_run_time_assert(int r) { -#define ACCCHK_ASSERT(expr) assert(expr); -#include "acc/acc_chk.ch" -#undef ACCCHK_ASSERT -return r; -} -]], [[ -test_acc_compile_time_assert(); -if (test_acc_run_time_assert(1) != 1) return 1; -]] -)]) - -mfx_tmp=FAILED -_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -rm -f conftest.$ac_ext conftest.$ac_objext - -CPPFLAGS=$mfx_save_CPPFLAGS - -AC_MSG_RESULT([$mfx_tmp]) -case x$mfx_tmp in - xpassed | xyes) ;; - *) - AC_MSG_NOTICE([]) - AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) - AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) - AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) - AC_MSG_NOTICE([Thanks for your support.]) - AC_MSG_NOTICE([]) - AC_MSG_ERROR([ACC conformance test failed. Stop.]) -dnl AS_EXIT - ;; -esac -])# mfx_ACC_ACCCHK - - -# /*********************************************************************** -# // Check for ACC_conformance -# ************************************************************************/ - -AC_DEFUN([mfx_MINIACC_ACCCHK], [ -mfx_tmp=$1 -mfx_save_CPPFLAGS=$CPPFLAGS -dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" - -AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) - -AC_LANG_CONFTEST([AC_LANG_PROGRAM( -[[#define ACC_CONFIG_NO_HEADER 1 -#define ACC_WANT_ACC_INCD_H 1 -#include $2 - -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT -#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -#include $2 - -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT -#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -static void test_acc_compile_time_assert(void) { -#include $2 -} - -#undef NDEBUG -#include <assert.h> -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT -#define ACCCHK_ASSERT(expr) assert(expr); -static int test_acc_run_time_assert(int r) { -#include $2 -return r; -} -]], [[ -test_acc_compile_time_assert(); -if (test_acc_run_time_assert(1) != 1) return 1; -]] -)]) - -mfx_tmp=FAILED -_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -rm -f conftest.$ac_ext conftest.$ac_objext - -CPPFLAGS=$mfx_save_CPPFLAGS - -AC_MSG_RESULT([$mfx_tmp]) -case x$mfx_tmp in - xpassed | xyes) ;; - *) - AC_MSG_NOTICE([]) - AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) - AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) - AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) - AC_MSG_NOTICE([Thanks for your support.]) - AC_MSG_NOTICE([]) - AC_MSG_ERROR([ACC conformance test failed. Stop.]) -dnl AS_EXIT - ;; -esac -])# mfx_MINIACC_ACCCHK - - - -# serial 1 - -AC_DEFUN([mfx_PROG_CPPFLAGS], [ -AC_MSG_CHECKING([whether the C preprocessor needs special flags]) - -AC_LANG_CONFTEST([AC_LANG_PROGRAM( -[[#include <limits.h> -#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -# include "your C preprocessor is broken 1" -#elif (0xffffu == 0xfffffffful) -# include "your C preprocessor is broken 2" -#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) -# include "your C preprocessor is broken 3" -#endif -]], [[ ]] -)]) - -mfx_save_CPPFLAGS=$CPPFLAGS -mfx_tmp=ERROR -for mfx_arg in "" -no-cpp-precomp -do - CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" - _AC_COMPILE_IFELSE([], -[mfx_tmp=$mfx_arg -break]) -done -CPPFLAGS=$mfx_save_CPPFLAGS -rm -f conftest.$ac_ext conftest.$ac_objext -case x$mfx_tmp in - x) - AC_MSG_RESULT([none needed]) ;; - xERROR) - AC_MSG_RESULT([ERROR]) - AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) - ;; - *) - AC_MSG_RESULT([$mfx_tmp]) - CPPFLAGS="$mfx_tmp $CPPFLAGS" - ;; -esac -])# mfx_PROG_CPPFLAGS - - - -# serial 3 - -AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ -AC_CACHE_CHECK([whether limits.h is sane], -mfx_cv_header_sane_limits_h, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h> -#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -# if defined(__APPLE__) && defined(__GNUC__) -# error "your preprocessor is broken - use compiler option -no-cpp-precomp" -# else -# include "your preprocessor is broken" -# endif -#endif -#define MFX_0xffff 0xffff -#define MFX_0xffffffffL 4294967295ul -#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -# include "error CHAR_BIT" -#endif -#if !defined(UCHAR_MAX) -# include "error UCHAR_MAX 1" -#endif -#if !defined(USHRT_MAX) -# include "error USHRT_MAX 1" -#endif -#if !defined(UINT_MAX) -# include "error UINT_MAX 1" -#endif -#if !defined(ULONG_MAX) -# include "error ULONG_MAX 1" -#endif -#if !defined(SHRT_MAX) -# include "error SHRT_MAX 1" -#endif -#if !defined(INT_MAX) -# include "error INT_MAX 1" -#endif -#if !defined(LONG_MAX) -# include "error LONG_MAX 1" -#endif -#if (UCHAR_MAX < 1) -# include "error UCHAR_MAX 2" -#endif -#if (USHRT_MAX < 1) -# include "error USHRT_MAX 2" -#endif -#if (UINT_MAX < 1) -# include "error UINT_MAX 2" -#endif -#if (ULONG_MAX < 1) -# include "error ULONG_MAX 2" -#endif -#if (UCHAR_MAX < 0xff) -# include "error UCHAR_MAX 3" -#endif -#if (USHRT_MAX < MFX_0xffff) -# include "error USHRT_MAX 3" -#endif -#if (UINT_MAX < MFX_0xffff) -# include "error UINT_MAX 3" -#endif -#if (ULONG_MAX < MFX_0xffffffffL) -# include "error ULONG_MAX 3" -#endif -#if (USHRT_MAX > UINT_MAX) -# include "error USHRT_MAX vs UINT_MAX" -#endif -#if (UINT_MAX > ULONG_MAX) -# include "error UINT_MAX vs ULONG_MAX" -#endif -]], [[ -#if (USHRT_MAX == MFX_0xffff) -{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } -#elif (USHRT_MAX >= MFX_0xffff) -{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } -#endif -#if (UINT_MAX == MFX_0xffff) -{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } -#elif (UINT_MAX >= MFX_0xffff) -{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } -#endif -#if (ULONG_MAX == MFX_0xffff) -{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } -#elif (ULONG_MAX >= MFX_0xffff) -{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } -#endif -#if !defined(_CRAY1) /* CRAY PVP systems */ -#if (USHRT_MAX == MFX_0xffffffffL) -{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } -#elif (USHRT_MAX >= MFX_0xffffffffL) -{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } -#endif -#endif /* _CRAY1 */ -#if (UINT_MAX == MFX_0xffffffffL) -{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } -#elif (UINT_MAX >= MFX_0xffffffffL) -{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } -#endif -#if (ULONG_MAX == MFX_0xffffffffL) -{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } -#elif (ULONG_MAX >= MFX_0xffffffffL) -{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } -#endif -]])], -[mfx_cv_header_sane_limits_h=yes], -[mfx_cv_header_sane_limits_h=no])]) -]) - -# /*********************************************************************** -# // -# ************************************************************************/ - -dnl more types which are not yet covered by ACC - -AC_DEFUN([mfx_CHECK_SIZEOF], [ -AC_CHECK_SIZEOF(__int32) -AC_CHECK_SIZEOF(intmax_t) -AC_CHECK_SIZEOF(uintmax_t) -AC_CHECK_SIZEOF(intptr_t) -AC_CHECK_SIZEOF(uintptr_t) - -AC_CHECK_SIZEOF(float) -AC_CHECK_SIZEOF(double) -AC_CHECK_SIZEOF(long double) - -AC_CHECK_SIZEOF(dev_t) -AC_CHECK_SIZEOF(fpos_t) -AC_CHECK_SIZEOF(mode_t) -AC_CHECK_SIZEOF(off_t) -AC_CHECK_SIZEOF(ssize_t) -AC_CHECK_SIZEOF(time_t) -])# - - - -AC_DEFUN([mfx_CHECK_LIB_WINMM], [ -if test "X$GCC" = Xyes; then -case $host_os in -cygwin* | mingw* | pw32*) - test "X$LIBS" != "X" && LIBS="$LIBS " - LIBS="${LIBS}-lwinmm" ;; -*) - ;; -esac -fi -])# - +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -#serial 7 - -# Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim, -# if it exists. - -AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC], - [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim], - ac_cv_struct_st_mtim_nsec, - [ac_save_CPPFLAGS="$CPPFLAGS" - ac_cv_struct_st_mtim_nsec=no - # tv_nsec -- the usual case - # _tv_nsec -- Solaris 2.6, if - # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1 - # && !defined __EXTENSIONS__) - # st__tim.tv_nsec -- UnixWare 2.1.2 - for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do - CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -#include <sys/stat.h>]], [[struct stat s; s.st_mtim.ST_MTIM_NSEC;]])], - [ac_cv_struct_st_mtim_nsec=$ac_val; break],[]) - done - CPPFLAGS="$ac_save_CPPFLAGS"]) - - if test $ac_cv_struct_st_mtim_nsec != no; then - AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, - [Define to be the nanoseconds member of struct stat's st_mtim, - if it exists.]) - fi - ] -) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -424,10 +32,10 @@ AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -443,22 +51,42 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +# Figure out how to run the assembler. -*- Autoconf -*- + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AS +# ---------- +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -477,7 +105,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -495,30 +123,26 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -537,16 +161,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -556,7 +178,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -569,12 +191,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -582,8 +205,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -622,16 +246,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -640,16 +264,16 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -697,7 +321,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -707,34 +331,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -747,7 +376,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -759,21 +388,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -791,7 +418,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -801,18 +428,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -825,7 +455,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -854,33 +484,42 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -889,34 +528,82 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -938,7 +625,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -949,7 +636,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -957,16 +644,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -983,20 +668,17 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -1004,13 +686,14 @@ AC_DEFUN([AM_MAINTAINER_MODE], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -1018,18 +701,14 @@ AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -1047,7 +726,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -1074,15 +753,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -1090,11 +766,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -1107,63 +782,35 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1174,24 +821,82 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1202,32 +907,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1237,36 +950,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1274,34 +1036,32 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1309,24 +1069,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1336,75 +1094,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/autoconf/ar-lib b/autoconf/ar-lib new file mode 100755 index 0000000..05094d3 --- /dev/null +++ b/autoconf/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Written by Peter Rosin <peda@lysator.liu.se>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <<EOF +Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...] + +Members may be specified in a file named with @FILE. +EOF + exit $? + ;; + -v | --v*) + echo "$me, version $scriptversion" + exit $? + ;; +esac + +if test $# -lt 3; then + func_error "you must specify a program, an action and an archive" +fi + +AR=$1 +shift +while : +do + if test $# -lt 2; then + func_error "you must specify a program, an action and an archive" + fi + case $1 in + -lib | -LIB \ + | -ltcg | -LTCG \ + | -machine* | -MACHINE* \ + | -subsystem* | -SUBSYSTEM* \ + | -verbose | -VERBOSE \ + | -wx* | -WX* ) + AR="$AR $1" + shift + ;; + *) + action=$1 + shift + break + ;; + esac +done +orig_archive=$1 +shift +func_file_conv "$orig_archive" +archive=$file + +# strip leading dash in $action +action=${action#-} + +delete= +extract= +list= +quick= +replace= +index= +create= + +while test -n "$action" +do + case $action in + d*) delete=yes ;; + x*) extract=yes ;; + t*) list=yes ;; + q*) quick=yes ;; + r*) replace=yes ;; + s*) index=yes ;; + S*) ;; # the index is always updated implicitly + c*) create=yes ;; + u*) ;; # TODO: don't ignore the update modifier + v*) ;; # TODO: don't ignore the verbose modifier + *) + func_error "unknown action specified" + ;; + esac + action=${action#?} +done + +case $delete$extract$list$quick$replace,$index in + yes,* | ,yes) + ;; + yesyes*) + func_error "more than one action specified" + ;; + *) + func_error "no action specified" + ;; +esac + +if test -n "$delete"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + for member + do + case $1 in + @*) + func_at_file "${1#@}" -REMOVE "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $? + ;; + esac + done + +elif test -n "$extract"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + if test $# -gt 0; then + for member + do + case $1 in + @*) + func_at_file "${1#@}" -EXTRACT "$archive" + ;; + *) + func_file_conv "$1" + $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $? + ;; + esac + done + else + $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member + do + $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $? + done + fi + +elif test -n "$quick$replace"; then + if test ! -f "$orig_archive"; then + if test -z "$create"; then + echo "$me: creating $orig_archive" + fi + orig_archive= + else + orig_archive=$archive + fi + + for member + do + case $1 in + @*) + func_file_conv "${1#@}" + set x "$@" "@$file" + ;; + *) + func_file_conv "$1" + set x "$@" "$file" + ;; + esac + shift + shift + done + + if test -n "$orig_archive"; then + $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $? + else + $AR -NOLOGO -OUT:"$archive" "$@" || exit $? + fi + +elif test -n "$list"; then + if test ! -f "$orig_archive"; then + func_error "archive not found" + fi + $AR -NOLOGO -LIST "$archive" || exit $? +fi diff --git a/autoconf/compile b/autoconf/compile index 46caccc..2ab71e4 100755 --- a/autoconf/compile +++ b/autoconf/compile @@ -1,10 +1,9 @@ #! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. +# Wrapper for compilers which do not understand '-c -o'. -scriptversion=2010-09-21.14; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -40,7 +39,7 @@ file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file -# Currently only supports Win32 hosts. If the determined conversion +# Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () @@ -79,6 +78,53 @@ func_file_conv () esac } +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () @@ -94,7 +140,7 @@ func_cl_wrapper () else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. + # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) @@ -109,43 +155,34 @@ func_cl_wrapper () ;; esac ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; -l*) - lib=${1#-l} - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - set x "$@" "$dir/$lib.dll.lib" - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - set x "$@" "$dir/$lib.lib" - break - fi - done - IFS=$save_IFS - - test "$found" != yes && set x "$@" "$lib.lib" + func_cl_dashl "${1#-l}" + set x "$@" "$lib" shift ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; -L*) - func_file_conv "${1#-L}" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" + func_cl_dashL "${1#-L}" ;; -static) shared=false @@ -192,21 +229,23 @@ func_cl_wrapper () exit 1 } +eat= + case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-automake@gnu.org>. EOF @@ -216,14 +255,14 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= -eat= for arg do @@ -232,8 +271,8 @@ do else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) @@ -260,10 +299,10 @@ do done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a + # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also + # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi @@ -272,7 +311,7 @@ fi cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d @@ -304,6 +343,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/config.guess b/autoconf/config.guess index 4c8f032..a744844 100755 --- a/autoconf/config.guess +++ b/autoconf/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2010-09-24' +timestamp='2017-08-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2010-09-24' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to <config-patches@gnu.org>. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -92,7 +84,7 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' HUP INT TERM +trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -106,7 +98,7 @@ trap 'exit 1' HUP INT TERM set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || @@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -155,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -181,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release @@ -194,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -218,13 +256,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; + *:Redox:*:*) + echo ${UNAME_MACHINE}-unknown-redox + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -234,43 +278,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,12 +343,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -339,16 +386,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -373,7 +420,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -395,23 +442,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +528,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +542,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -559,8 +606,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -595,58 +643,58 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -659,12 +707,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -731,22 +779,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -769,15 +817,15 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -789,30 +837,36 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -849,15 +903,22 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -867,52 +928,62 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -931,54 +1002,69 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -987,11 +1073,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1023,7 +1109,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1051,13 +1137,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1092,8 +1178,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1136,10 +1222,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm @@ -1165,11 +1251,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1182,6 +1268,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1200,6 +1289,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1208,24 +1300,43 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1234,15 +1345,18 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1256,7 +1370,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1282,13 +1396,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1298,7 +1412,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1306,174 +1420,28 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi +esac cat >&2 <<EOF $0: unable to guess system type -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff --git a/autoconf/config.rpath b/autoconf/config.rpath index 17298f2..af3c415 100755 --- a/autoconf/config.rpath +++ b/autoconf/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2010 Free Software Foundation, Inc. +# Copyright 1996-2017 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -57,13 +57,6 @@ else aix*) wl='-Wl,' ;; - darwin*) - case $cc_basename in - xlc*) - wl='-Wl,' - ;; - esac - ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) @@ -72,9 +65,7 @@ else irix5* | irix6* | nonstopux*) wl='-Wl,' ;; - newsos6) - ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' @@ -85,17 +76,26 @@ else lf95*) wl='-Wl,' ;; - pgcc | pgf77 | pgf90) + nagfor*) + wl='-Wl,-Wl,,' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; + xl* | bgxl* | bgf* | mpixl*) + wl='-Wl,' + ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ F* | *Sun*Fortran*) + wl= + ;; *Sun\ C*) wl='-Wl,' ;; @@ -103,13 +103,24 @@ else ;; esac ;; + newsos6) + ;; + *nto* | *qnx*) + ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) - wl='-Wl,' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + wl='-Qoption ld ' + ;; + *) + wl='-Wl,' + ;; + esac ;; sunos4*) wl='-Qoption ld ' @@ -171,15 +182,14 @@ if test "$with_gnu_ld" = yes; then fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we cannot use - # them. - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then @@ -198,11 +208,13 @@ if test "$with_gnu_ld" = yes; then ld_shlibs=no fi ;; + haiku*) + ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; - gnu* | linux* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else @@ -325,10 +337,14 @@ else fi ;; amigaos*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no + case "$host_cpu" in + powerpc) + ;; + m68k) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac ;; bsdi[45]*) ;; @@ -342,29 +358,16 @@ else ;; darwin* | rhapsody*) hardcode_direct=no - if test "$GCC" = yes ; then + if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else - case $cc_basename in - xlc*) - ;; - *) - ld_shlibs=no - ;; - esac + ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd1*) - ld_shlibs=no - ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -420,6 +423,8 @@ else hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; + *nto* | *qnx*) + ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes @@ -515,7 +520,12 @@ case "$host_os" in library_names_spec='$libname$shrext' ;; amigaos*) - library_names_spec='$libname.a' + case "$host_cpu" in + powerpc*) + library_names_spec='$libname$shrext' ;; + m68k) + library_names_spec='$libname.a' ;; + esac ;; beos*) library_names_spec='$libname$shrext' @@ -534,19 +544,18 @@ case "$host_os" in dgux*) library_names_spec='$libname$shrext' ;; - freebsd1*) + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac + library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; + haiku*) + library_names_spec='$libname$shrext' + ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) @@ -582,7 +591,7 @@ case "$host_os" in ;; linux*oldld* | linux*aout* | linux*coff*) ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) @@ -594,7 +603,7 @@ case "$host_os" in newsos6) library_names_spec='$libname$shrext' ;; - nto-qnx*) + *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) @@ -625,6 +634,9 @@ case "$host_os" in sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; + tpf*) + library_names_spec='$libname$shrext' + ;; uts4*) library_names_spec='$libname$shrext' ;; diff --git a/autoconf/config.sub b/autoconf/config.sub index 320e303..40ea5df 100755 --- a/autoconf/config.sub +++ b/autoconf/config.sub @@ -1,38 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2010-09-11' +timestamp='2017-04-02' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -40,7 +33,7 @@ timestamp='2010-09-11' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -60,8 +53,7 @@ timestamp='2010-09-11' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -75,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -125,13 +115,17 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -154,12 +148,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -175,10 +169,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -223,6 +217,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,20 +247,29 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -274,34 +283,41 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ - | rx \ + | riscv32 | riscv64 \ + | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; @@ -314,8 +330,10 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -325,6 +343,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -339,25 +372,32 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -371,35 +411,45 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -424,7 +474,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -474,6 +524,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -507,7 +560,7 @@ case $basic_machine in basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -539,7 +592,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -594,6 +647,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -697,7 +758,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -736,6 +796,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -755,11 +818,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -787,6 +854,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -794,10 +865,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -862,15 +941,18 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - neo-tandem) + neo-tandem) basic_machine=neo-tandem ;; - nse-tandem) + nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -950,11 +1032,12 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -964,7 +1047,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -977,7 +1060,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1046,6 +1133,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1102,13 +1192,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1163,6 +1248,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1178,6 +1266,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1275,11 +1366,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1303,29 +1394,30 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1364,7 +1456,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1413,7 +1505,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1449,17 +1541,16 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; + -ios) + ;; -none) ;; *) @@ -1482,10 +1573,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1497,8 +1588,14 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf ;; tic54x-*) os=-coff @@ -1527,14 +1624,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1552,6 +1646,9 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; @@ -1561,7 +1658,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/autoconf/depcomp b/autoconf/depcomp index c3163be..b687232 100755 --- a/autoconf/depcomp +++ b/autoconf/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2010-10-07.20; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +27,9 @@ scriptversion=2010-10-07.20; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,11 +39,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,26 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -122,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -131,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -145,31 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -180,59 +251,21 @@ hp) exit 1 ;; -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -245,9 +278,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -256,44 +287,100 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -305,8 +392,8 @@ icc) sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -317,9 +404,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -330,8 +416,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -341,77 +426,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -422,8 +491,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -441,14 +509,15 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -476,7 +545,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -496,18 +565,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -557,12 +626,15 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -579,7 +651,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -598,10 +670,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -633,23 +705,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -679,6 +751,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/install-sh b/autoconf/install-sh index 3f83ce9..0360b79 100755 --- a/autoconf/install-sh +++ b/autoconf/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2010-02-06.18; # UTC +scriptversion=2016-01-11.22; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,25 +35,21 @@ scriptversion=2010-02-06.18; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,42 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -186,6 +186,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,12 +198,21 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -215,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -232,9 +245,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -256,51 +269,20 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -311,74 +293,74 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -388,53 +370,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -469,15 +449,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -490,24 +467,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -519,6 +496,6 @@ done # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/local.m4 b/autoconf/local.m4 new file mode 100644 index 0000000..6874f2f --- /dev/null +++ b/autoconf/local.m4 @@ -0,0 +1,679 @@ +dnl Serial 3 mfx/m4/acc.m4 + +AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ +AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) +]) + +AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ +AC_HEADER_TIME +AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) +]) + +AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ +AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) +]) + +AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) + +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(__int16) +AC_CHECK_SIZEOF(__int32) +AC_CHECK_SIZEOF(__int64) + +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(size_t) +AC_CHECK_SIZEOF(ptrdiff_t) +]) + +AC_DEFUN([mfx_ACC_ACCCHK], [ +mfx_tmp=$1 +mfx_save_CPPFLAGS=$CPPFLAGS +dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here +test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" + +AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#define ACC_CFG_NO_CONFIG_HEADER 1 +#include "acc/acc.h" +#include "acc/acc_incd.h" + +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) +#include "acc/acc_chk.ch" + +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) +static void test_acc_compile_time_assert(void) { +#include "acc/acc_chk.ch" +} + +#undef NDEBUG +#include <assert.h> +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) assert(expr); +static int test_acc_run_time_assert(int r) { +#include "acc/acc_chk.ch" +return r; +} +]], [[ +test_acc_compile_time_assert(); +if (test_acc_run_time_assert(1) != 1) return 1; +]] +)]) + +mfx_tmp=FAILED +_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) +rm -f conftest.$ac_ext conftest.$ac_objext + +CPPFLAGS=$mfx_save_CPPFLAGS + +AC_MSG_RESULT([$mfx_tmp]) +case x$mfx_tmp in + xpassed | xyes) ;; + *) + AC_MSG_NOTICE([]) + AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) + AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) + AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) + AC_MSG_NOTICE([Thanks for your support.]) + AC_MSG_NOTICE([]) + AC_MSG_ERROR([ACC conformance test failed. Stop.]) +dnl AS_EXIT + ;; +esac +]) + +dnl Serial 3 mfx/m4/acc_miniacc.m4 + +AC_DEFUN([mfx_MINIACC_ACCCHK], [ +mfx_tmp=$1 +mfx_save_CPPFLAGS=$CPPFLAGS +dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here +test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" + +AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#define ACC_CFG_NO_CONFIG_HEADER 1 +#define ACC_WANT_ACC_INCD_H 1 +#include $2 + +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) +#define ACC_WANT_ACC_CHK_CH 1 +#include $2 + +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) +static void test_acc_compile_time_assert(void) { +#define ACC_WANT_ACC_CHK_CH 1 +#include $2 +} + +#undef NDEBUG +#include <assert.h> +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) assert(expr); +static int test_acc_run_time_assert(int r) { +#define ACC_WANT_ACC_CHK_CH 1 +#include $2 +return r; +} +]], [[ +test_acc_compile_time_assert(); +if (test_acc_run_time_assert(1) != 1) return 1; +]] +)]) + +mfx_tmp=FAILED +_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) +rm -f conftest.$ac_ext conftest.$ac_objext + +CPPFLAGS=$mfx_save_CPPFLAGS + +AC_MSG_RESULT([$mfx_tmp]) +case x$mfx_tmp in + xpassed | xyes) ;; + *) + AC_MSG_NOTICE([]) + AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) + AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) + AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) + AC_MSG_NOTICE([Thanks for your support.]) + AC_MSG_NOTICE([]) + AC_MSG_ERROR([ACC conformance test failed. Stop.]) +dnl AS_EXIT + ;; +esac +]) + +dnl Serial 2 mfx/m4/cppflags.m4 + +AC_DEFUN([mfx_PROG_CPPFLAGS], [ +AC_MSG_CHECKING([whether the C preprocessor needs special flags]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# include "your C preprocessor is broken 1" +#elif (0xffffu == 0xfffffffful) +# include "your C preprocessor is broken 2" +#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) +# include "your C preprocessor is broken 3" +#endif +]], [[ ]] +)]) + +mfx_save_CPPFLAGS=$CPPFLAGS +mfx_tmp=ERROR +for mfx_arg in "" -no-cpp-precomp +do + CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" + _AC_COMPILE_IFELSE([], +[mfx_tmp=$mfx_arg +break]) +done +CPPFLAGS=$mfx_save_CPPFLAGS +rm -f conftest.$ac_ext conftest.$ac_objext +case x$mfx_tmp in + x) + AC_MSG_RESULT([none needed]) ;; + xERROR) + AC_MSG_RESULT([ERROR]) + AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) + ;; + *) + AC_MSG_RESULT([$mfx_tmp]) + CPPFLAGS="$mfx_tmp $CPPFLAGS" + ;; +esac +]) + +dnl Serial 16 -*- Autoconf -*- +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 2.70 or later everywhere, but since Autoconf mutates rapidly +# enough in this area it's likely we'll need to redefine +# AC_USE_SYSTEM_EXTENSIONS for quite some time. + +# If autoconf reports a warning +# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# the fix is +# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked +# but always AC_REQUIREd, +# 2) to ensure that for each occurrence of +# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +# or +# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +# the corresponding gnulib module description has 'extensions' among +# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS +# invocation occurs in gl_EARLY, not in gl_INIT. + +# AC_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +# +# Remember that #undef in AH_VERBATIM gets replaced with #define by +# AC_DEFINE. The goal here is to define all known feature-enabling +# macros, then, if reports of conflicts are made, disable macros that +# cause problems on some platforms (such as __EXTENSIONS__). +AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], +[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl + + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) + if test "$MINIX" = yes; then + AC_DEFINE([_POSIX_SOURCE], [1], + [Define to 1 if you need to in order for 'stat' and other + things to work.]) + AC_DEFINE([_POSIX_1_SOURCE], [2], + [Define to 2 if the system does not provide POSIX.1 features + except with this defined.]) + AC_DEFINE([_MINIX], [1], + [Define to 1 if on MINIX.]) + AC_DEFINE([_NETBSD_SOURCE], [1], + [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) + fi + +dnl Use a different key than __EXTENSIONS__, as that name broke existing +dnl configure.ac when using autoheader 2.62. + AH_VERBATIM([USE_SYSTEM_EXTENSIONS], +[/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +]) + AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], + [ac_cv_safe_to_define___extensions__], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +# define __EXTENSIONS__ 1 + ]AC_INCLUDES_DEFAULT])], + [ac_cv_safe_to_define___extensions__=yes], + [ac_cv_safe_to_define___extensions__=no])]) + test $ac_cv_safe_to_define___extensions__ = yes && + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_DARWIN_C_SOURCE]) + AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([_OPENBSD_SOURCE]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) + AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) + AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) + AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) + AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) + AC_DEFINE([__STDC_WANT_LIB_EXT2__]) + AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) + AC_DEFINE([_TANDEM_SOURCE]) + AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], + [ac_cv_should_define__xopen_source], + [ac_cv_should_define__xopen_source=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include <wchar.h> + mbstate_t x;]])], + [], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x;]])], + [ac_cv_should_define__xopen_source=yes])])]) + test $ac_cv_should_define__xopen_source = yes && + AC_DEFINE([_XOPEN_SOURCE], [500]) +])# AC_USE_SYSTEM_EXTENSIONS + +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], +[ + dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. + dnl gnulib does not need it. But if it gets required by third-party macros + dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a + dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". + dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, + dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +]) + +dnl Serial 4 mfx/m4/limits.m4 + +AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ +AC_CACHE_CHECK([whether limits.h is sane], +mfx_cv_header_sane_limits_h, +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# if defined(__APPLE__) && defined(__GNUC__) +# error "your preprocessor is broken - use compiler option -no-cpp-precomp" +# else +# include "your preprocessor is broken" +# endif +#endif +#define MFX_0xffff 0xffff +#define MFX_0xffffffffL 4294967295ul +#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +# include "error CHAR_BIT" +#endif +#if !defined(UCHAR_MAX) +# include "error UCHAR_MAX 1" +#endif +#if !defined(USHRT_MAX) +# include "error USHRT_MAX 1" +#endif +#if !defined(UINT_MAX) +# include "error UINT_MAX 1" +#endif +#if !defined(ULONG_MAX) +# include "error ULONG_MAX 1" +#endif +#if !defined(SHRT_MAX) +# include "error SHRT_MAX 1" +#endif +#if !defined(INT_MAX) +# include "error INT_MAX 1" +#endif +#if !defined(LONG_MAX) +# include "error LONG_MAX 1" +#endif +#if (UCHAR_MAX < 1) +# include "error UCHAR_MAX 2" +#endif +#if (USHRT_MAX < 1) +# include "error USHRT_MAX 2" +#endif +#if (UINT_MAX < 1) +# include "error UINT_MAX 2" +#endif +#if (ULONG_MAX < 1) +# include "error ULONG_MAX 2" +#endif +#if (UCHAR_MAX < 0xff) +# include "error UCHAR_MAX 3" +#endif +#if (USHRT_MAX < MFX_0xffff) +# include "error USHRT_MAX 3" +#endif +#if (UINT_MAX < MFX_0xffff) +# include "error UINT_MAX 3" +#endif +#if (ULONG_MAX < MFX_0xffffffffL) +# include "error ULONG_MAX 3" +#endif +#if (USHRT_MAX > UINT_MAX) +# include "error USHRT_MAX vs UINT_MAX" +#endif +#if (UINT_MAX > ULONG_MAX) +# include "error UINT_MAX vs ULONG_MAX" +#endif +]], [[ +#if (USHRT_MAX == MFX_0xffff) +{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } +#elif (USHRT_MAX >= MFX_0xffff) +{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } +#endif +#if (UINT_MAX == MFX_0xffff) +{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } +#elif (UINT_MAX >= MFX_0xffff) +{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } +#endif +#if (ULONG_MAX == MFX_0xffff) +{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } +#elif (ULONG_MAX >= MFX_0xffff) +{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } +#endif +#if !defined(_CRAY1) /* CRAY PVP systems */ +#if (USHRT_MAX == MFX_0xffffffffL) +{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } +#elif (USHRT_MAX >= MFX_0xffffffffL) +{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } +#endif +#endif /* _CRAY1 */ +#if (UINT_MAX == MFX_0xffffffffL) +{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } +#elif (UINT_MAX >= MFX_0xffffffffL) +{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } +#endif +#if (ULONG_MAX == MFX_0xffffffffL) +{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } +#elif (ULONG_MAX >= MFX_0xffffffffL) +{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } +#endif +]])], +[mfx_cv_header_sane_limits_h=yes], +[mfx_cv_header_sane_limits_h=no])]) +]) + +dnl Serial 2 mfx/m4/lzo.m4 + +AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ +AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) +]) + +dnl Serial 3 mfx/m4/lzo_lzochk.m4 + +AC_DEFUN([mfx_LZO_LZOCHK], [ +mfx_tmp=$1 +mfx_save_CPPFLAGS=$CPPFLAGS +dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here +test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" + +AC_MSG_CHECKING([whether your compiler passes the LZO conformance test]) + +AC_LANG_CONFTEST([AC_LANG_PROGRAM( +[[#include <limits.h> +#include <stddef.h> +#define LZO_CFG_NO_CONFIG_HEADER 1 +#define LZO_WANT_ACC_INCD_H 1 +$2 +#include $3 + +#undef LZOCHK_ASSERT +#define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT_HEADER(expr) +#define LZO_WANT_ACC_CHK_CH 1 +#include $3 + +#undef LZOCHK_ASSERT +#define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) +static void test_lzo_compile_time_assert(void) { +#define LZO_WANT_ACC_CHK_CH 1 +#include $3 +} + +#undef NDEBUG +#include <assert.h> +#undef LZOCHK_ASSERT +#define LZOCHK_ASSERT(expr) assert(expr); +static int test_lzo_run_time_assert(int r) { +#define LZO_WANT_ACC_CHK_CH 1 +#include $3 +return r; +} +]], [[ +test_lzo_compile_time_assert(); +if (test_lzo_run_time_assert(1) != 1) return 1; +]] +)]) + +mfx_tmp=FAILED +_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) +rm -f conftest.$ac_ext conftest.$ac_objext + +CPPFLAGS=$mfx_save_CPPFLAGS + +AC_MSG_RESULT([$mfx_tmp]) +case x$mfx_tmp in + xpassed | xyes) ;; + *) + AC_MSG_NOTICE([]) + AC_MSG_NOTICE([Your compiler failed the LZO conformance test - for details see ]) + AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) + AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) + AC_MSG_NOTICE([Thanks for your support.]) + AC_MSG_NOTICE([]) + AC_MSG_ERROR([LZO conformance test failed. Stop.]) +dnl AS_EXIT + ;; +esac +]) + +dnl Serial 2 mfx/m4/mfx.m4 + +AC_DEFUN([mfx_CHECK_SIZEOF], [ +AC_CHECK_SIZEOF(__int32) +AC_CHECK_SIZEOF(intmax_t) +AC_CHECK_SIZEOF(uintmax_t) +AC_CHECK_SIZEOF(intptr_t) +AC_CHECK_SIZEOF(uintptr_t) + +AC_CHECK_SIZEOF(float) +AC_CHECK_SIZEOF(double) +AC_CHECK_SIZEOF(long double) + +AC_CHECK_SIZEOF(dev_t) +AC_CHECK_SIZEOF(fpos_t) +AC_CHECK_SIZEOF(mode_t) +AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(ssize_t) +AC_CHECK_SIZEOF(time_t) +])# + +AC_DEFUN([mfx_CHECK_LIB_WINMM], [ +if test "X$GCC" = Xyes; then +case $host_os in +cygwin* | mingw* | pw32*) + test "X$LIBS" != "X" && LIBS="$LIBS " + LIBS="${LIBS}-lwinmm" ;; +esac +fi +]) + +dnl Serial 2 mfx/m4/nrv.m4 + +AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [ +AC_C_BIGENDIAN([AC_DEFINE(NRV_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(NRV_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) +]) +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2017 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([gl_STAT_TIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include <sys/types.h> + #include <sys/stat.h> + #if HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #include <time.h> + struct timespec ts; + struct stat st; + ]], + [[ + st.st_atim = ts; + ]])], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include <sys/types.h> + #include <sys/stat.h>])], + [#include <sys/types.h> + #include <sys/stat.h>])], + [#include <sys/types.h> + #include <sys/stat.h>])], + [#include <sys/types.h> + #include <sys/stat.h>]) +]) + +# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) +# and NTFS (Cygwin). +# There was a time when this field was named st_createtime (21 June +# 2002 to 16 July 2002) But that window is very small and applied only +# to development code, so systems still using that configuration are +# not supported. See revisions 1.10 and 1.11 of FreeBSD's +# src/sys/ufs/ufs/dinode.h. +# +AC_DEFUN([gl_STAT_BIRTHTIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], + [#include <sys/types.h> + #include <sys/stat.h>])], + [#include <sys/types.h> + #include <sys/stat.h>])], + [#include <sys/types.h> + #include <sys/stat.h>]) +]) + +dnl Serial 2 mfx/m4/ucl.m4 + +AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [ +AC_C_BIGENDIAN([AC_DEFINE(UCL_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(UCL_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) +]) diff --git a/autoconf/ltmain.sh b/autoconf/ltmain.sh index 04eaea4..a50a21a 100755..100644 --- a/autoconf/ltmain.sh +++ b/autoconf/ltmain.sh @@ -1,10 +1,10 @@ -# Generated from ltmain.m4sh. +#! /bin/sh -# libtool (GNU libtool) 2.2.10 +# libtool (GNU libtool) 2.4.2.418 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -24,117 +24,181 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.10 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to <bug-libtool@gnu.org>. PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.10 -TIMESTAMP="" -package_revision=1.3175 +VERSION=2.4.2.418 +package_revision=2.4.2.418 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2013-08-23.20; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are still modern systems that have problems with 'echo' mis- +# handling backslashes, among others, so make sure $bs_echo is set to a +# command that correctly interprets backslashes. +# (this code from Autoconf 2.68) + +# Printing a long string crashes Solaris 7 /usr/bin/printf. +bs_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo +bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then + bs_echo='print -r --' + bs_echo_n='print -rn --' +elif (test "X`printf %s $bs_echo`" = "X$bs_echo") 2>/dev/null; then + bs_echo='printf %s\n' + bs_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $bs_echo) 2>/dev/null`" = "X-n $bs_echo"; then + bs_echo_body='eval /usr/ucb/echo -n "$1$nl"' + bs_echo_n='/usr/ucb/echo -n' + else + bs_echo_body='eval expr "X$1" : "X\\(.*\\)"' + bs_echo_n_body='eval + arg=$1; + case $arg in #( + *"$nl"*) + expr "X$arg" : "X\\(.*\\)$nl"; + arg=`expr "X$arg" : ".*$nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$nl" + ' + export bs_echo_n_body + bs_echo_n='sh -c $bs_echo_n_body bs_echo' + fi + export bs_echo_body + bs_echo='sh -c $bs_echo_body bs_echo' +fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO="$bs_echo"} : ${EGREP="grep -E"} : ${FGREP="grep -F"} : ${GREP="grep"} @@ -145,624 +209,1828 @@ test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${RM="rm -f"} : ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -exit_status=$EXIT_SUCCESS +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -dirname="s,/[^/]*$,," -basename="s,^.*/,," +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' + +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# Generated shell functions inserted here. -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +## ----------------- ## +## Global variables. ## +## ----------------- ## -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$bs_echo "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$bs_echo "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" - IFS=: + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () { - $ECHO "$progname${mode+: }$mode: $*" + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='[0m' + tc_bold='[1m'; tc_standout='[7m' + tc_red='[31m'; tc_green='[32m' + tc_blue='[34m'; tc_cyan='[36m' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: } -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () { - $opt_verbose && func_echo ${1+"$@"} + $debug_cmd - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : + eval _G_current_value='`$bs_echo $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac } -# func_echo_all arg... + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $bs_echo "$progname: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_echo_all ARG... +# -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$bs_echo "$_G_tc" | sed "$sed_make_literal_regex"` + _G_indent=`$bs_echo "$_G_indent" | sed "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | sed 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $bs_echo "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS } -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $debug_cmd - # bash bug again: - : + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } -# func_fatal_error arg... + +# func_fatal_error ARG... +# ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { - func_error ${1+"$@"} - exit $EXIT_FAILURE -} + $debug_cmd -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" + func_error "$*" + exit $EXIT_FAILURE } -help="Try \`$progname --help' for more information." ## default -# func_grep expression filename +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} - if test "$opt_dry_run" = ":"; then + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac + $debug_cmd - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. ;; *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# func_quote_for_expand arg +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { + $debug_cmd + case $1 in *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - my_arg="$1" ;; + _G_arg=$1 ;; esac - case $my_arg in + case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" + _G_arg=\"$_G_arg\" ;; esac - func_quote_for_expand_result="$my_arg" + func_quote_for_expand_result=$_G_arg } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_cmd=$1 + _G_fail_exp=${2-':'} - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" + $opt_quiet || { + func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_tr_sh +# ---------- +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () { - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () { - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + $debug_cmd + + $opt_verbose && func_echo "$*" + + : +} + + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + ver1=$1 + ver2=$2 + + # Split on '.' and compare each component. + i=1 + while :; do + p1=`echo "$ver1" |cut -d. -f$i` + p2=`echo "$ver2" |cut -d. -f$i` + if test ! "$p1"; then + echo "$1 $2" + break + elif test ! "$p2"; then + echo "$2 $1" + break + elif test ! "$p1" = "$p2"; then + if test "$p1" -gt "$p2" 2>/dev/null; then # numeric comparison + echo "$2 $1" + elif test "$p2" -gt "$p1" 2>/dev/null; then # numeric comparison + echo "$1 $2" + else # numeric, then lexicographic comparison + lp=`printf "$p1\n$p2\n" |sort -n |tail -n1` + if test "$lp" = "$p2"; then + echo "$1 $2" + else + echo "$2 $1" + fi + fi + break + fi + i=`expr $i + 1` + done +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2012-10-21.11; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2013 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$bs_echo "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '<hooked_function_name>_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ------------------## +## Helper functions. ## +## ------------------## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$bs_echo \""Usage: $usage"\" + eval \$bs_echo \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + $debug_cmd + + func_usage_message + $bs_echo "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - func_error "missing argument for $1." + $debug_cmd + + func_error "Missing argument for '$1'." exit_cmd=exit } -exit_cmd=: +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# func_split_short_opt SHORTOPT +# ----------------------------- +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd -# Global variables. -# $mode is unset -nonopt= -execute_dlfiles= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_fatal_configuration arg... +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $bs_echo "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$bs_echo \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$bs_echo \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n '/^##/q + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.2.418' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $bs_echo "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=$long_help_message" + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.2.418 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to <bug-libtool@gnu.org>. +GNU libtool home page: <http://www.gnu.org/software/libtool/>. +General help using GNU software: <http://www.gnu.org/gethelp/>." + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -780,17 +2048,19 @@ func_config () exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -799,256 +2069,325 @@ func_features () exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false - ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - opt_verbose=: - ;; - - --no-verbose) preserve_args="$preserve_args $opt" - opt_verbose=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; esac - done - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF + fi + + exit $EXIT_MISMATCH fi +} - exit $EXIT_MISMATCH - fi + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } +func_add_hook func_options_prep libtool_options_prep -## ----------- ## -## Main. ## -## ----------- ## +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd -$opt_help || { - # Sanity checks first: - func_check_version_match + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift + fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } +func_add_hook func_validate_options libtool_validate_options +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + + + +## ----------- ## +## Main. ## +## ----------- ## + +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () @@ -1059,12 +2398,12 @@ func_lalib_p () } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1072,13 +2411,13 @@ func_lalib_unsafe_p () for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1110,12 +2449,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1134,11 +2470,13 @@ func_ltwrapper_p () # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1150,10 +2488,11 @@ func_execute_cmds () # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1161,6 +2500,37 @@ func_source () } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case $lt_sysroot:$1 in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result='='$func_stripname_result + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1169,12 +2539,12 @@ func_source () # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1189,12 +2559,11 @@ func_infer_tag () for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1215,7 +2584,7 @@ func_infer_tag () # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1231,15 +2600,15 @@ func_infer_tag () # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1247,7 +2616,7 @@ func_write_libtool_object () $opt_dry_run || { cat >${write_libobj}T <<EOF # $write_libobj - a libtool object file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -1259,17 +2628,536 @@ pic_object=$write_lobj non_pic_object=$write_oldobj EOF - $MV "${write_libobj}T" "${write_libobj}" + $MV "${write_libobj}T" "$write_libobj" } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $debug_cmd + + func_convert_core_file_wine_to_w32_result=$1 + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $debug_cmd + + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result= + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result"; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $debug_cmd + + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $debug_cmd + + if test -z "$2" && test -n "$1"; then + func_error "Could not determine host file name corresponding to" + func_error " '$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result=$1 + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $debug_cmd + + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " '$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result=$3 + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $debug_cmd + + case $4 in + $1 ) func_to_host_path_result=$3$func_to_host_path_result + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via '$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $debug_cmd + + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $debug_cmd + + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result=$1 +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result=$func_convert_core_msys_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_file_result=$1 + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_cygpath_result + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via '$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $debug_cmd + + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd=func_convert_path_$func_stripname_result + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $debug_cmd + + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result=$1 +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_msys_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $debug_cmd + + func_to_host_path_result=$1 + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_cygpath_result + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1282,12 +3170,12 @@ func_mode_compile () case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1297,18 +3185,18 @@ func_mode_compile () case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1326,18 +3214,17 @@ func_mode_compile () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + IFS=$save_ifs + func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1345,16 +3232,15 @@ func_mode_compile () # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1362,13 +3248,13 @@ func_mode_compile () func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -1379,7 +3265,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1388,7 +3274,7 @@ func_mode_compile () case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -1397,8 +3283,8 @@ func_mode_compile () for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -1424,17 +3310,17 @@ func_mode_compile () func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -1446,16 +3332,16 @@ func_mode_compile () pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -1464,12 +3350,12 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -1477,7 +3363,7 @@ func_mode_compile () This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1485,26 +3371,25 @@ compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -1515,13 +3400,13 @@ compiler." if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -1532,7 +3417,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1548,29 +3433,29 @@ compiler." fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" + if test yes = "$compiler_c_o"; then + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -1581,7 +3466,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1601,7 +3486,7 @@ compiler." func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -1611,13 +3496,13 @@ compiler." } $opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1631,7 +3516,7 @@ func_mode_help () Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -1650,16 +3535,16 @@ This mode accepts the following additional options: -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -1672,7 +3557,7 @@ This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -1691,7 +3576,7 @@ Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -1701,7 +3586,7 @@ the \`--dry-run' option if you just want to see what would be executed." Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -1727,7 +3612,7 @@ The following components of LINK-COMMAND are treated specially: -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -1761,20 +3646,20 @@ The following components of LINK-COMMAND are treated specially: -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -1785,7 +3670,7 @@ is created, otherwise an executable program is created." Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -1793,28 +3678,28 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done @@ -1836,23 +3721,27 @@ fi # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -1863,18 +3752,18 @@ func_mode_execute () if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -1882,18 +3771,18 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -1905,7 +3794,7 @@ func_mode_execute () # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -1918,21 +3807,28 @@ func_mode_execute () if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -1949,34 +3845,64 @@ func_mode_execute () done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug - libdirs="$nonopt" + $debug_cmd + + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "'$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument '$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and '=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1986,73 +3912,77 @@ func_mode_finish () if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the '$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the '$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo + $ECHO " - use the '$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" + fi + echo - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -2066,7 +3996,7 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -2079,20 +4009,20 @@ func_mode_install () opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2110,7 +4040,7 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2124,23 +4054,23 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -2157,19 +4087,19 @@ func_mode_install () dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2178,7 +4108,7 @@ func_mode_install () case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2187,7 +4117,7 @@ func_mode_install () # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2198,13 +4128,16 @@ func_mode_install () case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2215,19 +4148,19 @@ func_mode_install () if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" + dir=$func_dirname_result + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. @@ -2240,7 +4173,7 @@ func_mode_install () # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2249,29 +4182,29 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= ;; esac ;; @@ -2282,7 +4215,7 @@ func_mode_install () if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -2293,18 +4226,18 @@ func_mode_install () fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2312,11 +4245,11 @@ func_mode_install () # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -2326,11 +4259,11 @@ func_mode_install () staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -2339,7 +4272,7 @@ func_mode_install () func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -2351,23 +4284,23 @@ func_mode_install () *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -2395,19 +4328,19 @@ func_mode_install () # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -2415,29 +4348,29 @@ func_mode_install () func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -2474,15 +4407,17 @@ func_mode_install () for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -2490,18 +4425,18 @@ func_mode_install () done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2509,16 +4444,17 @@ test "$mode" = install && func_mode_install ${1+"$@"} # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -2529,7 +4465,7 @@ func_generate_dlsyms () "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -2537,30 +4473,45 @@ func_generate_dlsyms () func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined __osf__ +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2579,10 +4530,10 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -2592,7 +4543,7 @@ extern \"C\" { } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -2606,13 +4557,55 @@ extern \"C\" { fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + name=$func_basename_result + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename= + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname"; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename=$func_basename_result + else + # no lafile. user explicitly requested -dlpreopen <import library>. + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename"; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2643,6 +4636,11 @@ extern \"C\" { echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -2650,29 +4648,31 @@ typedef struct { const char *name; void *address; } lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ " - case $host in - *cygwin* | *mingw* | *cegcc* ) + + if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - + } +}" + fi echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -2709,14 +4709,12 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -2725,7 +4723,7 @@ static const void *lt_preloaded_setup() { for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2733,10 +4731,10 @@ static const void *lt_preloaded_setup() { func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -2754,7 +4752,7 @@ static const void *lt_preloaded_setup() { esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -2768,6 +4766,32 @@ static const void *lt_preloaded_setup() { fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -2777,8 +4801,9 @@ static const void *lt_preloaded_setup() { # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -2788,15 +4813,29 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -2817,15 +4856,120 @@ func_win32_libid () $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $debug_cmd + + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $debug_cmd + + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1"; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result= + fi +} # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -2834,7 +4978,7 @@ func_extract_an_archive () fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -2848,22 +4992,23 @@ func_extract_an_archive () # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -2875,7 +5020,7 @@ func_extract_archives () esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -2888,19 +5033,20 @@ func_extract_archives () cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` @@ -2925,7 +5071,7 @@ func_extract_archives () my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -2940,7 +5086,7 @@ func_extract_archives () # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -2951,7 +5097,7 @@ func_emit_wrapper () #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3008,9 +5154,9 @@ _LTECHO_EOF' # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3043,7 +5189,7 @@ func_parse_lt_options () # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3054,7 +5200,7 @@ func_lt_dump_args () lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3068,7 +5214,7 @@ func_exec_program_core () *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3078,7 +5224,7 @@ func_exec_program_core () *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -3095,14 +5241,17 @@ func_exec_program_core () # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -3150,13 +5299,13 @@ func_exec_program () test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -3195,8 +5344,20 @@ func_exec_program () if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -3209,14 +5370,6 @@ func_exec_program () " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. @@ -3224,7 +5377,7 @@ func_exec_program () fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -3234,166 +5387,6 @@ fi\ } -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because @@ -3403,7 +5396,7 @@ func_emit_cwrapperexe_src () cat <<EOF /* $cwrappersource - temporary wrapper executable for $objdir/$outputname - Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION + Generated by $PROGRAM (GNU $PACKAGE) $VERSION The $output program cannot be directly executed until all the libtool libraries that it depends on are installed. @@ -3438,47 +5431,45 @@ EOF #include <fcntl.h> #include <sys/stat.h> +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -3497,8 +5488,8 @@ int setenv (const char *, const char *, int); # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -3531,10 +5522,10 @@ int setenv (const char *, const char *, int); #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -3563,14 +5554,14 @@ void lt_dump_script (FILE *f); EOF cat <<EOF -const char * MAGIC_EXE = "$magic_exe"; +volatile const char * MAGIC_EXE = "$magic_exe"; const char * LIB_PATH_VARNAME = "$shlibpath_var"; EOF - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - func_to_host_pathlist "$temp_rpath" + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + func_to_host_path "$temp_rpath" cat <<EOF -const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result"; +const char * LIB_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" @@ -3579,10 +5570,10 @@ EOF fi if test -n "$dllsearchpath"; then - func_to_host_pathlist "$dllsearchpath:" + func_to_host_path "$dllsearchpath:" cat <<EOF const char * EXE_PATH_VARNAME = "PATH"; -const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result"; +const char * EXE_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" @@ -3591,7 +5582,7 @@ const char * EXE_PATH_VALUE = ""; EOF fi - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then cat <<EOF const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ EOF @@ -3620,12 +5611,12 @@ main (int argc, char *argv[]) char *actual_cwrapper_name; char *target_name; char *lt_argv_zero; - intptr_t rval = 127; + int rval = 127; int i; program_name = (char *) xstrdup (base_name (argv[0])); - newargz = XMALLOC (char *, argc + 1); + newargz = XMALLOC (char *, (size_t) argc + 1); /* very simple arg parsing; don't want to rely on getopt * also, copy all non cwrapper options to newargz, except @@ -3634,10 +5625,10 @@ main (int argc, char *argv[]) newargc=0; for (i = 1; i < argc; i++) { - if (strcmp (argv[i], dumpscript_opt) == 0) + if (STREQ (argv[i], dumpscript_opt)) { EOF - case "$host" in + case $host in *mingw* | *cygwin* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" @@ -3648,12 +5639,12 @@ EOF lt_dump_script (stdout); return 0; } - if (strcmp (argv[i], debug_opt) == 0) + if (STREQ (argv[i], debug_opt)) { lt_debug = 1; continue; } - if (strcmp (argv[i], ltwrapper_option_prefix) == 0) + if (STREQ (argv[i], ltwrapper_option_prefix)) { /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX namespace, but it is not one of the ones we know about and @@ -3676,7 +5667,7 @@ EOF EOF cat <<EOF /* The GNU banner must be the first non-error debug message */ - lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n"); + lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n"); EOF cat <<"EOF" lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); @@ -3765,8 +5756,12 @@ EOF lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ lt_setenv ("DUALCASE", "1"); /* for MSK sh */ - lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); + /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must + be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) + because on Windows, both *_VARNAMEs are PATH but uninstalled + libraries must come first. */ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); + lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", nonnull (lt_argv_zero)); @@ -3783,7 +5778,7 @@ EOF cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ @@ -3828,7 +5823,7 @@ base_name (const char *name) { const char *base; -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; @@ -3887,7 +5882,7 @@ find_executable (const char *wrapper) const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; - int tmp_len; + size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", @@ -3897,7 +5892,7 @@ find_executable (const char *wrapper) return NULL; /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); @@ -3915,7 +5910,7 @@ find_executable (const char *wrapper) return concat_name; XFREE (concat_name); } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif @@ -3938,7 +5933,7 @@ find_executable (const char *wrapper) for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; - p_len = q - p; + p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { @@ -4057,7 +6052,7 @@ strendzap (char *str, const char *pat) if (patlen <= len) { str += len - patlen; - if (strcmp (str, pat) == 0) + if (STREQ (str, pat)) *str = '\0'; } return str; @@ -4122,7 +6117,7 @@ lt_setenv (const char *name, const char *value) char *str = xstrdup (value); setenv (name, str, 1); #else - int len = strlen (name) + 1 + strlen (value) + 1; + size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) @@ -4139,8 +6134,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) char *new_value; if (orig_value && *orig_value) { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { @@ -4171,10 +6166,10 @@ lt_update_exe_path (const char *name, const char *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -4322,9 +6317,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -4335,7 +6336,8 @@ EOF # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; @@ -4345,17 +6347,18 @@ func_win32_import_lib_p () # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -4402,7 +6405,7 @@ func_mode_link () non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -4414,7 +6417,7 @@ func_mode_link () vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -4422,15 +6425,15 @@ func_mode_link () do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -4463,7 +6466,7 @@ func_mode_link () # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -4480,21 +6483,21 @@ func_mode_link () case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -4502,9 +6505,9 @@ func_mode_link () continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -4514,10 +6517,10 @@ func_mode_link () continue ;; *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4525,14 +6528,14 @@ func_mode_link () esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -4541,7 +6544,7 @@ func_mode_link () *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4550,7 +6553,13 @@ func_mode_link () continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -4560,7 +6569,7 @@ func_mode_link () moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4574,22 +6583,22 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" prev= continue else @@ -4599,31 +6608,31 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -4631,7 +6640,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -4639,24 +6648,24 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -4668,48 +6677,48 @@ func_mode_link () func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4723,7 +6732,7 @@ func_mode_link () esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -4737,7 +6746,7 @@ func_mode_link () -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -4769,7 +6778,7 @@ func_mode_link () if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -4800,30 +6809,37 @@ func_mode_link () ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in @@ -4832,12 +6848,12 @@ func_mode_link () case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4845,7 +6861,7 @@ func_mode_link () ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -4853,35 +6869,40 @@ func_mode_link () ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm continue ;; @@ -4893,27 +6914,28 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -4927,8 +6949,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -4974,13 +6996,17 @@ func_mode_link () # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -5029,14 +7055,14 @@ func_mode_link () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" - arg="$arg $func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5045,15 +7071,15 @@ func_mode_link () func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5076,7 +7102,7 @@ func_mode_link () # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -5090,25 +7116,29 @@ func_mode_link () # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-stdlib=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -5124,22 +7154,22 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" prev= continue else @@ -5149,31 +7179,31 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5181,7 +7211,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5189,31 +7219,32 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. - if test "$prev" = dlfiles; then + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -5223,7 +7254,7 @@ func_mode_link () # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -5235,9 +7266,9 @@ func_mode_link () done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -5246,12 +7277,12 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -5259,7 +7290,9 @@ func_mode_link () eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -5280,15 +7313,15 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -5298,9 +7331,9 @@ func_mode_link () if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5320,7 +7353,7 @@ func_mode_link () case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -5328,7 +7361,7 @@ func_mode_link () prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -5340,35 +7373,36 @@ func_mode_link () for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library @@ -5378,45 +7412,46 @@ func_mode_link () deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -5424,31 +7459,22 @@ func_mode_link () for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -5456,19 +7482,19 @@ func_mode_link () old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -5477,18 +7503,28 @@ func_mode_link () *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5498,47 +7534,53 @@ func_mode_link () case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -5549,21 +7591,26 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -5571,18 +7618,13 @@ func_mode_link () echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -5593,38 +7635,36 @@ func_mode_link () esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -5649,40 +7689,40 @@ func_mode_link () for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done continue fi # $pass = conv @@ -5690,101 +7730,133 @@ func_mode_link () # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$libdir" - absdir="$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -5794,52 +7866,53 @@ func_mode_link () fi - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5851,7 +7924,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5860,15 +7933,15 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -5877,20 +7950,20 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + if test no = "$installed"; then + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5899,24 +7972,24 @@ func_mode_link () # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -5925,7 +7998,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5934,7 +8007,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5944,43 +8017,43 @@ func_mode_link () # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -5988,70 +8061,70 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6059,72 +8132,72 @@ func_mode_link () *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6132,43 +8205,43 @@ func_mode_link () test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6181,11 +8254,11 @@ func_mode_link () fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -6194,46 +8267,54 @@ func_mode_link () temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -6241,35 +8322,35 @@ func_mode_link () case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -6281,38 +8362,38 @@ func_mode_link () fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -6361,10 +8442,10 @@ func_mode_link () -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6373,59 +8454,59 @@ func_mode_link () # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + if test -n "$i"; then + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" + oldlibs=$output + func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -6434,10 +8515,10 @@ func_mode_link () eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -6451,31 +8532,31 @@ func_mode_link () esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -6484,20 +8565,20 @@ func_mode_link () fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -6505,41 +8586,42 @@ func_mode_link () case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -6547,30 +8629,30 @@ func_mode_link () case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -6585,26 +8667,35 @@ func_mode_link () # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -6615,69 +8706,69 @@ func_mode_link () nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -6691,42 +8782,45 @@ func_mode_link () verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= - if test "$mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6735,14 +8829,14 @@ func_mode_link () case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6752,11 +8846,11 @@ func_mode_link () fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -6770,38 +8864,39 @@ func_mode_link () # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -6809,7 +8904,7 @@ func_mode_link () ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6825,8 +8920,8 @@ func_mode_link () ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" fi ;; esac @@ -6841,9 +8936,9 @@ func_mode_link () # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -6872,21 +8967,21 @@ EOF -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" - i="" + func_append newdeplibs " $i" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" else droppeddeps=yes echo @@ -6900,7 +8995,7 @@ EOF fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6915,21 +9010,21 @@ EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" - i="" + func_append newdeplibs " $i" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" else droppeddeps=yes echo @@ -6951,7 +9046,7 @@ EOF fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6965,18 +9060,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test yes = "$want_nocaseglob"; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6988,25 +9095,25 @@ EOF # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7014,7 +9121,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7024,7 +9131,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -7037,30 +9144,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7068,7 +9175,7 @@ EOF echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7078,24 +9185,24 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7119,8 +9226,8 @@ EOF ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7129,12 +9236,12 @@ EOF if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7145,14 +9252,14 @@ EOF echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7182,7 +9289,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7192,13 +9299,13 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -7206,62 +9313,65 @@ EOF dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -7271,23 +9381,23 @@ EOF eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic @@ -7297,8 +9407,8 @@ EOF delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7306,36 +9416,68 @@ EOF cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test yes = "$try_normal_branch" \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=$output_objdir/$output_la.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7346,8 +9488,8 @@ EOF break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -7355,21 +9497,21 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7379,15 +9521,15 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -7398,27 +9540,27 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -7436,7 +9578,7 @@ EOF fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -7469,37 +9611,42 @@ EOF last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -7511,13 +9658,13 @@ EOF func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -7527,10 +9674,10 @@ EOF reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -7542,19 +9689,19 @@ EOF # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -7563,16 +9710,16 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -7580,7 +9727,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7589,7 +9736,7 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -7597,27 +9744,27 @@ EOF fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -7631,7 +9778,7 @@ EOF # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -7653,19 +9800,20 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -7673,7 +9821,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7682,10 +9830,10 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7705,39 +9853,39 @@ EOF done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -7745,7 +9893,7 @@ EOF ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -7768,18 +9916,21 @@ EOF eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + gentop=$output_objdir/${obj}x + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects + # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -7791,7 +9942,7 @@ EOF exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -7801,12 +9952,12 @@ EOF # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -7823,16 +9974,14 @@ EOF output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -7846,11 +9995,11 @@ EOF *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -7870,7 +10019,7 @@ EOF *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7880,17 +10029,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7898,7 +10047,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7910,39 +10059,39 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7950,10 +10099,10 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -7961,82 +10110,86 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8052,7 +10205,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -8060,45 +10213,53 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -8108,6 +10269,12 @@ EOF func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -8149,8 +10316,8 @@ EOF func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -8171,7 +10338,7 @@ EOF trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -8194,43 +10361,45 @@ EOF # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -8247,8 +10416,8 @@ EOF : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -8256,7 +10425,7 @@ EOF for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -8272,18 +10441,30 @@ EOF esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8313,18 +10494,18 @@ EOF else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -8341,7 +10522,7 @@ EOF case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -8356,52 +10537,63 @@ EOF fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -8411,34 +10603,34 @@ EOF # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -8454,10 +10646,9 @@ EOF case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -8466,7 +10657,7 @@ EOF esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -8480,7 +10671,7 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -8506,7 +10697,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -8521,29 +10712,31 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8552,24 +10745,23 @@ func_mode_uninstall () rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - objdir="$dir/$origobjdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test clean = "$opt_mode"; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8581,11 +10773,11 @@ func_mode_uninstall () elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -8595,28 +10787,27 @@ func_mode_uninstall () # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case $opt_mode in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -8632,21 +10823,19 @@ func_mode_uninstall () func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + if test -n "$pic_object" && test none != "$pic_object"; then + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -8656,7 +10845,7 @@ func_mode_uninstall () noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8665,7 +10854,7 @@ func_mode_uninstall () func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8673,12 +10862,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -8686,9 +10875,8 @@ func_mode_uninstall () esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -8698,16 +10886,17 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi -test -z "$mode" && { - help="$generic_help" +test -z "$opt_mode" && { + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -8718,7 +10907,7 @@ exit $exit_status # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -8741,5 +10930,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff --git a/autoconf/mdate-sh b/autoconf/mdate-sh index 60dc485..f80075c 100755 --- a/autoconf/mdate-sh +++ b/autoconf/mdate-sh @@ -1,10 +1,9 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2010-08-21.06; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1995-2017 Free Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you can redistribute it and/or modify @@ -40,7 +39,7 @@ fi case $1 in '') - echo "$0: No file. Try \`$0 --help' for more information." 1>&2 + echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -76,7 +75,7 @@ LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE -# variable. Since we cannot assume `unset' works, revert this +# variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso @@ -96,14 +95,14 @@ if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi -# A `ls -l' line looks as follows on OS/2. +# A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a -# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. @@ -116,7 +115,7 @@ month= command= until test $month do - test $# -gt 0 || error "failed parsing \`$ls_command /' output" + test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" @@ -136,7 +135,7 @@ do esac done -test -n "$month" || error "failed parsing \`$ls_command /' output" +test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` @@ -220,6 +219,6 @@ echo $day $month $year # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/missing b/autoconf/missing index 28055d2..c6e3795 100755 --- a/autoconf/missing +++ b/autoconf/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2009-04-28.21; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? @@ -100,277 +70,146 @@ Send bug reports to <bug-automake@gnu.org>." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/mkinstalldirs b/autoconf/mkinstalldirs index 4191a45..a31ce6d 100755 --- a/autoconf/mkinstalldirs +++ b/autoconf/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2009-04-28.21; # UTC +scriptversion=2016-01-11.22; # UTC # Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 @@ -81,9 +81,9 @@ case $dirmode in echo "mkdir -p -- $*" exec mkdir -p -- "$@" else - # On NextStep and OpenStep, the `mkdir' command does not + # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already + # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version @@ -157,6 +157,6 @@ exit $errstatus # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/py-compile b/autoconf/py-compile index 3f9d05b..3693d96 100755 --- a/autoconf/py-compile +++ b/autoconf/py-compile @@ -1,10 +1,9 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2009-04-28.21; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 2000-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,28 +31,36 @@ if [ -z "$PYTHON" ]; then PYTHON=python fi +me=py-compile + +usage_error () +{ + echo "$me: $*" >&2 + echo "Try '$me --help' for more information." >&2 + exit 1 +} + basedir= destdir= -files= while test $# -ne 0; do case "$1" in --basedir) - basedir=$2 - if test -z "$basedir"; then - echo "$0: Missing argument to --basedir." 1>&2 - exit 1 + if test $# -lt 2; then + usage_error "option '--basedir' requires an argument" + else + basedir=$2 fi shift ;; --destdir) - destdir=$2 - if test -z "$destdir"; then - echo "$0: Missing argument to --destdir." 1>&2 - exit 1 + if test $# -lt 2; then + usage_error "option '--destdir' requires an argument" + else + destdir=$2 fi shift ;; - -h|--h*) + -h|--help) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." @@ -69,20 +76,27 @@ Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; - -v|--v*) - echo "py-compile $scriptversion" + -v|--version) + echo "$me $scriptversion" exit $? ;; + --) + shift + break + ;; + -*) + usage_error "unrecognized option '$1'" + ;; *) - files="$files $1" + break ;; esac shift done +files=$* if test -z "$files"; then - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 + usage_error "no files given" fi # if basedir was given, then it should be prepended to filenames before @@ -102,7 +116,7 @@ else fi $PYTHON -c " -import sys, os, py_compile +import sys, os, py_compile, imp files = '''$files''' @@ -115,12 +129,19 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - py_compile.compile(filepath, filepath + 'c', path) + if hasattr(imp, 'get_tag'): + py_compile.compile(filepath, imp.cache_from_source(filepath), path) + else: + py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " -import sys, os, py_compile +import sys, os, py_compile, imp + +# pypy does not use .pyo optimization +if hasattr(sys, 'pypy_translation_info'): + sys.exit(0) files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') @@ -132,7 +153,10 @@ for file in files.split(): continue sys.stdout.write(file) sys.stdout.flush() - py_compile.compile(filepath, filepath + 'o', path) + if hasattr(imp, 'get_tag'): + py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) + else: + py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: @@ -141,6 +165,6 @@ sys.stdout.write('\n')" 2>/dev/null || : # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/autoconf/shtool b/autoconf/shtool index df3fdb3..a1f4e7e 100755 --- a/autoconf/shtool +++ b/autoconf/shtool @@ -23,7 +23,7 @@ ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ## USA, or contact Ralf S. Engelschall <rse@engelschall.com>. ## ## NOTICE: Given that you include this file verbatim into your own diff --git a/autoconf/ylwrap b/autoconf/ylwrap index 92b2011..abac60c 100755 --- a/autoconf/ylwrap +++ b/autoconf/ylwrap @@ -1,10 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2010-02-06.18; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -# 2007, 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # @@ -30,9 +29,41 @@ scriptversion=2010-02-06.18; # UTC # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard () +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + case "$1" in '') - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 exit 1 ;; --basedir) @@ -65,39 +96,56 @@ esac # The input. -input="$1" +input=$1 shift -case "$input" in +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. - input="`pwd`/$input" + input=`pwd`/$input ;; esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= -pairlist= -while test "$#" -ne 0; do - if test "$1" = "--"; then +while test $# -ne 0; do + if test x"$1" = x"--"; then shift break fi - pairlist="$pairlist $1" + from=$1 shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. -prog="$1" +prog=$1 shift # Make any relative path in $prog absolute. -case "$prog" in +case $prog in [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; + *[\\/]*) prog=`pwd`/$prog ;; esac -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -115,98 +163,56 @@ esac ret=$? if test $ret -eq 0; then - set X $pairlist - shift - first=yes - # Since DOS filename conventions don't allow two dots, - # the DOS version of Bison writes out y_tab.c instead of y.tab.c - # and y_tab.h instead of y.tab.h. Test to see if this is the case. - y_tab_nodot="no" - if test -f y_tab.c || test -f y_tab.h; then - y_tab_nodot="yes" - fi - - # The directory holding the input. - input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` - # Quote $INPUT_DIR so we can use it in a regexp. - # FIXME: really we should care about more than `.' and `\'. - input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` - - while test "$#" -ne 0; do - from="$1" - # Handle y_tab.c and y_tab.h output by DOS - if test $y_tab_nodot = "yes"; then - if test $from = "y.tab.c"; then - from="y_tab.c" - else - if test $from = "y.tab.h"; then - from="y_tab.h" - fi - fi - fi + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, - # otherwise prepend `../'. - case "$2" in - [\\/]* | ?:[\\/]*) target="$2";; - *) target="../$2";; + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target=../$to;; esac - # We do not want to overwrite a header file if it hasn't - # changed. This avoid useless recompilations. However the - # parser itself (the first file) should always be updated, - # because it is the destination of the .y.c rule in the - # Makefile. Divert the output of all other files to a temporary - # file so we can compare them to existing versions. - if test $first = no; then - realtarget="$target" - target="tmp-`echo $target | sed s/.*[\\/]//g`" + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget=$target + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi - # Edit out `#line' or `#' directives. - # - # We don't want the resulting debug information to point at - # an absolute srcdir; it is better for it to just mention the - # .y file with no path. - # - # We want to use the real output file name, not yy.lex.c for - # instance. - # - # We want the include guards to be adjusted too. - FROM=`echo "$from" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - TARGET=`echo "$2" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - - sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ - -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? - - # Check whether header files must be updated. - if test $first = no; then - if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$2" is unchanged - rm -f "$target" - else - echo updating "$2" + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" mv -f "$target" "$realtarget" fi fi else - # A missing file is only an error for the first file. This - # is a blatant hack to let us support using "yacc -d". If -d - # is not specified, we don't want an error when the header - # file is "missing". - if test $first = yes; then + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then ret=1 fi fi - shift - shift - first=no done -else - ret=$? fi # Remove the directory. @@ -221,6 +227,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: @@ -1,5 +1,8 @@ /* config.hin. Generated from configure.ac by autoheader. */ +#ifndef LZOP_AUTOCONF_CONFIG_H_INCLUDED__ +#define LZOP_AUTOCONF_CONFIG_H_INCLUDED__ 1 + /* Define to 1 if your machine is big endian. */ #undef ACC_ABI_BIG_ENDIAN @@ -240,6 +243,18 @@ /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMENSEC + +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC + +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC + /* Define to 1 if you have the <sys/mman.h> header file. */ #undef HAVE_SYS_MMAN_H @@ -285,12 +300,6 @@ /* Define to 1 if should be enabled. */ #undef LZOP_ENABLE_ANSI -/* Use asm. */ -#undef LZO_USE_ASM_1 - -/* Use asm. */ -#undef LZO_USE_ASM_2 - /* Name of package */ #undef PACKAGE @@ -387,13 +396,77 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to be the nanoseconds member of struct stat's st_mtim, if it exists. - */ -#undef ST_MTIM_NSEC - /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME +/* Define to 1 if the type of the st_atim member of a struct stat is struct + timespec. */ +#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable OpenBSD extensions on NetBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Version number of package */ #undef VERSION @@ -409,12 +482,30 @@ # endif #endif +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +#undef _NETBSD_SOURCE + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +#undef _POSIX_SOURCE + /* Define to empty if `const' does not conform to ANSI C. */ #undef const @@ -426,3 +517,5 @@ /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t + +#endif /* already included */ @@ -1,18 +1,16 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for lzop 1.03. +# Generated by GNU Autoconf 2.69 for lzop 1.04. # # Report bugs to <lzop-bugs@oberhumer.com>. # -# Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer. +# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer. # All Rights Reserved. # This configure script may be copied, distributed and modified under the # terms of the GNU General Public License; see COPYING for more details. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -96,6 +94,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -140,6 +139,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -173,7 +197,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -218,14 +243,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -328,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -449,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -557,8 +585,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='lzop' PACKAGE_TARNAME='lzop' -PACKAGE_VERSION='1.03' -PACKAGE_STRING='lzop 1.03' +PACKAGE_VERSION='1.04' +PACKAGE_STRING='lzop 1.04' PACKAGE_BUGREPORT='lzop-bugs@oberhumer.com' PACKAGE_URL='http://www.oberhumer.com/opensource/lzop/' @@ -600,27 +628,21 @@ ac_includes_default="\ # include <unistd.h> #endif" +ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -configure_CFLAGS -configure_CPPFLAGS AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR am__untar am__tar AMTAR -am__leading_dot SET_MAKE AWK mkdir_p @@ -643,6 +665,19 @@ INSTALL_PROGRAM EGREP GREP CPP +am__fastdepCCAS_FALSE +am__fastdepCCAS_TRUE +CCASDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__leading_dot +CCASFLAGS +CCAS OBJEXT EXEEXT ac_ct_CC @@ -709,8 +744,8 @@ enable_option_checking enable_maintainer_mode enable_asm enable_ansi -enable_largefile enable_dependency_tracking +enable_largefile enable_silent_rules ' ac_precious_vars='build_alias @@ -721,6 +756,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CCAS +CCASFLAGS CPP' @@ -1126,7 +1163,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1177,8 +1214,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1264,7 +1299,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lzop 1.03 to adapt to many kinds of systems. +\`configure' configures lzop 1.04 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1335,7 +1370,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lzop 1.03:";; + short | recursive ) echo "Configuration of lzop 1.04:";; esac cat <<\_ACEOF @@ -1343,15 +1378,18 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --disable-asm disable LZO assembly versions --disable-ansi disable ansi console + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-largefile omit support for large files - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") Some influential environment variables: CC C compiler command @@ -1361,6 +1399,8 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> + CCAS assembler compiler command (defaults to CC) + CCASFLAGS assembler compiler flags (defaults to CFLAGS) CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -1430,14 +1470,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -lzop configure 1.03 -generated by GNU Autoconf 2.67 +lzop configure 1.04 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer. +Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer. All Rights Reserved. This configure script may be copied, distributed and modified under the terms of the GNU General Public License; see COPYING for more details. @@ -1482,7 +1522,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1519,84 +1559,11 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using @@ -1605,10 +1572,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1675,7 +1642,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1684,10 +1651,83 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -1715,7 +1755,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1729,7 +1769,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1743,7 +1783,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1784,10 +1824,67 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -1805,7 +1902,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1821,7 +1919,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1847,7 +1946,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1863,7 +1963,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1897,7 +1998,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1961,7 +2063,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -1974,7 +2076,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2029,15 +2131,15 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lzop $as_me 1.03, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by lzop $as_me 1.04, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2316,6 +2418,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_list " sys/time.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2417,13 +2520,123 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + + + + + + + + + + + + + +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006-2017 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 2.70 or later everywhere, but since Autoconf mutates rapidly +# enough in this area it's likely we'll need to redefine +# AC_USE_SYSTEM_EXTENSIONS for quite some time. + +# If autoconf reports a warning +# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# the fix is +# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked +# but always AC_REQUIREd, +# 2) to ensure that for each occurrence of +# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +# or +# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +# the corresponding gnulib module description has 'extensions' among +# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS +# invocation occurs in gl_EARLY, not in gl_INIT. + +# AC_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +# +# Remember that #undef in AH_VERBATIM gets replaced with #define by +# AC_DEFINE. The goal here is to define all known feature-enabling +# macros, then, if reports of conflicts are made, disable macros that +# cause problems on some platforms (such as __EXTENSIONS__). +# AC_USE_SYSTEM_EXTENSIONS + +# gl_USE_SYSTEM_EXTENSIONS +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. + + + + + + + + + + + + +# + + + + + +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2017 Free Software +# Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + + + +# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) +# and NTFS (Cygwin). +# There was a time when this field was named st_createtime (21 June +# 2002 to 16 July 2002) But that window is very small and applied only +# to development code, so systems still using that configuration are +# not supported. See revisions 1.10 and 1.11 of FreeBSD's +# src/sys/ufs/ufs/dinode.h. +# + + + + + + # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -2457,7 +2670,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -2490,7 +2703,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then @@ -2620,7 +2833,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2632,7 +2845,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2660,7 +2873,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2672,7 +2885,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2713,7 +2926,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2725,7 +2938,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2753,7 +2966,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2766,7 +2979,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2812,7 +3025,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2824,7 +3037,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2856,7 +3069,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2868,7 +3081,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3139,7 +3352,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3190,7 +3403,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3227,7 +3440,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3305,7 +3518,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3314,8 +3527,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3400,6 +3612,274 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +# By default we simply use the C compiler to build assembly code. + +test "${CCAS+set}" = set || CCAS=$CC +test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS + + + +depcc="$CCAS" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CCAS_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CCAS_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CCAS_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } +CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then + am__fastdepCCAS_TRUE= + am__fastdepCCAS_FALSE='#' +else + am__fastdepCCAS_TRUE='#' + am__fastdepCCAS_FALSE= +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3412,7 +3892,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3538,144 +4018,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C preprocessor needs special flags" >&5 -$as_echo_n "checking whether the C preprocessor needs special flags... " >&6; } - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <limits.h> -#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -# include "your C preprocessor is broken 1" -#elif (0xffffu == 0xfffffffful) -# include "your C preprocessor is broken 2" -#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) -# include "your C preprocessor is broken 3" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF - -mfx_save_CPPFLAGS=$CPPFLAGS -mfx_tmp=ERROR -for mfx_arg in "" -no-cpp-precomp -do - CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" - if ac_fn_c_try_compile "$LINENO"; then : - mfx_tmp=$mfx_arg -break -fi -rm -f core conftest.err conftest.$ac_objext -done -CPPFLAGS=$mfx_save_CPPFLAGS -rm -f conftest.$ac_ext conftest.$ac_objext -case x$mfx_tmp in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xERROR) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR" >&5 -$as_echo "ERROR" >&6; } - as_fn_error $? "your C preprocessor is broken - for details see config.log" "$LINENO" 5 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mfx_tmp" >&5 -$as_echo "$mfx_tmp" >&6; } - CPPFLAGS="$mfx_tmp $CPPFLAGS" - ;; -esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3689,7 +4035,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3738,7 +4084,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3755,7 +4101,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3805,7 +4151,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3933,9 +4279,280 @@ done + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + + $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if ${ac_cv_should_define__xopen_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_should_define__xopen_source=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include <wchar.h> + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include <wchar.h> + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +$as_echo "$ac_cv_should_define__xopen_source" >&6; } + test $ac_cv_should_define__xopen_source = yes && + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C preprocessor needs special flags" >&5 +$as_echo_n "checking whether the C preprocessor needs special flags... " >&6; } + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> +#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) +# include "your C preprocessor is broken 1" +#elif (0xffffu == 0xfffffffful) +# include "your C preprocessor is broken 2" +#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) +# include "your C preprocessor is broken 3" +#endif + +int +main () +{ + + + ; + return 0; +} +_ACEOF + +mfx_save_CPPFLAGS=$CPPFLAGS +mfx_tmp=ERROR +for mfx_arg in "" -no-cpp-precomp +do + CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" + if ac_fn_c_try_compile "$LINENO"; then : + mfx_tmp=$mfx_arg +break +fi +rm -f core conftest.err conftest.$ac_objext +done +CPPFLAGS=$mfx_save_CPPFLAGS +rm -f conftest.$ac_ext conftest.$ac_objext +case x$mfx_tmp in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xERROR) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ERROR" >&5 +$as_echo "ERROR" >&6; } + as_fn_error $? "your C preprocessor is broken - for details see config.log" "$LINENO" 5 + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mfx_tmp" >&5 +$as_echo "$mfx_tmp" >&6; } + CPPFLAGS="$mfx_tmp $CPPFLAGS" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#ifndef __cplusplus + /* Ultrix mips cc rejects this sort of thing. */ + typedef int charset[2]; + const charset cs = { 0, 0 }; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes +else + ac_cv_c_const=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -4170,7 +4787,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -4221,7 +4838,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -4290,7 +4907,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -4357,10 +4974,12 @@ _ACEOF esac rm -rf conftest* fi + + fi -am__api_version='1.11' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -4379,7 +4998,7 @@ am__api_version='1.11' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4399,7 +5018,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4457,9 +5076,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -4470,32 +5086,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -4507,6 +5131,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -4517,9 +5151,6 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) @@ -4529,15 +5160,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4546,17 +5177,17 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -4568,7 +5199,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4596,7 +5227,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -4608,7 +5239,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4649,7 +5280,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4659,7 +5290,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -4688,19 +5319,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -4712,7 +5337,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4740,7 +5365,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -4767,76 +5392,44 @@ $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; fi -rmdir .tst 2>/dev/null - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else - AMDEP_TRUE='#' - AMDEP_FALSE= + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi - +AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output @@ -4860,7 +5453,7 @@ fi # Define the identity of the package. PACKAGE='lzop' - VERSION='1.03' + VERSION='1.04' cat >>confdefs.h <<_ACEOF @@ -4888,13 +5481,24 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' -AMTAR=${AMTAR-"${am_missing_run}tar"} +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' @@ -4903,15 +5507,16 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4945,16 +5550,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4963,16 +5568,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -5027,22 +5632,93 @@ fi +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=1;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' ac_config_headers="$ac_config_headers config.h:config.hin" + + # /*********************************************************************** # // Checks for header files 1) # ************************************************************************/ @@ -5050,7 +5726,7 @@ ac_config_headers="$ac_config_headers config.h:config.hin" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5103,7 +5779,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h is sane" >&5 $as_echo_n "checking whether limits.h is sane... " >&6; } -if test "${mfx_cv_header_sane_limits_h+set}" = set; then : +if ${mfx_cv_header_sane_limits_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5318,7 +5994,7 @@ fi if test "X$lzoconf_h_version" = X1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __lzo_init2 in -llzo" >&5 $as_echo_n "checking for __lzo_init2 in -llzo... " >&6; } -if test "${ac_cv_lib_lzo___lzo_init2+set}" = set; then : +if ${ac_cv_lib_lzo___lzo_init2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5352,7 +6028,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo___lzo_init2" >&5 $as_echo "$ac_cv_lib_lzo___lzo_init2" >&6; } -if test "x$ac_cv_lib_lzo___lzo_init2" = x""yes; then : +if test "x$ac_cv_lib_lzo___lzo_init2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLZO 1 _ACEOF @@ -5363,97 +6039,11 @@ else as_fn_error $? "LZO library v1 not found. Please check your installation or set the environment variable \`LDFLAGS'." "$LINENO" 5 fi - if test "X$enable_asm" != Xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo1x_decompress_asm_fast in -llzo" >&5 -$as_echo_n "checking for lzo1x_decompress_asm_fast in -llzo... " >&6; } -if test "${ac_cv_lib_lzo_lzo1x_decompress_asm_fast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzo $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lzo1x_decompress_asm_fast (); -int -main () -{ -return lzo1x_decompress_asm_fast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzo_lzo1x_decompress_asm_fast=yes -else - ac_cv_lib_lzo_lzo1x_decompress_asm_fast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo_lzo1x_decompress_asm_fast" >&5 -$as_echo "$ac_cv_lib_lzo_lzo1x_decompress_asm_fast" >&6; } -if test "x$ac_cv_lib_lzo_lzo1x_decompress_asm_fast" = x""yes; then : - -$as_echo "#define LZO_USE_ASM_1 1" >>confdefs.h - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _lzo1x_decompress_asm_fast in -llzo" >&5 -$as_echo_n "checking for _lzo1x_decompress_asm_fast in -llzo... " >&6; } -if test "${ac_cv_lib_lzo__lzo1x_decompress_asm_fast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzo $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _lzo1x_decompress_asm_fast (); -int -main () -{ -return _lzo1x_decompress_asm_fast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzo__lzo1x_decompress_asm_fast=yes -else - ac_cv_lib_lzo__lzo1x_decompress_asm_fast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo__lzo1x_decompress_asm_fast" >&5 -$as_echo "$ac_cv_lib_lzo__lzo1x_decompress_asm_fast" >&6; } -if test "x$ac_cv_lib_lzo__lzo1x_decompress_asm_fast" = x""yes; then : - -$as_echo "#define LZO_USE_ASM_2 1" >>confdefs.h - -fi - - fi fi if test "X$lzoconf_h_version" = X2; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __lzo_init_v2 in -llzo2" >&5 $as_echo_n "checking for __lzo_init_v2 in -llzo2... " >&6; } -if test "${ac_cv_lib_lzo2___lzo_init_v2+set}" = set; then : +if ${ac_cv_lib_lzo2___lzo_init_v2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5487,7 +6077,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo2___lzo_init_v2" >&5 $as_echo "$ac_cv_lib_lzo2___lzo_init_v2" >&6; } -if test "x$ac_cv_lib_lzo2___lzo_init_v2" = x""yes; then : +if test "x$ac_cv_lib_lzo2___lzo_init_v2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLZO2 1 _ACEOF @@ -5498,92 +6088,6 @@ else as_fn_error $? "LZO library v2 not found. Please check your installation or set the environment variable \`LDFLAGS'." "$LINENO" 5 fi - if test "X$enable_asm" != Xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo1x_decompress_asm_fast in -llzo2" >&5 -$as_echo_n "checking for lzo1x_decompress_asm_fast in -llzo2... " >&6; } -if test "${ac_cv_lib_lzo2_lzo1x_decompress_asm_fast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzo2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lzo1x_decompress_asm_fast (); -int -main () -{ -return lzo1x_decompress_asm_fast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzo2_lzo1x_decompress_asm_fast=yes -else - ac_cv_lib_lzo2_lzo1x_decompress_asm_fast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo2_lzo1x_decompress_asm_fast" >&5 -$as_echo "$ac_cv_lib_lzo2_lzo1x_decompress_asm_fast" >&6; } -if test "x$ac_cv_lib_lzo2_lzo1x_decompress_asm_fast" = x""yes; then : - -$as_echo "#define LZO_USE_ASM_1 1" >>confdefs.h - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _lzo1x_decompress_asm_fast in -llzo2" >&5 -$as_echo_n "checking for _lzo1x_decompress_asm_fast in -llzo2... " >&6; } -if test "${ac_cv_lib_lzo2__lzo1x_decompress_asm_fast+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llzo2 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _lzo1x_decompress_asm_fast (); -int -main () -{ -return _lzo1x_decompress_asm_fast (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lzo2__lzo1x_decompress_asm_fast=yes -else - ac_cv_lib_lzo2__lzo1x_decompress_asm_fast=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo2__lzo1x_decompress_asm_fast" >&5 -$as_echo "$ac_cv_lib_lzo2__lzo1x_decompress_asm_fast" >&6; } -if test "x$ac_cv_lib_lzo2__lzo1x_decompress_asm_fast" = x""yes; then : - -$as_echo "#define LZO_USE_ASM_2 1" >>confdefs.h - -fi - - fi fi @@ -5611,7 +6115,7 @@ done # ************************************************************************/ ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : +if test "x$ac_cv_type_off_t" = xyes; then : else @@ -5622,7 +6126,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : else @@ -5633,7 +6137,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -5645,7 +6149,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5676,49 +6180,119 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanoseconds member of struct stat.st_mtim" >&5 -$as_echo_n "checking for nanoseconds member of struct stat.st_mtim... " >&6; } -if test "${ac_cv_struct_st_mtim_nsec+set}" = set; then : + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h> + #include <sys/stat.h> +" +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_CPPFLAGS="$CPPFLAGS" - ac_cv_struct_st_mtim_nsec=no - # tv_nsec -- the usual case - # _tv_nsec -- Solaris 2.6, if - # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1 - # && !defined __EXTENSIONS__) - # st__tim.tv_nsec -- UnixWare 2.1.2 - for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do - CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <sys/types.h> -#include <sys/stat.h> + + #include <sys/types.h> + #include <sys/stat.h> + #if HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #include <time.h> + struct timespec ts; + struct stat st; + int main () { -struct stat s; s.st_mtim.ST_MTIM_NSEC; + + st.st_atim = ts; + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_st_mtim_nsec=$ac_val; break + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - CPPFLAGS="$ac_save_CPPFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5 -$as_echo "$ac_cv_struct_st_mtim_nsec" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + +$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + + fi +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h> + #include <sys/stat.h> +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : - if test $ac_cv_struct_st_mtim_nsec != no; then +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 +_ACEOF + + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> + #include <sys/stat.h> +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : cat >>confdefs.h <<_ACEOF -#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 _ACEOF - fi + +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h> + #include <sys/stat.h> +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 +_ACEOF + + +fi + +fi + +fi + +fi @@ -5729,7 +6303,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then : +if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : @@ -5762,7 +6336,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -5795,7 +6369,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : +if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : @@ -5829,7 +6403,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then : +if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : @@ -5862,7 +6436,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int16" >&5 $as_echo_n "checking size of __int16... " >&6; } -if test "${ac_cv_sizeof___int16+set}" = set; then : +if ${ac_cv_sizeof___int16+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int16))" "ac_cv_sizeof___int16" "$ac_includes_default"; then : @@ -5895,7 +6469,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int32" >&5 $as_echo_n "checking size of __int32... " >&6; } -if test "${ac_cv_sizeof___int32+set}" = set; then : +if ${ac_cv_sizeof___int32+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int32))" "ac_cv_sizeof___int32" "$ac_includes_default"; then : @@ -5928,7 +6502,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 $as_echo_n "checking size of __int64... " >&6; } -if test "${ac_cv_sizeof___int64+set}" = set; then : +if ${ac_cv_sizeof___int64+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : @@ -5962,7 +6536,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then : +if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : @@ -5995,7 +6569,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } -if test "${ac_cv_sizeof_size_t+set}" = set; then : +if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : @@ -6028,7 +6602,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ptrdiff_t" >&5 $as_echo_n "checking size of ptrdiff_t... " >&6; } -if test "${ac_cv_sizeof_ptrdiff_t+set}" = set; then : +if ${ac_cv_sizeof_ptrdiff_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ptrdiff_t))" "ac_cv_sizeof_ptrdiff_t" "$ac_includes_default"; then : @@ -6063,7 +6637,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int32" >&5 $as_echo_n "checking size of __int32... " >&6; } -if test "${ac_cv_sizeof___int32+set}" = set; then : +if ${ac_cv_sizeof___int32+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int32))" "ac_cv_sizeof___int32" "$ac_includes_default"; then : @@ -6096,7 +6670,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 $as_echo_n "checking size of intmax_t... " >&6; } -if test "${ac_cv_sizeof_intmax_t+set}" = set; then : +if ${ac_cv_sizeof_intmax_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then : @@ -6129,7 +6703,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintmax_t" >&5 $as_echo_n "checking size of uintmax_t... " >&6; } -if test "${ac_cv_sizeof_uintmax_t+set}" = set; then : +if ${ac_cv_sizeof_uintmax_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintmax_t))" "ac_cv_sizeof_uintmax_t" "$ac_includes_default"; then : @@ -6162,7 +6736,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intptr_t" >&5 $as_echo_n "checking size of intptr_t... " >&6; } -if test "${ac_cv_sizeof_intptr_t+set}" = set; then : +if ${ac_cv_sizeof_intptr_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intptr_t))" "ac_cv_sizeof_intptr_t" "$ac_includes_default"; then : @@ -6195,7 +6769,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 $as_echo_n "checking size of uintptr_t... " >&6; } -if test "${ac_cv_sizeof_uintptr_t+set}" = set; then : +if ${ac_cv_sizeof_uintptr_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then : @@ -6229,7 +6803,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 $as_echo_n "checking size of float... " >&6; } -if test "${ac_cv_sizeof_float+set}" = set; then : +if ${ac_cv_sizeof_float+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : @@ -6262,7 +6836,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 $as_echo_n "checking size of double... " >&6; } -if test "${ac_cv_sizeof_double+set}" = set; then : +if ${ac_cv_sizeof_double+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : @@ -6295,7 +6869,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 $as_echo_n "checking size of long double... " >&6; } -if test "${ac_cv_sizeof_long_double+set}" = set; then : +if ${ac_cv_sizeof_long_double+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : @@ -6329,7 +6903,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of dev_t" >&5 $as_echo_n "checking size of dev_t... " >&6; } -if test "${ac_cv_sizeof_dev_t+set}" = set; then : +if ${ac_cv_sizeof_dev_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (dev_t))" "ac_cv_sizeof_dev_t" "$ac_includes_default"; then : @@ -6362,7 +6936,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 $as_echo_n "checking size of fpos_t... " >&6; } -if test "${ac_cv_sizeof_fpos_t+set}" = set; then : +if ${ac_cv_sizeof_fpos_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then : @@ -6395,7 +6969,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mode_t" >&5 $as_echo_n "checking size of mode_t... " >&6; } -if test "${ac_cv_sizeof_mode_t+set}" = set; then : +if ${ac_cv_sizeof_mode_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mode_t))" "ac_cv_sizeof_mode_t" "$ac_includes_default"; then : @@ -6428,7 +7002,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } -if test "${ac_cv_sizeof_off_t+set}" = set; then : +if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : @@ -6461,7 +7035,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5 $as_echo_n "checking size of ssize_t... " >&6; } -if test "${ac_cv_sizeof_ssize_t+set}" = set; then : +if ${ac_cv_sizeof_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t" "$ac_includes_default"; then : @@ -6494,7 +7068,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 $as_echo_n "checking size of time_t... " >&6; } -if test "${ac_cv_sizeof_time_t+set}" = set; then : +if ${ac_cv_sizeof_time_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : @@ -6548,8 +7122,6 @@ case $host_os in cygwin* | mingw* | pw32*) test "X$LIBS" != "X" && LIBS="$LIBS " LIBS="${LIBS}-lwinmm" ;; -*) - ;; esac fi @@ -6569,28 +7141,28 @@ $as_echo_n "checking whether your compiler passes the ACC conformance test... " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define ACC_CONFIG_NO_HEADER 1 +#define ACC_CFG_NO_CONFIG_HEADER 1 #define ACC_WANT_ACC_INCD_H 1 #include "src/miniacc.h" -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT +#undef ACCCHK_ASSERT #define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) +#define ACC_WANT_ACC_CHK_CH 1 #include "src/miniacc.h" -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT +#undef ACCCHK_ASSERT #define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) static void test_acc_compile_time_assert(void) { +#define ACC_WANT_ACC_CHK_CH 1 #include "src/miniacc.h" } #undef NDEBUG #include <assert.h> -#define ACC_WANT_ACC_CHK_CH 1 -#undef ACCCHK_ASSERT -#define ACCCHK_ASSERT(expr) assert(expr); +#undef ACCCHK_ASSERT +#define ACCCHK_ASSERT(expr) assert(expr); static int test_acc_run_time_assert(int r) { +#define ACC_WANT_ACC_CHK_CH 1 #include "src/miniacc.h" return r; } @@ -6643,15 +7215,10 @@ if test -r .Conf.settings2; then . ./.Conf.settings2 fi -test "X$CPPFLAGS" != "X" && CPPFLAGS="$CPPFLAGS " -CPPFLAGS="${CPPFLAGS}-DLZOP_HAVE_CONFIG_H" - -configure_CPPFLAGS=$CPPFLAGS -configure_CFLAGS=$CFLAGS +my_DEFS="-DLZOP_HAVE_CONFIG_H=1" - -ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile" +ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6717,10 +7284,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -6755,11 +7333,23 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi - if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -6773,7 +7363,12 @@ else fi -: ${CONFIG_STATUS=./config.status} + test "X$DEFS" = "X-DHAVE_CONFIG_H" && DEFS= + test "X$DEFS" != "X" && DEFS="$DEFS " + DEFS="${DEFS}${my_DEFS}" + + +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -6874,6 +7469,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7069,16 +7665,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -7138,28 +7734,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -7180,8 +7764,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by lzop $as_me 1.03, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by lzop $as_me 1.04, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7247,11 +7831,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -lzop config.status 1.03 -configured by $0, generated by GNU Autoconf 2.67, +lzop config.status 1.04 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -7342,7 +7926,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -7379,8 +7963,6 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -7405,9 +7987,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -7415,12 +7998,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -7442,7 +8026,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -7470,7 +8054,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -7518,7 +8102,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -7550,7 +8134,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -7584,7 +8168,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -7596,8 +8180,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -7717,7 +8301,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -7752,7 +8336,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ + *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; @@ -7889,21 +8473,22 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -7914,20 +8499,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -7974,7 +8559,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -7987,7 +8572,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -8021,21 +8606,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -8116,6 +8699,7 @@ cat <<EOF configured for host : ${host_cpu}-${host_vendor}-${host_os} source code location : ${srcdir} compiler : ${CC} + preprocessor definitions : ${DEFS} preprocessor flags : ${CPPFLAGS} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} @@ -8124,7 +8708,7 @@ cat <<EOF ${PACKAGE_NAME} ${PACKAGE_VERSION} configured. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -8147,4 +8731,4 @@ After installing ${PACKAGE_NAME}, please read the accompanied documentation. EOF -# vi:ts=4:et +# vim:set ts=4 sw=4 et: diff --git a/configure.ac b/configure.ac index 7026021..6c506ed 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ # # This file is part of the lzop file compressor. # -# Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer # All Rights Reserved. # # lzop and the LZO library are free software; you can redistribute them @@ -19,7 +19,7 @@ # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. # If not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Markus F.X.J. Oberhumer # <markus@oberhumer.com> @@ -31,16 +31,17 @@ # // Init # ************************************************************************/ -AC_COPYRIGHT([Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer. +AC_COPYRIGHT([Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer. All Rights Reserved. This configure script may be copied, distributed and modified under the terms of the GNU General Public License; see COPYING for more details.]) -AC_PREREQ(2.67) -AC_INIT([lzop],[1.03],[lzop-bugs@oberhumer.com],[lzop],[http://www.oberhumer.com/opensource/lzop/]) +AC_PREREQ(2.69) +AC_INIT([lzop],[1.04],[lzop-bugs@oberhumer.com],[lzop],[http://www.oberhumer.com/opensource/lzop/]) AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION]) AC_CONFIG_SRCDIR(src/lzop.c) AC_CONFIG_AUX_DIR(autoconf) +m4_include([autoconf/local.m4]) AC_PREFIX_DEFAULT(/usr/local) AC_CANONICAL_BUILD AC_CANONICAL_HOST @@ -64,15 +65,21 @@ if test "X$enable_ansi" != Xno; then fi AC_PROG_CC +AM_PROG_CC_C_O +AM_PROG_AS AC_PROG_CPP +gl_USE_SYSTEM_EXTENSIONS mfx_PROG_CPPFLAGS AC_C_CONST mfx_ACC_CHECK_ENDIAN AC_SYS_LARGEFILE -AM_INIT_AUTOMAKE([1.11.1 foreign]) -AM_SILENT_RULES([no]) +AM_INIT_AUTOMAKE([1.14.1 foreign subdir-objects]) +AM_SILENT_RULES([yes]) AC_CONFIG_HEADERS([config.h:config.hin]) +AH_TOP([#ifndef LZOP_AUTOCONF_CONFIG_H_INCLUDED__ +#define LZOP_AUTOCONF_CONFIG_H_INCLUDED__ 1]) +AH_BOTTOM([#endif /* already included */]) # /*********************************************************************** @@ -137,17 +144,9 @@ fi if test "X$lzoconf_h_version" = X1; then AC_CHECK_LIB(lzo,__lzo_init2,,AC_MSG_ERROR([LZO library v1 not found. Please check your installation or set the environment variable \`LDFLAGS'.])) - if test "X$enable_asm" != Xno; then - AC_CHECK_LIB(lzo,lzo1x_decompress_asm_fast,AC_DEFINE(LZO_USE_ASM_1,1,[Use asm.])) - AC_CHECK_LIB(lzo,_lzo1x_decompress_asm_fast,AC_DEFINE(LZO_USE_ASM_2,1,[Use asm.])) - fi fi if test "X$lzoconf_h_version" = X2; then AC_CHECK_LIB(lzo2,__lzo_init_v2,,AC_MSG_ERROR([LZO library v2 not found. Please check your installation or set the environment variable \`LDFLAGS'.])) - if test "X$enable_asm" != Xno; then - AC_CHECK_LIB(lzo2,lzo1x_decompress_asm_fast,AC_DEFINE(LZO_USE_ASM_1,1,[Use asm.])) - AC_CHECK_LIB(lzo2,_lzo1x_decompress_asm_fast,AC_DEFINE(LZO_USE_ASM_2,1,[Use asm.])) - fi fi @@ -168,7 +167,7 @@ AC_TYPE_OFF_T AC_CHECK_TYPE(ptrdiff_t,long) AC_TYPE_SIZE_T AC_TYPE_SIGNAL -AC_STRUCT_ST_MTIM_NSEC +gl_STAT_TIME mfx_ACC_CHECK_SIZEOF mfx_CHECK_SIZEOF @@ -192,15 +191,14 @@ if test -r .Conf.settings2; then . ./.Conf.settings2 fi -test "X$CPPFLAGS" != "X" && CPPFLAGS="$CPPFLAGS " -CPPFLAGS="${CPPFLAGS}-DLZOP_HAVE_CONFIG_H" - -configure_CPPFLAGS=$CPPFLAGS -configure_CFLAGS=$CFLAGS -AC_SUBST(configure_CPPFLAGS) -AC_SUBST(configure_CFLAGS) +my_DEFS="-DLZOP_HAVE_CONFIG_H=1" -AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile]) +AC_CONFIG_COMMANDS_PRE([ + test "X$DEFS" = "X-DHAVE_CONFIG_H" && DEFS= + test "X$DEFS" != "X" && DEFS="$DEFS " + DEFS="${DEFS}${my_DEFS}" +]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -212,6 +210,7 @@ cat <<EOF configured for host : ${host_cpu}-${host_vendor}-${host_os} source code location : ${srcdir} compiler : ${CC} + preprocessor definitions : ${DEFS} preprocessor flags : ${CPPFLAGS} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} @@ -220,7 +219,7 @@ cat <<EOF ${PACKAGE_NAME} ${PACKAGE_VERSION} configured. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -243,4 +242,4 @@ After installing ${PACKAGE_NAME}, please read the accompanied documentation. EOF -# vi:ts=4:et +# vim:set ts=4 sw=4 et: diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index e0c12dc..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer -# - -SUFFIXES = .1 .html .man .pod .ps .tex .texi .txt - -man_MANS = lzop.1 - -BUILT_SOURCES = lzop.1 lzop.html lzop.man lzop.ps lzop.tex lzop.txt - -EXTRA_DIST = lzop.pod magic $(BUILT_SOURCES) - - -all-local: $(BUILT_SOURCES) - -doc-clean: - -rm -f $(BUILT_SOURCES) - - -.pod.1: - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="2010-11-01" $< > $@ - -.pod.html: - pod2html --noindex $< > $@ - -rm -f pod2htm* - -.pod.tex: - pod2latex $< - -.pod.txt: - pod2text < $< > $@ - -.1.man: - nroff -man $< > $@ - -.1.ps: - groff -man $< > $@ - diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 35b7dfc..0000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,457 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer -# -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(man_MANS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -configure_CFLAGS = @configure_CFLAGS@ -configure_CPPFLAGS = @configure_CPPFLAGS@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .1 .html .man .pod .ps .tex .texi .txt -man_MANS = lzop.1 -BUILT_SOURCES = lzop.1 lzop.html lzop.man lzop.ps lzop.tex lzop.txt -EXTRA_DIST = lzop.pod magic $(BUILT_SOURCES) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .1 .html .man .pod .ps .tex .texi .txt -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-man - -uninstall-man: uninstall-man1 - -.MAKE: all check install install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - distclean distclean-generic distdir dvi dvi-am html html-am \ - info info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-man uninstall-man1 - - -all-local: $(BUILT_SOURCES) - -doc-clean: - -rm -f $(BUILT_SOURCES) - -.pod.1: - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="2010-11-01" $< > $@ - -.pod.html: - pod2html --noindex $< > $@ - -rm -f pod2htm* - -.pod.tex: - pod2latex $< - -.pod.txt: - pod2text < $< > $@ - -.1.man: - nroff -man $< > $@ - -.1.ps: - groff -man $< > $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,26 +38,31 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ +.if !\nF .nr F 0 +.if \nF>0 \{\ . de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). @@ -124,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "LZOP 1" -.TH LZOP 1 "2010-11-06" "lzop 1.03" " " +.TH LZOP 1 "2017-08-10" "lzop 1.04" " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -189,7 +194,7 @@ is compressed into 40\-50% of the original size, and large files usually compress much better than small ones. Compression and decompression speed is generally much faster than that achieved by \fBgzip\fR, but compression ratio is worse. -.SS "\s-1COMPRESSION\s0 \s-1LEVELS\s0" +.SS "\s-1COMPRESSION LEVELS\s0" .IX Subsection "COMPRESSION LEVELS" lzop offers the following compression levels of the \&\s-1LZO1X\s0 algorithm: @@ -345,7 +350,7 @@ regardless of this option. When decompressing, do not restore the original file name if present (remove only the lzop suffix from the compressed file name). This option is the -default under \s-1UNIX\s0. +default under \s-1UNIX.\s0 .IP "\-N, \-\-name" 4 .IX Item "-N, --name" When decompressing, restore the original file name @@ -354,7 +359,7 @@ have a limit on file name length. If the original name saved in the compressed file is not suitable for its file system, a new name is constructed from the original one to make it legal. -This option is the default under \s-1DOS\s0, Windows and \s-1OS/2\s0. +This option is the default under \s-1DOS,\s0 Windows and \s-1OS/2.\s0 .IP "\-P" 4 .IX Item "-P" When decompressing, restore the original path and file name if present. @@ -380,13 +385,13 @@ when files are transferred to other systems. Do not delete input files. This is the default. .IP "\-U, \-\-unlink, \-\-delete" 4 .IX Item "-U, --unlink, --delete" -Delete input files after succesfull compression or +Delete input files after successful compression or decompression. Use this option to make lzop behave like \fBgzip\fR and \fBbzip2\fR. Note that explicitly giving \fB\-k\fR overrides \fB\-U\fR. .IP "\-\-crc32" 4 .IX Item "--crc32" -Use a crc32 checksum instead of a adler32 checksum. +Use a crc32 checksum instead of an adler32 checksum. .IP "\-\-no\-warn" 4 .IX Item "--no-warn" Suppress all warnings. @@ -559,14 +564,14 @@ For example: .Ve .PP On Vax/VMS, the name of the environment variable is -\&\s-1LZOP_OPT\s0, to avoid a conflict with the symbol set for +\&\s-1LZOP_OPT,\s0 to avoid a conflict with the symbol set for invocation of the program. .PP Not all of the options are valid in the environment variable \- lzop will tell you. .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fBbzip2\fR(1), \fBgzip\fR(1), \fBtar\fR(1) +\&\fBbzip2\fR(1), \fBgzip\fR(1), \fBtar\fR(1), \fBxz\fR(1) .PP Precompiled binaries for some platforms are available from the lzop home page. @@ -599,13 +604,12 @@ http://www.oberhumer.com/opensource/lzop/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" lzop and the \s-1LZO\s0 library are -Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010 by Markus Franz Xaver Johannes Oberhumer. +Copyright (C) 1996\-2017 Markus Franz Xaver Oberhumer <markus@oberhumer.com>. All Rights Reserved. .PP lzop and the \s-1LZO\s0 library are distributed under the terms of the \s-1GNU\s0 General Public License (\s-1GPL\s0). .PP Legal info: If want to integrate lzop into your commercial (backup\-)system -please carefully read the \s-1GNU\s0 \s-1GPL\s0 \s-1FAQ\s0 at http://www.gnu.org/licenses/gpl\-faq.html +please carefully read the \s-1GNU GPL FAQ\s0 at http://www.gnu.org/licenses/gpl\-faq.html about possible implications. diff --git a/doc/lzop.html b/doc/lzop.html index 662e4c9..cd9413f 100644 --- a/doc/lzop.html +++ b/doc/lzop.html @@ -2,615 +2,501 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> -<title>lzop - compress or expand files</title> +<title></title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:root@localhost" /> </head> -<body style="background-color: white"> +<body> -<!-- INDEX BEGIN --> -<div name="index"> -<p><a name="__index__"></a></p> -<!-- -<ul> +<h1 id="NAME">NAME</h1> - <li><a href="#name">NAME</a></li> - <li><a href="#abstract">ABSTRACT</a></li> - <li><a href="#synopsis">SYNOPSIS</a></li> - <li><a href="#description">DESCRIPTION</a></li> - <ul> +<p>lzop - compress or expand files</p> - <li><a href="#compression_levels">COMPRESSION LEVELS</a></li> - </ul> +<h1 id="ABSTRACT">ABSTRACT</h1> - <li><a href="#main_command">MAIN COMMAND</a></li> - <li><a href="#options">OPTIONS</a></li> - <li><a href="#other_options">OTHER OPTIONS</a></li> - <li><a href="#advanced_usage">ADVANCED USAGE</a></li> - <li><a href="#environment">ENVIRONMENT</a></li> - <li><a href="#see_also">SEE ALSO</a></li> - <li><a href="#diagnostics">DIAGNOSTICS</a></li> - <li><a href="#bugs">BUGS</a></li> - <li><a href="#author">AUTHOR</a></li> - <li><a href="#copyright">COPYRIGHT</a></li> -</ul> +<p><b>lzop</b> is a file compressor very similar to <b>gzip</b>. <b>lzop</b> favors speed over compression ratio.</p> ---> +<h1 id="SYNOPSIS">SYNOPSIS</h1> +<p><b>lzop</b> <span style="white-space: nowrap;">[ <i>command</i> ]</span> <span style="white-space: nowrap;">[ <i>options</i> ]</span> <span style="white-space: nowrap;">[ <i>filename</i> ... ]</span></p> -</div> -<!-- INDEX END --> +<p><b>lzop</b> <span style="white-space: nowrap;">[<b>-dxlthIVL19</b>]</span> <span style="white-space: nowrap;">[<b>-qvcfFnNPkU</b>]</span> <span style="white-space: nowrap;">[<b>-o</b> <i>file</i>]</span> <span style="white-space: nowrap;">[<b>-p</b>[<i>path</i>]]</span> <span style="white-space: nowrap;">[<b>-S</b> <i>suffix</i>]</span> <span style="white-space: nowrap;">[<i>filename</i> ...]</span></p> + +<h1 id="DESCRIPTION">DESCRIPTION</h1> + +<p><b>lzop</b> reduces the size of the named files. Whenever possible, each file is compressed into one with the extension <b>.lzo</b>, while keeping the same ownership modes, access and modification times. If no files are specified, or if a file name is "-", lzop tries to compress the standard input to the standard output. lzop will only attempt to compress regular files or symbolic links to regular files. In particular, it will ignore directories.</p> + +<p>If the compressed file name is too long for its file system, <b>lzop</b> truncates it.</p> + +<p>Compressed files can be restored to their original form using <span style="white-space: nowrap;"><b>lzop -d</b></span>. <span style="white-space: nowrap;"><b>lzop -d</b></span> takes a list of files on its command line and decompresses each file whose name ends with <b>.lzo</b> and which begins with the correct magic number to an uncompressed file without the original extension. <span style="white-space: nowrap;"><b>lzop -d</b></span> also recognizes the special extension <b>.tzo</b> as shorthand for <b>.tar.lzo</b>. When compressing, lzop uses the <b>.tzo</b> extension if necessary instead of truncating a file with a <b>.tar</b> extension.</p> + +<p><b>lzop</b> stores the original file name, mode and time stamp in the compressed file. These can be used when decompressing the file with the <b>-d</b> option. This is useful when the compressed file name was truncated or when the time stamp was not preserved after a file transfer.</p> + +<p><b>lzop</b> preserves the ownership, mode and time stamp of files when compressing. When decompressing lzop restores the mode and time stamp if present in the compressed files. See the options <b>-n</b>, <b>-N</b>, <b>--no-mode</b> and <b>--no-time</b> for more information.</p> + +<p><b>lzop</b> always keeps original files unchanged unless you use the option <b>-U</b>.</p> + +<p><b>lzop</b> uses the <i>LZO data compression library</i> for compression services. The amount of compression obtained depends on the size of the input and the distribution of common substrings. Typically, text such as source code or English is compressed into 40-50% of the original size, and large files usually compress much better than small ones. Compression and decompression speed is generally much faster than that achieved by <b>gzip</b>, but compression ratio is worse.</p> + +<h2 id="COMPRESSION-LEVELS">COMPRESSION LEVELS</h2> + +<p>lzop offers the following compression levels of the LZO1X algorithm:</p> -<p> -</p> -<h1><a name="name">NAME</a></h1> -<p>lzop - compress or expand files</p> -<p> -</p> -<hr /> -<h1><a name="abstract">ABSTRACT</a></h1> -<p><strong>lzop</strong> is a file compressor very similar to <strong>gzip</strong>. -<strong>lzop</strong> favors speed over compression ratio.</p> -<p> -</p> -<hr /> -<h1><a name="synopsis">SYNOPSIS</a></h1> -<p><strong>lzop</strong> [ <em>command</em> ] [ <em>options</em> ] [ <em>filename</em> ... ]</p> -<p><strong>lzop</strong> [<strong>-dxlthIVL19</strong>] [<strong>-qvcfFnNPkU</strong>] -[<strong>-o</strong> <em>file</em>] [<strong>-p</strong>[<em>path</em>]] [<strong>-S</strong> <em>suffix</em>] -[<em>filename</em> ...]</p> -<p> -</p> -<hr /> -<h1><a name="description">DESCRIPTION</a></h1> -<p><strong>lzop</strong> reduces the size of the named files. Whenever possible, -each file is compressed into one with the extension -<strong>.lzo</strong>, while keeping the same ownership modes, access and -modification times. If no files are specified, or if a -file name is "-", lzop tries to compress the standard -input to the standard output. lzop will only attempt to -compress regular files or symbolic links to regular files. -In particular, it will ignore directories.</p> -<p>If the compressed file name is too long for its file system, -<strong>lzop</strong> truncates it.</p> -<p>Compressed files can be restored to their original form -using <strong>lzop -d</strong>. -<strong>lzop -d</strong> takes a list of files on its command line and -decompresses each file whose name ends with <strong>.lzo</strong> and which -begins with the correct magic number to an uncompressed -file without the original extension. <strong>lzop -d</strong> also recognizes -the special extension <strong>.tzo</strong> as shorthand for <strong>.tar.lzo</strong>. -When compressing, lzop uses the <strong>.tzo</strong> extension if necessary -instead of truncating a file with a <strong>.tar</strong> extension.</p> -<p><strong>lzop</strong> stores the original file name, mode and time stamp -in the compressed file. These can be used when -decompressing the file with the <strong>-d</strong> option. This is useful when -the compressed file name was truncated or when the time -stamp was not preserved after a file transfer.</p> -<p><strong>lzop</strong> preserves the ownership, mode and time stamp of files -when compressing. When decompressing lzop restores the -mode and time stamp if present in the compressed files. -See the options <strong>-n</strong>, <strong>-N</strong>, <strong>--no-mode</strong> and <strong>--no-time</strong> -for more information.</p> -<p><strong>lzop</strong> always keeps original files unchanged unless -you use the option <strong>-U</strong>.</p> -<p><strong>lzop</strong> uses the <em>LZO data compression library</em> for compression -services. The amount of compression obtained depends on -the size of the input and the distribution of common substrings. -Typically, text such as source code or English -is compressed into 40-50% of the original size, and large files usually -compress much better than small ones. Compression and decompression speed -is generally much faster than that achieved by <strong>gzip</strong>, but -compression ratio is worse.</p> -<p> -</p> -<h2><a name="compression_levels">COMPRESSION LEVELS</a></h2> -<p>lzop offers the following compression levels of the -LZO1X algorithm:</p> <dl> -<dt><strong><a name="3" class="item">-3</a></strong></dt> +<dt id="pod-3">-3</dt> <dd> -<p>the default level offers pretty fast compression. --2, -3, -4, -5 and -6 are currently all equivalent - this -may change in a future release.</p> -</dd> -<dt><strong><a name="1_fast" class="item">-1, --fast</a></strong></dt> -<dd> -<p>can be even a little bit faster in some cases - but -most times you won't notice the difference</p> +<p>the default level offers pretty fast compression. -2, -3, -4, -5 and -6 are currently all equivalent - this may change in a future release.</p> + </dd> -<dt><strong><a name="7_8_9_best" class="item">-7, -8, -9, --best</a></strong></dt> +<dt id="fast">-1, --fast</dt> +<dd> + +<p>can be even a little bit faster in some cases - but most times you won't notice the difference</p> +</dd> +<dt id="best">-7, -8, -9, --best</dt> <dd> -<p>these compression levels are mainly intended for generating -pre-compressed data - especially <strong>-9</strong> can be somewhat slow</p> + +<p>these compression levels are mainly intended for generating pre-compressed data - especially <b>-9</b> can be somewhat slow</p> + </dd> </dl> -<p>Decompression is <em>very</em> fast for all compression levels, -and decompression speed is not affected by the compression -level.</p> -<p> -</p> -<hr /> -<h1><a name="main_command">MAIN COMMAND</a></h1> -<p>If no other command is given then lzop defaults to compression -(using compression level -3).</p> + +<p>Decompression is <i>very</i> fast for all compression levels, and decompression speed is not affected by the compression level.</p> + +<h1 id="MAIN-COMMAND">MAIN COMMAND</h1> + +<p>If no other command is given then lzop defaults to compression (using compression level -3).</p> + <dl> -<dt><strong><a name="fast_best" class="item">-#, --fast, --best</a></strong></dt> +<dt id="fast---best">-#, --fast, --best</dt> <dd> -<p>Regulate the speed of compression using the specified -digit <strong>#</strong>, where -1 or --fast indicates the -fastest compression method (less compression) and --9 or --best indicates the slowest compression -method (best compression). The default compression -level is -3.</p> -</dd> -<dt><strong><a name="d_decompress_uncompress" class="item">-d, --decompress, --uncompress</a></strong></dt> -<dd> -<p>Decompress. Each file will be placed into -same the directory as the compressed file.</p> -</dd> -<dt><strong><a name="x_extract" class="item">-x, --extract</a></strong></dt> +<p>Regulate the speed of compression using the specified digit <b>#</b>, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method (best compression). The default compression level is -3.</p> +</dd> +<dt id="d---decompress---uncompress">-d, --decompress, --uncompress</dt> <dd> -<p>Extract compressed files to the current working -directory. This is the same as '-dPp'.</p> + +<p>Decompress. Each file will be placed into same the directory as the compressed file.</p> + </dd> -<dt><strong><a name="t_test" class="item">-t, --test</a></strong></dt> +<dt id="x---extract">-x, --extract</dt> +<dd> + +<p>Extract compressed files to the current working directory. This is the same as '-dPp'.</p> +</dd> +<dt id="t---test">-t, --test</dt> <dd> + <p>Test. Check the compressed file integrity.</p> -</dd> -<dt><strong><a name="l_list" class="item">-l, --list</a></strong></dt> +</dd> +<dt id="l---list">-l, --list</dt> <dd> -<p>For each compressed file, list the following -fields:</p> -<pre> - method: compression method + +<p>For each compressed file, list the following fields:</p> + +<pre><code> method: compression method compressed: size of the compressed file uncompr.: size of the uncompressed file ratio: compression ratio - uncompressed_name: name of the uncompressed file</pre> -<p>In combination with the --verbose option, the following -fields are also displayed:</p> -<pre> - date & time: time stamp for the uncompressed file</pre> -<p>With --name, the uncompressed name, date and time -are those stored within the compress file if present.</p> -<p>With --verbose, the size totals and compression -ratio for all files is also displayed. With ---quiet, the title and totals lines are not displayed.</p> -<p>Note that lzop defines compression ratio -as compressed_size / uncompressed_size.</p> -</dd> -<dt><strong><a name="ls_ls_flags" class="item">--ls, --ls=<em>FLAGS</em></a></strong></dt> + uncompressed_name: name of the uncompressed file</code></pre> + +<p>In combination with the --verbose option, the following fields are also displayed:</p> + +<pre><code> date & time: time stamp for the uncompressed file</code></pre> + +<p>With --name, the uncompressed name, date and time are those stored within the compress file if present.</p> + +<p>With --verbose, the size totals and compression ratio for all files is also displayed. With --quiet, the title and totals lines are not displayed.</p> + +<p>Note that lzop defines compression ratio as compressed_size / uncompressed_size.</p> -<dd> -<p>List each compressed file in a format similar to <strong>ls -ln</strong>.</p> -<p>The following flags are currently honoured: - F Append a '*' for executable files. - G Inhibit display of group information. - Q Enclose file names in double quotes.</p> </dd> -<dt><strong><a name="info" class="item">--info</a></strong></dt> +<dt id="ls---ls-FLAGS">--ls, --ls=<i>FLAGS</i></dt> +<dd> + +<p>List each compressed file in a format similar to <span style="white-space: nowrap;"><b>ls -ln</b></span>.</p> + +<p>The following flags are currently honoured: F Append a '*' for executable files. G Inhibit display of group information. Q Enclose file names in double quotes.</p> +</dd> +<dt id="info">--info</dt> <dd> + <p>For each compressed file, list the internal header fields.</p> -</dd> -<dt><strong><a name="i_sysinfo" class="item">-I, --sysinfo</a></strong></dt> +</dd> +<dt id="I---sysinfo">-I, --sysinfo</dt> <dd> + <p>Display information about the system and quit.</p> -</dd> -<dt><strong><a name="l_license" class="item">-L, --license</a></strong></dt> +</dd> +<dt id="L---license">-L, --license</dt> <dd> + <p>Display the lzop license and quit.</p> -</dd> -<dt><strong><a name="h_h_help" class="item">-h, -H, --help</a></strong></dt> +</dd> +<dt id="h--H---help">-h, -H, --help</dt> <dd> + <p>Display a help screen and quit.</p> -</dd> -<dt><strong><a name="v" class="item">-V</a></strong></dt> -<dd> -<p>Version. Display the version number and compilation -options and quit.</p> </dd> -<dt><strong><a name="version" class="item">--version</a></strong></dt> +<dt id="V">-V</dt> +<dd> + +<p>Version. Display the version number and compilation options and quit.</p> +</dd> +<dt id="version">--version</dt> <dd> + <p>Version. Display the version number and quit.</p> + </dd> </dl> -<p> -</p> -<hr /> -<h1><a name="options">OPTIONS</a></h1> + +<h1 id="OPTIONS">OPTIONS</h1> + <dl> -<dt><strong><a name="c_stdout_to_stdout" class="item">-c, --stdout, --to-stdout</a></strong></dt> +<dt id="c---stdout---to-stdout">-c, --stdout, --to-stdout</dt> <dd> -<p>Write output on standard output. If there are several -input files, the output consists of a sequence -of independently (de)compressed members. To obtain -better compression, concatenate all input files -before compressing them.</p> -</dd> -<dt><strong><a name="o_file_output_file" class="item">-o <em>FILE</em>, --output=<em>FILE</em></a></strong></dt> -<dd> -<p>Write output to the file <em>FILE</em>. If there are several -input files, the output consists of a sequence -of independently (de)compressed members.</p> -</dd> -<dt><strong><a name="p_pdir_path_dir" class="item">-p, -p<em>DIR</em>, --path=<em>DIR</em></a></strong></dt> +<p>Write output on standard output. If there are several input files, the output consists of a sequence of independently (de)compressed members. To obtain better compression, concatenate all input files before compressing them.</p> +</dd> +<dt id="o-FILE---output-FILE">-o <i>FILE</i>, --output=<i>FILE</i></dt> <dd> -<p>Write output files into the directory <em>DIR</em> instead -of the directory determined by the input file. If -<em>DIR</em> is omitted, then write to the current working -directory.</p> + +<p>Write output to the file <i>FILE</i>. If there are several input files, the output consists of a sequence of independently (de)compressed members.</p> + </dd> -<dt><strong><a name="f_force" class="item">-f, --force</a></strong></dt> +<dt id="p--pDIR---path-DIR">-p, -p<i>DIR</i>, --path=<i>DIR</i></dt> +<dd> + +<p>Write output files into the directory <i>DIR</i> instead of the directory determined by the input file. If <i>DIR</i> is omitted, then write to the current working directory.</p> +</dd> +<dt id="f---force">-f, --force</dt> <dd> + <p>Force lzop to</p> -<pre> - - overwrite existing files + +<pre><code> - overwrite existing files - (de-)compress from stdin even if it seems a terminal - (de-)compress to stdout even if it seems a terminal - - allow option -c in combination with -U</pre> -<p>Using <strong>-f</strong> two or more times forces things like</p> -<pre> - - compress files that already have a .lzo suffix + - allow option -c in combination with -U</code></pre> + +<p>Using <b>-f</b> two or more times forces things like</p> + +<pre><code> - compress files that already have a .lzo suffix - try to decompress files that do not have a valid suffix - - try to handle compressed files with unknown header flags</pre> + - try to handle compressed files with unknown header flags</code></pre> + <p>Use with care.</p> -</dd> -<dt><strong><a name="f_no_checksum" class="item">-F, --no-checksum</a></strong></dt> -<dd> -<p>Do not store or verify a checksum of the uncompressed -file when compressing or decompressing. -This speeds up the operation of lzop a little bit (especially -when decompressing), but as unnoticed data corruption can happen -in case of damaged compressed files the usage of this option -is not generally recommended. -Also, a checksum is always stored when -compressing with one of the slow compression levels (-7, -8 or -9), -regardless of this option.</p> </dd> -<dt><strong><a name="n_no_name" class="item">-n, --no-name</a></strong></dt> - +<dt id="F---no-checksum">-F, --no-checksum</dt> <dd> -<p>When decompressing, do not restore the original -file name if present (remove only the lzop suffix -from the compressed file name). This option is the -default under UNIX.</p> -</dd> -<dt><strong><a name="n_name" class="item">-N, --name</a></strong></dt> -<dd> -<p>When decompressing, restore the original file name -if present. This option is useful on systems which -have a limit on file name length. If the original name saved in -the compressed file is not suitable for its file system, a -new name is constructed from the original one to make it -legal. -This option is the default under DOS, Windows and OS/2.</p> -</dd> -<dt><strong><a name="p" class="item">-P</a></strong></dt> +<p>Do not store or verify a checksum of the uncompressed file when compressing or decompressing. This speeds up the operation of lzop a little bit (especially when decompressing), but as unnoticed data corruption can happen in case of damaged compressed files the usage of this option is not generally recommended. Also, a checksum is always stored when compressing with one of the slow compression levels (-7, -8 or -9), regardless of this option.</p> -<dd> -<p>When decompressing, restore the original path and file name if present. -When compressing, store the relative (and cleaned) path name. -This option is mainly useful when using <strong>archive mode</strong> - see -usage examples below.</p> </dd> -<dt><strong><a name="no_mode" class="item">--no-mode</a></strong></dt> - +<dt id="n---no-name">-n, --no-name</dt> <dd> -<p>When decompressing, do not restore the original -mode (permissions) saved in the compressed file.</p> + +<p>When decompressing, do not restore the original file name if present (remove only the lzop suffix from the compressed file name). This option is the default under UNIX.</p> + </dd> -<dt><strong><a name="no_time" class="item">--no-time</a></strong></dt> +<dt id="N---name">-N, --name</dt> +<dd> +<p>When decompressing, restore the original file name if present. This option is useful on systems which have a limit on file name length. If the original name saved in the compressed file is not suitable for its file system, a new name is constructed from the original one to make it legal. This option is the default under DOS, Windows and OS/2.</p> + +</dd> +<dt id="P">-P</dt> <dd> -<p>When decompressing, do not restore the original -time stamp saved in the compressed file.</p> + +<p>When decompressing, restore the original path and file name if present. When compressing, store the relative (and cleaned) path name. This option is mainly useful when using <b>archive mode</b> - see usage examples below.</p> + </dd> -<dt><strong><a name="s_suf_suffix_suf" class="item">-S <em>.suf</em>, --suffix=<em>.suf</em></a></strong></dt> +<dt id="no-mode">--no-mode</dt> +<dd> + +<p>When decompressing, do not restore the original mode (permissions) saved in the compressed file.</p> +</dd> +<dt id="no-time">--no-time</dt> <dd> -<p>Use suffix <em>.suf</em> instead of <em>.lzo</em>. The suffix must -not contain multiple dots and special characters like '+' or '*', -and suffixes other than <em>.lzo</em> should be avoided to avoid confusion -when files are transferred to other systems.</p> + +<p>When decompressing, do not restore the original time stamp saved in the compressed file.</p> + </dd> -<dt><strong><a name="k_keep" class="item">-k, --keep</a></strong></dt> +<dt id="S-.suf---suffix-.suf">-S <i>.suf</i>, --suffix=<i>.suf</i></dt> +<dd> + +<p>Use suffix <i>.suf</i> instead of <i>.lzo</i>. The suffix must not contain multiple dots and special characters like '+' or '*', and suffixes other than <i>.lzo</i> should be avoided to avoid confusion when files are transferred to other systems.</p> +</dd> +<dt id="k---keep">-k, --keep</dt> <dd> + <p>Do not delete input files. This is the default.</p> -</dd> -<dt><strong><a name="u_unlink_delete" class="item">-U, --unlink, --delete</a></strong></dt> -<dd> -<p>Delete input files after succesfull compression or -decompression. Use this option to make lzop behave -like <strong>gzip</strong> and <strong>bzip2</strong>. -Note that explicitly giving <strong>-k</strong> overrides <strong>-U</strong>.</p> </dd> -<dt><strong><a name="crc32" class="item">--crc32</a></strong></dt> - +<dt id="U---unlink---delete">-U, --unlink, --delete</dt> <dd> -<p>Use a crc32 checksum instead of a adler32 checksum.</p> + +<p>Delete input files after successful compression or decompression. Use this option to make lzop behave like <b>gzip</b> and <b>bzip2</b>. Note that explicitly giving <b>-k</b> overrides <b>-U</b>.</p> + </dd> -<dt><strong><a name="no_warn" class="item">--no-warn</a></strong></dt> +<dt id="crc32">--crc32</dt> +<dd> +<p>Use a crc32 checksum instead of an adler32 checksum.</p> + +</dd> +<dt id="no-warn">--no-warn</dt> <dd> + <p>Suppress all warnings.</p> -</dd> -<dt><strong><a name="ignore_warn" class="item">--ignore-warn</a></strong></dt> +</dd> +<dt id="ignore-warn">--ignore-warn</dt> <dd> + <p>Suppress all warnings, and never exit with exit status 2.</p> -</dd> -<dt><strong><a name="q_quiet_silent" class="item">-q, --quiet, --silent</a></strong></dt> -<dd> -<p>Suppress all warnings and decrease the verbosity of some -commands like <strong>--list</strong> or <strong>--test</strong>.</p> </dd> -<dt><strong><a name="v_verbose" class="item">-v, --verbose</a></strong></dt> - +<dt id="q---quiet---silent">-q, --quiet, --silent</dt> <dd> -<p>Verbose. Display the name for each file compressed -or decompressed. Multiple <strong>-v</strong> can be used to increase -the verbosity of some commands like <strong>--list</strong> or <strong>--test</strong>.</p> + +<p>Suppress all warnings and decrease the verbosity of some commands like <b>--list</b> or <b>--test</b>.</p> + </dd> -<dt><strong><a name="__" class="item">--</a></strong></dt> +<dt id="v---verbose">-v, --verbose</dt> +<dd> + +<p>Verbose. Display the name for each file compressed or decompressed. Multiple <b>-v</b> can be used to increase the verbosity of some commands like <b>--list</b> or <b>--test</b>.</p> +</dd> +<dt id="pod">--</dt> <dd> -<p>Specifies that this is the end of the options. Any file name -after <strong>--</strong> will not be interpreted as an option even if -it starts with a hyphen.</p> + +<p>Specifies that this is the end of the options. Any file name after <b>--</b> will not be interpreted as an option even if it starts with a hyphen.</p> + </dd> </dl> -<p> -</p> -<hr /> -<h1><a name="other_options">OTHER OPTIONS</a></h1> + +<h1 id="OTHER-OPTIONS">OTHER OPTIONS</h1> + <dl> -<dt><strong><a name="no_stdin" class="item">--no-stdin</a></strong></dt> +<dt id="no-stdin">--no-stdin</dt> <dd> -<p>Do not try to read standard input (but a file name "-" will -still override this option). -In old versions of <strong>lzop</strong>, this option was necessary when -used in cron jobs (which do not have a controlling terminal).</p> -</dd> -<dt><strong><a name="filter_number" class="item">--filter=<em>NUMBER</em></a></strong></dt> +<p>Do not try to read standard input (but a file name "-" will still override this option). In old versions of <b>lzop</b>, this option was necessary when used in cron jobs (which do not have a controlling terminal).</p> + +</dd> +<dt id="filter-NUMBER">--filter=<i>NUMBER</i></dt> <dd> -<p>Rarely useful. -Preprocess data with a special "multimedia" filter -before compressing in order to improve compression ratio. -<em>NUMBER</em> must be a decimal number from 1 to 16, inclusive. -Using a filter slows down both compression and decompression -quite a bit, and the compression ratio usually doesn't improve -much either... -More effective filters may be added in the future, though.</p> -<p>You can try --filter=1 with data like 8-bit sound samples, ---filter=2 with 16-bit samples or depth-16 images, etc.</p> + +<p>Rarely useful. Preprocess data with a special "multimedia" filter before compressing in order to improve compression ratio. <i>NUMBER</i> must be a decimal number from 1 to 16, inclusive. Using a filter slows down both compression and decompression quite a bit, and the compression ratio usually doesn't improve much either... More effective filters may be added in the future, though.</p> + +<p>You can try <span style="white-space: nowrap;">--filter=1</span> with data like 8-bit sound samples, <span style="white-space: nowrap;">--filter=2</span> with 16-bit samples or depth-16 images, etc.</p> + <p>Un-filtering during decompression is handled automatically.</p> -</dd> -<dt><strong><a name="c_checksum" class="item">-C, --checksum</a></strong></dt> -<dd> -<p>Deprecated. Only for compatibility with very old versions -as lzop now uses a checksum by default. This option will -get removed in a future release.</p> </dd> -<dt><strong><a name="no_color" class="item">--no-color</a></strong></dt> +<dt id="C---checksum">-C, --checksum</dt> +<dd> + +<p>Deprecated. Only for compatibility with very old versions as lzop now uses a checksum by default. This option will get removed in a future release.</p> +</dd> +<dt id="no-color">--no-color</dt> <dd> + <p>Do not use any color escape sequences.</p> -</dd> -<dt><strong><a name="mono" class="item">--mono</a></strong></dt> -<dd> -<p>Assume a mono ANSI terminal. This is the default under UNIX -(if console support is compiled in).</p> </dd> -<dt><strong><a name="color" class="item">--color</a></strong></dt> +<dt id="mono">--mono</dt> +<dd> + +<p>Assume a mono ANSI terminal. This is the default under UNIX (if console support is compiled in).</p> +</dd> +<dt id="color">--color</dt> <dd> -<p>Assume a color ANSI terminal or try full-screen access. This -is the default under DOS and in a Linux virtual console -(if console support is compiled in).</p> + +<p>Assume a color ANSI terminal or try full-screen access. This is the default under DOS and in a Linux virtual console (if console support is compiled in).</p> + </dd> </dl> -<p> -</p> -<hr /> -<h1><a name="advanced_usage">ADVANCED USAGE</a></h1> -<p>lzop allows you to deal with your files in many flexible -ways. Here are some usage examples:</p> + +<h1 id="ADVANCED-USAGE">ADVANCED USAGE</h1> + +<p>lzop allows you to deal with your files in many flexible ways. Here are some usage examples:</p> + <dl> -<dt><strong><a name="backup_mode" class="item"><strong>backup mode</strong></a></strong></dt> +<dt id="backup-mode"><b>backup mode</b></dt> <dd> -<pre> - tar --use-compress-program=lzop -cf archive.tar.lzo files..</pre> -<pre> + +<pre><code> tar --use-compress-program=lzop -cf archive.tar.lzo files.. + This is the recommended mode for creating backups. Requires GNU tar or a compatible version which accepts the - '--use-compress-program=XXX' option.</pre> -</dd> -<dt><strong><a name="individually" class="item"><strong>single file mode:</strong> individually (de)compress each file</a></strong></dt> + '--use-compress-program=XXX' option.</code></pre> +</dd> +<dt id="single-file-mode:-individually-de-compress-each-file"><b>single file mode:</b> individually (de)compress each file</dt> <dd> -<pre> - create + +<pre><code> create lzop a.c -> create a.c.lzo lzop a.c b.c -> create a.c.lzo & b.c.lzo lzop -U a.c b.c -> create a.c.lzo & b.c.lzo and delete a.c & b.c - lzop *.c</pre> -<pre> + lzop *.c + extract lzop -d a.c.lzo -> restore a.c lzop -df a.c.lzo -> restore a.c, overwrite if already exists - lzop -d *.lzo</pre> -<pre> + lzop -d *.lzo + list lzop -l a.c.lzo lzop -l *.lzo - lzop -lv *.lzo -> be verbose</pre> -<pre> + lzop -lv *.lzo -> be verbose + test lzop -t a.c.lzo - lzop -tq *.lzo -> be quiet</pre> -</dd> -<dt><strong><a name="pipe_mode_de_compress_from_stdin_to_stdout" class="item"><strong>pipe mode:</strong> (de)compress from stdin to stdout</a></strong></dt> + lzop -tq *.lzo -> be quiet</code></pre> +</dd> +<dt id="pipe-mode:-de-compress-from-stdin-to-stdout"><b>pipe mode:</b> (de)compress from stdin to stdout</dt> <dd> -<pre> - create + +<pre><code> create lzop < a.c > y.lzo cat a.c | lzop > y.lzo - tar -cf - *.c | lzop > y.tar.lzo -> create a compressed tar file</pre> -<pre> + tar -cf - *.c | lzop > y.tar.lzo -> create a compressed tar file + extract lzop -d < y.lzo > a.c - lzop -d < y.tar.lzo | tar -xvf - -> extract a tar file</pre> -<pre> + lzop -d < y.tar.lzo | tar -xvf - -> extract a tar file + list lzop -l < y.lzo cat y.lzo | lzop -l - lzop -d < y.tar.lzo | tar -tvf - -> list a tar file</pre> -<pre> + lzop -d < y.tar.lzo | tar -tvf - -> list a tar file + test lzop -t < y.lzo - cat y.lzo | lzop -t</pre> -</dd> -<dt><strong><a name="stdout_mode_de_compress_to_stdout" class="item"><strong>stdout mode:</strong> (de)compress to stdout</a></strong></dt> + cat y.lzo | lzop -t</code></pre> +</dd> +<dt id="stdout-mode:-de-compress-to-stdout"><b>stdout mode:</b> (de)compress to stdout</dt> <dd> -<pre> - create - lzop -c a.c > y.lzo</pre> -<pre> + +<pre><code> create + lzop -c a.c > y.lzo + extract lzop -dc y.lzo > a.c - lzop -dc y.tar.lzo | tar -xvf - -> extract a tar file</pre> -<pre> + lzop -dc y.tar.lzo | tar -xvf - -> extract a tar file + list - lzop -dc y.tar.lzo | tar -tvf - -> list a tar file</pre> -</dd> -<dt><strong><a name="archive_mode_compress_extract_multiple_files_into_a_single_archive_file" class="item"><strong>archive mode:</strong> compress/extract multiple files into a single archive file</a></strong></dt> + lzop -dc y.tar.lzo | tar -tvf - -> list a tar file</code></pre> +</dd> +<dt id="archive-mode:-compress-extract-multiple-files-into-a-single-archive-file"><b>archive mode:</b> compress/extract multiple files into a single archive file</dt> <dd> -<pre> - create + +<pre><code> create lzop a.c b.c -o sources.lzo -> create an archive lzop -P src/*.c -o sources.lzo -> create an archive, store path name lzop -c *.c > sources.lzo -> another way to create an archive - lzop -c *.h >> sources.lzo -> add files to archive</pre> -<pre> + lzop -c *.h >> sources.lzo -> add files to archive + extract lzop -dN sources.lzo lzop -x ../src/sources.lzo -> extract to current directory - lzop -x -p/tmp < ../src/sources.lzo -> extract to /tmp directory</pre> -<pre> + lzop -x -p/tmp < ../src/sources.lzo -> extract to /tmp directory + list - lzop -lNv sources.lzo</pre> -<pre> + lzop -lNv sources.lzo + test lzop -t sources.lzo - lzop -tvv sources.lzo -> be very verbose</pre> + lzop -tvv sources.lzo -> be very verbose</code></pre> + </dd> </dl> -<p>If you wish to create a single archive file with multiple -members so that members can later be extracted independently, -you should prefer a full-featured archiver such as -tar. The latest version of GNU tar supports the -<strong>--use-compress-program=lzop</strong> option to invoke lzop transparently. -lzop is designed as a complement to tar, not as -a replacement.</p> -<p> -</p> -<hr /> -<h1><a name="environment">ENVIRONMENT</a></h1> -<p>The environment variable <strong>LZOP</strong> can hold a set of default -options for lzop. These options are interpreted first and -can be overwritten by explicit command line parameters. -For example:</p> -<pre> - for sh/ksh/zsh: LZOP="-1v --name"; export LZOP + +<p>If you wish to create a single archive file with multiple members so that members can later be extracted independently, you should prefer a full-featured archiver such as tar. The latest version of GNU tar supports the <span style="white-space: nowrap;"><b>--use-compress-program=lzop</b></span> option to invoke lzop transparently. lzop is designed as a complement to tar, not as a replacement.</p> + +<h1 id="ENVIRONMENT">ENVIRONMENT</h1> + +<p>The environment variable <b>LZOP</b> can hold a set of default options for lzop. These options are interpreted first and can be overwritten by explicit command line parameters. For example:</p> + +<pre><code> for sh/ksh/zsh: LZOP="-1v --name"; export LZOP for csh/tcsh: setenv LZOP "-1v --name" - for DOS/Windows: set LZOP=-1v --name</pre> -<p>On Vax/VMS, the name of the environment variable is -LZOP_OPT, to avoid a conflict with the symbol set for -invocation of the program.</p> -<p>Not all of the options are valid in the environment variable - -lzop will tell you.</p> -<p> -</p> -<hr /> -<h1><a name="see_also">SEE ALSO</a></h1> -<p><strong>bzip2</strong>(1), <strong>gzip</strong>(1), <strong>tar</strong>(1)</p> -<p>Precompiled binaries for some platforms are available -from the lzop home page.</p> -<pre> - see <a href="http://www.oberhumer.com/opensource/lzop/">http://www.oberhumer.com/opensource/lzop/</a></pre> -<p>lzop uses the LZO data compression library for compression -services.</p> -<pre> - see <a href="http://www.oberhumer.com/opensource/lzo/">http://www.oberhumer.com/opensource/lzo/</a></pre> -<p> -</p> -<hr /> -<h1><a name="diagnostics">DIAGNOSTICS</a></h1> -<p>Exit status is normally 0; if an error occurs, exit status -is 1. If a warning occurs, exit status is 2 (unless -option <strong>--ignore-warn</strong> is in effect).</p> -<p><strong>lzop's</strong> diagnostics are intended to be self-explanatory.</p> -<p> -</p> -<hr /> -<h1><a name="bugs">BUGS</a></h1> + for DOS/Windows: set LZOP=-1v --name</code></pre> + +<p>On Vax/VMS, the name of the environment variable is LZOP_OPT, to avoid a conflict with the symbol set for invocation of the program.</p> + +<p>Not all of the options are valid in the environment variable - lzop will tell you.</p> + +<h1 id="SEE-ALSO">SEE ALSO</h1> + +<p><b>bzip2</b>(1), <b>gzip</b>(1), <b>tar</b>(1), <b>xz</b>(1)</p> + +<p>Precompiled binaries for some platforms are available from the lzop home page.</p> + +<pre><code> see http://www.oberhumer.com/opensource/lzop/</code></pre> + +<p>lzop uses the LZO data compression library for compression services.</p> + +<pre><code> see http://www.oberhumer.com/opensource/lzo/</code></pre> + +<h1 id="DIAGNOSTICS">DIAGNOSTICS</h1> + +<p>Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2 (unless option <b>--ignore-warn</b> is in effect).</p> + +<p><b>lzop's</b> diagnostics are intended to be self-explanatory.</p> + +<h1 id="BUGS">BUGS</h1> + <p>No bugs are known. Please report all problems immediately to the author.</p> -<p> -</p> -<hr /> -<h1><a name="author">AUTHOR</a></h1> -<p>Markus Franz Xaver Johannes Oberhumer -<<a href="mailto:markus@oberhumer.com">markus@oberhumer.com</a>> -<a href="http://www.oberhumer.com/opensource/lzop/">http://www.oberhumer.com/opensource/lzop/</a></p> -<p> -</p> -<hr /> -<h1><a name="copyright">COPYRIGHT</a></h1> -<p>lzop and the LZO library are -Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010 by Markus Franz Xaver Johannes Oberhumer. -All Rights Reserved.</p> -<p>lzop and the LZO library are distributed under the terms -of the GNU General Public License (GPL).</p> -<p>Legal info: If want to integrate lzop into your commercial (backup-)system -please carefully read the GNU GPL FAQ at <a href="http://www.gnu.org/licenses/gpl-faq.html">http://www.gnu.org/licenses/gpl-faq.html</a> -about possible implications.</p> + +<h1 id="AUTHOR">AUTHOR</h1> + +<p>Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzop/</p> + +<h1 id="COPYRIGHT">COPYRIGHT</h1> + +<p>lzop and the LZO library are Copyright (C) 1996-2017 Markus Franz Xaver Oberhumer <markus@oberhumer.com>. All Rights Reserved.</p> + +<p>lzop and the LZO library are distributed under the terms of the GNU General Public License (GPL).</p> + +<p>Legal info: If want to integrate lzop into your commercial (backup-)system please carefully read the GNU GPL FAQ at http://www.gnu.org/licenses/gpl-faq.html about possible implications.</p> + </body> </html> + + diff --git a/doc/lzop.man b/doc/lzop.man index d86ddd9..9507060 100644 --- a/doc/lzop.man +++ b/doc/lzop.man @@ -2,61 +2,61 @@ LZOP(1) LZOP(1) -NNAAMMEE +[1mNAME[0m lzop - compress or expand files -AABBSSTTRRAACCTT - llzzoopp is a file compressor very similar to ggzziipp. llzzoopp favors speed over +[1mABSTRACT[0m + [1mlzop [22mis a file compressor very similar to [1mgzip[22m. [1mlzop [22mfavors speed over compression ratio. -SSYYNNOOPPSSIISS - llzzoopp [ _c_o_m_m_a_n_d ] [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ... ] +[1mSYNOPSIS[0m + [1mlzop [22m[ [4mcommand[24m ] [ [4moptions[24m ] [ [4mfilename[24m ... ] - llzzoopp [--ddxxlltthhIIVVLL1199] [--qqvvccffFFnnNNPPkkUU] [--oo _f_i_l_e] [--pp[_p_a_t_h]] [--SS _s_u_f_f_i_x] - [_f_i_l_e_n_a_m_e ...] + [1mlzop [22m[[1m-dxlthIVL19[22m] [[1m-qvcfFnNPkU[22m] [[1m-o [4m[22mfile[24m] [[1m-p[22m[[4mpath[24m]] [[1m-S [4m[22msuffix[24m] + [[4mfilename[24m ...] -DDEESSCCRRIIPPTTIIOONN - llzzoopp reduces the size of the named files. Whenever possible, each file - is compressed into one with the extension ..llzzoo, while keeping the same +[1mDESCRIPTION[0m + [1mlzop [22mreduces the size of the named files. Whenever possible, each file + is compressed into one with the extension [1m.lzo[22m, while keeping the same ownership modes, access and modification times. If no files are specified, or if a file name is "-", lzop tries to compress the standard input to the standard output. lzop will only attempt to compress regular files or symbolic links to regular files. In particular, it will ignore directories. - If the compressed file name is too long for its file system, llzzoopp + If the compressed file name is too long for its file system, [1mlzop[0m truncates it. - Compressed files can be restored to their original form using llzzoopp --dd. - llzzoopp --dd takes a list of files on its command line and decompresses each - file whose name ends with ..llzzoo and which begins with the correct magic - number to an uncompressed file without the original extension. llzzoopp --dd - also recognizes the special extension ..ttzzoo as shorthand for ..ttaarr..llzzoo. - When compressing, lzop uses the ..ttzzoo extension if necessary instead of - truncating a file with a ..ttaarr extension. + Compressed files can be restored to their original form using [1mlzop -d[22m. + [1mlzop -d [22mtakes a list of files on its command line and decompresses each + file whose name ends with [1m.lzo [22mand which begins with the correct magic + number to an uncompressed file without the original extension. [1mlzop -d[0m + also recognizes the special extension [1m.tzo [22mas shorthand for [1m.tar.lzo[22m. + When compressing, lzop uses the [1m.tzo [22mextension if necessary instead of + truncating a file with a [1m.tar [22mextension. - llzzoopp stores the original file name, mode and time stamp in the + [1mlzop [22mstores the original file name, mode and time stamp in the compressed file. These can be used when decompressing the file with the - --dd option. This is useful when the compressed file name was truncated + [1m-d [22moption. This is useful when the compressed file name was truncated or when the time stamp was not preserved after a file transfer. - llzzoopp preserves the ownership, mode and time stamp of files when + [1mlzop [22mpreserves the ownership, mode and time stamp of files when compressing. When decompressing lzop restores the mode and time stamp - if present in the compressed files. See the options --nn, --NN, ----nnoo--mmooddee - and ----nnoo--ttiimmee for more information. + if present in the compressed files. See the options [1m-n[22m, [1m-N[22m, [1m--no-mode[0m + and [1m--no-time [22mfor more information. - llzzoopp always keeps original files unchanged unless you use the option - --UU. + [1mlzop [22malways keeps original files unchanged unless you use the option + [1m-U[22m. - llzzoopp uses the _L_Z_O _d_a_t_a _c_o_m_p_r_e_s_s_i_o_n _l_i_b_r_a_r_y for compression services. + [1mlzop [22muses the [4mLZO[24m [4mdata[24m [4mcompression[24m [4mlibrary[24m for compression services. The amount of compression obtained depends on the size of the input and the distribution of common substrings. Typically, text such as source code or English is compressed into 40-50% of the original size, and large files usually compress much better than small ones. Compression and decompression speed is generally much faster than that achieved by - ggzziipp, but compression ratio is worse. + [1mgzip[22m, but compression ratio is worse. - CCOOMMPPRREESSSSIIOONN LLEEVVEELLSS + [1mCOMPRESSION LEVELS[0m lzop offers the following compression levels of the LZO1X algorithm: -3 the default level offers pretty fast compression. -2, -3, -4, -5 @@ -65,21 +65,21 @@ DDEESSCCRRIIPPTTIIOONN -1, --fast can be even a little bit faster in some cases - but most times you - won’t notice the difference + won't notice the difference -7, -8, -9, --best these compression levels are mainly intended for generating pre- - compressed data - especially --99 can be somewhat slow + compressed data - especially [1m-9 [22mcan be somewhat slow - Decompression is _v_e_r_y fast for all compression levels, and + Decompression is [4mvery[24m fast for all compression levels, and decompression speed is not affected by the compression level. -MMAAIINN CCOOMMMMAANNDD +[1mMAIN COMMAND[0m If no other command is given then lzop defaults to compression (using compression level -3). -#, --fast, --best - Regulate the speed of compression using the specified digit ##, + Regulate the speed of compression using the specified digit [1m#[22m, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method (best compression). The default compression level is -3. @@ -90,7 +90,7 @@ MMAAIINN CCOOMMMMAANNDD -x, --extract Extract compressed files to the current working directory. This is - the same as ’-dPp’. + the same as '-dPp'. -t, --test Test. Check the compressed file integrity. @@ -119,11 +119,11 @@ MMAAIINN CCOOMMMMAANNDD Note that lzop defines compression ratio as compressed_size / uncompressed_size. - --ls, --ls=_F_L_A_G_S - List each compressed file in a format similar to llss --llnn. + --ls, --ls=[4mFLAGS[0m + List each compressed file in a format similar to [1mls -ln[22m. The following flags are currently honoured: - F Append a ’*’ for executable files. + F Append a '*' for executable files. G Inhibit display of group information. Q Enclose file names in double quotes. @@ -145,21 +145,21 @@ MMAAIINN CCOOMMMMAANNDD --version Version. Display the version number and quit. -OOPPTTIIOONNSS +[1mOPTIONS[0m -c, --stdout, --to-stdout Write output on standard output. If there are several input files, the output consists of a sequence of independently (de)compressed members. To obtain better compression, concatenate all input files before compressing them. - -o _F_I_L_E, --output=_F_I_L_E - Write output to the file _F_I_L_E. If there are several input files, + -o [4mFILE[24m, --output=[4mFILE[0m + Write output to the file [4mFILE[24m. If there are several input files, the output consists of a sequence of independently (de)compressed members. - -p, -p_D_I_R, --path=_D_I_R - Write output files into the directory _D_I_R instead of the directory - determined by the input file. If _D_I_R is omitted, then write to the + -p, -p[4mDIR[24m, --path=[4mDIR[0m + Write output files into the directory [4mDIR[24m instead of the directory + determined by the input file. If [4mDIR[24m is omitted, then write to the current working directory. -f, --force @@ -170,7 +170,7 @@ OOPPTTIIOONNSS - (de-)compress to stdout even if it seems a terminal - allow option -c in combination with -U - Using --ff two or more times forces things like + Using [1m-f [22mtwo or more times forces things like - compress files that already have a .lzo suffix - try to decompress files that do not have a valid suffix @@ -202,7 +202,7 @@ OOPPTTIIOONNSS -P When decompressing, restore the original path and file name if present. When compressing, store the relative (and cleaned) path - name. This option is mainly useful when using aarrcchhiivvee mmooddee - see + name. This option is mainly useful when using [1marchive mode [22m- see usage examples below. --no-mode @@ -213,22 +213,22 @@ OOPPTTIIOONNSS When decompressing, do not restore the original time stamp saved in the compressed file. - -S _._s_u_f, --suffix=_._s_u_f - Use suffix _._s_u_f instead of _._l_z_o. The suffix must not contain - multiple dots and special characters like ’+’ or ’*’, and suffixes - other than _._l_z_o should be avoided to avoid confusion when files are + -S [4m.suf[24m, --suffix=[4m.suf[0m + Use suffix [4m.suf[24m instead of [4m.lzo[24m. The suffix must not contain + multiple dots and special characters like '+' or '*', and suffixes + other than [4m.lzo[24m should be avoided to avoid confusion when files are transferred to other systems. -k, --keep Do not delete input files. This is the default. -U, --unlink, --delete - Delete input files after succesfull compression or decompression. - Use this option to make lzop behave like ggzziipp and bbzziipp22. Note that - explicitly giving --kk overrides --UU. + Delete input files after successful compression or decompression. + Use this option to make lzop behave like [1mgzip [22mand [1mbzip2[22m. Note that + explicitly giving [1m-k [22moverrides [1m-U[22m. --crc32 - Use a crc32 checksum instead of a adler32 checksum. + Use a crc32 checksum instead of an adler32 checksum. --no-warn Suppress all warnings. @@ -238,30 +238,30 @@ OOPPTTIIOONNSS -q, --quiet, --silent Suppress all warnings and decrease the verbosity of some commands - like ----lliisstt or ----tteesstt. + like [1m--list [22mor [1m--test[22m. -v, --verbose Verbose. Display the name for each file compressed or decompressed. - Multiple --vv can be used to increase the verbosity of some commands - like ----lliisstt or ----tteesstt. + Multiple [1m-v [22mcan be used to increase the verbosity of some commands + like [1m--list [22mor [1m--test[22m. -- Specifies that this is the end of the options. Any file name after - ---- will not be interpreted as an option even if it starts with a + [1m-- [22mwill not be interpreted as an option even if it starts with a hyphen. -OOTTHHEERR OOPPTTIIOONNSS +[1mOTHER OPTIONS[0m --no-stdin Do not try to read standard input (but a file name "-" will still - override this option). In old versions of llzzoopp, this option was + override this option). In old versions of [1mlzop[22m, this option was necessary when used in cron jobs (which do not have a controlling terminal). - --filter=_N_U_M_B_E_R + --filter=[4mNUMBER[0m Rarely useful. Preprocess data with a special "multimedia" filter - before compressing in order to improve compression ratio. _N_U_M_B_E_R + before compressing in order to improve compression ratio. [4mNUMBER[0m must be a decimal number from 1 to 16, inclusive. Using a filter slows down both compression and decompression quite a bit, and the - compression ratio usually doesn’t improve much either... More + compression ratio usually doesn't improve much either... More effective filters may be added in the future, though. You can try --filter=1 with data like 8-bit sound samples, @@ -286,18 +286,18 @@ OOTTHHEERR OOPPTTIIOONNSS default under DOS and in a Linux virtual console (if console support is compiled in). -AADDVVAANNCCEEDD UUSSAAGGEE +[1mADVANCED USAGE[0m lzop allows you to deal with your files in many flexible ways. Here are some usage examples: - bbaacckkuupp mmooddee + [1mbackup mode[0m tar --use-compress-program=lzop -cf archive.tar.lzo files.. This is the recommended mode for creating backups. Requires GNU tar or a compatible version which accepts the '--use-compress-program=XXX' option. - ssiinnggllee ffiillee mmooddee:: individually (de)compress each file + [1msingle file mode: [22mindividually (de)compress each file create lzop a.c -> create a.c.lzo lzop a.c b.c -> create a.c.lzo & b.c.lzo @@ -318,7 +318,7 @@ AADDVVAANNCCEEDD UUSSAAGGEE lzop -t a.c.lzo lzop -tq *.lzo -> be quiet - ppiippee mmooddee:: (de)compress from stdin to stdout + [1mpipe mode: [22m(de)compress from stdin to stdout create lzop < a.c > y.lzo cat a.c | lzop > y.lzo @@ -337,7 +337,7 @@ AADDVVAANNCCEEDD UUSSAAGGEE lzop -t < y.lzo cat y.lzo | lzop -t - ssttddoouutt mmooddee:: (de)compress to stdout + [1mstdout mode: [22m(de)compress to stdout create lzop -c a.c > y.lzo @@ -348,7 +348,7 @@ AADDVVAANNCCEEDD UUSSAAGGEE list lzop -dc y.tar.lzo | tar -tvf - -> list a tar file - aarrcchhiivvee mmooddee:: compress/extract multiple files into a single archive + [1marchive mode: [22mcompress/extract multiple files into a single archive file create lzop a.c b.c -o sources.lzo -> create an archive @@ -371,12 +371,12 @@ AADDVVAANNCCEEDD UUSSAAGGEE If you wish to create a single archive file with multiple members so that members can later be extracted independently, you should prefer a full-featured archiver such as tar. The latest version of GNU tar - supports the ----uussee--ccoommpprreessss--pprrooggrraamm==llzzoopp option to invoke lzop + supports the [1m--use-compress-program=lzop [22moption to invoke lzop transparently. lzop is designed as a complement to tar, not as a replacement. -EENNVVIIRROONNMMEENNTT - The environment variable LLZZOOPP can hold a set of default options for +[1mENVIRONMENT[0m + The environment variable [1mLZOP [22mcan hold a set of default options for lzop. These options are interpreted first and can be overwritten by explicit command line parameters. For example: @@ -390,8 +390,8 @@ EENNVVIIRROONNMMEENNTT Not all of the options are valid in the environment variable - lzop will tell you. -SSEEEE AALLSSOO - bbzziipp22(1), ggzziipp(1), ttaarr(1) +[1mSEE ALSO[0m + [1mbzip2[22m(1), [1mgzip[22m(1), [1mtar[22m(1), [1mxz[22m(1) Precompiled binaries for some platforms are available from the lzop home page. @@ -402,25 +402,24 @@ SSEEEE AALLSSOO see http://www.oberhumer.com/opensource/lzo/ -DDIIAAGGNNOOSSTTIICCSS +[1mDIAGNOSTICS[0m Exit status is normally 0; if an error occurs, exit status is 1. If a - warning occurs, exit status is 2 (unless option ----iiggnnoorree--wwaarrnn is in + warning occurs, exit status is 2 (unless option [1m--ignore-warn [22mis in effect). - llzzoopp’’ss diagnostics are intended to be self-explanatory. + [1mlzop's [22mdiagnostics are intended to be self-explanatory. -BBUUGGSS +[1mBUGS[0m No bugs are known. Please report all problems immediately to the author. -AAUUTTHHOORR +[1mAUTHOR[0m Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzop/ -CCOOPPYYRRIIGGHHTT - lzop and the LZO library are Copyright (C) 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by - Markus Franz Xaver Johannes Oberhumer. All Rights Reserved. +[1mCOPYRIGHT[0m + lzop and the LZO library are Copyright (C) 1996-2017 Markus Franz Xaver + Oberhumer <markus@oberhumer.com>. All Rights Reserved. lzop and the LZO library are distributed under the terms of the GNU General Public License (GPL). @@ -431,4 +430,4 @@ CCOOPPYYRRIIGGHHTT -lzop 1.03 2010-11-06 LZOP(1) +lzop 1.04 2017-08-10 LZOP(1) diff --git a/doc/lzop.pod b/doc/lzop.pod index bef01b3..cd74861 100644 --- a/doc/lzop.pod +++ b/doc/lzop.pod @@ -297,14 +297,14 @@ Do not delete input files. This is the default. =item -U, --unlink, --delete -Delete input files after succesfull compression or +Delete input files after successful compression or decompression. Use this option to make lzop behave like B<gzip> and B<bzip2>. Note that explicitly giving B<-k> overrides B<-U>. =item --crc32 -Use a crc32 checksum instead of a adler32 checksum. +Use a crc32 checksum instead of an adler32 checksum. =item --no-warn @@ -511,7 +511,7 @@ lzop will tell you. =head1 SEE ALSO -B<bzip2>(1), B<gzip>(1), B<tar>(1) +B<bzip2>(1), B<gzip>(1), B<tar>(1), B<xz>(1) Precompiled binaries for some platforms are available from the lzop home page. @@ -552,8 +552,7 @@ http://www.oberhumer.com/opensource/lzop/ =head1 COPYRIGHT lzop and the LZO library are -Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010 by Markus Franz Xaver Johannes Oberhumer. +Copyright (C) 1996-2017 Markus Franz Xaver Oberhumer <markus@oberhumer.com>. All Rights Reserved. lzop and the LZO library are distributed under the terms diff --git a/doc/lzop.ps b/doc/lzop.ps index 341ad69..d73e259 100644 --- a/doc/lzop.ps +++ b/doc/lzop.ps @@ -1,17 +1,22 @@ %!PS-Adobe-3.0 -%%Creator: groff version 1.18.1.4 -%%CreationDate: Mon Nov 1 00:51:10 2010 +%%Creator: groff version 1.22.3 +%%CreationDate: Thu Aug 10 13:20:44 2017 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier -%%DocumentSuppliedResources: procset grops 1.18 1 +%%DocumentSuppliedResources: procset grops 1.22 3 %%Pages: 6 %%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () %%Orientation: Portrait %%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults %%BeginProlog -%%BeginResource: procset grops 1.18 1 +%%BeginResource: procset grops 1.22 3 +%!PS-Adobe-3.0 Resource-ProcSet /setpacking where{ pop currentpacking @@ -68,6 +73,7 @@ exch pop add exch pop /level0 save def 1 setlinecap 1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if 72 RES div dup scale LS{ 90 rotate @@ -79,7 +85,7 @@ LS{ /EP{ level0 restore showpage -}bind def +}def /DA{ newpath arcn stroke }bind def @@ -112,22 +118,31 @@ TM setmatrix /Fr{ setrgbcolor fill }bind def +/setcmykcolor where{ +pop /Fk{ setcmykcolor fill }bind def +}if /Fg{ setgray fill }bind def /FL/fill load def /LW/setlinewidth load def /Cr/setrgbcolor load def +/setcmykcolor where{ +pop /Ck/setcmykcolor load def +}if /Cg/setgray load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { -1 index/FID ne{def}{pop pop}ifelse +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def @@ -164,9 +179,11 @@ newpath /CNT countdictstack def userdict begin /showpage{}def +/setpagedevice{}def +mark }bind def /PEND{ -clear +cleartomark countdictstack CNT sub{end}repeat level1 restore }bind def @@ -176,6 +193,11 @@ pop setpacking }if %%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic @@ -210,609 +232,438 @@ def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE -%%EndProlog +%%EndSetup %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R/F1 -10.95/Times-Bold@0 SF -.219<4e41>72 84 S<4d45>.219 E F0 -<6c7a6f7020ad20636f6d7072657373206f722065>108 96 Q<7870616e64208c6c6573> --.15 E F1<414253545241>72 112.8 Q<4354>-.602 E/F2 10/Times-Bold@0 SF -<6c7a6f70>108 124.8 Q F0<69732061208c6c6520636f6d70726573736f722076>2.5 -E<6572792073696d696c617220746f>-.15 E F2<677a6970>2.5 E F0<2e>A F2 -<6c7a6f70>5 E F0 -.1<6661>2.5 G -.2<766f>-.1 G<7273207370656564206f>.2 E --.15<7665>-.15 G 2.5<7263>.15 G<6f6d7072657373696f6e20726174696f2e>-2.5 -E F1<53594e4f50534953>72 141.6 Q F2<6c7a6f70>108 153.6 Q F0<5b>2.5 E/F3 -10/Times-Italic@0 SF<636f6d6d616e64>2.5 E F0 2.5<5d5b>2.5 G F3 -<6f7074696f6e73>A F0 2.5<5d5b>2.5 G F3<8c6c656e616d65>A F0 2.5 -<2e2e2e205d>2.5 F F2<6c7a6f70>108 170.4 Q F0<5b>2.5 E F2 -<ad64786c746849564c3139>A F0 2.5<5d5b>C F2<ad71766366466e4e506b55>-2.5 E -F0 2.5<5d5b>C F2<ad6f>-2.5 E F3<8c6c65>2.5 E F0 2.5<5d5b>C F2<ad70>-2.5 -E F0<5b>A F3<70617468>A F0<5d5d205b>A F2<ad53>A F3<737566>2.5 E<8c78> --.18 E F0 2.5<5d5b>C F3<8c6c656e616d65>-2.5 E F0<2e2e2e5d>2.5 E F1 -<4445534352495054494f4e>72 187.2 Q F2<6c7a6f70>108 199.2 Q F0 1.534<7265 -6475636573207468652073697a65206f6620746865206e616d6564208c6c65732e205768 -656e65>4.035 F -.15<7665>-.25 G 4.034<7270>.15 G 1.534<6f737369626c652c -2065616368208c6c6520697320636f6d7072657373656420696e746f206f6e6520776974 -6820746865>-4.034 F -.15<6578>108 211.2 S<74656e73696f6e>.15 E F2 -<2e6c7a6f>3.985 E F0 3.985<2c77>C 1.485<68696c65206b>-3.985 F 1.485 -<656570696e67207468652073616d65206f>-.1 F 1.486<776e657273686970206d6f64 -65732c2061636365737320616e64206d6f64698c636174696f6e2074696d65732e204966 -206e6f208c6c657320617265>-.25 F .131 -<73706563698c65642c206f722069662061208c6c65206e616d652069732060>108 -223.2 R<60ad27>-.74 E .13<272c206c7a6f7020747269657320746f20636f6d707265 -737320746865207374616e6461726420696e70757420746f20746865207374616e646172 -64206f75747075742e206c7a6f702077696c6c>-.74 F 2.271 -<6f6e6c7920617474656d707420746f20636f6d7072657373207265>108 235.2 R -2.271 -<67756c6172208c6c6573206f722073796d626f6c6963206c696e6b7320746f207265> --.15 F 2.271<67756c6172208c6c65732e>-.15 F 2.272 -<496e20706172746963756c6172>7.271 F 4.772<2c69>-.4 G 4.772<7477>-4.772 G -2.272<696c6c2069676e6f7265>-4.772 F<6469726563746f726965732e>108 247.2 Q -<49662074686520636f6d70726573736564208c6c65206e616d6520697320746f6f206c -6f6e6720666f7220697473208c6c652073797374656d2c>108 264 Q F2<6c7a6f70>2.5 -E F0<7472756e63617465732069742e>2.5 E .966<436f6d70726573736564208c6c65 -732063616e20626520726573746f72656420746f207468656972206f726967696e616c20 -666f726d207573696e67>108 280.8 R F2<6c7a6f7020ad64>3.466 E F0<2e>A F2 -<6c7a6f7020ad64>5.965 E F0<74616b>3.465 E .965 -<65732061206c697374206f66208c6c6573206f6e20697473>-.1 F .99<636f6d6d616e -64206c696e6520616e64206465636f6d707265737365732065616368208c6c652077686f -7365206e616d6520656e64732077697468>108 292.8 R F2<2e6c7a6f>3.49 E F0 .99 -<616e64207768696368206265>3.49 F .99 -<67696e7320776974682074686520636f7272656374>-.15 F .702<6d61676963206e75 -6d62657220746f20616e20756e636f6d70726573736564208c6c6520776974686f757420 -746865206f726967696e616c2065>108 304.8 R<7874656e73696f6e2e>-.15 E F2 -<6c7a6f7020ad64>3.202 E F0 .702 -<616c736f207265636f676e697a657320746865207370656369616c>3.202 F -.15 -<6578>108 316.8 S<74656e73696f6e>.15 E F2<2e747a6f>4.507 E F0 2.008 -<61732073686f727468616e6420666f72>4.507 F F2<2e746172>4.508 E<2e6c7a6f> --1 E F0 7.008<2e57>C 2.008 -<68656e20636f6d7072657373696e672c206c7a6f70207573657320746865>-7.008 F -F2<2e747a6f>4.508 E F0 -.15<6578>4.508 G 2.008 -<74656e73696f6e206966206e6563657373617279>.15 F -<696e7374656164206f66207472756e636174696e672061208c6c6520776974682061> -108 328.8 Q F2<2e746172>2.5 E F0 -.15<6578>2.5 G<74656e73696f6e2e>.15 E -F2<6c7a6f70>108 345.6 Q F0 .978<73746f72657320746865206f726967696e616c20 -8c6c65206e616d652c206d6f646520616e642074696d65207374616d7020696e20746865 -20636f6d70726573736564208c6c652e2054686573652063616e20626520757365642077 -68656e>3.479 F .575 -<6465636f6d7072657373696e6720746865208c6c65207769746820746865>108 357.6 -R F2<ad64>3.075 E F0 .575<6f7074696f6e2e20546869732069732075736566756c20 -7768656e2074686520636f6d70726573736564208c6c65206e616d652077>3.075 F -.576<6173207472756e6361746564206f72>-.1 F -<7768656e207468652074696d65207374616d702077>108 369.6 Q -<6173206e6f742070726573657276>-.1 E -<65642061667465722061208c6c65207472616e73666572>-.15 E<2e>-.55 E F2 -<6c7a6f70>108 386.4 Q F0<70726573657276>2.954 E .454<657320746865206f> --.15 F .453<776e6572736869702c206d6f646520616e642074696d65207374616d7020 -6f66208c6c6573207768656e20636f6d7072657373696e672e205768656e206465636f6d -7072657373696e67206c7a6f70>-.25 F .453<726573746f72657320746865206d6f64 -6520616e642074696d65207374616d702069662070726573656e7420696e207468652063 -6f6d70726573736564208c6c65732e>108 398.4 R .453 -<53656520746865206f7074696f6e73>5.453 F F2<ad6e>2.953 E F0<2c>A F2<ad4e> -2.953 E F0<2c>A F2<adad6e6fad6d6f6465>2.953 E F0<616e64>108 410.4 Q F2 -<adad6e6fad74696d65>2.5 E F0<666f72206d6f726520696e666f726d6174696f6e2e> -2.5 E F2<6c7a6f70>108 427.2 Q F0<616c>2.5 E -.1<7761>-.1 G<7973206b>.1 E -<65657073206f726967696e616c208c6c657320756e6368616e67656420756e6c657373 -20796f752075736520746865206f7074696f6e>-.1 E F2<ad55>2.5 E F0<2e>A F2 -<6c7a6f70>108 444 Q F0 .136<7573657320746865>2.636 F/F4 9/Times-Italic@0 -SF<4c5a4f>2.636 E F3 .135<6461746120636f6d7072>2.636 F .135 -<657373696f6e206c696272>-.37 F<617279>-.15 E F0 .135<666f7220636f6d7072 -657373696f6e2073657276696365732e2054686520616d6f756e74206f6620636f6d7072 -657373696f6e206f627461696e6564>2.635 F .552<646570656e6473206f6e20746865 -2073697a65206f662074686520696e70757420616e64207468652064697374726962>108 -456 R .552<7574696f6e206f6620636f6d6d6f6e20737562737472696e67732e>-.2 F --.8<5479>5.553 G<706963616c6c79>.8 E 3.053<2c74>-.65 G -.15<6578>-3.053 -G 3.053<7473>.15 G .553<75636820617320736f75726365>-3.053 F 1.332<636f64 -65206f7220456e676c69736820697320636f6d7072657373656420696e746f203430ad35 -3025206f6620746865206f726967696e616c2073697a652c20616e64206c6172>108 468 -R 1.332<6765208c6c657320757375616c6c7920636f6d7072657373206d756368>-.18 -F .64<626574746572207468616e20736d616c6c206f6e65732e20436f6d707265737369 -6f6e20616e64206465636f6d7072657373696f6e2073706565642069732067656e657261 -6c6c79206d7563682066>108 480 R .64 -<6173746572207468616e2074686174206163686965>-.1 F -.15<7665>-.25 G<64> -.15 E<6279>108 492 Q F2<677a6970>2.5 E F0 2.5<2c62>C -<757420636f6d7072657373696f6e20726174696f2069732077>-2.7 E<6f7273652e> --.1 E/F5 9/Times-Bold@0 SF .25<434f4d5052455353494f4e204c4556454c53>87 -508.8 R F0<6c7a6f70206f66>108 520.8 Q<666572732074686520666f6c6c6f>-.25 -E<77696e6720636f6d7072657373696f6e206c65>-.25 E -.15<7665>-.25 G -<6c73206f6620746865>.15 E/F6 9/Times-Roman@0 SF<4c5a4f3158>2.5 E F0 -<616c676f726974686d3a>2.5 E 6.86<ad3320746865>108 537.6 R<646566>3.326 E -.826<61756c74206c65>-.1 F -.15<7665>-.25 G 3.326<6c6f>.15 G -.25<6666> --3.326 G .826<657273207072657474792066>.25 F .825 -<61737420636f6d7072657373696f6e2e>-.1 F .825<ad322c20ad332c20ad342c20ad -3520616e6420ad36206172652063757272656e746c7920616c6c2065717569>5.825 F --.25<7661>-.25 G .825<6c656e7420ad>.25 F<74686973206d6179206368616e6765 -20696e2061206675747572652072656c656173652e>128 549.6 Q<ad312c20adad66> -108 566.4 Q<617374>-.1 E<63616e2062652065>128 578.4 Q -.15<7665>-.25 G -2.5<6e616c>.15 G<6974746c65206269742066>-2.5 E -<617374657220696e20736f6d6520636173657320ad2062>-.1 E -<7574206d6f73742074696d657320796f752077>-.2 E<6f6e27>-.1 E 2.5<746e>-.18 -G<6f746963652074686520646966>-2.5 E<666572656e6365>-.25 E -<ad372c20ad382c20ad392c20adad62657374>108 595.2 Q .537 -<746865736520636f6d7072657373696f6e206c65>128 607.2 R -.15<7665>-.25 G -.538<6c7320617265206d61696e6c7920696e74656e64656420666f722067656e657261 -74696e67207072652d636f6d70726573736564206461746120ad20657370656369616c6c -79>.15 F F2<ad39>3.038 E F0<63616e>3.038 E<626520736f6d65>128 619.2 Q -<7768617420736c6f>-.25 E<77>-.25 E 1.708 -<4465636f6d7072657373696f6e206973>108 636 R F3<76657279>4.208 E F0 -.1 -<6661>4.208 G 1.708<737420666f7220616c6c20636f6d7072657373696f6e206c65> -.1 F -.15<7665>-.25 G 1.707<6c732c20616e64206465636f6d7072657373696f6e20 -7370656564206973206e6f74206166>.15 F 1.707<66656374656420627920746865> --.25 F<636f6d7072657373696f6e206c65>108 648 Q -.15<7665>-.25 G<6c2e>.15 -E F1<4d41494e20434f4d4d414e44>72 664.8 Q F0 -<4966206e6f206f7468657220636f6d6d616e64206973206769>108 676.8 Q -.15 -<7665>-.25 G 2.5<6e74>.15 G<68656e206c7a6f7020646566>-2.5 E<61756c747320 -746f20636f6d7072657373696f6e20287573696e6720636f6d7072657373696f6e206c65> --.1 E -.15<7665>-.25 G 2.5<6cad>.15 G<33292e>-2.5 E<ad232c20adad66>108 -693.6 Q<6173742c20adad62657374>-.1 E<5265>128 705.6 Q .325<67756c617465 -20746865207370656564206f6620636f6d7072657373696f6e207573696e672074686520 -73706563698c6564206469676974>-.15 F F2<23>2.826 E F0 2.826<2c77>C .326 -<6865726520ad31206f7220adad66>-2.826 F .326 -<61737420696e64696361746573207468652066>-.1 F<617374657374>-.1 E .864<63 -6f6d7072657373696f6e206d6574686f6420286c65737320636f6d7072657373696f6e29 -20616e6420ad39206f7220adad6265737420696e646963617465732074686520736c6f> -128 717.6 R .864<7765737420636f6d7072657373696f6e206d6574686f64>-.25 F -<286265737420636f6d7072657373696f6e292e2054686520646566>128 729.6 Q -<61756c7420636f6d7072657373696f6e206c65>-.1 E -.15<7665>-.25 G 2.5<6c69> -.15 G 2.5<73ad>-2.5 G<332e>-2.5 E<6c7a6f7020312e3033>72 768 Q 203.17 -<323031302d31312d30362031>173.45 F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R/F1 10.95 +/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(lzop \255 compress or e) +108 96 Q(xpand \214les)-.15 E F1(ABSTRA)72 112.8 Q(CT)-.602 E/F2 10 +/Times-Bold@0 SF(lzop)108 124.8 Q F0(is a \214le compressor v)2.5 E +(ery similar to)-.15 E F2(gzip)2.5 E F0(.)A F2(lzop)5 E F0 -.1(fa)2.5 G +-.2(vo)-.1 G(rs speed o).2 E -.15(ve)-.15 G 2.5(rc).15 G +(ompression ratio.)-2.5 E F1(SYNOPSIS)72 141.6 Q F2(lzop)108 153.6 Q F0 +([)2.5 E/F3 10/Times-Italic@0 SF(command)2.5 E F0 2.5(][)2.5 G F3 +(options)A F0 2.5(][)2.5 G F3(\214lename)A F0 2.5(... ])2.5 F F2(lzop) +108 170.4 Q F0([)2.5 E F2(\255dxlthIVL19)A F0 2.5(][)C F2 +(\255qvcfFnNPkU)-2.5 E F0 2.5(][)C F2<ad6f>-2.5 E F3(\214le)2.5 E F0 2.5 +(][)C F2<ad70>-2.5 E F0([)A F3(path)A F0(]] [)A F2<ad53>A F3(suf)2.5 E +<8c78>-.18 E F0 2.5(][)C F3(\214lename)-2.5 E F0(...])2.5 E F1 +(DESCRIPTION)72 187.2 Q F2(lzop)108 199.2 Q F0 1.534 +(reduces the size of the named \214les. Whene)4.035 F -.15(ve)-.25 G +4.034(rp).15 G 1.534 +(ossible, each \214le is compressed into one with the)-4.034 F -.15(ex) +108 211.2 S(tension).15 E F2(.lzo)3.985 E F0 3.985(,w)C 1.485(hile k) +-3.985 F 1.485(eeping the same o)-.1 F 1.486 +(wnership modes, access and modi\214cation times. If no \214les are)-.25 +F .131(speci\214ed, or if a \214le name is `)108 223.2 R(`\255')-.74 E +.13(', lzop tries to compress the standard input to the standard output\ +. lzop will)-.74 F 2.271(only attempt to compress re)108 235.2 R 2.271 +(gular \214les or symbolic links to re)-.15 F 2.271(gular \214les.)-.15 +F 2.272(In particular)7.271 F 4.772(,i)-.4 G 4.772(tw)-4.772 G 2.272 +(ill ignore)-4.772 F(directories.)108 247.2 Q +(If the compressed \214le name is too long for its \214le system,)108 +264 Q F2(lzop)2.5 E F0(truncates it.)2.5 E .966 +(Compressed \214les can be restored to their original form using)108 +280.8 R F2(lzop \255d)3.466 E F0(.)A F2(lzop \255d)5.965 E F0(tak)3.465 +E .965(es a list of \214les on its)-.1 F .99 +(command line and decompresses each \214le whose name ends with)108 +292.8 R F2(.lzo)3.49 E F0 .99(and which be)3.49 F .99 +(gins with the correct)-.15 F .702 +(magic number to an uncompressed \214le without the original e)108 304.8 +R(xtension.)-.15 E F2(lzop \255d)3.202 E F0 .702 +(also recognizes the special)3.202 F -.15(ex)108 316.8 S(tension).15 E +F2(.tzo)4.507 E F0 2.008(as shorthand for)4.507 F F2(.tar)4.508 E(.lzo) +-1 E F0 7.008(.W)C 2.008(hen compressing, lzop uses the)-7.008 F F2 +(.tzo)4.508 E F0 -.15(ex)4.508 G 2.008(tension if necessary).15 F +(instead of truncating a \214le with a)108 328.8 Q F2(.tar)2.5 E F0 -.15 +(ex)2.5 G(tension.).15 E F2(lzop)108 345.6 Q F0 .978(stores the origina\ +l \214le name, mode and time stamp in the compressed \214le. These can \ +be used when)3.479 F .575(decompressing the \214le with the)108 357.6 R +F2<ad64>3.075 E F0 .575 +(option. This is useful when the compressed \214le name w)3.075 F .576 +(as truncated or)-.1 F(when the time stamp w)108 369.6 Q(as not preserv) +-.1 E(ed after a \214le transfer)-.15 E(.)-.55 E F2(lzop)108 386.4 Q F0 +(preserv)2.954 E .454(es the o)-.15 F .453(wnership, mode and time stam\ +p of \214les when compressing. When decompressing lzop)-.25 F .453 +(restores the mode and time stamp if present in the compressed \214les.) +108 398.4 R .453(See the options)5.453 F F2<ad6e>2.953 E F0(,)A F2<ad4e> +2.953 E F0(,)A F2(\255\255no\255mode)2.953 E F0(and)108 410.4 Q F2 +(\255\255no\255time)2.5 E F0(for more information.)2.5 E F2(lzop)108 +427.2 Q F0(al)2.5 E -.1(wa)-.1 G(ys k).1 E +(eeps original \214les unchanged unless you use the option)-.1 E F2 +<ad55>2.5 E F0(.)A F2(lzop)108 444 Q F0 .136(uses the)2.636 F/F4 9 +/Times-Italic@0 SF(LZO)2.636 E F3 .135(data compr)2.636 F .135 +(ession libr)-.37 F(ary)-.15 E F0 .135 +(for compression services. The amount of compression obtained)2.635 F +.552(depends on the size of the input and the distrib)108 456 R .552 +(ution of common substrings.)-.2 F -.8(Ty)5.553 G(pically).8 E 3.053(,t) +-.65 G -.15(ex)-3.053 G 3.053(ts).15 G .553(uch as source)-3.053 F 1.332 +(code or English is compressed into 40\25550% of the original size, and\ + lar)108 468 R 1.332(ge \214les usually compress much)-.18 F .64(better\ + than small ones. Compression and decompression speed is generally much\ + f)108 480 R .64(aster than that achie)-.1 F -.15(ve)-.25 G(d).15 E(by) +108 492 Q F2(gzip)2.5 E F0 2.5(,b)C(ut compression ratio is w)-2.7 E +(orse.)-.1 E/F5 9/Times-Bold@0 SF(COMPRESSION LEVELS)87 508.8 Q F0 +(lzop of)108 520.8 Q(fers the follo)-.25 E(wing compression le)-.25 E +-.15(ve)-.25 G(ls of the).15 E/F6 9/Times-Roman@0 SF(LZO1X)2.5 E F0 +(algorithm:)2.5 E<ad33>108 537.6 Q .826(the def)128 537.6 R .826 +(ault le)-.1 F -.15(ve)-.25 G 3.326(lo).15 G -.25(ff)-3.326 G .826 +(ers pretty f).25 F .825(ast compression.)-.1 F .825 +(\2552, \2553, \2554, \2555 and \2556 are currently all equi)5.825 F +-.25(va)-.25 G .825(lent \255).25 F +(this may change in a future release.)128 549.6 Q<ad312c20adad66>108 +566.4 Q(ast)-.1 E(can be e)128 578.4 Q -.15(ve)-.25 G 2.5(nal).15 G +(ittle bit f)-2.5 E(aster in some cases \255 b)-.1 E +(ut most times you w)-.2 E(on')-.1 E 2.5(tn)-.18 G(otice the dif)-2.5 E +(ference)-.25 E(\2557, \2558, \2559, \255\255best)108 595.2 Q .537 +(these compression le)128 607.2 R -.15(ve)-.25 G .538(ls are mainly int\ +ended for generating pre-compressed data \255 especially).15 F F2<ad39> +3.038 E F0(can)3.038 E(be some)128 619.2 Q(what slo)-.25 E(w)-.25 E +1.708(Decompression is)108 636 R F3(very)4.208 E F0 -.1(fa)4.208 G 1.708 +(st for all compression le).1 F -.15(ve)-.25 G 1.707 +(ls, and decompression speed is not af).15 F 1.707(fected by the)-.25 F +(compression le)108 648 Q -.15(ve)-.25 G(l.).15 E F1(MAIN COMMAND)72 +664.8 Q F0(If no other command is gi)108 676.8 Q -.15(ve)-.25 G 2.5(nt) +.15 G(hen lzop def)-2.5 E(aults to compression \(using compression le) +-.1 E -.15(ve)-.25 G 2.5<6cad>.15 G(3\).)-2.5 E<ad232c20adad66>108 693.6 +Q(ast, \255\255best)-.1 E(Re)128 705.6 Q .325 +(gulate the speed of compression using the speci\214ed digit)-.15 F F2 +(#)2.826 E F0 2.826(,w)C .326(here \2551 or \255\255f)-2.826 F .326 +(ast indicates the f)-.1 F(astest)-.1 E .864(compression method \(less \ +compression\) and \2559 or \255\255best indicates the slo)128 717.6 R +.864(west compression method)-.25 F(\(best compression\). The def)128 +729.6 Q(ault compression le)-.1 E -.15(ve)-.25 G 2.5(li).15 G 2.5<73ad> +-2.5 G(3.)-2.5 E(lzop 1.04)72 768 Q 203.17(2017-08-10 1)173.45 F 0 Cg EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R -<ad642c20adad6465636f6d70726573732c20adad756e636f6d7072657373>108 84 Q< -4465636f6d70726573732e2045616368208c6c652077696c6c20626520706c6163656420 -696e746f2073616d6520746865206469726563746f72792061732074686520636f6d7072 -6573736564208c6c652e>128 96 Q<ad782c20adad65>108 112.8 Q<787472616374> --.15 E<4578747261637420636f6d70726573736564208c6c657320746f207468652063 -757272656e742077>128 124.8 Q<6f726b696e67206469726563746f7279>-.1 E 2.5 -<2e54>-.65 G<686973206973207468652073616d652061732027ad645070272e>-2.5 E -<ad742c20adad74657374>108 141.6 Q -.7<5465>128 153.6 S -<73742e20436865636b2074686520636f6d70726573736564208c6c6520696e7465>.7 E -<6772697479>-.15 E<2e>-.65 E<ad6c2c20adad6c697374>108 170.4 Q -.15<466f> -128 182.4 S 2.5<7265>.15 G -<61636820636f6d70726573736564208c6c652c206c6973742074686520666f6c6c6f> --2.5 E<77696e67208c656c64733a>-.25 E/F1 10/Courier@0 SF -<6d6574686f643a20636f6d7072657373696f6e206d6574686f64>140 200.4 Q<636f6d -707265737365643a2073697a65206f662074686520636f6d707265737365642066696c65> -140 212.4 Q<756e636f6d70722e3a2073697a65206f662074686520756e636f6d707265 -737365642066696c65>140 224.4 Q -<726174696f3a20636f6d7072657373696f6e20726174696f>140 236.4 Q<756e636f6d -707265737365645f6e616d653a206e616d65206f662074686520756e636f6d7072657373 -65642066696c65>140 248.4 Q F0 -<496e20636f6d62696e6174696f6e20776974682074686520adad76>128 266.4 Q -<6572626f7365206f7074696f6e2c2074686520666f6c6c6f>-.15 E -<77696e67208c656c64732061726520616c736f20646973706c617965643a>-.25 E F1< -6461746520262074696d653a2074696d65207374616d7020666f722074686520756e636f -6d707265737365642066696c65>140 284.4 Q F0 -.4<5769>128 302.4 S 1.653<74 -6820adad6e616d652c2074686520756e636f6d70726573736564206e616d652c20646174 -6520616e642074696d65206172652074686f73652073746f7265642077697468696e2074 -686520636f6d7072657373208c6c65206966>.4 F<70726573656e742e>128 314.4 Q --.4<5769>128 332.4 S .461<746820adad76>.4 F .461<6572626f73652c20746865 -2073697a6520746f74616c7320616e6420636f6d7072657373696f6e20726174696f2066 -6f7220616c6c208c6c657320697320616c736f20646973706c617965642e2057>-.15 F -.46<69746820adad71756965742c20746865>-.4 F<7469746c6520616e6420746f7461 -6c73206c696e657320617265206e6f7420646973706c617965642e>128 344.4 Q<4e6f -74652074686174206c7a6f702064658c6e657320636f6d7072657373696f6e2072617469 -6f20617320636f6d707265737365645f73697a65202f20756e636f6d707265737365645f -73697a652e>128 362.4 Q<adad6c732c20adad6c733d>108 379.2 Q/F2 9 -/Times-Italic@0 SF<464c41>A<4753>-.315 E F0<4c697374206561636820636f6d70 -726573736564208c6c6520696e206120666f726d61742073696d696c617220746f>128 -391.2 Q/F3 10/Times-Bold@0 SF<6c7320ad6c6e>2.5 E F0<2e>A -<54686520666f6c6c6f>128 409.2 Q -<77696e67208d616773206172652063757272656e746c7920686f6e6f757265643a>-.25 -E 5<4641>133 421.2 S<7070656e64206120272a2720666f722065>-5 E -.15<7865> --.15 G<63757461626c65208c6c65732e>.15 E 5<4749>133 433.2 S<6e6869626974 -20646973706c6179206f662067726f757020696e666f726d6174696f6e2e>-5 E 5 -<5145>133 445.2 S -<6e636c6f7365208c6c65206e616d657320696e20646f75626c652071756f7465732e>-5 -E<adad696e666f>108 462 Q -.15<466f>128 474 S 2.5<7265>.15 G<61636820636f -6d70726573736564208c6c652c206c6973742074686520696e7465726e616c2068656164 -6572208c656c64732e>-2.5 E<ad492c20adad737973696e666f>108 490.8 Q<446973 -706c617920696e666f726d6174696f6e2061626f7574207468652073797374656d20616e -6420717569742e>128 502.8 Q<ad4c2c20adad6c6963656e7365>108 519.6 Q -<446973706c617920746865206c7a6f70206c6963656e736520616e6420717569742e> -128 531.6 Q<ad682c20ad482c20adad68656c70>108 548.4 Q -<446973706c617920612068656c702073637265656e20616e6420717569742e>128 -560.4 Q 4.64<ad562056>108 577.2 R -<657273696f6e2e20446973706c6179207468652076>-1.11 E<657273696f6e206e756d -62657220616e6420636f6d70696c6174696f6e206f7074696f6e7320616e642071756974 -2e>-.15 E<adad76>108 594 Q<657273696f6e>-.15 E -1.11<5665>128 606 S -<7273696f6e2e20446973706c6179207468652076>1.11 E -<657273696f6e206e756d62657220616e6420717569742e>-.15 E/F4 10.95 -/Times-Bold@0 SF<4f5054494f4e53>72 622.8 Q F0 -<ad632c20adad7374646f75742c20adad746fad7374646f7574>108 634.8 Q .913<57 -72697465206f7574707574206f6e207374616e64617264206f75747075742e2049662074 -6865726520617265207365>128 646.8 R -.15<7665>-.25 G .913<72616c20696e70 -7574208c6c65732c20746865206f757470757420636f6e7369737473206f662061207365 -7175656e6365206f66>.15 F 2.231<696e646570656e64656e746c792028646529636f -6d70726573736564206d656d626572732e2054>128 658.8 R 4.731<6f6f>-.8 G -2.231<627461696e2062657474657220636f6d7072657373696f6e2c20636f6e63617465 -6e61746520616c6c20696e707574208c6c6573>-4.731 F -<6265666f726520636f6d7072657373696e67207468656d2e>128 670.8 Q<ad6f>108 -687.6 Q F2<46494c45>2.5 E F0 2.5<2cad>C<ad6f75747075743d>-2.5 E F2 -<46494c45>A F0 1.704<5772697465206f757470757420746f20746865208c6c65>128 -699.6 R F2<46494c45>4.204 E F0 4.204<2e49>C 4.204<6674>-4.204 G 1.704 -<6865726520617265207365>-4.204 F -.15<7665>-.25 G 1.705<72616c20696e7075 -74208c6c65732c20746865206f757470757420636f6e7369737473206f66206120736571 -75656e6365206f66>.15 F<696e646570656e64656e746c792028646529636f6d707265 -73736564206d656d626572732e>128 711.6 Q<6c7a6f7020312e3033>72 768 Q -203.17<323031302d31312d30362032>173.45 F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R +(\255d, \255\255decompress, \255\255uncompress)108 84 Q(Decompress. Eac\ +h \214le will be placed into same the directory as the compressed \214l\ +e.)128 96 Q<ad782c20adad65>108 112.8 Q(xtract)-.15 E +(Extract compressed \214les to the current w)128 124.8 Q +(orking directory)-.1 E 2.5(.T)-.65 G(his is the same as '\255dPp'.)-2.5 +E(\255t, \255\255test)108 141.6 Q -.7(Te)128 153.6 S +(st. Check the compressed \214le inte).7 E(grity)-.15 E(.)-.65 E +(\255l, \255\255list)108 170.4 Q -.15(Fo)128 182.4 S 2.5(re).15 G +(ach compressed \214le, list the follo)-2.5 E(wing \214elds:)-.25 E/F1 +10/Courier@0 SF(method: compression method)140 200.4 Q +(compressed: size of the compressed file)140 212.4 Q +(uncompr.: size of the uncompressed file)140 224.4 Q +(ratio: compression ratio)140 236.4 Q +(uncompressed_name: name of the uncompressed file)140 248.4 Q F0 +(In combination with the \255\255v)128 266.4 Q(erbose option, the follo) +-.15 E(wing \214elds are also displayed:)-.25 E F1 +(date & time: time stamp for the uncompressed file)140 284.4 Q F0 -.4 +(Wi)128 302.4 S 1.653(th \255\255name, the uncompressed name, date and \ +time are those stored within the compress \214le if).4 F(present.)128 +314.4 Q -.4(Wi)128 332.4 S .461(th \255\255v).4 F .461(erbose, the size\ + totals and compression ratio for all \214les is also displayed. W)-.15 +F .46(ith \255\255quiet, the)-.4 F +(title and totals lines are not displayed.)128 344.4 Q(Note that lzop d\ +e\214nes compression ratio as compressed_size / uncompressed_size.)128 +362.4 Q<adad6c732c20adad6c733d>108 379.2 Q/F2 9/Times-Italic@0 SF(FLA)A +(GS)-.315 E F0(List each compressed \214le in a format similar to)128 +391.2 Q/F3 10/Times-Bold@0 SF(ls \255ln)2.5 E F0(.)A(The follo)128 409.2 +Q(wing \215ags are currently honoured:)-.25 E 5(FA)133 421.2 S +(ppend a '*' for e)-5 E -.15(xe)-.15 G(cutable \214les.).15 E 5(GI)133 +433.2 S(nhibit display of group information.)-5 E 5(QE)133 445.2 S +(nclose \214le names in double quotes.)-5 E(\255\255info)108 462 Q -.15 +(Fo)128 474 S 2.5(re).15 G +(ach compressed \214le, list the internal header \214elds.)-2.5 E +(\255I, \255\255sysinfo)108 490.8 Q +(Display information about the system and quit.)128 502.8 Q +(\255L, \255\255license)108 519.6 Q(Display the lzop license and quit.) +128 531.6 Q(\255h, \255H, \255\255help)108 548.4 Q +(Display a help screen and quit.)128 560.4 Q<ad56>108 577.2 Q -1.11(Ve) +128 577.2 S(rsion. Display the v)1.11 E +(ersion number and compilation options and quit.)-.15 E<adad76>108 594 Q +(ersion)-.15 E -1.11(Ve)128 606 S(rsion. Display the v)1.11 E +(ersion number and quit.)-.15 E/F4 10.95/Times-Bold@0 SF(OPTIONS)72 +622.8 Q F0(\255c, \255\255stdout, \255\255to\255stdout)108 634.8 Q .913 +(Write output on standard output. If there are se)128 646.8 R -.15(ve) +-.25 G .913(ral input \214les, the output consists of a sequence of).15 +F 2.231(independently \(de\)compressed members. T)128 658.8 R 4.731(oo) +-.8 G 2.231(btain better compression, concatenate all input \214les) +-4.731 F(before compressing them.)128 670.8 Q<ad6f>108 687.6 Q F2(FILE) +2.5 E F0 2.5<2cad>C(\255output=)-2.5 E F2(FILE)A F0 1.704 +(Write output to the \214le)128 699.6 R F2(FILE)4.204 E F0 4.204(.I)C +4.204(ft)-4.204 G 1.704(here are se)-4.204 F -.15(ve)-.25 G 1.705 +(ral input \214les, the output consists of a sequence of).15 F +(independently \(de\)compressed members.)128 711.6 Q(lzop 1.04)72 768 Q +203.17(2017-08-10 2)173.45 F 0 Cg EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R -<ad702c20ad70>108 84 Q/F1 9/Times-Italic@0 SF<444952>A F0 2.5<2cad>C -<ad706174683d>-2.5 E F1<444952>A F0 .377<5772697465206f7574707574208c6c -657320696e746f20746865206469726563746f7279>128 96 R F1<444952>2.876 E F0 -.376<696e7374656164206f6620746865206469726563746f72792064657465726d696e -65642062792074686520696e707574208c6c652e204966>2.876 F F1<444952>2.876 E -F0<6973>2.876 E<6f6d69747465642c207468656e20777269746520746f207468652063 -757272656e742077>128 108 Q<6f726b696e67206469726563746f7279>-.1 E<2e> --.65 E<ad662c20adad666f726365>108 124.8 Q -.15<466f>128 136.8 S -<726365206c7a6f7020746f>.15 E/F2 10/Courier@0 SF 6<ad6f>134 154.8 S -<7665727772697465206578697374696e672066696c6573>-6 E 6<ad28>134 166.8 S< -6465ad29636f6d70726573732066726f6d20737464696e206576656e2069662069742073 -65656d732061207465726d696e616c>-6 E 6<ad28>134 178.8 S<6465ad29636f6d70 -7265737320746f207374646f7574206576656e206966206974207365656d732061207465 -726d696e616c>-6 E 6<ad61>134 190.8 S<6c6c6f77206f7074696f6e20ad6320696e -20636f6d62696e6174696f6e207769746820ad55>-6 E F0<5573696e67>128 208.8 Q -/F3 10/Times-Bold@0 SF<ad66>2.5 E F0<7477>2.5 E 2.5<6f6f>-.1 G 2.5<726d> --2.5 G<6f72652074696d657320666f72636573207468696e6773206c696b>-2.5 E<65> --.1 E F2 6<ad63>134 226.8 S<6f6d70726573732066696c6573207468617420616c72 -6561647920686176652061202e6c7a6f20737566666978>-6 E 6<ad74>134 238.8 S< -727920746f206465636f6d70726573732066696c6573207468617420646f206e6f742068 -61766520612076616c696420737566666978>-6 E 6<ad74>134 250.8 S<727920746f -2068616e646c6520636f6d707265737365642066696c6573207769746820756e6b6e6f77 -6e2068656164657220666c616773>-6 E F0<557365207769746820636172652e>128 -268.8 Q<ad46>108 285.6 Q 2.5<2cad>-.8 G<ad6e6fad636865636b73756d>-2.5 E -1.607<446f206e6f742073746f7265206f722076>128 297.6 R 1.607<657269667920 -6120636865636b73756d206f662074686520756e636f6d70726573736564208c6c652077 -68656e20636f6d7072657373696e67206f72206465636f6d7072657373696e672e>-.15 -F .054<546869732073706565647320757020746865206f7065726174696f6e206f6620 -6c7a6f702061206c6974746c65206269742028657370656369616c6c79207768656e2064 -65636f6d7072657373696e67292c2062>128 309.6 R .054 -<757420617320756e6e6f74696365642064617461>-.2 F .893<636f7272757074696f -6e2063616e2068617070656e20696e2063617365206f662064616d6167656420636f6d70 -726573736564208c6c657320746865207573616765206f662074686973206f7074696f6e -206973206e6f742067656e6572616c6c79>128 321.6 R 6.326 -<7265636f6d6d656e6465642e20416c736f2c>128 333.6 R 6.326<6163>6.326 G -3.826<6865636b73756d20697320616c>-6.326 F -.1<7761>-.1 G 3.825<79732073 -746f726564207768656e20636f6d7072657373696e672077697468206f6e65206f662074 -686520736c6f>.1 F<77>-.25 E<636f6d7072657373696f6e206c65>128 345.6 Q --.15<7665>-.25 G<6c732028ad372c20ad38206f7220ad39292c207265>.15 E -.05 -<6761>-.15 G<72646c657373206f662074686973206f7074696f6e2e>.05 E -<ad6e2c20adad6e6fad6e616d65>108 362.4 Q .042<5768656e206465636f6d707265 -7373696e672c20646f206e6f7420726573746f726520746865206f726967696e616c208c -6c65206e616d652069662070726573656e74202872656d6f>128 374.4 R .342 -.15 -<7665206f>-.15 H .042<6e6c7920746865206c7a6f7020737566>.15 F .042 -<8c782066726f6d>-.25 F<74686520636f6d70726573736564208c6c65206e616d6529 -2e2054686973206f7074696f6e2069732074686520646566>128 386.4 Q -<61756c7420756e646572>-.1 E/F4 9/Times-Roman@0 SF<554e4958>2.5 E F0<2e>A -<ad4e2c20adad6e616d65>108 403.2 Q .34<5768656e206465636f6d7072657373696e -672c20726573746f726520746865206f726967696e616c208c6c65206e616d6520696620 -70726573656e742e2054686973206f7074696f6e2069732075736566756c206f6e207379 -7374656d73207768696368>128 415.2 R<6861>128 427.2 Q .423 -.15 -<76652061206c>-.2 H .123<696d6974206f6e208c6c65206e616d65206c656e677468 -2e20496620746865206f726967696e616c206e616d65207361>.15 F -.15<7665>-.2 G -2.623<6469>.15 G 2.623<6e74>-2.623 G .123<686520636f6d70726573736564208c -6c65206973206e6f74207375697461626c6520666f7220697473>-2.623 F 1.672 -<8c6c652073797374656d2c2061206e65>128 439.2 R 4.171<776e>-.25 G 1.671<61 -6d6520697320636f6e73747275637465642066726f6d20746865206f726967696e616c20 -6f6e6520746f206d616b>-4.171 F 4.171<6569>-.1 G 4.171<746c>-4.171 G -2.25 --.15<65672061>-4.171 H 4.171<6c2e2054686973>.15 F 1.671 -<6f7074696f6e20697320746865>4.171 F<646566>128 451.2 Q -<61756c7420756e646572>-.1 E F4<444f53>2.5 E F0 2.5<2c57>C<696e646f>-2.9 -E<777320616e64>-.25 E F4<4f532f32>2.5 E F0<2e>A 6.3<ad50205768656e>108 -468 R .386<6465636f6d7072657373696e672c20726573746f726520746865206f7269 -67696e616c207061746820616e64208c6c65206e616d652069662070726573656e742e> -2.886 F .387<5768656e20636f6d7072657373696e672c2073746f726520746865> -5.387 F<72656c617469>128 480 Q .647 -.15<76652028>-.25 H .347 -<616e6420636c65616e6564292070617468206e616d652e>.15 F .346<54686973206f -7074696f6e206973206d61696e6c792075736566756c207768656e207573696e67>5.346 -F F3<6172>2.846 E<636869>-.18 E .546 -.1<7665206d>-.1 H<6f6465>.1 E F0 -2.846<ad73>2.846 G .346<6565207573616765>-2.846 F -.15<6578>128 492 S -<616d706c65732062656c6f>.15 E -.65<772e>-.25 G<adad6e6fad6d6f6465>108 -508.8 Q<5768656e206465636f6d7072657373696e672c20646f206e6f7420726573746f -726520746865206f726967696e616c206d6f646520287065726d697373696f6e73292073 -61>128 520.8 Q -.15<7665>-.2 G 2.5<6469>.15 G 2.5<6e74>-2.5 G -<686520636f6d70726573736564208c6c652e>-2.5 E<adad6e6fad74696d65>108 -537.6 Q<5768656e206465636f6d7072657373696e672c20646f206e6f7420726573746f -726520746865206f726967696e616c2074696d65207374616d70207361>128 549.6 Q --.15<7665>-.2 G 2.5<6469>.15 G 2.5<6e74>-2.5 G -<686520636f6d70726573736564208c6c652e>-2.5 E<ad53>108 566.4 Q/F5 10 -/Times-Italic@0 SF<2e737566>2.5 E F0 2.5<2cad>C<ad737566>-2.5 E<8c783d> --.25 E F5<2e737566>A F0 .248<55736520737566>128 578.4 R<8c78>-.25 E F5 -<2e737566>2.748 E F0 .248<696e7374656164206f66>2.748 F F5<2e6c7a6f>2.748 -E F0 2.748<2e54>C .248<686520737566>-2.748 F .248<8c78206d757374206e6f74 -20636f6e7461696e206d756c7469706c6520646f747320616e64207370656369616c2063 -686172616374657273206c696b>-.25 F 2.749<6527>-.1 G<2b27>-2.749 E .699 -<6f7220272a272c20616e6420737566>128 590.4 R<8c78>-.25 E .699 -<6573206f74686572207468616e>-.15 F F5<2e6c7a6f>3.199 E F0 .699 -<73686f756c642062652061>3.199 F -.2<766f>-.2 G .699<6964656420746f2061> -.2 F -.2<766f>-.2 G .699<696420636f6e667573696f6e207768656e208c6c657320 -617265207472616e7366657272656420746f>.2 F<6f746865722073797374656d732e> -128 602.4 Q<ad6b2c20adad6b>108 619.2 Q<656570>-.1 E<446f206e6f742064656c -65746520696e707574208c6c65732e20546869732069732074686520646566>128 631.2 -Q<61756c742e>-.1 E<ad552c20adad756e6c696e6b2c20adad64656c657465>108 648 -Q .278<44656c65746520696e707574208c6c6573206166746572207375636365736675 -6c6c20636f6d7072657373696f6e206f72206465636f6d7072657373696f6e2e20557365 -2074686973206f7074696f6e20746f206d616b>128 660 R 2.779<656c>-.1 G .279 -<7a6f702062656861>-2.779 F -.15<7665>-.2 G<6c696b>128 672 Q<65>-.1 E F3 -<677a6970>2.5 E F0<616e64>2.5 E F3<627a697032>2.5 E F0 5<2e4e>C -<6f746520746861742065>-5 E<78706c696369746c79206769>-.15 E<76696e67>-.25 -E F3<ad6b>2.5 E F0 -.15<6f7665>2.5 G<727269646573>.15 E F3<ad55>2.5 E F0 -<2e>A<adad6372633332>108 688.8 Q<557365206120637263333220636865636b7375 -6d20696e7374656164206f6620612061646c6572333220636865636b73756d2e>128 -700.8 Q<6c7a6f7020312e3033>72 768 Q 203.17<323031302d31312d30362033> -173.45 F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R(\255p, \255p) +108 84 Q/F1 9/Times-Italic@0 SF(DIR)A F0 2.5<2cad>C(\255path=)-2.5 E F1 +(DIR)A F0 .377(Write output \214les into the directory)128 96 R F1(DIR) +2.876 E F0 .376 +(instead of the directory determined by the input \214le. If)2.876 F F1 +(DIR)2.876 E F0(is)2.876 E(omitted, then write to the current w)128 108 +Q(orking directory)-.1 E(.)-.65 E(\255f, \255\255force)108 124.8 Q -.15 +(Fo)128 136.8 S(rce lzop to).15 E/F2 10/Courier@0 SF 6<ad6f>134 154.8 S +(verwrite existing files)-6 E 6<ad28>134 166.8 S +(de\255\)compress from stdin even if it seems a terminal)-6 E 6<ad28>134 +178.8 S(de\255\)compress to stdout even if it seems a terminal)-6 E 6 +<ad61>134 190.8 S(llow option \255c in combination with \255U)-6 E F0 +(Using)128 208.8 Q/F3 10/Times-Bold@0 SF<ad66>2.5 E F0(tw)2.5 E 2.5(oo) +-.1 G 2.5(rm)-2.5 G(ore times forces things lik)-2.5 E(e)-.1 E F2 6 +<ad63>134 226.8 S(ompress files that already have a .lzo suffix)-6 E 6 +<ad74>134 238.8 S +(ry to decompress files that do not have a valid suffix)-6 E 6<ad74>134 +250.8 S(ry to handle compressed files with unknown header flags)-6 E F0 +(Use with care.)128 268.8 Q<ad46>108 285.6 Q 2.5<2cad>-.8 G +(\255no\255checksum)-2.5 E 1.607(Do not store or v)128 297.6 R 1.607(er\ +ify a checksum of the uncompressed \214le when compressing or decompres\ +sing.)-.15 F .054(This speeds up the operation of lzop a little bit \(e\ +specially when decompressing\), b)128 309.6 R .054(ut as unnoticed data) +-.2 F .893(corruption can happen in case of damaged compressed \214les \ +the usage of this option is not generally)128 321.6 R 6.326 +(recommended. Also,)128 333.6 R 6.326(ac)6.326 G 3.826(hecksum is al) +-6.326 F -.1(wa)-.1 G 3.825 +(ys stored when compressing with one of the slo).1 F(w)-.25 E +(compression le)128 345.6 Q -.15(ve)-.25 G +(ls \(\2557, \2558 or \2559\), re).15 E -.05(ga)-.15 G +(rdless of this option.).05 E(\255n, \255\255no\255name)108 362.4 Q .042 +(When decompressing, do not restore the original \214le name if present\ + \(remo)128 374.4 R .342 -.15(ve o)-.15 H .042(nly the lzop suf).15 F +.042(\214x from)-.25 F +(the compressed \214le name\). This option is the def)128 386.4 Q +(ault under)-.1 E/F4 9/Times-Roman@0 SF(UNIX.)2.5 E F0 +(\255N, \255\255name)108 403.2 Q .34(When decompressing, restore the or\ +iginal \214le name if present. This option is useful on systems which) +128 415.2 R(ha)128 427.2 Q .423 -.15(ve a l)-.2 H .123 +(imit on \214le name length. If the original name sa).15 F -.15(ve)-.2 G +2.623(di).15 G 2.623(nt)-2.623 G .123 +(he compressed \214le is not suitable for its)-2.623 F 1.672 +(\214le system, a ne)128 439.2 R 4.171(wn)-.25 G 1.671 +(ame is constructed from the original one to mak)-4.171 F 4.171(ei)-.1 G +4.171(tl)-4.171 G -2.25 -.15(eg a)-4.171 H 4.171(l. This).15 F 1.671 +(option is the)4.171 F(def)128 451.2 Q(ault under)-.1 E F4(DOS,)2.5 E F0 +-.4(Wi)2.5 G(ndo).4 E(ws and)-.25 E F4(OS/2.)2.5 E F0<ad50>108 468 Q +.386(When decompressing, restore the original path and \214le name if p\ +resent.)128 468 R .387(When compressing, store the)5.387 F(relati)128 +480 Q .647 -.15(ve \()-.25 H .347(and cleaned\) path name.).15 F .346 +(This option is mainly useful when using)5.346 F F3(ar)2.846 E(chi)-.18 +E .546 -.1(ve m)-.1 H(ode).1 E F0 2.846<ad73>2.846 G .346(ee usage) +-2.846 F -.15(ex)128 492 S(amples belo).15 E -.65(w.)-.25 G +(\255\255no\255mode)108 508.8 Q(When decompressing, do not restore the \ +original mode \(permissions\) sa)128 520.8 Q -.15(ve)-.2 G 2.5(di).15 G +2.5(nt)-2.5 G(he compressed \214le.)-2.5 E(\255\255no\255time)108 537.6 +Q(When decompressing, do not restore the original time stamp sa)128 +549.6 Q -.15(ve)-.2 G 2.5(di).15 G 2.5(nt)-2.5 G(he compressed \214le.) +-2.5 E<ad53>108 566.4 Q/F5 10/Times-Italic@0 SF(.suf)2.5 E F0 2.5<2cad>C +(\255suf)-2.5 E(\214x=)-.25 E F5(.suf)A F0 .248(Use suf)128 578.4 R +<8c78>-.25 E F5(.suf)2.748 E F0 .248(instead of)2.748 F F5(.lzo)2.748 E +F0 2.748(.T)C .248(he suf)-2.748 F .248 +(\214x must not contain multiple dots and special characters lik)-.25 F +2.749(e')-.1 G(+')-2.749 E .699(or '*', and suf)128 590.4 R<8c78>-.25 E +.699(es other than)-.15 F F5(.lzo)3.199 E F0 .699(should be a)3.199 F +-.2(vo)-.2 G .699(ided to a).2 F -.2(vo)-.2 G .699 +(id confusion when \214les are transferred to).2 F(other systems.)128 +602.4 Q<ad6b2c20adad6b>108 619.2 Q(eep)-.1 E +(Do not delete input \214les. This is the def)128 631.2 Q(ault.)-.1 E +(\255U, \255\255unlink, \255\255delete)108 648 Q .199(Delete input \214\ +les after successful compression or decompression. Use this option to m\ +ak)128 660 R 2.7(el)-.1 G .2(zop beha)-2.7 F -.15(ve)-.2 G(lik)128 672 Q +(e)-.1 E F3(gzip)2.5 E F0(and)2.5 E F3(bzip2)2.5 E F0 5(.N)C(ote that e) +-5 E(xplicitly gi)-.15 E(ving)-.25 E F3<ad6b>2.5 E F0 -.15(ove)2.5 G +(rrides).15 E F3<ad55>2.5 E F0(.)A(\255\255crc32)108 688.8 Q +(Use a crc32 checksum instead of an adler32 checksum.)128 700.8 Q +(lzop 1.04)72 768 Q 203.17(2017-08-10 3)173.45 F 0 Cg EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R -<adad6e6fad77>108 84 Q<61726e>-.1 E<537570707265737320616c6c2077>128 96 -Q<61726e696e67732e>-.1 E<adad69676e6f7265ad77>108 112.8 Q<61726e>-.1 E -<537570707265737320616c6c2077>128 124.8 Q -<61726e696e67732c20616e64206e65>-.1 E -.15<7665>-.25 G 2.5<7265>.15 G -<78697420776974682065>-2.65 E<7869742073746174757320322e>-.15 E -<ad712c20adad71756965742c20adad73696c656e74>108 141.6 Q -<537570707265737320616c6c2077>128 153.6 Q -<61726e696e677320616e64206465637265617365207468652076>-.1 E -<6572626f73697479206f6620736f6d6520636f6d6d616e6473206c696b>-.15 E<65> --.1 E/F1 10/Times-Bold@0 SF<adad6c697374>2.5 E F0<6f72>2.5 E F1 -<adad74657374>2.5 E F0<2e>A<ad76>108 170.4 Q 2.5<2cad>-.65 G<ad76>-2.5 E -<6572626f7365>-.15 E -1.11<5665>128 182.4 S 1.518<72626f73652e2044697370 -6c617920746865206e616d6520666f722065616368208c6c6520636f6d70726573736564 -206f72206465636f6d707265737365642e204d756c7469706c65>1.11 F F1<ad76> -4.018 E F0 1.518<63616e206265207573656420746f>4.018 F -<696e637265617365207468652076>128 194.4 Q -<6572626f73697479206f6620736f6d6520636f6d6d616e6473206c696b>-.15 E<65> --.1 E F1<adad6c697374>2.5 E F0<6f72>2.5 E F1<adad74657374>2.5 E F0<2e>A -6.22<adad2053706563698c6573>108 211.2 R .247<74686174207468697320697320 -74686520656e64206f6620746865206f7074696f6e732e20416e>2.747 F 2.747<798c> --.15 G .248<6c65206e616d65206166746572>-2.747 F F1<adad>2.748 E F0 .248< -77696c6c206e6f7420626520696e74657270726574656420617320616e206f7074696f6e> -2.748 F -2.15 -.25<65762065>128 223.2 T 2.5<6e69>.25 G 2.5<6669>-2.5 G -2.5<7473>-2.5 G<7461727473207769746820612068>-2.5 E<797068656e2e>-.05 E -/F2 10.95/Times-Bold@0 SF -.438<4f54>72 240 S<484552204f5054494f4e53> -.438 E F0<adad6e6fad737464696e>108 252 Q .551<446f206e6f742074727920746f -2072656164207374616e6461726420696e707574202862>128 264 R .551 -<75742061208c6c65206e616d652060>-.2 F<60ad27>-.74 E 3.051<2777>-.74 G -.551<696c6c207374696c6c206f>-3.051 F -.15<7665>-.15 G .551 -<72726964652074686973206f7074696f6e292e>.15 F .551<496e206f6c642076> -5.551 F<657273696f6e73>-.15 E<6f66>128 276 Q F1<6c7a6f70>2.5 E F0 2.5 -<2c74>C<686973206f7074696f6e2077>-2.5 E<6173206e656365737361727920776865 -6e207573656420696e2063726f6e206a6f62732028776869636820646f206e6f74206861> --.1 E .3 -.15<766520612063>-.2 H -<6f6e74726f6c6c696e67207465726d696e616c292e>.15 E<adad8c6c7465723d>108 -292.8 Q/F3 9/Times-Italic@0 SF<4e554d424552>A F0 1.876 -<526172656c792075736566756c2e>128 304.8 R 1.876 -<50726570726f63657373206461746120776974682061207370656369616c2060>6.876 -F<606d756c74696d6564696127>-.74 E 4.376<278c>-.74 G 1.876 -<6c746572206265666f726520636f6d7072657373696e6720696e206f7264657220746f> --4.376 F<696d70726f>128 316.8 Q .326 -.15<76652063>-.15 H .026 -<6f6d7072657373696f6e20726174696f2e>.15 F F3<4e554d424552>5.026 E F0 -.025<6d757374206265206120646563696d616c206e756d6265722066726f6d20312074 -6f2031362c20696e636c757369>2.526 F -.15<7665>-.25 G 5.025<2e55>.15 G -.025<73696e672061208c6c746572>-5.025 F<736c6f>128 328.8 Q 2.331 -<777320646f>-.25 F 2.332<776e20626f746820636f6d7072657373696f6e20616e64 -206465636f6d7072657373696f6e2071756974652061206269742c20616e642074686520 -636f6d7072657373696f6e20726174696f20757375616c6c79>-.25 F<646f65736e27> -128 340.8 Q 2.5<7469>-.18 G<6d70726f>-2.5 E .3 -.15<7665206d>-.15 H -<75636820656974686572>.15 E 2.5<2e2e2e204d6f7265>-.55 F<6566>2.5 E -<6665637469>-.25 E .3 -.15<7665208c>-.25 H<6c74657273206d61792062652061 -6464656420696e20746865206675747572652c2074686f7567682e>.15 E -1.1<596f> -128 358.8 S 2.516<7563>1.1 G .016 -<616e2074727920adad8c6c7465723d3120776974682064617461206c696b>-2.516 F -2.515<6538>-.1 G .015<ad62697420736f756e642073616d706c65732c20adad8c6c74 -65723d322077697468203136ad6269742073616d706c6573206f72206465707468ad3136> --2.515 F<696d616765732c206574632e>128 370.8 Q<556e2d8c6c746572696e672064 -7572696e67206465636f6d7072657373696f6e2069732068616e646c6564206175746f6d -61746963616c6c79>128 388.8 Q<2e>-.65 E<ad432c20adad636865636b73756d>108 -405.6 Q 1.051<446570726563617465642e204f6e6c7920666f7220636f6d7061746962 -696c69747920776974682076>128 417.6 R 1.051<657279206f6c642076>-.15 F -1.051<657273696f6e73206173206c7a6f70206e6f>-.15 F 3.552<7775>-.25 G -1.052<736573206120636865636b73756d20627920646566>-3.552 F<61756c742e>-.1 -E<54686973206f7074696f6e2077696c6c206765742072656d6f>128 429.6 Q -.15 -<7665>-.15 G 2.5<6469>.15 G 2.5<6e6166>-2.5 G -<75747572652072656c656173652e>-2.5 E<adad6e6fad636f6c6f72>108 446.4 Q -<446f206e6f742075736520616e>128 458.4 Q 2.5<7963>-.15 G -<6f6c6f72206573636170652073657175656e6365732e>-2.5 E<adad6d6f6e6f>108 -475.2 Q<417373756d652061206d6f6e6f>128 487.2 Q/F4 9/Times-Roman@0 SF -<414e5349>2.5 E F0<7465726d696e616c2e20546869732069732074686520646566> -2.5 E<61756c7420756e646572>-.1 E F4<554e4958>2.5 E F0<28696620636f6e736f -6c6520737570706f727420697320636f6d70696c656420696e292e>2.5 E -<adad636f6c6f72>108 504 Q .532<417373756d65206120636f6c6f72>128 516 R F4 -<414e5349>3.032 E F0 .531<7465726d696e616c206f72207472792066756c6c2d7363 -7265656e206163636573732e20546869732069732074686520646566>3.032 F .531 -<61756c7420756e646572>-.1 F F4<444f53>3.031 E F0 .531 -<616e6420696e2061204c696e7578>3.031 F<7669727475616c20636f6e736f6c652028 -696620636f6e736f6c6520737570706f727420697320636f6d70696c656420696e292e> -128 528 Q F2<4144>72 544.8 Q -1.478<5641>-.438 G<4e43454420555341>1.478 -E<4745>-.602 E F0<6c7a6f7020616c6c6f>108 556.8 Q<777320796f7520746f2064 -65616c207769746820796f7572208c6c657320696e206d616e>-.25 E 2.5<798d>-.15 -G -.15<6578>-2.5 G<69626c652077>.15 E -<6179732e20486572652061726520736f6d652075736167652065>-.1 E -<78616d706c65733a>-.15 E F1<6261636b7570206d6f6465>108 573.6 Q/F5 10 -/Courier@0 SF<74617220adad757365ad636f6d7072657373ad70726f6772616d3d6c7a -6f7020ad636620617263686976652e7461722e6c7a6f2066696c65732e2e>125 585.6 Q -<5468697320697320746865207265636f6d6d656e646564206d6f646520666f72206372 -656174696e67206261636b7570732e>125 609.6 Q<526571756972657320474e552074 -6172206f72206120636f6d70617469626c652076657273696f6e20776869636820616363 -6570747320746865>125 621.6 Q<08adad757365ad636f6d7072657373ad70726f6772 -616d3d58585808206f7074696f6e2e>125 633.6 Q F1 -<73696e676c65208c6c65206d6f64653a>108 650.4 Q F0<696e6469>2.5 E -<76696475616c6c792028646529636f6d70726573732065616368208c6c65>-.25 E F5 -<637265617465>119 662.4 Q<6c7a6f7020612e63>131 674.4 Q -<ad3e2063726561746520612e632e6c7a6f>78 E<6c7a6f7020612e6320622e63>131 -686.4 Q<ad3e2063726561746520612e632e6c7a6f202620622e632e6c7a6f>54 E -<6c7a6f7020ad5520612e6320622e63>131 698.4 Q<ad3e2063726561746520612e632e -6c7a6f202620622e632e6c7a6f20616e642064656c65746520612e63202620622e63>36 -E<6c7a6f70202a2e63>131 710.4 Q F0<6c7a6f7020312e3033>72 768 Q 203.17 -<323031302d31312d30362034>173.45 F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R<adad6e6fad77> +108 84 Q(arn)-.1 E(Suppress all w)128 96 Q(arnings.)-.1 E +(\255\255ignore\255w)108 112.8 Q(arn)-.1 E(Suppress all w)128 124.8 Q +(arnings, and ne)-.1 E -.15(ve)-.25 G 2.5(re).15 G(xit with e)-2.65 E +(xit status 2.)-.15 E(\255q, \255\255quiet, \255\255silent)108 141.6 Q +(Suppress all w)128 153.6 Q(arnings and decrease the v)-.1 E +(erbosity of some commands lik)-.15 E(e)-.1 E/F1 10/Times-Bold@0 SF +(\255\255list)2.5 E F0(or)2.5 E F1(\255\255test)2.5 E F0(.)A<ad76>108 +170.4 Q 2.5<2cad>-.65 G<ad76>-2.5 E(erbose)-.15 E -1.11(Ve)128 182.4 S +1.518(rbose. Display the name for each \214le compressed or decompresse\ +d. Multiple)1.11 F F1<ad76>4.018 E F0 1.518(can be used to)4.018 F +(increase the v)128 194.4 Q(erbosity of some commands lik)-.15 E(e)-.1 E +F1(\255\255list)2.5 E F0(or)2.5 E F1(\255\255test)2.5 E F0(.)A<adad>108 +211.2 Q .247(Speci\214es that this is the end of the options. An)128 +211.2 R 2.747<798c>-.15 G .248(le name after)-2.747 F F1<adad>2.748 E F0 +.248(will not be interpreted as an option)2.748 F -2.15 -.25(ev e)128 +223.2 T 2.5(ni).25 G 2.5(fi)-2.5 G 2.5(ts)-2.5 G(tarts with a h)-2.5 E +(yphen.)-.05 E/F2 10.95/Times-Bold@0 SF -.438(OT)72 240 S(HER OPTIONS) +.438 E F0(\255\255no\255stdin)108 252 Q .551 +(Do not try to read standard input \(b)128 264 R .551 +(ut a \214le name `)-.2 F(`\255')-.74 E 3.051('w)-.74 G .551 +(ill still o)-3.051 F -.15(ve)-.15 G .551(rride this option\).).15 F +.551(In old v)5.551 F(ersions)-.15 E(of)128 276 Q F1(lzop)2.5 E F0 2.5 +(,t)C(his option w)-2.5 E +(as necessary when used in cron jobs \(which do not ha)-.1 E .3 -.15 +(ve a c)-.2 H(ontrolling terminal\).).15 E<adad8c6c7465723d>108 292.8 Q +/F3 9/Times-Italic@0 SF(NUMBER)A F0 1.876(Rarely useful.)128 304.8 R +1.876(Preprocess data with a special `)6.876 F(`multimedia')-.74 E 4.376 +<278c>-.74 G 1.876(lter before compressing in order to)-4.376 F(impro) +128 316.8 Q .326 -.15(ve c)-.15 H .026(ompression ratio.).15 F F3 +(NUMBER)5.026 E F0 .025(must be a decimal number from 1 to 16, inclusi) +2.526 F -.15(ve)-.25 G 5.025(.U).15 G .025(sing a \214lter)-5.025 F(slo) +128 328.8 Q 2.331(ws do)-.25 F 2.332(wn both compression and decompress\ +ion quite a bit, and the compression ratio usually)-.25 F(doesn')128 +340.8 Q 2.5(ti)-.18 G(mpro)-2.5 E .3 -.15(ve m)-.15 H(uch either).15 E +2.5(... More)-.55 F(ef)2.5 E(fecti)-.25 E .3 -.15(ve \214)-.25 H +(lters may be added in the future, though.).15 E -1.1(Yo)128 358.8 S +2.516(uc)1.1 G .016(an try \255\255\214lter=1 with data lik)-2.516 F +2.515(e8)-.1 G .015(\255bit sound samples, \255\255\214lter=2 with 16\ +\255bit samples or depth\25516)-2.515 F(images, etc.)128 370.8 Q +(Un-\214ltering during decompression is handled automatically)128 388.8 +Q(.)-.65 E(\255C, \255\255checksum)108 405.6 Q 1.051 +(Deprecated. Only for compatibility with v)128 417.6 R 1.051(ery old v) +-.15 F 1.051(ersions as lzop no)-.15 F 3.552(wu)-.25 G 1.052 +(ses a checksum by def)-3.552 F(ault.)-.1 E(This option will get remo) +128 429.6 Q -.15(ve)-.15 G 2.5(di).15 G 2.5(naf)-2.5 G(uture release.) +-2.5 E(\255\255no\255color)108 446.4 Q(Do not use an)128 458.4 Q 2.5(yc) +-.15 G(olor escape sequences.)-2.5 E(\255\255mono)108 475.2 Q +(Assume a mono)128 487.2 Q/F4 9/Times-Roman@0 SF(ANSI)2.5 E F0 +(terminal. This is the def)2.5 E(ault under)-.1 E F4(UNIX)2.5 E F0 +(\(if console support is compiled in\).)2.5 E(\255\255color)108 504 Q +.532(Assume a color)128 516 R F4(ANSI)3.032 E F0 .531 +(terminal or try full-screen access. This is the def)3.032 F .531 +(ault under)-.1 F F4(DOS)3.031 E F0 .531(and in a Linux)3.031 F +(virtual console \(if console support is compiled in\).)128 528 Q F2(AD) +72 544.8 Q -1.478(VA)-.438 G(NCED USA)1.478 E(GE)-.602 E F0(lzop allo) +108 556.8 Q(ws you to deal with your \214les in man)-.25 E 2.5<798d>-.15 +G -.15(ex)-2.5 G(ible w).15 E(ays. Here are some usage e)-.1 E(xamples:) +-.15 E F1(backup mode)108 573.6 Q/F5 10/Courier@0 SF(tar \255\255use\ +\255compress\255program=lzop \255cf archive.tar.lzo files..)125 585.6 Q +(This is the recommended mode for creating backups.)125 609.6 Q +(Requires GNU tar or a compatible version which accepts the)125 621.6 Q +(\010\255\255use\255compress\255program=XXX\010 option.)125 633.6 Q F1 +(single \214le mode:)108 650.4 Q F0(indi)2.5 E +(vidually \(de\)compress each \214le)-.25 E F5(create)119 662.4 Q +(lzop a.c)131 674.4 Q(\255> create a.c.lzo)78 E(lzop a.c b.c)131 686.4 Q +(\255> create a.c.lzo & b.c.lzo)54 E(lzop \255U a.c b.c)131 698.4 Q +(\255> create a.c.lzo & b.c.lzo and delete a.c & b.c)36 E(lzop *.c)131 +710.4 Q F0(lzop 1.04)72 768 Q 203.17(2017-08-10 4)173.45 F 0 Cg EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R/F1 -10/Courier@0 SF<65787472616374>119 84 Q<6c7a6f7020ad6420612e632e6c7a6f> -131 96 Q<ad3e20726573746f726520612e63>36 E -<6c7a6f7020ad646620612e632e6c7a6f>131 108 Q<ad3e20726573746f726520612e63 -2c206f766572777269746520696620616c726561647920657869737473>30 E -<6c7a6f7020ad64202a2e6c7a6f>131 120 Q<6c697374>119 144 Q -<6c7a6f7020ad6c20612e632e6c7a6f>131 156 Q<6c7a6f7020ad6c202a2e6c7a6f>131 -168 Q<6c7a6f7020ad6c76202a2e6c7a6f>131 180 Q<ad3e20626520766572626f7365> -42 E<74657374>119 204 Q<6c7a6f7020ad7420612e632e6c7a6f>131 216 Q -<6c7a6f7020ad7471202a2e6c7a6f>131 228 Q<ad3e206265207175696574>42 E/F2 -10/Times-Bold@0 SF<70697065206d6f64653a>108 244.8 Q F0 -<28646529636f6d70726573732066726f6d20737464696e20746f207374646f7574>2.5 -E F1<637265617465>119 256.8 Q<6c7a6f70203c20612e63203e20792e6c7a6f>131 -268.8 Q<63617420612e63207c206c7a6f70203e20792e6c7a6f>131 280.8 Q -<74617220ad636620ad202a2e63207c206c7a6f70203e20792e7461722e6c7a6f>131 -292.8 Q<ad3e20637265617465206120636f6d70726573736564207461722066696c65> -30 E<65787472616374>119 316.8 Q -<6c7a6f7020ad64203c20792e6c7a6f203e20612e63>131 328.8 Q -<6c7a6f7020ad64203c20792e7461722e6c7a6f207c2074617220ad78766620ad>131 -340.8 Q<ad3e20657874726163742061207461722066696c65>30 E<6c697374>119 -364.8 Q<6c7a6f7020ad6c203c20792e6c7a6f>131 376.8 Q -<63617420792e6c7a6f207c206c7a6f7020ad6c>131 388.8 Q -<6c7a6f7020ad64203c20792e7461722e6c7a6f207c2074617220ad74766620ad>131 -400.8 Q<ad3e206c6973742061207461722066696c65>30 E<74657374>119 424.8 Q -<6c7a6f7020ad74203c20792e6c7a6f>131 436.8 Q -<63617420792e6c7a6f207c206c7a6f7020ad74>131 448.8 Q F2 -<7374646f7574206d6f64653a>108 465.6 Q F0 -<28646529636f6d707265737320746f207374646f7574>2.5 E F1<637265617465>119 -477.6 Q<6c7a6f7020ad6320612e63203e20792e6c7a6f>131 489.6 Q -<65787472616374>119 513.6 Q<6c7a6f7020ad646320792e6c7a6f203e20612e63>131 -525.6 Q<6c7a6f7020ad646320792e7461722e6c7a6f207c2074617220ad78766620ad> -131 537.6 Q<ad3e20657874726163742061207461722066696c65>36 E<6c697374>119 -561.6 Q<6c7a6f7020ad646320792e7461722e6c7a6f207c2074617220ad74766620ad> -131 573.6 Q<ad3e206c6973742061207461722066696c65>36 E F2<6172>108 590.4 -Q<636869>-.18 E .2 -.1<7665206d>-.1 H<6f64653a>.1 E F0 -<636f6d70726573732f65>2.5 E<787472616374206d756c7469706c65208c6c65732069 -6e746f20612073696e676c65206172636869>-.15 E .3 -.15<7665208c>-.25 H -<6c65>.15 E F1<637265617465>119 602.4 Q -<6c7a6f7020612e6320622e6320ad6f20736f75726365732e6c7a6f>131 614.4 Q -<ad3e2063726561746520616e2061726368697665>60 E -<6c7a6f7020ad50207372632f2a2e6320ad6f20736f75726365732e6c7a6f>131 626.4 -Q<ad3e2063726561746520616e20617263686976652c2073746f72652070617468206e61 -6d65>42 E<6c7a6f7020ad63202a2e63203e20736f75726365732e6c7a6f>131 638.4 Q -<ad3e20616e6f746865722077617920746f2063726561746520616e2061726368697665> -72 E<6c7a6f7020ad63202a2e68203e3e20736f75726365732e6c7a6f>131 650.4 Q -<ad3e206164642066696c657320746f2061726368697665>66 E<65787472616374>119 -674.4 Q<6c7a6f7020ad644e20736f75726365732e6c7a6f>131 686.4 Q -<6c7a6f7020ad78202e2e2f7372632f736f75726365732e6c7a6f>131 698.4 Q -<ad3e206578747261637420746f2063757272656e74206469726563746f7279>66 E -<6c7a6f7020ad7820ad702f746d70203c202e2e2f7372632f736f75726365732e6c7a6f> -131 710.4 Q<ad3e206578747261637420746f202f746d70206469726563746f7279>12 -E F0<6c7a6f7020312e3033>72 768 Q 203.17<323031302d31312d30362035>173.45 -F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R/F1 10 +/Courier@0 SF(extract)119 84 Q(lzop \255d a.c.lzo)131 96 Q +(\255> restore a.c)36 E(lzop \255df a.c.lzo)131 108 Q +(\255> restore a.c, overwrite if already exists)30 E(lzop \255d *.lzo) +131 120 Q(list)119 144 Q(lzop \255l a.c.lzo)131 156 Q(lzop \255l *.lzo) +131 168 Q(lzop \255lv *.lzo)131 180 Q(\255> be verbose)42 E(test)119 204 +Q(lzop \255t a.c.lzo)131 216 Q(lzop \255tq *.lzo)131 228 Q +(\255> be quiet)42 E/F2 10/Times-Bold@0 SF(pipe mode:)108 244.8 Q F0 +(\(de\)compress from stdin to stdout)2.5 E F1(create)119 256.8 Q +(lzop < a.c > y.lzo)131 268.8 Q(cat a.c | lzop > y.lzo)131 280.8 Q +(tar \255cf \255 *.c | lzop > y.tar.lzo)131 292.8 Q +(\255> create a compressed tar file)30 E(extract)119 316.8 Q +(lzop \255d < y.lzo > a.c)131 328.8 Q +(lzop \255d < y.tar.lzo | tar \255xvf \255)131 340.8 Q +(\255> extract a tar file)30 E(list)119 364.8 Q(lzop \255l < y.lzo)131 +376.8 Q(cat y.lzo | lzop \255l)131 388.8 Q +(lzop \255d < y.tar.lzo | tar \255tvf \255)131 400.8 Q +(\255> list a tar file)30 E(test)119 424.8 Q(lzop \255t < y.lzo)131 +436.8 Q(cat y.lzo | lzop \255t)131 448.8 Q F2(stdout mode:)108 465.6 Q +F0(\(de\)compress to stdout)2.5 E F1(create)119 477.6 Q +(lzop \255c a.c > y.lzo)131 489.6 Q(extract)119 513.6 Q +(lzop \255dc y.lzo > a.c)131 525.6 Q +(lzop \255dc y.tar.lzo | tar \255xvf \255)131 537.6 Q +(\255> extract a tar file)36 E(list)119 561.6 Q +(lzop \255dc y.tar.lzo | tar \255tvf \255)131 573.6 Q +(\255> list a tar file)36 E F2(ar)108 590.4 Q(chi)-.18 E .2 -.1(ve m)-.1 +H(ode:).1 E F0(compress/e)2.5 E +(xtract multiple \214les into a single archi)-.15 E .3 -.15(ve \214)-.25 +H(le).15 E F1(create)119 602.4 Q(lzop a.c b.c \255o sources.lzo)131 +614.4 Q(\255> create an archive)60 E +(lzop \255P src/*.c \255o sources.lzo)131 626.4 Q +(\255> create an archive, store path name)42 E +(lzop \255c *.c > sources.lzo)131 638.4 Q +(\255> another way to create an archive)72 E +(lzop \255c *.h >> sources.lzo)131 650.4 Q(\255> add files to archive)66 +E(extract)119 674.4 Q(lzop \255dN sources.lzo)131 686.4 Q +(lzop \255x ../src/sources.lzo)131 698.4 Q +(\255> extract to current directory)66 E +(lzop \255x \255p/tmp < ../src/sources.lzo)131 710.4 Q +(\255> extract to /tmp directory)12 E F0(lzop 1.04)72 768 Q 203.17 +(2017-08-10 5)173.45 F 0 Cg EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup -/F0 10/Times-Roman@0 SF 392.18<4c5a4f50283129204c5a4f50283129>72 48 R/F1 -10/Courier@0 SF<6c697374>119 84 Q -<6c7a6f7020ad6c4e7620736f75726365732e6c7a6f>131 96 Q<74657374>119 120 Q -<6c7a6f7020ad7420736f75726365732e6c7a6f>131 132 Q -<6c7a6f7020ad74767620736f75726365732e6c7a6f>131 144 Q -<ad3e206265207665727920766572626f7365>96 E F0 1.041<496620796f7520776973 -6820746f2063726561746520612073696e676c65206172636869>108 160.8 R 1.341 --.15<7665208c>-.25 H 1.041<6c652077697468206d756c7469706c65206d656d6265 -727320736f2074686174206d656d626572732063616e206c617465722062652065>.15 F -<7874726163746564>-.15 E<696e646570656e64656e746c79>108 172.8 Q 2.738 -<2c79>-.65 G .238<6f752073686f756c642070726566657220612066756c6c2d666561 -7475726564206172636869>-2.738 F -.15<7665>-.25 G 2.737<7273>.15 G .237 -<75636820617320746172>-2.737 F 2.737<2e54>-.55 G .237 -<6865206c61746573742076>-2.737 F .237<657273696f6e206f66>-.15 F/F2 9 -/Times-Roman@0 SF<474e55>2.737 E F0 .237<74617220737570706f727473>2.737 -F<746865>108 184.8 Q/F3 10/Times-Bold@0 SF<adad757365ad636f6d7072>6.941 -E<657373ad7072>-.18 E<6f6772616d3d6c7a6f70>-.18 E F0 4.442 -<6f7074696f6e20746f20696e>6.941 F -.2<766f>-.4 G 4.642 -.1<6b65206c>.2 H -4.442<7a6f70207472616e73706172656e746c79>.1 F 9.442<2e6c>-.65 G 4.442 -<7a6f702069732064657369676e65642061732061>-9.442 F -<636f6d706c656d656e7420746f20746172>108 196.8 Q 2.5<2c6e>-.4 G -<6f742061732061207265706c6163656d656e742e>-2.5 E/F4 10.95/Times-Bold@0 -SF<454e564952>72 213.6 Q<4f4e4d454e54>-.329 E F0 1.059<54686520656e>108 -225.6 R 1.059<7669726f6e6d656e742076>-.4 F<61726961626c65>-.25 E/F5 9 -/Times-Bold@0 SF<4c5a4f50>3.559 E F0 1.058 -<63616e20686f6c64206120736574206f6620646566>3.559 F 1.058<61756c74206f70 -74696f6e7320666f72206c7a6f702e205468657365206f7074696f6e732061726520696e -746572707265746564>-.1 F<8c72737420616e642063616e206265206f>108 237.6 Q --.15<7665>-.15 G<727772697474656e2062792065>.15 E -<78706c6963697420636f6d6d616e64206c696e6520706172616d65746572732e>-.15 E --.15<466f>5 G 2.5<7265>.15 G<78616d706c653a>-2.65 E F1 -<666f722073682f6b73682f7a73683a>132 254.4 Q -<4c5a4f503d22ad317620adad6e616d65223b206578706f7274204c5a4f50>24 E -<666f72206373682f746373683a>132 266.4 Q -<736574656e76204c5a4f502022ad317620adad6e616d6522>36 E -<666f7220444f532f57696e646f77733a>132 278.4 Q -<736574204c5a4f503dad317620adad6e616d65>18 E F0 .615<4f6e2056>108 295.2 -R .616<61782f564d532c20746865206e616d65206f662074686520656e>-1.11 F .616 -<7669726f6e6d656e742076>-.4 F .616<61726961626c65206973>-.25 F F2 -<4c5a4f505f4f5054>3.116 E F0 3.116<2c74>C 3.116<6f61>-3.116 G -.2<766f> --3.316 G .616 -<6964206120636f6e8d6963742077697468207468652073796d626f6c20736574>.2 F -<666f7220696e>108 307.2 Q -.2<766f>-.4 G -<636174696f6e206f66207468652070726f6772616d2e>.2 E -<4e6f7420616c6c206f6620746865206f7074696f6e73206172652076>108 324 Q -<616c696420696e2074686520656e>-.25 E<7669726f6e6d656e742076>-.4 E -<61726961626c6520ad206c7a6f702077696c6c2074656c6c20796f752e>-.25 E F4 -<53454520414c534f>72 340.8 Q F3<627a697032>108 352.8 Q F0<2831292c>A F3 -<677a6970>2.5 E F0<2831292c>A F3<746172>2.5 E F0<283129>A<507265636f6d70 -696c65642062696e617269657320666f7220736f6d6520706c6174666f726d7320617265 -2061>108 369.6 Q -.25<7661>-.2 G -<696c61626c652066726f6d20746865206c7a6f7020686f6d6520706167652e>.25 E F1 -<73656520687474703a2f2f7777772e6f62657268756d65722e636f6d2f6f70656e736f -757263652f6c7a6f702f>132 386.4 Q F0<6c7a6f70207573657320746865>108 403.2 -Q F2<4c5a4f>2.5 E F0<6461746120636f6d7072657373696f6e206c69627261727920 -666f7220636f6d7072657373696f6e2073657276696365732e>2.5 E F1<736565206874 -74703a2f2f7777772e6f62657268756d65722e636f6d2f6f70656e736f757263652f6c7a -6f2f>132 420 Q F4<444941>72 436.8 Q<474e4f5354494353>-.602 E F0 1.148<45 -78697420737461747573206973206e6f726d616c6c7920303b20696620616e206572726f -72206f63637572732c2065>108 448.8 R 1.148 -<7869742073746174757320697320312e20496620612077>-.15 F 1.148 -<61726e696e67206f63637572732c2065>-.1 F 1.148 -<7869742073746174757320697320322028756e6c657373>-.15 F<6f7074696f6e>108 -460.8 Q F3<adad69676e6f72>2.5 E<65ad776172>-.18 E<6e>-.15 E F0 -<697320696e206566>2.5 E<66656374292e>-.25 E F3<6c7a6f7027>108 477.6 Q -<73>-.37 E F0<646961676e6f73746963732061726520696e74656e64656420746f2062 -652073656c662d65>2.5 E<78706c616e61746f7279>-.15 E<2e>-.65 E F4 -.11 -<4255>72 494.4 S<4753>.11 E F0<4e6f2062>108 506.4 Q -<75677320617265206b6e6f>-.2 E<776e2e20506c65617365207265706f727420616c6c -2070726f626c656d7320696d6d6564696174656c7920746f2074686520617574686f72> --.25 E<2e>-.55 E F4 -.548<4155>72 523.2 S<54484f52>.548 E F0 29.496 -<4d61726b7573204672616e7a205861>108 535.2 R -.15<7665>-.2 G 31.996<724a> -.15 G 29.496 -<6f68616e6e6573204f62657268756d6572203c6d61726b7573406f62657268756d6572> --31.996 F<2e636f6d3e>-.55 E<687474703a2f2f777777>108 547.2 Q -<2e6f62657268756d6572>-.65 E<2e636f6d2f6f70656e736f757263652f6c7a6f702f> --.55 E F4<434f50595249474854>72 564 Q F0 .616<6c7a6f7020616e6420746865> -108 576 R F2<4c5a4f>3.116 E F0 .616<6c6962726172792061726520436f70>3.116 -F .615<7972696768742028432920313939362c20313939372c20313939382c20313939 -392c20323030302c20323030312c20323030322c20323030332c20323030342c20323030 -352c>-.1 F<323030362c20323030372c20323030382c20323030392c20323031302062 -79204d61726b7573204672616e7a205861>108 588 Q -.15<7665>-.2 G 2.5<724a> -.15 G<6f68616e6e6573204f62657268756d6572>-2.5 E 5<2e41>-.55 G -<6c6c2052696768747320526573657276>-5 E<65642e>-.15 E -<6c7a6f7020616e6420746865>108 604.8 Q F2<4c5a4f>2.5 E F0 -<6c696272617279206172652064697374726962>2.5 E -<7574656420756e64657220746865207465726d73206f6620746865>-.2 E F2<474e55> -2.5 E F0<47656e6572616c205075626c6963204c6963656e73652028>2.5 E F2 -<47504c>A F0<292e>A<4c65>108 621.6 Q -.05<6761>-.15 G 3.012<6c69>.05 G -.512<6e666f3a2049662077>-3.012 F .512<616e7420746f20696e7465>-.1 F .513< -6772617465206c7a6f7020696e746f20796f757220636f6d6d65726369616c2028626163 -6b7570ad2973797374656d20706c65617365206361726566756c6c792072656164207468 -65>-.15 F F2<474e55>3.013 E .25<47504c2046>108 633.6 R -.495<4151>-.666 -G F0<617420687474703a2f2f777777>2.995 E<2e676e752e6f72>-.65 E -<672f6c6963656e7365732f67706cad66>-.18 E<61712e68746d6c2061626f75742070 -6f737369626c6520696d706c69636174696f6e732e>-.1 E<6c7a6f7020312e3033>72 -768 Q 203.17<323031302d31312d30362036>173.45 F 0 Cg EP +/F0 10/Times-Roman@0 SF 392.18(LZOP\(1\) LZOP\(1\))72 48 R/F1 10 +/Courier@0 SF(list)119 84 Q(lzop \255lNv sources.lzo)131 96 Q(test)119 +120 Q(lzop \255t sources.lzo)131 132 Q(lzop \255tvv sources.lzo)131 144 +Q(\255> be very verbose)96 E F0 1.041 +(If you wish to create a single archi)108 160.8 R 1.341 -.15(ve \214) +-.25 H 1.041(le with multiple members so that members can later be e).15 +F(xtracted)-.15 E(independently)108 172.8 Q 2.738(,y)-.65 G .238 +(ou should prefer a full-featured archi)-2.738 F -.15(ve)-.25 G 2.737 +(rs).15 G .237(uch as tar)-2.737 F 2.737(.T)-.55 G .237(he latest v) +-2.737 F .237(ersion of)-.15 F/F2 9/Times-Roman@0 SF(GNU)2.737 E F0 .237 +(tar supports)2.737 F(the)108 184.8 Q/F3 10/Times-Bold@0 SF +(\255\255use\255compr)6.941 E(ess\255pr)-.18 E(ogram=lzop)-.18 E F0 +4.442(option to in)6.941 F -.2(vo)-.4 G 4.642 -.1(ke l).2 H 4.442 +(zop transparently).1 F 9.442(.l)-.65 G 4.442(zop is designed as a) +-9.442 F(complement to tar)108 196.8 Q 2.5(,n)-.4 G +(ot as a replacement.)-2.5 E/F4 10.95/Times-Bold@0 SF(ENVIR)72 213.6 Q +(ONMENT)-.329 E F0 1.059(The en)108 225.6 R 1.059(vironment v)-.4 F +(ariable)-.25 E/F5 9/Times-Bold@0 SF(LZOP)3.559 E F0 1.058 +(can hold a set of def)3.559 F 1.058 +(ault options for lzop. These options are interpreted)-.1 F +(\214rst and can be o)108 237.6 Q -.15(ve)-.15 G(rwritten by e).15 E +(xplicit command line parameters.)-.15 E -.15(Fo)5 G 2.5(re).15 G +(xample:)-2.65 E F1(for sh/ksh/zsh:)132 254.4 Q +(LZOP="\2551v \255\255name"; export LZOP)24 E(for csh/tcsh:)132 266.4 Q +(setenv LZOP "\2551v \255\255name")36 E(for DOS/Windows:)132 278.4 Q +(set LZOP=\2551v \255\255name)18 E F0 .669(On V)108 295.2 R .669 +(ax/VMS, the name of the en)-1.11 F .67(vironment v)-.4 F .67 +(ariable is)-.25 F F2(LZOP_OPT)3.17 E(,)-.666 E F0 .67(to a)3.17 F -.2 +(vo)-.2 G .67(id a con\215ict with the symbol set).2 F(for in)108 307.2 +Q -.2(vo)-.4 G(cation of the program.).2 E(Not all of the options are v) +108 324 Q(alid in the en)-.25 E(vironment v)-.4 E +(ariable \255 lzop will tell you.)-.25 E F4(SEE ALSO)72 340.8 Q F3 +(bzip2)108 352.8 Q F0(\(1\),)A F3(gzip)2.5 E F0(\(1\),)A F3(tar)2.5 E F0 +(\(1\),)A F3(xz)2.5 E F0(\(1\))A +(Precompiled binaries for some platforms are a)108 369.6 Q -.25(va)-.2 G +(ilable from the lzop home page.).25 E F1 +(see http://www.oberhumer.com/opensource/lzop/)132 386.4 Q F0 +(lzop uses the)108 403.2 Q F2(LZO)2.5 E F0 +(data compression library for compression services.)2.5 E F1 +(see http://www.oberhumer.com/opensource/lzo/)132 420 Q F4(DIA)72 436.8 +Q(GNOSTICS)-.602 E F0 1.148 +(Exit status is normally 0; if an error occurs, e)108 448.8 R 1.148 +(xit status is 1. If a w)-.15 F 1.148(arning occurs, e)-.1 F 1.148 +(xit status is 2 \(unless)-.15 F(option)108 460.8 Q F3(\255\255ignor)2.5 +E(e\255war)-.18 E(n)-.15 E F0(is in ef)2.5 E(fect\).)-.25 E F3(lzop')108 +477.6 Q(s)-.37 E F0(diagnostics are intended to be self-e)2.5 E +(xplanatory)-.15 E(.)-.65 E F4 -.11(BU)72 494.4 S(GS).11 E F0(No b)108 +506.4 Q(ugs are kno)-.2 E +(wn. Please report all problems immediately to the author)-.25 E(.)-.55 +E F4 -.548(AU)72 523.2 S(THOR).548 E F0 29.496(Markus Franz Xa)108 535.2 +R -.15(ve)-.2 G 31.996(rJ).15 G 29.496 +(ohannes Oberhumer <markus@oberhumer)-31.996 F(.com>)-.55 E(http://www) +108 547.2 Q(.oberhumer)-.65 E(.com/opensource/lzop/)-.55 E F4(COPYRIGHT) +72 564 Q F0 6.616(lzop and the)108 576 R F2(LZO)9.116 E F0 6.615 +(library are Cop)9.116 F 6.615 +(yright \(C\) 1996\2552017 Markus Franz Xa)-.1 F -.15(ve)-.2 G 9.115(rO) +.15 G(berhumer)-9.115 E(<markus@oberhumer)108 588 Q 2.5(.com>. All)-.55 +F(Rights Reserv)2.5 E(ed.)-.15 E(lzop and the)108 604.8 Q F2(LZO)2.5 E +F0(library are distrib)2.5 E(uted under the terms of the)-.2 E F2(GNU) +2.5 E F0(General Public License \()2.5 E F2(GPL)A F0(\).)A(Le)108 621.6 +Q -.05(ga)-.15 G 3.012(li).05 G .512(nfo: If w)-3.012 F .512 +(ant to inte)-.1 F .513(grate lzop into your commercial \(backup\255\)s\ +ystem please carefully read the)-.15 F F2(GNU)3.013 E(GPL F)108 633.6 Q +-.495(AQ)-.666 G F0(at http://www)2.995 E(.gnu.or)-.65 E +(g/licenses/gpl\255f)-.18 E(aq.html about possible implications.)-.1 E +(lzop 1.04)72 768 Q 203.17(2017-08-10 6)173.45 F 0 Cg EP %%Trailer end %%EOF diff --git a/doc/lzop.tex b/doc/lzop.tex index 430b1b5..3a50f63 100644 --- a/doc/lzop.tex +++ b/doc/lzop.tex @@ -62,7 +62,7 @@ stamp was not preserved after a file transfer. \textbf{lzop} preserves the ownership, mode and time stamp of files when compressing. When decompressing lzop restores the mode and time stamp if present in the compressed files. -See the options \textbf{-n}, \textbf{-N}, \textbf{--no-mode} and \textbf{--no-time} +See the options \textbf{-n}, \textbf{-N}, \textbf{-{}-no-mode} and \textbf{-{}-no-time} for more information. @@ -96,13 +96,13 @@ the default level offers pretty fast compression. may change in a future release. -\item[{-1, --fast}] \mbox{} +\item[{-1, -{}-fast}] \mbox{} can be even a little bit faster in some cases - but most times you won't notice the difference -\item[{-7, -8, -9, --best}] \mbox{} +\item[{-7, -8, -9, -{}-best}] \mbox{} these compression levels are mainly intended for generating pre-compressed data - especially \textbf{-9} can be somewhat slow @@ -122,34 +122,34 @@ If no other command is given then lzop defaults to compression \begin{description} -\item[{-\#, --fast, --best}] \mbox{} +\item[{-\#, -{}-fast, -{}-best}] \mbox{} Regulate the speed of compression using the specified -digit \textbf{\#}, where -1 or --fast indicates the +digit \textbf{\#}, where -1 or -{}-fast indicates the fastest compression method (less compression) and --9 or --best indicates the slowest compression +-9 or -{}-best indicates the slowest compression method (best compression). The default compression level is -3. -\item[{-d, --decompress, --uncompress}] \mbox{} +\item[{-d, -{}-decompress, -{}-uncompress}] \mbox{} Decompress. Each file will be placed into same the directory as the compressed file. -\item[{-x, --extract}] \mbox{} +\item[{-x, -{}-extract}] \mbox{} Extract compressed files to the current working directory. This is the same as '-dPp'. -\item[{-t, --test}] \mbox{} +\item[{-t, -{}-test}] \mbox{} Test. Check the compressed file integrity. -\item[{-l, --list}] \mbox{} +\item[{-l, -{}-list}] \mbox{} For each compressed file, list the following fields: @@ -163,7 +163,7 @@ fields: \end{verbatim} -In combination with the --verbose option, the following +In combination with the -{}-verbose option, the following fields are also displayed: \begin{verbatim} @@ -171,14 +171,14 @@ fields are also displayed: \end{verbatim} -With --name, the uncompressed name, date and time +With -{}-name, the uncompressed name, date and time are those stored within the compress file if present. -With --verbose, the size totals and compression +With -{}-verbose, the size totals and compression ratio for all files is also displayed. With ---quiet, the title and totals lines are not displayed. +-{}-quiet, the title and totals lines are not displayed. @@ -186,7 +186,7 @@ Note that lzop defines compression ratio as compressed\_size / uncompressed\_size. -\item[{--ls, --ls=\textit{FLAGS}}] \mbox{} +\item[{-{}-ls, -{}-ls=\textit{FLAGS}}] \mbox{} List each compressed file in a format similar to \textbf{ls~-ln}. @@ -198,22 +198,22 @@ The following flags are currently honoured: Q Enclose file names in double quotes. -\item[{--info}] \mbox{} +\item[{-{}-info}] \mbox{} For each compressed file, list the internal header fields. -\item[{-I, --sysinfo}] \mbox{} +\item[{-I, -{}-sysinfo}] \mbox{} Display information about the system and quit. -\item[{-L, --license}] \mbox{} +\item[{-L, -{}-license}] \mbox{} Display the lzop license and quit. -\item[{-h, -H, --help}] \mbox{} +\item[{-h, -H, -{}-help}] \mbox{} Display a help screen and quit. @@ -224,7 +224,7 @@ Version. Display the version number and compilation options and quit. -\item[{--version}] \mbox{} +\item[{-{}-version}] \mbox{} Version. Display the version number and quit. @@ -232,7 +232,7 @@ Version. Display the version number and quit. \section{OPTIONS\label{OPTIONS}\index{OPTIONS}} \begin{description} -\item[{-c, --stdout, --to-stdout}] \mbox{} +\item[{-c, -{}-stdout, -{}-to-stdout}] \mbox{} Write output on standard output. If there are several input files, the output consists of a sequence @@ -241,14 +241,14 @@ better compression, concatenate all input files before compressing them. -\item[{-o \textit{FILE}, --output=\textit{FILE}}] \mbox{} +\item[{-o \textit{FILE}, -{}-output=\textit{FILE}}] \mbox{} Write output to the file \textit{FILE}. If there are several input files, the output consists of a sequence of independently (de)compressed members. -\item[{-p, -p\textit{DIR}, --path=\textit{DIR}}] \mbox{} +\item[{-p, -p\textit{DIR}, -{}-path=\textit{DIR}}] \mbox{} Write output files into the directory \textit{DIR} instead of the directory determined by the input file. If @@ -256,7 +256,7 @@ of the directory determined by the input file. If directory. -\item[{-f, --force}] \mbox{} +\item[{-f, -{}-force}] \mbox{} Force lzop to @@ -280,7 +280,7 @@ Using \textbf{-f} two or more times forces things like Use with care. -\item[{-F, --no-checksum}] \mbox{} +\item[{-F, -{}-no-checksum}] \mbox{} Do not store or verify a checksum of the uncompressed file when compressing or decompressing. @@ -293,7 +293,7 @@ compressing with one of the slow compression levels (-7, -8 or -9), regardless of this option. -\item[{-n, --no-name}] \mbox{} +\item[{-n, -{}-no-name}] \mbox{} When decompressing, do not restore the original file name if present (remove only the lzop suffix @@ -301,7 +301,7 @@ from the compressed file name). This option is the default under UNIX. -\item[{-N, --name}] \mbox{} +\item[{-N, -{}-name}] \mbox{} When decompressing, restore the original file name if present. This option is useful on systems which @@ -320,19 +320,19 @@ This option is mainly useful when using \textbf{archive mode} - see usage examples below. -\item[{--no-mode}] \mbox{} +\item[{-{}-no-mode}] \mbox{} When decompressing, do not restore the original mode (permissions) saved in the compressed file. -\item[{--no-time}] \mbox{} +\item[{-{}-no-time}] \mbox{} When decompressing, do not restore the original time stamp saved in the compressed file. -\item[{-S \textit{.suf}, --suffix=\textit{.suf}}] \mbox{} +\item[{-S \textit{.suf}, -{}-suffix=\textit{.suf}}] \mbox{} Use suffix \textit{.suf} instead of \textit{.lzo}. The suffix must not contain multiple dots and special characters like '+' or '*', @@ -340,58 +340,58 @@ and suffixes other than \textit{.lzo} should be avoided to avoid confusion when files are transferred to other systems. -\item[{-k, --keep}] \mbox{} +\item[{-k, -{}-keep}] \mbox{} Do not delete input files. This is the default. -\item[{-U, --unlink, --delete}] \mbox{} +\item[{-U, -{}-unlink, -{}-delete}] \mbox{} -Delete input files after succesfull compression or +Delete input files after successful compression or decompression. Use this option to make lzop behave like \textbf{gzip} and \textbf{bzip2}. Note that explicitly giving \textbf{-k} overrides \textbf{-U}. -\item[{--crc32}] \mbox{} +\item[{-{}-crc32}] \mbox{} -Use a crc32 checksum instead of a adler32 checksum. +Use a crc32 checksum instead of an adler32 checksum. -\item[{--no-warn}] \mbox{} +\item[{-{}-no-warn}] \mbox{} Suppress all warnings. -\item[{--ignore-warn}] \mbox{} +\item[{-{}-ignore-warn}] \mbox{} Suppress all warnings, and never exit with exit status 2. -\item[{-q, --quiet, --silent}] \mbox{} +\item[{-q, -{}-quiet, -{}-silent}] \mbox{} Suppress all warnings and decrease the verbosity of some -commands like \textbf{--list} or \textbf{--test}. +commands like \textbf{-{}-list} or \textbf{-{}-test}. -\item[{-v, --verbose}] \mbox{} +\item[{-v, -{}-verbose}] \mbox{} Verbose. Display the name for each file compressed or decompressed. Multiple \textbf{-v} can be used to increase -the verbosity of some commands like \textbf{--list} or \textbf{--test}. +the verbosity of some commands like \textbf{-{}-list} or \textbf{-{}-test}. -\item[{--}] \mbox{} +\item[{-{}-}] \mbox{} Specifies that this is the end of the options. Any file name -after \textbf{--} will not be interpreted as an option even if +after \textbf{-{}-} will not be interpreted as an option even if it starts with a hyphen. \end{description} \section{OTHER OPTIONS\label{OTHER_OPTIONS}\index{OTHER OPTIONS}} \begin{description} -\item[{--no-stdin}] \mbox{} +\item[{-{}-no-stdin}] \mbox{} Do not try to read standard input (but a file name "-" will still override this option). @@ -399,7 +399,7 @@ In old versions of \textbf{lzop}, this option was necessary when used in cron jobs (which do not have a controlling terminal). -\item[{--filter=\textit{NUMBER}}] \mbox{} +\item[{-{}-filter=\textit{NUMBER}}] \mbox{} Rarely useful. Preprocess data with a special "multimedia" filter @@ -412,33 +412,33 @@ More effective filters may be added in the future, though. -You can try --filter=1 with data like 8-bit sound samples, ---filter=2 with 16-bit samples or depth-16 images, etc. +You can try -{}-filter=1 with data like 8-bit sound samples, +-{}-filter=2 with 16-bit samples or depth-16 images, etc. Un-filtering during decompression is handled automatically. -\item[{-C, --checksum}] \mbox{} +\item[{-C, -{}-checksum}] \mbox{} Deprecated. Only for compatibility with very old versions as lzop now uses a checksum by default. This option will get removed in a future release. -\item[{--no-color}] \mbox{} +\item[{-{}-no-color}] \mbox{} Do not use any color escape sequences. -\item[{--mono}] \mbox{} +\item[{-{}-mono}] \mbox{} Assume a mono ANSI terminal. This is the default under UNIX (if console support is compiled in). -\item[{--color}] \mbox{} +\item[{-{}-color}] \mbox{} Assume a color ANSI terminal or try full-screen access. This is the default under DOS and in a Linux virtual console @@ -553,7 +553,7 @@ If you wish to create a single archive file with multiple members so that members can later be extracted independently, you should prefer a full-featured archiver such as tar. The latest version of GNU tar supports the -\textbf{--use-compress-program=lzop} option to invoke lzop transparently. +\textbf{-{}-use-compress-program=lzop} option to invoke lzop transparently. lzop is designed as a complement to tar, not as a replacement. @@ -584,7 +584,7 @@ lzop will tell you. \section{SEE ALSO\label{SEE_ALSO}\index{SEE ALSO}} -\textbf{bzip2}(1), \textbf{gzip}(1), \textbf{tar}(1) +\textbf{bzip2}(1), \textbf{gzip}(1), \textbf{tar}(1), \textbf{xz}(1) @@ -607,7 +607,7 @@ services. Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2 (unless -option \textbf{--ignore-warn} is in effect). +option \textbf{-{}-ignore-warn} is in effect). @@ -629,8 +629,7 @@ http://www.oberhumer.com/opensource/lzop/ lzop and the LZO library are -Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2006, 2007, 2008, 2009, 2010 by Markus Franz Xaver Johannes Oberhumer. +Copyright (C) 1996-2017 Markus Franz Xaver Oberhumer $<$markus@oberhumer.com$>$. All Rights Reserved. diff --git a/doc/lzop.txt b/doc/lzop.txt index 9e648ed..9ebd57d 100644 --- a/doc/lzop.txt +++ b/doc/lzop.txt @@ -217,12 +217,12 @@ OPTIONS Do not delete input files. This is the default. -U, --unlink, --delete - Delete input files after succesfull compression or decompression. + Delete input files after successful compression or decompression. Use this option to make lzop behave like gzip and bzip2. Note that explicitly giving -k overrides -U. --crc32 - Use a crc32 checksum instead of a adler32 checksum. + Use a crc32 checksum instead of an adler32 checksum. --no-warn Suppress all warnings. @@ -384,7 +384,7 @@ ENVIRONMENT tell you. SEE ALSO - bzip2(1), gzip(1), tar(1) + bzip2(1), gzip(1), tar(1), xz(1) Precompiled binaries for some platforms are available from the lzop home page. @@ -410,9 +410,8 @@ AUTHOR http://www.oberhumer.com/opensource/lzop/ COPYRIGHT - lzop and the LZO library are Copyright (C) 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by Markus - Franz Xaver Johannes Oberhumer. All Rights Reserved. + lzop and the LZO library are Copyright (C) 1996-2017 Markus Franz Xaver + Oberhumer <markus@oberhumer.com>. All Rights Reserved. lzop and the LZO library are distributed under the terms of the GNU General Public License (GPL). diff --git a/packaging/lzop.manifest b/packaging/lzop.manifest deleted file mode 100644 index 017d22d..0000000 --- a/packaging/lzop.manifest +++ /dev/null @@ -1,5 +0,0 @@ -<manifest> - <request> - <domain name="_"/> - </request> -</manifest> diff --git a/packaging/lzop.spec b/packaging/lzop.spec deleted file mode 100644 index 0693ced..0000000 --- a/packaging/lzop.spec +++ /dev/null @@ -1,44 +0,0 @@ -Name: lzop -Version: 1.03 -Release: 1 -License: GPLv2+ -Summary: lzop -URL: http://www.lzop.org -Group: Applications/Text -Source: %{name}-%{version}.tar.gz -Source1001: lzop.manifest -BuildRequires: lzo -BuildRequires: lzo-devel - - -%description -lzop is a file compressor which is very similar to gzip. lzop uses -the LZO data compression library for compression services, and its -main advantages over gzip are much higher compression and -decompression speed (at the cost of some compression ratio). - -lzop is copyrighted OpenSource software distributed under the terms -of the GNU General Public License (GPL). - -%prep -%setup -q - -%build -cp %{SOURCE1001} . -%configure --disable-nls -make PR_PROGRAM=%{_bindir}/pr - -%install -%make_install - -%clean -rm -rf %{buildroot} - -%docs_package - -%files -%manifest %{name}.manifest -%defattr(-,root,root,-) -%doc NEWS README COPYING -%{_bindir}/* -%{_mandir}/*/* diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 051db8d..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## Process this file with automake to produce Makefile.in -# -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer -# - -bin_PROGRAMS = lzop - -lzop_SOURCES = \ - lzop.c compress.c filter.c help.c mblock.c p_lzo.c util.c \ - c_init.c c_none.c c_ansim.c c_ansic.c c_screen.c \ - s_object.c s_curses.c s_djgpp2.c s_vcsa.c \ - frames.c djgpp2.c - -EXTRA_DIST = \ - conf.h console.h frames.h miniacc.h screen.h version.h - diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index ebbd843..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,516 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -# Copyright (C) 1996-2010 Markus F.X.J. Oberhumer -# - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -bin_PROGRAMS = lzop$(EXEEXT) -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/autoconf/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_lzop_OBJECTS = lzop.$(OBJEXT) compress.$(OBJEXT) filter.$(OBJEXT) \ - help.$(OBJEXT) mblock.$(OBJEXT) p_lzo.$(OBJEXT) util.$(OBJEXT) \ - c_init.$(OBJEXT) c_none.$(OBJEXT) c_ansim.$(OBJEXT) \ - c_ansic.$(OBJEXT) c_screen.$(OBJEXT) s_object.$(OBJEXT) \ - s_curses.$(OBJEXT) s_djgpp2.$(OBJEXT) s_vcsa.$(OBJEXT) \ - frames.$(OBJEXT) djgpp2.$(OBJEXT) -lzop_OBJECTS = $(am_lzop_OBJECTS) -lzop_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(lzop_SOURCES) -DIST_SOURCES = $(lzop_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -configure_CFLAGS = @configure_CFLAGS@ -configure_CPPFLAGS = @configure_CPPFLAGS@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lzop_SOURCES = \ - lzop.c compress.c filter.c help.c mblock.c p_lzo.c util.c \ - c_init.c c_none.c c_ansim.c c_ansic.c c_screen.c \ - s_object.c s_curses.c s_djgpp2.c s_vcsa.c \ - frames.c djgpp2.c - -EXTRA_DIST = \ - conf.h console.h frames.h miniacc.h screen.h version.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -lzop$(EXEEXT): $(lzop_OBJECTS) $(lzop_DEPENDENCIES) - @rm -f lzop$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(lzop_OBJECTS) $(lzop_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_ansic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_ansim.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_none.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_screen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/djgpp2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frames.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_lzo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_curses.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_djgpp2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_object.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s_vcsa.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/c_ansic.c b/src/c_ansic.c index 9a1a099..833d611 100644 --- a/src/c_ansic.c +++ b/src/c_ansic.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -84,7 +84,4 @@ console_t console_ansi_color = #endif /* USE_ANSI */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/c_ansim.c b/src/c_ansim.c index bec1409..db59069 100644 --- a/src/c_ansim.c +++ b/src/c_ansim.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -72,7 +72,4 @@ console_t console_ansi_mono = #endif /* USE_ANSI */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/c_init.c b/src/c_init.c index 510d20e..e4ffcaa 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -163,7 +163,4 @@ void con_fprintf(FILE *f, const char *format, ...) #endif /* USE_CONSOLE */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/c_none.c b/src/c_none.c index 6a19f2c..8854c6f 100644 --- a/src/c_none.c +++ b/src/c_none.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -90,7 +90,4 @@ console_t console_none = #endif /* USE_CONSOLE */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/c_screen.c b/src/c_screen.c index 483531e..2b52327 100644 --- a/src/c_screen.c +++ b/src/c_screen.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -207,7 +207,4 @@ console_t console_screen = #endif /* USE_SCREEN */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/compress.c b/src/compress.c index eaa9407..fb437ac 100644 --- a/src/compress.c +++ b/src/compress.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -391,8 +391,4 @@ void x_filter(lzo_bytep p, lzo_uint l, const header_t *h) } - -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -29,6 +29,22 @@ #ifndef __LZOP_CONF_H #define __LZOP_CONF_H 1 +#if defined(_WIN32) +/* disable silly warnings about using "deprecated" POSIX functions like fopen() */ +#ifndef _CRT_NONSTDC_NO_DEPRECATE +#define _CRT_NONSTDC_NO_DEPRECATE 1 +#endif +#ifndef _CRT_NONSTDC_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS 1 +#endif +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE 1 +#endif +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS 1 +#endif +#endif + #if defined(LZOP_HAVE_CONFIG_H) # include <config.h> #endif @@ -53,8 +69,8 @@ #endif #if !defined(LZO_VERSION) # error "you need the LZO library" -#elif (LZO_VERSION < 0x1040) -# error "please upgrade your LZO package" +#elif (LZO_VERSION < 0x2080) && 0 +# error "please upgrade your LZO package to version 2.08 or newer" #endif #endif @@ -610,23 +626,13 @@ typedef struct lzo_bytep mb_mem_alloc; lzo_uint32 mb_size_alloc; lzo_uint32 mb_align; - /* the following fields are not yet used but may prove useful for - * adding new algorithms */ - lzo_uint32 mb_flags; - lzo_uint32 mb_id; - lzo_uint32 mb_len; - lzo_uint32 mb_adler32; - lzo_uint32 mb_crc32; } mblock_t; #define mblock_p mblock_t * -lzo_bool mb_alloc(mblock_p m, lzo_uint32 size, lzo_uint align); +lzo_bool mb_alloc(mblock_p m, lzo_uint32 size, lzo_uint32 align); void mb_free(mblock_p m); -lzo_bool mb_init(mblock_p m, lzo_uint32 size, lzo_uint align, - lzo_voidp heap, lzo_uint32 heap_size); - /************************************************************************* // util.c @@ -675,6 +681,7 @@ char *maybe_rename_file(const char *original_name); // other globals **************************************************************************/ +extern const char lzop_rcsid[]; extern const char *progname; extern MODE_T u_mask; extern time_t current_time; @@ -703,37 +710,6 @@ void sysinfo_djgpp(void); # define USE_LZO1X_1_15 1 #endif -#if defined(LZO_USE_ASM_1) -#if !defined(LZO_EXTERN_CDECL) -#define LZO_EXTERN_CDECL(r) LZO_EXTERN(r) -#endif -LZO_EXTERN_CDECL(int) -lzo1x_decompress_asm_fast - ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); -LZO_EXTERN_CDECL(int) -lzo1x_decompress_asm_fast_safe - ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); -# define lzo1x_decompress lzo1x_decompress_asm_fast -# define lzo1x_decompress_safe lzo1x_decompress_asm_fast_safe -#elif defined(LZO_USE_ASM_2) -LZO_EXTERN_CDECL(int) -_lzo1x_decompress_asm_fast - ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); -LZO_EXTERN_CDECL(int) -_lzo1x_decompress_asm_fast_safe - ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem /* NOT USED */ ); -# define lzo1x_decompress _lzo1x_decompress_asm_fast -# define lzo1x_decompress_safe _lzo1x_decompress_asm_fast_safe -#endif - #endif /* WITH_LZO */ @@ -747,7 +723,4 @@ _lzo1x_decompress_asm_fast_safe #endif /* already included */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/console.h b/src/console.h index d55a558..c0333eb 100644 --- a/src/console.h +++ b/src/console.h @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -191,7 +191,4 @@ extern console_t console_screen; #endif /* USE_CONSOLE */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/djgpp2.c b/src/djgpp2.c index 22dd993..9cb4b32 100644 --- a/src/djgpp2.c +++ b/src/djgpp2.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -175,7 +175,4 @@ void sysinfo_djgpp(void) #endif /* __DJGPP__ */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/filter.c b/src/filter.c index e2023b4..92f42b0 100644 --- a/src/filter.c +++ b/src/filter.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -161,7 +161,4 @@ void t_unmtf(lzo_bytep p, lzo_uint l) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/frames.c b/src/frames.c index 4a065b3..e17cd41 100644 --- a/src/frames.c +++ b/src/frames.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -241,7 +241,4 @@ void screen_show_frames(screen_t *screen) #endif /* USE_FRAMES */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/frames.h b/src/frames.h index 0069ffe..021f684 100644 --- a/src/frames.h +++ b/src/frames.h @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -328,3 +328,5 @@ static const unsigned char compressed_frames[3522] = { 0xb1, 0x20, 0x10, 0x05, 0x11, 0xcb, 0xb0, 0x18, 0x08, 0x30, 0x84, 0x20, 0x05, 0x6c, 0x2c, 0x11, 0x00, 0x00 }; + +/* vim:set ts=4 sw=4 et: */ @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -48,7 +48,7 @@ void head(void) fg = con_fg(f,FG_GREEN); con_fprintf(f, " Lempel-Ziv-Oberhumer Packer\n" - " Copyright (C) 1996 - 2010\n" + " Copyright (C) 1996 - 2017\n" "lzop v%-11s Markus Franz Xaver Johannes Oberhumer %20s\n" "\n", LZOP_VERSION_STRING, LZOP_VERSION_DATE); @@ -165,7 +165,7 @@ con_fprintf(f, " You should have received a copy of the GNU General Public License\n" " along with this program; see the file COPYING.\n" " If not, write to the Free Software Foundation, Inc.,\n" -" 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" +" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n" "\n" " Markus F.X.J. Oberhumer\n" " <markus@oberhumer.com>\n" @@ -269,7 +269,4 @@ void sysinfo(void) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -209,11 +209,17 @@ void e_envopt(const char *n) #endif -RETSIGTYPE __acc_cdecl_sighandler e_sighandler(acc_signo_t signo) +#if defined(__cplusplus) +extern "C" { +#endif +static void __acc_cdecl_sighandler e_sighandler(acc_signo_t signo) { UNUSED(signo); e_exit(EXIT_FATAL); } +#if defined(__cplusplus) +} +#endif /************************************************************************* @@ -742,12 +748,10 @@ void init_compress_header(header_t *h, const file_t *fip, const file_t *fop) h->mode = fix_mode_for_header(fip->st.st_mode); - if (fip->st.st_mtime) + if (fip->st.st_mtime > 0) { - h->mtime_low = (lzo_uint32) (fip->st.st_mtime); - h->mtime_high = (lzo_uint32) (fip->st.st_mtime >> 16 >> 16); - if ((lzo_int32) h->mtime_high < 0) - h->mtime_high = 0; + h->mtime_low = (lzo_uint32) (fip->st.st_mtime); + h->mtime_high = (lzo_uint32) ((fip->st.st_mtime >> 16) >> 16); } if (fip->name[0] && fip->fd != STDIN_FILENO) @@ -1539,7 +1543,9 @@ static lzo_bool check_stdout(file_t *ft) static lzo_bool open_stdin(file_t *ft) { +#if !defined(NO_SETMODE) static lzo_bool setmode_done = 0; +#endif assert(ft->fd == -1); f_reset(ft); @@ -1556,8 +1562,8 @@ static lzo_bool open_stdin(file_t *ft) return 0; } } -#endif setmode_done = 1; +#endif ft->st.st_mtime = time(NULL); #if 1 && defined(HAVE_FSTAT) @@ -1575,7 +1581,9 @@ static lzo_bool open_stdin(file_t *ft) static lzo_bool open_stdout(file_t *ft) { +#if !defined(NO_SETMODE) static lzo_bool setmode_done = 0; +#endif assert(ft->fd == -1); f_reset(ft); @@ -1597,8 +1605,8 @@ static lzo_bool open_stdout(file_t *ft) return 0; } } -#endif setmode_done = 1; +#endif return 1; } @@ -2583,7 +2591,7 @@ static int do_option(acc_getopt_p g, int optc) opt_console = CON_NONE; fprintf(stdout,"lzop %s\n",LZOP_VERSION_STRING); fprintf(stdout,"LZO library %s\n",lzo_version_string()); - fprintf(stdout,"Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer\n"); + fprintf(stdout,"Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer\n"); e_exit(EXIT_OK); break; case 'x': @@ -2984,15 +2992,12 @@ int __acc_cdecl_main main(int argc, char *argv[]) static char default_argv0[] = "lzop"; int cmdline_cmd = CMD_NONE; - sanity_check(); - -#if defined(__MINT__) - __binmode(1); - __set_binmode(stdout, 0); - __set_binmode(stderr, 0); +#if (ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_CC_MSC) && defined(_WRITE_ABORT_MSG) && defined(_CALL_REPORTFAULT) + _set_abort_behavior(_WRITE_ABORT_MSG, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); #endif acc_wildargv(&argc, &argv); + sanity_check(); #if defined(__DJGPP__) opt_shortname = !_USE_LFN; @@ -3147,6 +3152,7 @@ int __acc_cdecl_main main(int argc, char *argv[]) opt_console = CON_SCREEN; (void) ((con_intro(con_term) || (help(), 0))); e_exit(EXIT_OK); + break; case CMD_VERSION: version(); e_exit(EXIT_OK); @@ -3195,7 +3201,4 @@ int __acc_cdecl_main main(int argc, char *argv[]) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/mblock.c b/src/mblock.c index 09566cd..d57acd7 100644 --- a/src/mblock.c +++ b/src/mblock.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -33,44 +33,16 @@ // **************************************************************************/ -static void do_init(mblock_p m, lzo_uint32 size, lzo_uint align) +static void do_init(mblock_p m, lzo_uint32 size, lzo_uint32 align) { memset(m,0,sizeof(*m)); m->mb_size = size; m->mb_align = (align > 1) ? align : 1; assert((m->mb_align & (m->mb_align - 1)) == 0); - m->mb_adler32 = ADLER32_INIT_VALUE; - m->mb_crc32 = CRC32_INIT_VALUE; } -#if 0 -lzo_bool mb_init(mblock_p m, lzo_uint32 size, lzo_uint align, - lzo_voidp heap, lzo_uint32 heap_size) -{ - do_init(m,size,align); - if (m->mb_size == 0) - return 1; - - if (heap == 0) - return 0; - m->mb_mem_alloc = (lzo_bytep) heap; - m->mb_size_alloc = heap_size; - assert(m->mb_size_alloc >= m->mb_size + m->mb_align - 1); - - m->mb_mem = LZO_PTR_ALIGN_UP(m->mb_mem_alloc,m->mb_align); - assert(m->mb_mem >= m->mb_mem_alloc); - assert(m->mb_mem + m->mb_size <= m->mb_mem_alloc + m->mb_size_alloc); -#if 0 - printf("m_init: %p %p %8ld %8ld %8ld\n", m->mb_mem_alloc, m->mb_mem, - (long) m->mb_size_alloc, (long) m->mb_size, (long) m->mb_align); -#endif - return 1; -} -#endif - - -lzo_bool mb_alloc(mblock_p m, lzo_uint32 size, lzo_uint align) +lzo_bool mb_alloc(mblock_p m, lzo_uint32 size, lzo_uint32 align) { do_init(m,size,align); if (m->mb_size == 0) @@ -100,7 +72,4 @@ void mb_free(mblock_p m) } -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/miniacc.h b/src/miniacc.h index 4c0d210..5f44085 100644 --- a/src/miniacc.h +++ b/src/miniacc.h @@ -2,21 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -32,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -42,16 +28,10 @@ #ifndef __ACC_H_INCLUDED #define __ACC_H_INCLUDED 1 -#define ACC_VERSION 20101019L +#define ACC_VERSION 20170808L #if defined(__CYGWIN32__) && !defined(__CYGWIN__) # define __CYGWIN__ __CYGWIN32__ #endif -#if defined(__IBMCPP__) && !defined(__IBMC__) -# define __IBMC__ __IBMCPP__ -#endif -#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) -# define __INTEL_COMPILER __ICL -#endif #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) # define _ALL_SOURCE 1 #endif @@ -60,20 +40,53 @@ # define __LONG_MAX__ 9223372036854775807L # endif #endif -#if defined(__INTEL_COMPILER) && defined(__linux__) -# pragma warning(disable: 193) +#if 0 +#elif !defined(__ACC_LANG_OVERRIDE) +#if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__) +# if (__ASSEMBLER__+0) <= 0 +# error "__ASSEMBLER__" +# else +# define ACC_LANG_ASSEMBLER 1 +# endif +#elif defined(__cplusplus) +# if (__cplusplus+0) <= 0 +# error "__cplusplus" +# elif (__cplusplus < 199711L) +# define ACC_LANG_CXX 1 +# elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1 +# define ACC_LANG_CXX _MSVC_LANG +# else +# define ACC_LANG_CXX __cplusplus +# endif +# define ACC_LANG_CPLUSPLUS ACC_LANG_CXX +#else +# if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L) +# define ACC_LANG_C __STDC_VERSION__ +# else +# define ACC_LANG_C 1 +# endif #endif -#if defined(__KEIL__) && defined(__C166__) -# pragma warning disable = 322 -#elif 0 && defined(__C251__) -# pragma warning disable = 322 #endif -#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) -# if (_MSC_VER >= 1300) +#if !defined(ACC_CFG_NO_DISABLE_WUNDEF) +#if defined(__ARMCC_VERSION) +# pragma diag_suppress 193 +#elif defined(__clang__) && defined(__clang_minor__) +# pragma clang diagnostic ignored "-Wundef" +#elif defined(__INTEL_COMPILER) +# pragma warning(disable: 193) +#elif defined(__KEIL__) && defined(__C166__) +# pragma warning disable = 322 +#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) +# if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) +# pragma GCC diagnostic ignored "-Wundef" +# endif +#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +# if ((_MSC_VER-0) >= 1300) # pragma warning(disable: 4668) # endif #endif -#if defined(__POCC__) && defined(_WIN32) +#endif +#if 0 && defined(__POCC__) && defined(_WIN32) # if (__POCC__ >= 400) # pragma warn(disable: 2216) # endif @@ -86,6 +99,20 @@ #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) # pragma option -h #endif +#if !(ACC_CFG_NO_DISABLE_WCRTNONSTDC) +#ifndef _CRT_NONSTDC_NO_DEPRECATE +#define _CRT_NONSTDC_NO_DEPRECATE 1 +#endif +#ifndef _CRT_NONSTDC_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS 1 +#endif +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE 1 +#endif +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS 1 +#endif +#endif #if (ACC_CFG_NO_CONFIG_HEADER) #elif defined(ACC_CFG_CONFIG_HEADER) # include ACC_CFG_CONFIG_HEADER @@ -110,7 +137,9 @@ #define __INT_MAX__ 2147483647 #endif #ifndef __LONG_MAX__ -#if defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__) +#if defined(_ILP32) || defined(__ILP32__) +#define __LONG_MAX__ 2147483647L +#elif defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__) #define __LONG_MAX__ 9223372036854775807L #else #define __LONG_MAX__ 2147483647L @@ -158,12 +187,14 @@ # include <limits.h> #endif #if 0 -#define ACC_0xffffL 0xfffful -#define ACC_0xffffffffL 0xfffffffful +#define ACC_0xffffUL 0xfffful +#define ACC_0xffffffffUL 0xfffffffful #else -#define ACC_0xffffL 65535ul -#define ACC_0xffffffffL 4294967295ul +#define ACC_0xffffUL 65535ul +#define ACC_0xffffffffUL 4294967295ul #endif +#define ACC_0xffffL ACC_0xffffUL +#define ACC_0xffffffffL ACC_0xffffffffUL #if (ACC_0xffffL == ACC_0xffffffffL) # error "your preprocessor is broken 1" #endif @@ -178,6 +209,13 @@ # error "your preprocessor is broken 4" #endif #endif +#if defined(__COUNTER__) +# ifndef ACC_CFG_USE_COUNTER +# define ACC_CFG_USE_COUNTER 1 +# endif +#else +# undef ACC_CFG_USE_COUNTER +#endif #if (UINT_MAX == ACC_0xffffL) #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) # if !defined(MSDOS) @@ -197,10 +235,12 @@ # endif #endif #endif -#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL) +#if (UINT_MAX == ACC_0xffffL) +#if defined(_MSC_VER) && defined(M_I86HM) # define ptrdiff_t long # define _PTRDIFF_T_DEFINED 1 #endif +#endif #if (UINT_MAX == ACC_0xffffL) # undef __ACC_RENAME_A # undef __ACC_RENAME_B @@ -308,14 +348,31 @@ #endif #define ACC_PP_STRINGIZE(x) #x #define ACC_PP_MACRO_EXPAND(x) ACC_PP_STRINGIZE(x) +#define ACC_PP_CONCAT0() /*empty*/ +#define ACC_PP_CONCAT1(a) a #define ACC_PP_CONCAT2(a,b) a ## b #define ACC_PP_CONCAT3(a,b,c) a ## b ## c #define ACC_PP_CONCAT4(a,b,c,d) a ## b ## c ## d #define ACC_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define ACC_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f +#define ACC_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g +#define ACC_PP_ECONCAT0() ACC_PP_CONCAT0() +#define ACC_PP_ECONCAT1(a) ACC_PP_CONCAT1(a) #define ACC_PP_ECONCAT2(a,b) ACC_PP_CONCAT2(a,b) #define ACC_PP_ECONCAT3(a,b,c) ACC_PP_CONCAT3(a,b,c) #define ACC_PP_ECONCAT4(a,b,c,d) ACC_PP_CONCAT4(a,b,c,d) #define ACC_PP_ECONCAT5(a,b,c,d,e) ACC_PP_CONCAT5(a,b,c,d,e) +#define ACC_PP_ECONCAT6(a,b,c,d,e,f) ACC_PP_CONCAT6(a,b,c,d,e,f) +#define ACC_PP_ECONCAT7(a,b,c,d,e,f,g) ACC_PP_CONCAT7(a,b,c,d,e,f,g) +#define ACC_PP_EMPTY /*empty*/ +#define ACC_PP_EMPTY0() /*empty*/ +#define ACC_PP_EMPTY1(a) /*empty*/ +#define ACC_PP_EMPTY2(a,b) /*empty*/ +#define ACC_PP_EMPTY3(a,b,c) /*empty*/ +#define ACC_PP_EMPTY4(a,b,c,d) /*empty*/ +#define ACC_PP_EMPTY5(a,b,c,d,e) /*empty*/ +#define ACC_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ +#define ACC_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ #if 1 #define ACC_CPP_STRINGIZE(x) #x #define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x) @@ -323,12 +380,16 @@ #define ACC_CPP_CONCAT3(a,b,c) a ## b ## c #define ACC_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d #define ACC_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +#define ACC_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f +#define ACC_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g #define ACC_CPP_ECONCAT2(a,b) ACC_CPP_CONCAT2(a,b) #define ACC_CPP_ECONCAT3(a,b,c) ACC_CPP_CONCAT3(a,b,c) #define ACC_CPP_ECONCAT4(a,b,c,d) ACC_CPP_CONCAT4(a,b,c,d) #define ACC_CPP_ECONCAT5(a,b,c,d,e) ACC_CPP_CONCAT5(a,b,c,d,e) +#define ACC_CPP_ECONCAT6(a,b,c,d,e,f) ACC_CPP_CONCAT6(a,b,c,d,e,f) +#define ACC_CPP_ECONCAT7(a,b,c,d,e,f,g) ACC_CPP_CONCAT7(a,b,c,d,e,f,g) #endif -#define __ACC_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +#define __ACC_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0)) #if 1 && defined(__cplusplus) # if !defined(__STDC_CONSTANT_MACROS) # define __STDC_CONSTANT_MACROS 1 @@ -338,9 +399,13 @@ # endif #endif #if defined(__cplusplus) -# define ACC_EXTERN_C extern "C" +# define ACC_EXTERN_C extern "C" +# define ACC_EXTERN_C_BEGIN extern "C" { +# define ACC_EXTERN_C_END } #else -# define ACC_EXTERN_C extern +# define ACC_EXTERN_C extern +# define ACC_EXTERN_C_BEGIN /*empty*/ +# define ACC_EXTERN_C_END /*empty*/ #endif #if !defined(__ACC_OS_OVERRIDE) #if (ACC_OS_FREESTANDING) @@ -435,18 +500,18 @@ #elif defined(__TOS__) || defined(__atarist__) # define ACC_OS_TOS 1 # define ACC_INFO_OS "tos" -#elif defined(macintosh) && !defined(__ppc__) +#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) # define ACC_OS_MACCLASSIC 1 # define ACC_INFO_OS "macclassic" #elif defined(__VMS) # define ACC_OS_VMS 1 # define ACC_INFO_OS "vms" -#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) # define ACC_OS_CONSOLE 1 # define ACC_OS_CONSOLE_PS2 1 # define ACC_INFO_OS "console" # define ACC_INFO_OS_CONSOLE "ps2" -#elif (defined(__mips__) && defined(__psp__)) +#elif defined(__mips__) && defined(__psp__) # define ACC_OS_CONSOLE 1 # define ACC_OS_CONSOLE_PSP 1 # define ACC_INFO_OS "console" @@ -474,9 +539,18 @@ # elif defined(__linux__) || defined(__linux) || defined(__LINUX__) # define ACC_OS_POSIX_LINUX 1 # define ACC_INFO_OS_POSIX "linux" -# elif defined(__APPLE__) || defined(__MACOS__) -# define ACC_OS_POSIX_MACOSX 1 -# define ACC_INFO_OS_POSIX "macosx" +# elif defined(__APPLE__) && defined(__MACH__) +# if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) +# define ACC_OS_POSIX_DARWIN 1040 +# define ACC_INFO_OS_POSIX "darwin_iphone" +# elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) +# define ACC_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# define ACC_INFO_OS_POSIX "darwin" +# else +# define ACC_OS_POSIX_DARWIN 1 +# define ACC_INFO_OS_POSIX "darwin" +# endif +# define ACC_OS_POSIX_MACOSX ACC_OS_POSIX_DARWIN # elif defined(__minix__) || defined(__minix) # define ACC_OS_POSIX_MINIX 1 # define ACC_INFO_OS_POSIX "minix" @@ -511,18 +585,18 @@ #endif #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) # if (UINT_MAX != ACC_0xffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif # if (ULONG_MAX != ACC_0xffffffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif #endif #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64) # if (UINT_MAX != ACC_0xffffffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif # if (ULONG_MAX != ACC_0xffffffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif #endif #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) @@ -538,59 +612,81 @@ # define ACC_INFO_CC "sdcc" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(SDCC) #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) -# define ACC_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +# define ACC_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) # define ACC_INFO_CC "Pathscale C" # define ACC_INFO_CCVER __PATHSCALE__ -#elif defined(__INTEL_COMPILER) -# define ACC_CC_INTELC 1 +# if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +# define ACC_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) +# endif +#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) +# define ACC_CC_INTELC __INTEL_COMPILER # define ACC_INFO_CC "Intel C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__INTEL_COMPILER) -# if defined(_WIN32) || defined(_WIN64) -# define ACC_CC_SYNTAX_MSC 1 -# else -# define ACC_CC_SYNTAX_GNUC 1 +# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) +# define ACC_CC_INTELC_MSC _MSC_VER +# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +# define ACC_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) # endif #elif defined(__POCC__) && defined(_WIN32) # define ACC_CC_PELLESC 1 # define ACC_INFO_CC "Pelles C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__POCC__) -#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) # if defined(__GNUC_PATCHLEVEL__) -# define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) # else -# define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) # endif +# define ACC_CC_ARMCC __ARMCC_VERSION +# define ACC_INFO_CC "ARM C Compiler" +# define ACC_INFO_CCVER __VERSION__ +#elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER) +# define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) +# define ACC_CC_CLANG_C2 _MSC_VER +# define ACC_CC_CLANG_VENDOR_MICROSOFT 1 +# define ACC_INFO_CC "clang/c2" +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__c2_version__) +#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) -# define ACC_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) +# define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) # else -# define ACC_CC_CLANG_CLANG 0x020700L +# define ACC_CC_CLANG 0x010000L +# endif +# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) +# define ACC_CC_CLANG_MSC _MSC_VER +# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +# define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) +# endif +# if defined(__APPLE_CC__) +# define ACC_CC_CLANG_VENDOR_APPLE 1 +# define ACC_INFO_CC "clang/apple" +# else +# define ACC_CC_CLANG_VENDOR_LLVM 1 +# define ACC_INFO_CC "clang" +# endif +# if defined(__clang_version__) +# define ACC_INFO_CCVER __clang_version__ +# else +# define ACC_INFO_CCVER __VERSION__ # endif -# define ACC_CC_CLANG ACC_CC_CLANG_GNUC -# define ACC_INFO_CC "clang" -# define ACC_INFO_CCVER __VERSION__ #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) # if defined(__GNUC_PATCHLEVEL__) -# define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +# define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) # else -# define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +# define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) # endif # define ACC_CC_LLVM ACC_CC_LLVM_GNUC # define ACC_INFO_CC "llvm-gcc" # define ACC_INFO_CCVER __VERSION__ -#elif defined(__GNUC__) && defined(__VERSION__) -# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) -# elif defined(__GNUC_MINOR__) -# define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) -# else -# define ACC_CC_GNUC (__GNUC__ * 0x10000L) -# endif -# define ACC_INFO_CC "gcc" -# define ACC_INFO_CCVER __VERSION__ #elif defined(__ACK__) && defined(_ACK) # define ACC_CC_ACK 1 # define ACC_INFO_CC "Amsterdam Compiler Kit C" # define ACC_INFO_CCVER "unknown" +#elif defined(__ARMCC_VERSION) && !defined(__GNUC__) +# define ACC_CC_ARMCC __ARMCC_VERSION +# define ACC_CC_ARMCC_ARMCC __ARMCC_VERSION +# define ACC_INFO_CC "ARM C Compiler" +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ARMCC_VERSION) #elif defined(__AZTEC_C__) # define ACC_CC_AZTECC 1 # define ACC_INFO_CC "Aztec C" @@ -615,10 +711,23 @@ # define ACC_CC_DECC 1 # define ACC_INFO_CC "DEC C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DECC) +#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) +# define ACC_CC_GHS 1 +# define ACC_INFO_CC "Green Hills C" +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) +# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) +# define ACC_CC_GHS_MSC _MSC_VER +# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +# define ACC_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) +# endif #elif defined(__HIGHC__) # define ACC_CC_HIGHC 1 # define ACC_INFO_CC "MetaWare High C" # define ACC_INFO_CCVER "unknown" +#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) +# define ACC_CC_HPACC __HP_aCC +# define ACC_INFO_CC "HP aCC" +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__HP_aCC) #elif defined(__IAR_SYSTEMS_ICC__) # define ACC_CC_IARC 1 # define ACC_INFO_CC "IAR C" @@ -627,10 +736,14 @@ # else # define ACC_INFO_CCVER "unknown" # endif -#elif defined(__IBMC__) -# define ACC_CC_IBMC 1 +#elif defined(__IBMC__) && ((__IBMC__-0) > 0) +# define ACC_CC_IBMC __IBMC__ # define ACC_INFO_CC "IBM C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMC__) +#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) +# define ACC_CC_IBMC __IBMCPP__ +# define ACC_INFO_CC "IBM C" +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMCPP__) #elif defined(__KEIL__) && defined(__C166__) # define ACC_CC_KEILC 1 # define ACC_INFO_CC "Keil C" @@ -647,16 +760,8 @@ # else # define ACC_INFO_CCVER "unknown" # endif -#elif defined(_MSC_VER) -# define ACC_CC_MSC 1 -# define ACC_INFO_CC "Microsoft C" -# if defined(_MSC_FULL_VER) -# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER) -# else -# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) -# endif -#elif defined(__MWERKS__) -# define ACC_CC_MWERKS 1 +#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) +# define ACC_CC_MWERKS __MWERKS__ # define ACC_INFO_CC "Metrowerks C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__MWERKS__) #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) @@ -667,6 +772,15 @@ # define ACC_CC_PACIFICC 1 # define ACC_INFO_CC "Pacific C" # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PACIFIC__) +#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) "." ACC_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) +# else +# define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" +# endif +# define ACC_INFO_CC "Portland Group PGI C" #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) # define ACC_CC_PGI 1 # define ACC_INFO_CC "Portland Group PGI C" @@ -681,7 +795,7 @@ # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SC__) #elif defined(__SUNPRO_C) # define ACC_INFO_CC "SunPro C" -# if ((__SUNPRO_C)+0 > 0) +# if ((__SUNPRO_C-0) > 0) # define ACC_CC_SUNPROC __SUNPRO_C # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_C) # else @@ -690,7 +804,7 @@ # endif #elif defined(__SUNPRO_CC) # define ACC_INFO_CC "SunPro C" -# if ((__SUNPRO_CC)+0 > 0) +# if ((__SUNPRO_CC-0) > 0) # define ACC_CC_SUNPROC __SUNPRO_CC # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_CC) # else @@ -716,16 +830,46 @@ #elif defined(__ZTC__) # define ACC_CC_ZORTECHC 1 # define ACC_INFO_CC "Zortech C" -# if (__ZTC__ == 0x310) +# if ((__ZTC__-0) == 0x310) # define ACC_INFO_CCVER "0x310" # else # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__) # endif +#elif defined(__GNUC__) && defined(__VERSION__) +# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +# define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) +# elif defined(__GNUC_MINOR__) +# define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) +# else +# define ACC_CC_GNUC (__GNUC__ * 0x10000L) +# endif +# define ACC_INFO_CC "gcc" +# define ACC_INFO_CCVER __VERSION__ +#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) +# define ACC_CC_MSC _MSC_VER +# define ACC_INFO_CC "Microsoft C" +# if defined(_MSC_FULL_VER) +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER) +# else +# define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) +# endif #else # define ACC_CC_UNKNOWN 1 # define ACC_INFO_CC "unknown" # define ACC_INFO_CCVER "unknown" #endif +#if (ACC_CC_GNUC) && defined(__OPEN64__) +# if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) +# define ACC_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) +# define ACC_CC_OPEN64_GNUC ACC_CC_GNUC +# endif +#endif +#if (ACC_CC_GNUC) && defined(__PCC__) +# if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) +# define ACC_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) +# define ACC_CC_PCC_GNUC ACC_CC_GNUC +# endif +#endif #if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) # error "ACC_CC_MSC: _MSC_FULL_VER is not defined" #endif @@ -743,8 +887,10 @@ # define ACC_INFO_ARCH "generic" #elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) # define ACC_ARCH_I086 1 -# define ACC_ARCH_IA16 1 # define ACC_INFO_ARCH "i086" +#elif defined(__aarch64__) || defined(_M_ARM64) +# define ACC_ARCH_ARM64 1 +# define ACC_INFO_ARCH "arm64" #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) # define ACC_ARCH_ALPHA 1 # define ACC_INFO_ARCH "alpha" @@ -754,22 +900,11 @@ #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) # define ACC_ARCH_AMD64 1 # define ACC_INFO_ARCH "amd64" -#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +#elif defined(__arm__) || defined(_M_ARM) # define ACC_ARCH_ARM 1 -# define ACC_ARCH_ARM_THUMB 1 -# define ACC_INFO_ARCH "arm_thumb" +# define ACC_INFO_ARCH "arm" #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) # define ACC_ARCH_ARM 1 -# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) -# define ACC_ARCH_ARM_THUMB 1 -# define ACC_INFO_ARCH "arm_thumb" -# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) -# define ACC_INFO_ARCH "arm" -# else -# define ACC_INFO_ARCH "arm" -# endif -#elif defined(__arm__) || defined(_M_ARM) -# define ACC_ARCH_ARM 1 # define ACC_INFO_ARCH "arm" #elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__) # define ACC_ARCH_AVR 1 @@ -831,6 +966,9 @@ #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) # define ACC_ARCH_MCS51 1 # define ACC_INFO_ARCH "mcs51" +#elif defined(__microblaze__) || defined(__MICROBLAZE__) +# define ACC_ARCH_MICROBLAZE 1 +# define ACC_INFO_ARCH "microblaze" #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) # define ACC_ARCH_MIPS 1 # define ACC_INFO_ARCH "mips" @@ -843,6 +981,15 @@ #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) # define ACC_ARCH_POWERPC 1 # define ACC_INFO_ARCH "powerpc" +#elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__) +# define ACC_ARCH_POWERPC 1 +# define ACC_INFO_ARCH "powerpc" +#elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__) +# define ACC_ARCH_POWERPC 1 +# define ACC_INFO_ARCH "powerpc" +#elif defined(__riscv) +# define ACC_ARCH_RISCV 1 +# define ACC_INFO_ARCH "riscv" #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) # define ACC_ARCH_S390 1 # define ACC_INFO_ARCH "s390" @@ -877,57 +1024,171 @@ # define ACC_INFO_ARCH "unknown" #endif #endif +#if !defined(ACC_ARCH_ARM_THUMB2) +#if (ACC_ARCH_ARM) +# if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB) +# if defined(__thumb2__) +# define ACC_ARCH_ARM_THUMB2 1 +# elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4) +# define ACC_ARCH_ARM_THUMB2 1 +# elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7) +# define ACC_ARCH_ARM_THUMB2 1 +# endif +# endif +#endif +#endif +#if (ACC_ARCH_ARM_THUMB2) +# undef ACC_INFO_ARCH +# define ACC_INFO_ARCH "arm_thumb2" +#endif #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2) # error "FIXME - missing define for CPU architecture" #endif #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32) -# error "FIXME - missing WIN32 define for CPU architecture" +# error "FIXME - missing ACC_OS_WIN32 define for CPU architecture" #endif #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64) -# error "FIXME - missing WIN64 define for CPU architecture" +# error "FIXME - missing ACC_OS_WIN64 define for CPU architecture" #endif #if (ACC_OS_OS216 || ACC_OS_WIN16) # define ACC_ARCH_I086PM 1 -# define ACC_ARCH_IA16PM 1 #elif 1 && (ACC_OS_DOS16 && defined(BLX286)) # define ACC_ARCH_I086PM 1 -# define ACC_ARCH_IA16PM 1 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286)) # define ACC_ARCH_I086PM 1 -# define ACC_ARCH_IA16PM 1 #elif 1 && (ACC_OS_DOS16 && ACC_CC_BORLANDC && defined(__DPMI16__)) # define ACC_ARCH_I086PM 1 -# define ACC_ARCH_IA16PM 1 #endif -#if (ACC_ARCH_ARM_THUMB) && !(ACC_ARCH_ARM) -# error "this should not happen" +#if (ACC_ARCH_AMD64 && !ACC_ARCH_X64) +# define ACC_ARCH_X64 1 +#elif (!ACC_ARCH_AMD64 && ACC_ARCH_X64) && defined(__ACC_ARCH_OVERRIDE) +# define ACC_ARCH_AMD64 1 +#endif +#if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64) +# define ACC_ARCH_AARCH64 1 +#elif (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64) && defined(__ACC_ARCH_OVERRIDE) +# define ACC_ARCH_ARM64 1 +#endif +#if (ACC_ARCH_I386 && !ACC_ARCH_X86) +# define ACC_ARCH_X86 1 +#elif (!ACC_ARCH_I386 && ACC_ARCH_X86) && defined(__ACC_ARCH_OVERRIDE) +# define ACC_ARCH_I386 1 +#endif +#if (ACC_ARCH_AMD64 && !ACC_ARCH_X64) || (!ACC_ARCH_AMD64 && ACC_ARCH_X64) +# error "unexpected configuration - check your compiler defines" #endif -#if (ACC_ARCH_I086PM) && !(ACC_ARCH_I086) -# error "this should not happen" +#if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64) || (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_I386 && !ACC_ARCH_X86) || (!ACC_ARCH_I386 && ACC_ARCH_X86) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_ARM_THUMB1 && !ACC_ARCH_ARM) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_ARM_THUMB2 && !ACC_ARCH_ARM) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_ARM_THUMB1 && ACC_ARCH_ARM_THUMB2) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_I086PM && !ACC_ARCH_I086) +# error "unexpected configuration - check your compiler defines" #endif #if (ACC_ARCH_I086) # if (UINT_MAX != ACC_0xffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif # if (ULONG_MAX != ACC_0xffffffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif #endif #if (ACC_ARCH_I386) # if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif # if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif # if (ULONG_MAX != ACC_0xffffffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" +# endif +#endif +#if (ACC_ARCH_AMD64 || ACC_ARCH_I386) +# if !defined(ACC_TARGET_FEATURE_SSE2) +# if defined(__SSE2__) +# define ACC_TARGET_FEATURE_SSE2 1 +# elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2)) +# define ACC_TARGET_FEATURE_SSE2 1 +# elif (ACC_CC_INTELC_MSC || ACC_CC_MSC) && defined(_M_AMD64) +# define ACC_TARGET_FEATURE_SSE2 1 +# endif +# endif +# if !defined(ACC_TARGET_FEATURE_SSSE3) +# if (ACC_TARGET_FEATURE_SSE2) +# if defined(__SSSE3__) +# define ACC_TARGET_FEATURE_SSSE3 1 +# elif defined(_MSC_VER) && defined(__AVX__) +# define ACC_TARGET_FEATURE_SSSE3 1 +# endif +# endif +# endif +# if !defined(ACC_TARGET_FEATURE_SSE4_2) +# if (ACC_TARGET_FEATURE_SSSE3) +# if defined(__SSE4_2__) +# define ACC_TARGET_FEATURE_SSE4_2 1 +# endif +# endif +# endif +# if !defined(ACC_TARGET_FEATURE_AVX) +# if (ACC_TARGET_FEATURE_SSSE3) +# if defined(__AVX__) +# define ACC_TARGET_FEATURE_AVX 1 +# endif +# endif +# endif +# if !defined(ACC_TARGET_FEATURE_AVX2) +# if (ACC_TARGET_FEATURE_AVX) +# if defined(__AVX2__) +# define ACC_TARGET_FEATURE_AVX2 1 +# endif +# endif # endif #endif -#if !defined(__ACC_MM_OVERRIDE) +#if (ACC_TARGET_FEATURE_SSSE3 && !(ACC_TARGET_FEATURE_SSE2)) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_TARGET_FEATURE_SSE4_2 && !(ACC_TARGET_FEATURE_SSSE3)) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_TARGET_FEATURE_AVX && !(ACC_TARGET_FEATURE_SSSE3)) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_TARGET_FEATURE_AVX2 && !(ACC_TARGET_FEATURE_AVX)) +# error "unexpected configuration - check your compiler defines" +#endif +#if (ACC_ARCH_ARM) +# if !defined(ACC_TARGET_FEATURE_NEON) +# if defined(__ARM_NEON) && ((__ARM_NEON)+0) +# define ACC_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0) +# define ACC_TARGET_FEATURE_NEON 1 +# elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0) +# define ACC_TARGET_FEATURE_NEON 1 +# endif +# endif +#elif (ACC_ARCH_ARM64) +# if !defined(ACC_TARGET_FEATURE_NEON) +# if 1 +# define ACC_TARGET_FEATURE_NEON 1 +# endif +# endif +#endif +#if 0 +#elif !defined(__ACC_MM_OVERRIDE) #if (ACC_ARCH_I086) #if (UINT_MAX != ACC_0xffffL) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" #endif #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) # define ACC_MM_TINY 1 @@ -954,7 +1215,7 @@ #elif (ACC_CC_ZORTECHC && defined(__VCM__)) # define ACC_MM_LARGE 1 #else -# error "unknown memory model" +# error "unknown ACC_ARCH_I086 memory model" #endif #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) #define ACC_HAVE_MM_HUGE_PTR 1 @@ -977,13 +1238,13 @@ #endif #if (ACC_ARCH_I086PM) && !(ACC_HAVE_MM_HUGE_PTR) # if (ACC_OS_DOS16) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # elif (ACC_CC_ZORTECHC) # else -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" # endif #endif -#ifdef __cplusplus +#if defined(__cplusplus) extern "C" { #endif #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) @@ -1006,13 +1267,13 @@ extern "C" { #else # error "FIXME - implement ACC_MM_AHSHIFT" #endif -#ifdef __cplusplus +#if defined(__cplusplus) } #endif #endif #elif (ACC_ARCH_C166) #if !defined(__MODEL__) -# error "FIXME - C166 __MODEL__" +# error "FIXME - ACC_ARCH_C166 __MODEL__" #elif ((__MODEL__) == 0) # define ACC_MM_SMALL 1 #elif ((__MODEL__) == 1) @@ -1026,11 +1287,11 @@ extern "C" { #elif ((__MODEL__) == 5) # define ACC_MM_XSMALL 1 #else -# error "FIXME - C166 __MODEL__" +# error "FIXME - ACC_ARCH_C166 __MODEL__" #endif #elif (ACC_ARCH_MCS251) #if !defined(__MODEL__) -# error "FIXME - MCS251 __MODEL__" +# error "FIXME - ACC_ARCH_MCS251 __MODEL__" #elif ((__MODEL__) == 0) # define ACC_MM_SMALL 1 #elif ((__MODEL__) == 2) @@ -1042,11 +1303,11 @@ extern "C" { #elif ((__MODEL__) == 5) # define ACC_MM_XSMALL 1 #else -# error "FIXME - MCS251 __MODEL__" +# error "FIXME - ACC_ARCH_MCS251 __MODEL__" #endif #elif (ACC_ARCH_MCS51) #if !defined(__MODEL__) -# error "FIXME - MCS51 __MODEL__" +# error "FIXME - ACC_ARCH_MCS51 __MODEL__" #elif ((__MODEL__) == 1) # define ACC_MM_SMALL 1 #elif ((__MODEL__) == 2) @@ -1058,7 +1319,7 @@ extern "C" { #elif ((__MODEL__) == 5) # define ACC_MM_XSMALL 1 #else -# error "FIXME - MCS51 __MODEL__" +# error "FIXME - ACC_ARCH_MCS51 __MODEL__" #endif #elif (ACC_ARCH_CRAY_PVP) # define ACC_MM_PVP 1 @@ -1085,35 +1346,887 @@ extern "C" { # error "unknown memory model" #endif #endif +#if !defined(__acc_gnuc_extension__) +#if (ACC_CC_GNUC >= 0x020800ul) +# define __acc_gnuc_extension__ __extension__ +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_gnuc_extension__ __extension__ +#elif (ACC_CC_IBMC >= 600) +# define __acc_gnuc_extension__ __extension__ +#endif +#endif +#if !defined(__acc_gnuc_extension__) +# define __acc_gnuc_extension__ /*empty*/ +#endif +#if !defined(acc_has_builtin) +#if (ACC_CC_CLANG) && defined(__has_builtin) +# define acc_has_builtin __has_builtin +#endif +#endif +#if !defined(acc_has_builtin) +# define acc_has_builtin(x) 0 +#endif +#if !defined(acc_has_attribute) +#if (ACC_CC_CLANG) && defined(__has_attribute) +# define acc_has_attribute __has_attribute +#endif +#endif +#if !defined(acc_has_attribute) +# define acc_has_attribute(x) 0 +#endif +#if !defined(acc_has_declspec_attribute) +#if (ACC_CC_CLANG) && defined(__has_declspec_attribute) +# define acc_has_declspec_attribute __has_declspec_attribute +#endif +#endif +#if !defined(acc_has_declspec_attribute) +# define acc_has_declspec_attribute(x) 0 +#endif +#if !defined(acc_has_feature) +#if (ACC_CC_CLANG) && defined(__has_feature) +# define acc_has_feature __has_feature +#endif +#endif +#if !defined(acc_has_feature) +# define acc_has_feature(x) 0 +#endif +#if !defined(acc_has_extension) +#if (ACC_CC_CLANG) && defined(__has_extension) +# define acc_has_extension __has_extension +#elif (ACC_CC_CLANG) && defined(__has_feature) +# define acc_has_extension __has_feature +#endif +#endif +#if !defined(acc_has_extension) +# define acc_has_extension(x) 0 +#endif +#if !defined(ACC_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0 +# if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) +# define ACC_CFG_USE_NEW_STYLE_CASTS 0 +# elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1200)) +# define ACC_CFG_USE_NEW_STYLE_CASTS 0 +# else +# define ACC_CFG_USE_NEW_STYLE_CASTS 1 +# endif +#endif +#if !defined(ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_CFG_USE_NEW_STYLE_CASTS 0 +#endif +#if !defined(__cplusplus) +# if defined(ACC_CFG_USE_NEW_STYLE_CASTS) +# undef ACC_CFG_USE_NEW_STYLE_CASTS +# endif +# define ACC_CFG_USE_NEW_STYLE_CASTS 0 +#endif +#if !defined(ACC_REINTERPRET_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e)) +# endif +#endif +#if !defined(ACC_REINTERPRET_CAST) +# define ACC_REINTERPRET_CAST(t,e) ((t) (e)) +#endif +#if !defined(ACC_STATIC_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_STATIC_CAST(t,e) (static_cast<t> (e)) +# endif +#endif +#if !defined(ACC_STATIC_CAST) +# define ACC_STATIC_CAST(t,e) ((t) (e)) +#endif +#if !defined(ACC_STATIC_CAST2) +# define ACC_STATIC_CAST2(t1,t2,e) ACC_STATIC_CAST(t1, ACC_STATIC_CAST(t2, e)) +#endif +#if !defined(ACC_UNCONST_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_UNCONST_CAST(t,e) (const_cast<t> (e)) +# elif (ACC_HAVE_MM_HUGE_PTR) +# define ACC_UNCONST_CAST(t,e) ((t) (e)) +# elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((const void *) (e))))) +# endif +#endif +#if !defined(ACC_UNCONST_CAST) +# define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e)))) +#endif +#if !defined(ACC_UNCONST_VOLATILE_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e)) +# elif (ACC_HAVE_MM_HUGE_PTR) +# define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) (e)) +# elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((acc_uintptr_t) ((volatile const void *) (e))))) +# endif +#endif +#if !defined(ACC_UNCONST_VOLATILE_CAST) +# define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e)))) +#endif +#if !defined(ACC_UNVOLATILE_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_UNVOLATILE_CAST(t,e) (const_cast<t> (e)) +# elif (ACC_HAVE_MM_HUGE_PTR) +# define ACC_UNVOLATILE_CAST(t,e) ((t) (e)) +# elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((volatile void *) (e))))) +# endif +#endif +#if !defined(ACC_UNVOLATILE_CAST) +# define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e)))) +#endif +#if !defined(ACC_UNVOLATILE_CONST_CAST) +# if (ACC_CFG_USE_NEW_STYLE_CASTS) +# define ACC_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e)) +# elif (ACC_HAVE_MM_HUGE_PTR) +# define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) (e)) +# elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((acc_uintptr_t) ((volatile const void *) (e))))) +# endif +#endif +#if !defined(ACC_UNVOLATILE_CONST_CAST) +# define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e)))) +#endif +#if !defined(ACC_PCAST) +# if (ACC_HAVE_MM_HUGE_PTR) +# define ACC_PCAST(t,e) ((t) (e)) +# endif +#endif +#if !defined(ACC_PCAST) +# define ACC_PCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(void *, e)) +#endif +#if !defined(ACC_CCAST) +# if (ACC_HAVE_MM_HUGE_PTR) +# define ACC_CCAST(t,e) ((t) (e)) +# endif +#endif +#if !defined(ACC_CCAST) +# define ACC_CCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(const void *, e)) +#endif +#if !defined(ACC_ICONV) +# define ACC_ICONV(t,e) ACC_STATIC_CAST(t, e) +#endif +#if !defined(ACC_ICAST) +# define ACC_ICAST(t,e) ACC_STATIC_CAST(t, e) +#endif +#if !defined(ACC_ITRUNC) +# define ACC_ITRUNC(t,e) ACC_STATIC_CAST(t, e) +#endif +#if !defined(__acc_cte) +# if (ACC_CC_MSC || ACC_CC_WATCOMC) +# define __acc_cte(e) ((void)0,(e)) +# elif 1 +# define __acc_cte(e) ((void)0,(e)) +# endif +#endif +#if !defined(__acc_cte) +# define __acc_cte(e) (e) +#endif +#if !defined(ACC_BLOCK_BEGIN) +# define ACC_BLOCK_BEGIN do { +# define ACC_BLOCK_END } while __acc_cte(0) +#endif +#if !defined(ACC_UNUSED) +# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define ACC_UNUSED(var) ((void) &var) +# elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC) +# define ACC_UNUSED(var) if (&var) ; else +# elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030200ul)) +# define ACC_UNUSED(var) ((void) &var) +# elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define ACC_UNUSED(var) ((void) var) +# elif (ACC_CC_MSC && (_MSC_VER < 900)) +# define ACC_UNUSED(var) if (&var) ; else +# elif (ACC_CC_KEILC) +# define ACC_UNUSED(var) {extern int acc_unused__[1-2*!(sizeof(var)>0)]; (void)acc_unused__;} +# elif (ACC_CC_PACIFICC) +# define ACC_UNUSED(var) ((void) sizeof(var)) +# elif (ACC_CC_WATCOMC) && defined(__cplusplus) +# define ACC_UNUSED(var) ((void) var) +# else +# define ACC_UNUSED(var) ((void) &var) +# endif +#endif +#if !defined(ACC_UNUSED_RESULT) +# define ACC_UNUSED_RESULT(var) ACC_UNUSED(var) +#endif +#if !defined(ACC_UNUSED_FUNC) +# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +# define ACC_UNUSED_FUNC(func) ((void) func) +# elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC) +# define ACC_UNUSED_FUNC(func) if (func) ; else +# elif (ACC_CC_CLANG || ACC_CC_LLVM) +# define ACC_UNUSED_FUNC(func) ((void) &func) +# elif (ACC_CC_MSC && (_MSC_VER < 900)) +# define ACC_UNUSED_FUNC(func) if (func) ; else +# elif (ACC_CC_MSC) +# define ACC_UNUSED_FUNC(func) ((void) &func) +# elif (ACC_CC_KEILC || ACC_CC_PELLESC) +# define ACC_UNUSED_FUNC(func) {extern int acc_unused__[1-2*!(sizeof((int)func)>0)]; (void)acc_unused__;} +# else +# define ACC_UNUSED_FUNC(func) ((void) func) +# endif +#endif +#if !defined(ACC_UNUSED_LABEL) +# if (ACC_CC_CLANG >= 0x020800ul) +# define ACC_UNUSED_LABEL(l) (__acc_gnuc_extension__ ((void) ((const void *) &&l))) +# elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC) +# define ACC_UNUSED_LABEL(l) if __acc_cte(0) goto l +# else +# define ACC_UNUSED_LABEL(l) switch (0) case 1:goto l +# endif +#endif +#if !defined(ACC_DEFINE_UNINITIALIZED_VAR) +# if 0 +# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var +# elif 0 && (ACC_CC_GNUC) +# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var +# else +# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +# endif +#endif +#if !defined(__acc_inline) +#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295)) +#elif defined(__cplusplus) +# define __acc_inline inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) +# define __acc_inline inline +#elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +# define __acc_inline __inline +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI) +# define __acc_inline __inline__ +#elif (ACC_CC_DMC) +# define __acc_inline __inline +#elif (ACC_CC_GHS) +# define __acc_inline __inline__ +#elif (ACC_CC_IBMC >= 600) +# define __acc_inline __inline__ +#elif (ACC_CC_INTELC) +# define __acc_inline __inline +#elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405)) +# define __acc_inline __inline +#elif (ACC_CC_MSC && (_MSC_VER >= 900)) +# define __acc_inline __inline +#elif (ACC_CC_SUNPROC >= 0x5100) +# define __acc_inline __inline__ +#endif +#endif +#if defined(__acc_inline) +# ifndef __acc_HAVE_inline +# define __acc_HAVE_inline 1 +# endif +#else +# define __acc_inline /*empty*/ +#endif +#if !defined(__acc_forceinline) +#if (ACC_CC_GNUC >= 0x030200ul) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#elif (ACC_CC_IBMC >= 700) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) +# define __acc_forceinline __forceinline +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) +# define __acc_forceinline __forceinline +#elif (ACC_CC_PGI >= 0x0d0a00ul) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#elif (ACC_CC_SUNPROC >= 0x5100) +# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#endif +#endif +#if defined(__acc_forceinline) +# ifndef __acc_HAVE_forceinline +# define __acc_HAVE_forceinline 1 +# endif +#else +# define __acc_forceinline __acc_inline +#endif +#if !defined(__acc_noinline) +#if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul) +# define __acc_noinline __attribute__((__noinline__,__used__)) +#elif (ACC_CC_GNUC >= 0x030200ul) +# define __acc_noinline __attribute__((__noinline__)) +#elif (ACC_CC_IBMC >= 700) +# define __acc_noinline __attribute__((__noinline__)) +#elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) +# define __acc_noinline __declspec(noinline) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) +# define __acc_noinline __attribute__((__noinline__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_noinline __attribute__((__noinline__)) +#elif (ACC_CC_MSC && (_MSC_VER >= 1300)) +# define __acc_noinline __declspec(noinline) +#elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64)) +# if defined(__cplusplus) +# else +# define __acc_noinline __declspec(noinline) +# endif +#elif (ACC_CC_PGI >= 0x0d0a00ul) +# define __acc_noinline __attribute__((__noinline__)) +#elif (ACC_CC_SUNPROC >= 0x5100) +# define __acc_noinline __attribute__((__noinline__)) +#endif +#endif +#if defined(__acc_noinline) +# ifndef __acc_HAVE_noinline +# define __acc_HAVE_noinline 1 +# endif +#else +# define __acc_noinline /*empty*/ +#endif +#if (__acc_HAVE_forceinline || __acc_HAVE_noinline) && !(__acc_HAVE_inline) +# error "unexpected configuration - check your compiler defines" +#endif +#if !defined(__acc_static_inline) +#if (ACC_CC_IBMC) +# define __acc_static_inline __acc_gnuc_extension__ static __acc_inline +#endif +#endif +#if !defined(__acc_static_inline) +# define __acc_static_inline static __acc_inline +#endif +#if !defined(__acc_static_forceinline) +#if (ACC_CC_IBMC) +# define __acc_static_forceinline __acc_gnuc_extension__ static __acc_forceinline +#endif +#endif +#if !defined(__acc_static_forceinline) +# define __acc_static_forceinline static __acc_forceinline +#endif +#if !defined(__acc_static_noinline) +#if (ACC_CC_IBMC) +# define __acc_static_noinline __acc_gnuc_extension__ static __acc_noinline +#endif +#endif +#if !defined(__acc_static_noinline) +# define __acc_static_noinline static __acc_noinline +#endif +#if !defined(__acc_c99_extern_inline) +#if defined(__GNUC_GNU_INLINE__) +# define __acc_c99_extern_inline __acc_inline +#elif defined(__GNUC_STDC_INLINE__) +# define __acc_c99_extern_inline extern __acc_inline +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L) +# define __acc_c99_extern_inline extern __acc_inline +#endif +#if !defined(__acc_c99_extern_inline) && (__acc_HAVE_inline) +# define __acc_c99_extern_inline __acc_inline +#endif +#endif +#if defined(__acc_c99_extern_inline) +# ifndef __acc_HAVE_c99_extern_inline +# define __acc_HAVE_c99_extern_inline 1 +# endif +#else +# define __acc_c99_extern_inline /*empty*/ +#endif +#if !defined(__acc_may_alias) +#if (ACC_CC_GNUC >= 0x030400ul) +# define __acc_may_alias __attribute__((__may_alias__)) +#elif (ACC_CC_CLANG >= 0x020900ul) +# define __acc_may_alias __attribute__((__may_alias__)) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0 +# define __acc_may_alias __attribute__((__may_alias__)) +#elif (ACC_CC_PGI >= 0x0d0a00ul) && 0 +# define __acc_may_alias __attribute__((__may_alias__)) +#endif +#endif +#if defined(__acc_may_alias) +# ifndef __acc_HAVE_may_alias +# define __acc_HAVE_may_alias 1 +# endif +#else +# define __acc_may_alias /*empty*/ +#endif +#if !defined(__acc_noreturn) +#if (ACC_CC_GNUC >= 0x020700ul) +# define __acc_noreturn __attribute__((__noreturn__)) +#elif (ACC_CC_IBMC >= 700) +# define __acc_noreturn __attribute__((__noreturn__)) +#elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) +# define __acc_noreturn __declspec(noreturn) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) +# define __acc_noreturn __attribute__((__noreturn__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_noreturn __attribute__((__noreturn__)) +#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) +# define __acc_noreturn __declspec(noreturn) +#elif (ACC_CC_PGI >= 0x0d0a00ul) +# define __acc_noreturn __attribute__((__noreturn__)) +#endif +#endif +#if defined(__acc_noreturn) +# ifndef __acc_HAVE_noreturn +# define __acc_HAVE_noreturn 1 +# endif +#else +# define __acc_noreturn /*empty*/ +#endif +#if !defined(__acc_nothrow) +#if (ACC_CC_GNUC >= 0x030300ul) +# define __acc_nothrow __attribute__((__nothrow__)) +#elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus) +# define __acc_nothrow __declspec(nothrow) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900)) +# define __acc_nothrow __attribute__((__nothrow__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_nothrow __attribute__((__nothrow__)) +#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) +# define __acc_nothrow __declspec(nothrow) +#endif +#endif +#if defined(__acc_nothrow) +# ifndef __acc_HAVE_nothrow +# define __acc_HAVE_nothrow 1 +# endif +#else +# define __acc_nothrow /*empty*/ +#endif +#if !defined(__acc_restrict) +#if (ACC_CC_GNUC >= 0x030400ul) +# define __acc_restrict __restrict__ +#elif (ACC_CC_IBMC >= 800) && !defined(__cplusplus) +# define __acc_restrict __restrict__ +#elif (ACC_CC_IBMC >= 1210) +# define __acc_restrict __restrict__ +#elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600)) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600)) +# define __acc_restrict __restrict__ +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM) +# define __acc_restrict __restrict__ +#elif (ACC_CC_MSC && (_MSC_VER >= 1400)) +# define __acc_restrict __restrict +#elif (ACC_CC_PGI >= 0x0d0a00ul) +# define __acc_restrict __restrict__ +#endif +#endif +#if defined(__acc_restrict) +# ifndef __acc_HAVE_restrict +# define __acc_HAVE_restrict 1 +# endif +#else +# define __acc_restrict /*empty*/ +#endif +#if !defined(__acc_alignof) +#if (ACC_CC_ARMCC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI) +# define __acc_alignof(e) __alignof__(e) +#elif (ACC_CC_GHS) && !defined(__cplusplus) +# define __acc_alignof(e) __alignof__(e) +#elif (ACC_CC_IBMC >= 600) +# define __acc_alignof(e) (__acc_gnuc_extension__ __alignof__(e)) +#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700)) +# define __acc_alignof(e) __alignof__(e) +#elif (ACC_CC_MSC && (_MSC_VER >= 1300)) +# define __acc_alignof(e) __alignof(e) +#elif (ACC_CC_SUNPROC >= 0x5100) +# define __acc_alignof(e) __alignof__(e) +#endif +#endif +#if defined(__acc_alignof) +# ifndef __acc_HAVE_alignof +# define __acc_HAVE_alignof 1 +# endif +#endif +#if !defined(__acc_struct_packed) +#if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus) +#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul)) +#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus) +#elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul)) +#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) +#elif (ACC_CC_GNUC >= 0x030400ul) && !(ACC_CC_PCC_GNUC) && (ACC_ARCH_AMD64 || ACC_ARCH_I386) +# define __acc_struct_packed(s) struct s { +# define __acc_struct_packed_end() } __attribute__((__gcc_struct__,__packed__)); +# define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__gcc_struct__,__packed__)); +#elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || (ACC_CC_PGI >= 0x0d0a00ul) || (ACC_CC_SUNPROC >= 0x5100)) +# define __acc_struct_packed(s) struct s { +# define __acc_struct_packed_end() } __attribute__((__packed__)); +# define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__packed__)); +#elif (ACC_CC_IBMC >= 700) +# define __acc_struct_packed(s) __acc_gnuc_extension__ struct s { +# define __acc_struct_packed_end() } __attribute__((__packed__)); +# define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__packed__)); +#elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300)) +# define __acc_struct_packed(s) __pragma(pack(push,1)) struct s { +# define __acc_struct_packed_end() } __pragma(pack(pop)); +#elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900)) +# define __acc_struct_packed(s) _Packed struct s { +# define __acc_struct_packed_end() }; +#endif +#endif +#if defined(__acc_struct_packed) && !defined(__acc_struct_packed_ma) +# define __acc_struct_packed_ma(s) __acc_struct_packed(s) +#endif +#if defined(__acc_struct_packed_end) && !defined(__acc_struct_packed_ma_end) +# define __acc_struct_packed_ma_end() __acc_struct_packed_end() +#endif +#if !defined(__acc_byte_struct) +#if defined(__acc_struct_packed) +# define __acc_byte_struct(s,n) __acc_struct_packed(s) unsigned char a[n]; __acc_struct_packed_end() +# define __acc_byte_struct_ma(s,n) __acc_struct_packed_ma(s) unsigned char a[n]; __acc_struct_packed_ma_end() +#elif (ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_PGI || (ACC_CC_SUNPROC >= 0x5100)) +# define __acc_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__)); +# define __acc_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __acc_may_alias __attribute__((__packed__)); +#endif +#endif +#if defined(__acc_byte_struct) && !defined(__acc_byte_struct_ma) +# define __acc_byte_struct_ma(s,n) __acc_byte_struct(s,n) +#endif +#if !defined(__acc_struct_align16) && (__acc_HAVE_alignof) +#if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul)) +#elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus) +#elif (ACC_CC_CILLY || ACC_CC_PCC) +#elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300)) +# define __acc_struct_align16(s) struct __declspec(align(16)) s { +# define __acc_struct_align16_end() }; +# define __acc_struct_align32(s) struct __declspec(align(32)) s { +# define __acc_struct_align32_end() }; +# define __acc_struct_align64(s) struct __declspec(align(64)) s { +# define __acc_struct_align64_end() }; +#elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || (ACC_CC_IBMC >= 700) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_struct_align16(s) struct s { +# define __acc_struct_align16_end() } __attribute__((__aligned__(16))); +# define __acc_struct_align32(s) struct s { +# define __acc_struct_align32_end() } __attribute__((__aligned__(32))); +# define __acc_struct_align64(s) struct s { +# define __acc_struct_align64_end() } __attribute__((__aligned__(64))); +#endif +#endif +#if !defined(__acc_union_um) +#if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus) +#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul)) +#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER < 810)) +#elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul)) +#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus) +#elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || (ACC_CC_PGI >= 0x0d0a00ul) || (ACC_CC_SUNPROC >= 0x5100)) +# define __acc_union_am(s) union s { +# define __acc_union_am_end() } __acc_may_alias; +# define __acc_union_um(s) union s { +# define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__)); +#elif (ACC_CC_IBMC >= 700) +# define __acc_union_am(s) __acc_gnuc_extension__ union s { +# define __acc_union_am_end() } __acc_may_alias; +# define __acc_union_um(s) __acc_gnuc_extension__ union s { +# define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__)); +#elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300)) +# define __acc_union_um(s) __pragma(pack(push,1)) union s { +# define __acc_union_um_end() } __pragma(pack(pop)); +#elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900)) +# define __acc_union_um(s) _Packed union s { +# define __acc_union_um_end() }; +#endif +#endif +#if !defined(__acc_union_am) +# define __acc_union_am(s) union s { +# define __acc_union_am_end() }; +#endif +#if !defined(__acc_constructor) +#if (ACC_CC_GNUC >= 0x030400ul) +# define __acc_constructor __attribute__((__constructor__,__used__)) +#elif (ACC_CC_GNUC >= 0x020700ul) +# define __acc_constructor __attribute__((__constructor__)) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) +# define __acc_constructor __attribute__((__constructor__,__used__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_constructor __attribute__((__constructor__)) +#endif +#endif +#if defined(__acc_constructor) +# ifndef __acc_HAVE_constructor +# define __acc_HAVE_constructor 1 +# endif +#endif +#if !defined(__acc_destructor) +#if (ACC_CC_GNUC >= 0x030400ul) +# define __acc_destructor __attribute__((__destructor__,__used__)) +#elif (ACC_CC_GNUC >= 0x020700ul) +# define __acc_destructor __attribute__((__destructor__)) +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800)) +# define __acc_destructor __attribute__((__destructor__,__used__)) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_destructor __attribute__((__destructor__)) +#endif +#endif +#if defined(__acc_destructor) +# ifndef __acc_HAVE_destructor +# define __acc_HAVE_destructor 1 +# endif +#endif +#if (__acc_HAVE_destructor) && !(__acc_HAVE_constructor) +# error "unexpected configuration - check your compiler defines" +#endif +#if !defined(__acc_likely) && !defined(__acc_unlikely) +#if (ACC_CC_GNUC >= 0x030200ul) +# define __acc_likely(e) (__builtin_expect(!!(e),1)) +# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (ACC_CC_IBMC >= 1010) +# define __acc_likely(e) (__builtin_expect(!!(e),1)) +# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800)) +# define __acc_likely(e) (__builtin_expect(!!(e),1)) +# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) +#elif (ACC_CC_CLANG && ACC_CC_CLANG_C2) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) +# define __acc_likely(e) (__builtin_expect(!!(e),1)) +# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) +#endif +#endif +#if defined(__acc_likely) +# ifndef __acc_HAVE_likely +# define __acc_HAVE_likely 1 +# endif +#else +# define __acc_likely(e) (e) +#endif +#if defined(__acc_very_likely) +# ifndef __acc_HAVE_very_likely +# define __acc_HAVE_very_likely 1 +# endif +#else +# define __acc_very_likely(e) __acc_likely(e) +#endif +#if defined(__acc_unlikely) +# ifndef __acc_HAVE_unlikely +# define __acc_HAVE_unlikely 1 +# endif +#else +# define __acc_unlikely(e) (e) +#endif +#if defined(__acc_very_unlikely) +# ifndef __acc_HAVE_very_unlikely +# define __acc_HAVE_very_unlikely 1 +# endif +#else +# define __acc_very_unlikely(e) __acc_unlikely(e) +#endif +#if !defined(__acc_loop_forever) +# if (ACC_CC_IBMC) +# define __acc_loop_forever() ACC_BLOCK_BEGIN for (;;) { ; } ACC_BLOCK_END +# else +# define __acc_loop_forever() do { ; } while __acc_cte(1) +# endif +#endif +#if !defined(__acc_unreachable) +#if (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x020800ul)) && acc_has_builtin(__builtin_unreachable) +# define __acc_unreachable() __builtin_unreachable(); +#elif (ACC_CC_GNUC >= 0x040500ul) +# define __acc_unreachable() __builtin_unreachable(); +#elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1 +# define __acc_unreachable() __builtin_unreachable(); +#endif +#endif +#if defined(__acc_unreachable) +# ifndef __acc_HAVE_unreachable +# define __acc_HAVE_unreachable 1 +# endif +#else +# if 0 +# define __acc_unreachable() ((void)0); +# else +# define __acc_unreachable() __acc_loop_forever(); +# endif +#endif +#if !defined(acc_unused_funcs_impl) +# if 1 && (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020700ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI) +# define acc_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f +# elif 1 && (ACC_CC_BORLANDC || ACC_CC_GNUC) +# define acc_unused_funcs_impl(r,f) static r f +# else +# define acc_unused_funcs_impl(r,f) __acc_static_forceinline r f +# endif +#endif +#ifndef __ACC_CTA_NAME +#if (ACC_CFG_USE_COUNTER) +# define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__COUNTER__) +#else +# define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__LINE__) +#endif +#endif +#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) +# if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END +# elif (ACC_CC_DMC || ACC_CC_SYMANTECC) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1u-2*!(e)]; ACC_EXTERN_C_END +# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END +# elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020900ul)) && defined(__cplusplus) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN int __ACC_CTA_NAME(acc_cta_f__)(int [1-2*!(e)]); ACC_EXTERN_C_END +# elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN enum {__ACC_CTA_NAME(acc_cta_e__)=1/!!(e)} __attribute__((__unused__)); ACC_EXTERN_C_END +# else +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-2*!(e)]; ACC_EXTERN_C_END +# endif +#endif +#if !defined(ACC_COMPILE_TIME_ASSERT) +# if (ACC_CC_AZTECC) +# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-!(e)];} +# elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030000ul)) +# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));} +# elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) +# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__) +# define ACC_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));} +# elif (ACC_CC_GNUC >= 0x040700ul) && (ACC_CFG_USE_COUNTER) && defined(__cplusplus) +# define ACC_COMPILE_TIME_ASSERT(e) {enum {__ACC_CTA_NAME(acc_cta_e__)=1/!!(e)} __attribute__((__unused__));} +# elif (ACC_CC_GNUC >= 0x040700ul) +# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));} +# elif (ACC_CC_MSC && (_MSC_VER < 900)) +# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) +# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +# else +# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)];} +# endif +#endif +#if (ACC_LANG_ASSEMBLER) +# undef ACC_COMPILE_TIME_ASSERT_HEADER +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/ +#else +ACC_COMPILE_TIME_ASSERT_HEADER(1 == 1) +#if defined(__cplusplus) +extern "C" { ACC_COMPILE_TIME_ASSERT_HEADER(2 == 2) } +#endif +ACC_COMPILE_TIME_ASSERT_HEADER(3 == 3) +#endif +#if (ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) +# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC) +# elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) +# define __acc_cdecl __cdecl +# define __acc_cdecl_atexit /*empty*/ +# define __acc_cdecl_main __cdecl +# if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC)) +# define __acc_cdecl_qsort __pascal +# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC)) +# define __acc_cdecl_qsort _stdcall +# else +# define __acc_cdecl_qsort __cdecl +# endif +# elif (ACC_CC_WATCOMC) +# define __acc_cdecl __cdecl +# else +# define __acc_cdecl __cdecl +# define __acc_cdecl_atexit __cdecl +# define __acc_cdecl_main __cdecl +# define __acc_cdecl_qsort __cdecl +# endif +# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC) +# elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC)) +# define __acc_cdecl_sighandler __pascal +# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC)) +# define __acc_cdecl_sighandler _stdcall +# elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +# define __acc_cdecl_sighandler __clrcall +# elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +# if defined(_DLL) +# define __acc_cdecl_sighandler _far _cdecl _loadds +# elif defined(_MT) +# define __acc_cdecl_sighandler _far _cdecl +# else +# define __acc_cdecl_sighandler _cdecl +# endif +# else +# define __acc_cdecl_sighandler __cdecl +# endif +#elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC) +# define __acc_cdecl __cdecl +#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) +# define __acc_cdecl cdecl +#endif +#if !defined(__acc_cdecl) +# define __acc_cdecl /*empty*/ +#endif +#if !defined(__acc_cdecl_atexit) +# define __acc_cdecl_atexit /*empty*/ +#endif +#if !defined(__acc_cdecl_main) +# define __acc_cdecl_main /*empty*/ +#endif +#if !defined(__acc_cdecl_qsort) +# define __acc_cdecl_qsort /*empty*/ +#endif +#if !defined(__acc_cdecl_sighandler) +# define __acc_cdecl_sighandler /*empty*/ +#endif +#if !defined(__acc_cdecl_va) +# define __acc_cdecl_va __acc_cdecl +#endif +#if !(ACC_CFG_NO_WINDOWS_H) +#if !defined(ACC_HAVE_WINDOWS_H) +#if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64) +# if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000)) +# elif ((ACC_OS_WIN32 && defined(__PW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul))) +# elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul))) +# else +# define ACC_HAVE_WINDOWS_H 1 +# endif +#endif +#endif +#endif +#define ACC_SIZEOF_CHAR 1 +#ifndef ACC_SIZEOF_SHORT #if defined(SIZEOF_SHORT) # define ACC_SIZEOF_SHORT (SIZEOF_SHORT) +#elif defined(__SIZEOF_SHORT__) +# define ACC_SIZEOF_SHORT (__SIZEOF_SHORT__) +#endif #endif +#ifndef ACC_SIZEOF_INT #if defined(SIZEOF_INT) # define ACC_SIZEOF_INT (SIZEOF_INT) +#elif defined(__SIZEOF_INT__) +# define ACC_SIZEOF_INT (__SIZEOF_INT__) #endif +#endif +#ifndef ACC_SIZEOF_LONG #if defined(SIZEOF_LONG) # define ACC_SIZEOF_LONG (SIZEOF_LONG) +#elif defined(__SIZEOF_LONG__) +# define ACC_SIZEOF_LONG (__SIZEOF_LONG__) +#endif #endif +#ifndef ACC_SIZEOF_LONG_LONG #if defined(SIZEOF_LONG_LONG) # define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +#elif defined(__SIZEOF_LONG_LONG__) +# define ACC_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__) #endif +#endif +#ifndef ACC_SIZEOF___INT16 #if defined(SIZEOF___INT16) # define ACC_SIZEOF___INT16 (SIZEOF___INT16) #endif +#endif +#ifndef ACC_SIZEOF___INT32 #if defined(SIZEOF___INT32) # define ACC_SIZEOF___INT32 (SIZEOF___INT32) #endif +#endif +#ifndef ACC_SIZEOF___INT64 #if defined(SIZEOF___INT64) # define ACC_SIZEOF___INT64 (SIZEOF___INT64) #endif +#endif +#ifndef ACC_SIZEOF_VOID_P #if defined(SIZEOF_VOID_P) # define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P) +#elif defined(__SIZEOF_POINTER__) +# define ACC_SIZEOF_VOID_P (__SIZEOF_POINTER__) +#endif #endif +#ifndef ACC_SIZEOF_SIZE_T #if defined(SIZEOF_SIZE_T) # define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +#elif defined(__SIZEOF_SIZE_T__) +# define ACC_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__) +#endif #endif +#ifndef ACC_SIZEOF_PTRDIFF_T #if defined(SIZEOF_PTRDIFF_T) # define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +#elif defined(__SIZEOF_PTRDIFF_T__) +# define ACC_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__) +#endif #endif #define __ACC_LSR(x,b) (((x)+0ul) >> (b)) #if !defined(ACC_SIZEOF_SHORT) @@ -1135,6 +2248,7 @@ extern "C" { # error "ACC_SIZEOF_SHORT" # endif #endif +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SHORT == sizeof(short)) #if !defined(ACC_SIZEOF_INT) # if (ACC_ARCH_CRAY_PVP) # define ACC_SIZEOF_INT 8 @@ -1156,6 +2270,7 @@ extern "C" { # error "ACC_SIZEOF_INT" # endif #endif +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_INT == sizeof(int)) #if !defined(ACC_SIZEOF_LONG) # if (ULONG_MAX == ACC_0xffffffffL) # define ACC_SIZEOF_LONG 4 @@ -1165,6 +2280,8 @@ extern "C" { # define ACC_SIZEOF_LONG 2 # elif (__ACC_LSR(ULONG_MAX,31) == 1) # define ACC_SIZEOF_LONG 4 +# elif (__ACC_LSR(ULONG_MAX,39) == 1) +# define ACC_SIZEOF_LONG 5 # elif (__ACC_LSR(ULONG_MAX,63) == 1) # define ACC_SIZEOF_LONG 8 # elif (__ACC_LSR(ULONG_MAX,127) == 1) @@ -1173,11 +2290,12 @@ extern "C" { # error "ACC_SIZEOF_LONG" # endif #endif +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_LONG == sizeof(long)) #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64) #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8) # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) # if (ACC_CC_GNUC >= 0x030300ul) -# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +# if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0)) # define ACC_SIZEOF_LONG_LONG ACC_SIZEOF_LONG # elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1) # define ACC_SIZEOF_LONG_LONG 4 @@ -1191,7 +2309,7 @@ extern "C" { #if (ACC_ARCH_I086 && ACC_CC_DMC) #elif (ACC_CC_CILLY) && defined(__GNUC__) # define ACC_SIZEOF_LONG_LONG 8 -#elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) +#elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) # define ACC_SIZEOF_LONG_LONG 8 #elif ((ACC_OS_WIN32 || ACC_OS_WIN64 || defined(_WIN32)) && ACC_CC_MSC && (_MSC_VER >= 1400)) # define ACC_SIZEOF_LONG_LONG 8 @@ -1213,11 +2331,13 @@ extern "C" { # define ACC_SIZEOF___INT64 8 #elif (ACC_ARCH_I386 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100))) # define ACC_SIZEOF___INT64 8 -#elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +#elif (ACC_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64)) +# define ACC_SIZEOF_LONG_LONG 8 +#elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64)) # define ACC_SIZEOF___INT64 8 #elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) # define ACC_SIZEOF_LONG_LONG 8 -#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +#elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64) # define ACC_SIZEOF_LONG_LONG 8 #elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2) #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) @@ -1230,87 +2350,133 @@ extern "C" { # undef ACC_SIZEOF_LONG_LONG # endif #endif -#if (ACC_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +#if (ACC_CFG_NO_LONG_LONG) +# undef ACC_SIZEOF_LONG_LONG +#elif defined(__NO_LONG_LONG) +# undef ACC_SIZEOF_LONG_LONG +#elif defined(_NO_LONGLONG) # undef ACC_SIZEOF_LONG_LONG #endif -#if !defined(ACC_SIZEOF_VOID_P) -#if (ACC_ARCH_I086) -# define __ACC_WORDSIZE 2 -# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM) -# define ACC_SIZEOF_VOID_P 2 -# elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE) -# define ACC_SIZEOF_VOID_P 4 +#if !defined(ACC_WORDSIZE) +#if (ACC_ARCH_ALPHA) +# define ACC_WORDSIZE 8 +#elif (ACC_ARCH_AMD64) +# define ACC_WORDSIZE 8 +#elif (ACC_ARCH_ARM64) +# define ACC_WORDSIZE 8 +#elif (ACC_ARCH_AVR) +# define ACC_WORDSIZE 1 +#elif (ACC_ARCH_H8300) +# if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +# define ACC_WORDSIZE 4 # else -# error "ACC_MM" +# define ACC_WORDSIZE 2 # endif -#elif (ACC_ARCH_AVR || ACC_ARCH_Z80) -# define __ACC_WORDSIZE 1 +#elif (ACC_ARCH_I086) +# define ACC_WORDSIZE 2 +#elif (ACC_ARCH_IA64) +# define ACC_WORDSIZE 8 +#elif (ACC_ARCH_M16C) +# define ACC_WORDSIZE 2 +#elif (ACC_ARCH_SPU) +# define ACC_WORDSIZE 4 +#elif (ACC_ARCH_Z80) +# define ACC_WORDSIZE 1 +#elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 8) && (defined(__R5900) || defined(__MIPS_PSX2__)) +# define ACC_WORDSIZE 8 +#elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 4) && defined(__mips64) && defined(_MIPS_SIM) && defined(_ABIN32) && (_MIPS_SIM+0 == _ABIN32+0) +# define ACC_WORDSIZE 8 +#elif (ACC_OS_OS400 || defined(__OS400__)) +# define ACC_WORDSIZE 8 +#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +# define ACC_WORDSIZE 8 +#endif +#endif +#if !defined(ACC_SIZEOF_VOID_P) +#if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) +# define ACC_SIZEOF_VOID_P 4 +#elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) +# define ACC_SIZEOF_VOID_P 8 +#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4) +# define ACC_SIZEOF_VOID_P 8 +#elif defined(__LP64__) || defined(__LP64) || defined(_LP64) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8) +# define ACC_SIZEOF_VOID_P 8 +#elif (ACC_ARCH_AVR) # define ACC_SIZEOF_VOID_P 2 #elif (ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251 || ACC_ARCH_MSP430) # define ACC_SIZEOF_VOID_P 2 #elif (ACC_ARCH_H8300) -# if defined(__NORMAL_MODE__) -# define __ACC_WORDSIZE 4 -# define ACC_SIZEOF_VOID_P 2 -# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) -# define __ACC_WORDSIZE 4 -# define ACC_SIZEOF_VOID_P 4 +# if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) + ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 4) +# if defined(__NORMAL_MODE__) +# define ACC_SIZEOF_VOID_P 2 +# else +# define ACC_SIZEOF_VOID_P 4 +# endif # else -# define __ACC_WORDSIZE 2 + ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 2) # define ACC_SIZEOF_VOID_P 2 # endif # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x040000ul)) && (ACC_SIZEOF_INT == 4) # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_INT # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_INT # endif +#elif (ACC_ARCH_I086) +# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM) +# define ACC_SIZEOF_VOID_P 2 +# elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE) +# define ACC_SIZEOF_VOID_P 4 +# else +# error "invalid ACC_ARCH_I086 memory model" +# endif #elif (ACC_ARCH_M16C) -# define __ACC_WORDSIZE 2 # if defined(__m32c_cpu__) || defined(__m32cm_cpu__) # define ACC_SIZEOF_VOID_P 4 # else # define ACC_SIZEOF_VOID_P 2 # endif +#elif (ACC_ARCH_SPU) +# define ACC_SIZEOF_VOID_P 4 +#elif (ACC_ARCH_Z80) +# define ACC_SIZEOF_VOID_P 2 #elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) -# define __ACC_WORDSIZE 8 # define ACC_SIZEOF_VOID_P 4 -#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) -# define __ACC_WORDSIZE 8 -# define ACC_SIZEOF_VOID_P 8 -#elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) -# define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG -# define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG -# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG #elif (ACC_OS_OS400 || defined(__OS400__)) -# define __ACC_WORDSIZE ACC_SIZEOF_LONG -# define ACC_SIZEOF_VOID_P 16 -# define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG -# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG +# if defined(__LLP64_IFC__) +# define ACC_SIZEOF_VOID_P 8 +# define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG +# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG +# else +# define ACC_SIZEOF_VOID_P 16 +# define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG +# define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG +# endif #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) # define ACC_SIZEOF_VOID_P 8 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG -#elif (ACC_ARCH_SPU) -# if 0 -# define __ACC_WORDSIZE 16 -# endif -# define ACC_SIZEOF_VOID_P 4 -#else -# define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG #endif #endif -#if !defined(ACC_WORDSIZE) -# if defined(__ACC_WORDSIZE) -# define ACC_WORDSIZE __ACC_WORDSIZE -# else -# define ACC_WORDSIZE ACC_SIZEOF_VOID_P -# endif +#if !defined(ACC_SIZEOF_VOID_P) +# define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG #endif +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_VOID_P == sizeof(void *)) #if !defined(ACC_SIZEOF_SIZE_T) #if (ACC_ARCH_I086 || ACC_ARCH_M16C) # define ACC_SIZEOF_SIZE_T 2 -#else +#endif +#endif +#if !defined(ACC_SIZEOF_SIZE_T) # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P #endif +#if defined(offsetof) +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SIZE_T == sizeof(size_t)) #endif #if !defined(ACC_SIZEOF_PTRDIFF_T) #if (ACC_ARCH_I086) @@ -1323,11 +2489,18 @@ extern "C" { # define ACC_SIZEOF_PTRDIFF_T 2 # endif # else -# error "ACC_MM" +# error "invalid ACC_ARCH_I086 memory model" # endif -#else +#endif +#endif +#if !defined(ACC_SIZEOF_PTRDIFF_T) # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T #endif +#if defined(offsetof) +ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t)) +#endif +#if !defined(ACC_WORDSIZE) +# define ACC_WORDSIZE ACC_SIZEOF_VOID_P #endif #if (ACC_ABI_NEUTRAL_ENDIAN) # undef ACC_ABI_BIG_ENDIAN @@ -1337,9 +2510,9 @@ extern "C" { # define ACC_ABI_BIG_ENDIAN 1 #elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64) # define ACC_ABI_LITTLE_ENDIAN 1 -#elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430) +#elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430 || ACC_ARCH_RISCV) # define ACC_ABI_LITTLE_ENDIAN 1 -#elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390) +#elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390 || ACC_ARCH_SPU) # define ACC_ABI_BIG_ENDIAN 1 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) # if (__LITTLE_ENDIAN__ == 1) @@ -1351,10 +2524,31 @@ extern "C" { # define ACC_ABI_BIG_ENDIAN 1 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) # define ACC_ABI_LITTLE_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define ACC_ABI_BIG_ENDIAN 1 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) # define ACC_ABI_BIG_ENDIAN 1 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) # define ACC_ABI_LITTLE_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32) +# define ACC_ABI_LITTLE_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM && ACC_CC_ARMCC_ARMCC) +# if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) +# error "unexpected configuration - check your compiler defines" +# elif defined(__BIG_ENDIAN) +# define ACC_ABI_BIG_ENDIAN 1 +# else +# define ACC_ABI_LITTLE_ENDIAN 1 +# endif +# define ACC_ABI_LITTLE_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0) +# define ACC_ABI_BIG_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__) +# define ACC_ABI_BIG_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__) +# define ACC_ABI_LITTLE_ENDIAN 1 +#elif 1 && (ACC_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32) +# define ACC_ABI_LITTLE_ENDIAN 1 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) # define ACC_ABI_BIG_ENDIAN 1 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) @@ -1362,7 +2556,7 @@ extern "C" { #endif #endif #if (ACC_ABI_BIG_ENDIAN) && (ACC_ABI_LITTLE_ENDIAN) -# error "this should not happen" +# error "unexpected configuration - check your compiler defines" #endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_INFO_ABI_ENDIAN "be" @@ -1377,6 +2571,9 @@ extern "C" { #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2) # define ACC_ABI_ILP16 1 # define ACC_INFO_ABI_PM "ilp16" +#elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4) +# define ACC_ABI_LP32 1 +# define ACC_INFO_ABI_PM "lp32" #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4) # define ACC_ABI_ILP32 1 # define ACC_INFO_ABI_PM "ilp32" @@ -1393,7 +2590,14 @@ extern "C" { # define ACC_ABI_IP32L64 1 # define ACC_INFO_ABI_PM "ip32l64" #endif -#if !defined(__ACC_LIBC_OVERRIDE) +#if (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_VOID_P == 4 && ACC_WORDSIZE == 8) +# define ACC_ABI_IP32W64 1 +# ifndef ACC_INFO_ABI_PM +# define ACC_INFO_ABI_PM "ip32w64" +# endif +#endif +#if 0 +#elif !defined(__ACC_LIBC_OVERRIDE) #if (ACC_LIBC_NAKED) # define ACC_INFO_LIBC "naked" #elif (ACC_LIBC_FREESTANDING) @@ -1404,6 +2608,9 @@ extern "C" { # define ACC_INFO_LIBC "isoc90" #elif (ACC_LIBC_ISOC99) # define ACC_INFO_LIBC "isoc99" +#elif (ACC_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION) +# define ACC_LIBC_ISOC90 1 +# define ACC_INFO_LIBC "isoc90" #elif defined(__dietlibc__) # define ACC_LIBC_DIETLIBC 1 # define ACC_INFO_LIBC "dietlibc" @@ -1412,13 +2619,13 @@ extern "C" { # define ACC_INFO_LIBC "newlib" #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) # if defined(__UCLIBC_SUBLEVEL__) -# define ACC_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +# define ACC_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0)) # else # define ACC_LIBC_UCLIBC 0x00090bL # endif -# define ACC_INFO_LIBC "uclibc" +# define ACC_INFO_LIBC "uc" "libc" #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +# define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100) # define ACC_INFO_LIBC "glibc" #elif (ACC_CC_MWERKS) && defined(__MSL__) # define ACC_LIBC_MSL __MSL__ @@ -1431,424 +2638,196 @@ extern "C" { # define ACC_INFO_LIBC "default" #endif #endif -#if !defined(__acc_gnuc_extension__) -#if (ACC_CC_GNUC >= 0x020800ul) -# define __acc_gnuc_extension__ __extension__ -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_gnuc_extension__ __extension__ -#else -# define __acc_gnuc_extension__ /*empty*/ -#endif -#endif -#if !defined(__acc_ua_volatile) -# define __acc_ua_volatile volatile -#endif -#if !defined(__acc_alignof) -#if (ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI) -# define __acc_alignof(e) __alignof__(e) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700)) -# define __acc_alignof(e) __alignof__(e) -#elif (ACC_CC_MSC && (_MSC_VER >= 1300)) -# define __acc_alignof(e) __alignof(e) -#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC >= 0x5100)) -# define __acc_alignof(e) __alignof__(e) -#endif -#endif -#if defined(__acc_alignof) -# define __acc_HAVE_alignof 1 -#endif -#if !defined(__acc_constructor) -#if (ACC_CC_GNUC >= 0x030400ul) -# define __acc_constructor __attribute__((__constructor__,__used__)) -#elif (ACC_CC_GNUC >= 0x020700ul) -# define __acc_constructor __attribute__((__constructor__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_constructor __attribute__((__constructor__)) -#endif -#endif -#if defined(__acc_constructor) -# define __acc_HAVE_constructor 1 -#endif -#if !defined(__acc_destructor) -#if (ACC_CC_GNUC >= 0x030400ul) -# define __acc_destructor __attribute__((__destructor__,__used__)) -#elif (ACC_CC_GNUC >= 0x020700ul) -# define __acc_destructor __attribute__((__destructor__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_destructor __attribute__((__destructor__)) -#endif -#endif -#if defined(__acc_destructor) -# define __acc_HAVE_destructor 1 -#endif -#if (__acc_HAVE_destructor) && !(__acc_HAVE_constructor) -# error "this should not happen" -#endif -#if !defined(__acc_inline) -#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295)) -#elif defined(__cplusplus) -# define __acc_inline inline -#elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) -# define __acc_inline __inline -#elif (ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI) -# define __acc_inline __inline__ -#elif (ACC_CC_DMC) -# define __acc_inline __inline -#elif (ACC_CC_INTELC) -# define __acc_inline __inline -#elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405)) -# define __acc_inline __inline -#elif (ACC_CC_MSC && (_MSC_VER >= 900)) -# define __acc_inline __inline -#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC >= 0x5100)) -# define __acc_inline __inline__ -#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -# define __acc_inline inline -#endif -#endif -#if defined(__acc_inline) -# define __acc_HAVE_inline 1 -#else -# define __acc_inline /*empty*/ -#endif -#if !defined(__acc_forceinline) -#if (ACC_CC_GNUC >= 0x030200ul) -# define __acc_forceinline __inline__ __attribute__((__always_inline__)) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC) -# define __acc_forceinline __forceinline -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC) -# define __acc_forceinline __inline__ __attribute__((__always_inline__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_forceinline __inline__ __attribute__((__always_inline__)) -#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) -# define __acc_forceinline __forceinline -#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC >= 0x5100)) -# define __acc_forceinline __inline__ __attribute__((__always_inline__)) +#if (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)) +# define ACC_ASM_SYNTAX_MSC 1 +#elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)) +#elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC == 0x011f00ul)) +#elif (ACC_ARCH_I386 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)) +# define ACC_ASM_SYNTAX_GNUC 1 +#elif (ACC_ARCH_AMD64 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)) +# define ACC_ASM_SYNTAX_GNUC 1 +#elif (ACC_CC_GNUC) +# define ACC_ASM_SYNTAX_GNUC 1 #endif +#if (ACC_ASM_SYNTAX_GNUC) +#if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) +# define __ACC_ASM_CLOBBER "ax" +# define __ACC_ASM_CLOBBER_LIST_CC /*empty*/ +# define __ACC_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/ +# define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/ +#elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1000)) +# define __ACC_ASM_CLOBBER "memory" +# define __ACC_ASM_CLOBBER_LIST_CC /*empty*/ +# define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "memory" +# define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/ +#else +# define __ACC_ASM_CLOBBER "cc", "memory" +# define __ACC_ASM_CLOBBER_LIST_CC : "cc" +# define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory" +# define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/ #endif -#if defined(__acc_forceinline) -# define __acc_HAVE_forceinline 1 -#else -# define __acc_forceinline /*empty*/ #endif -#if !defined(__acc_noinline) -#if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul) -# define __acc_noinline __attribute__((__noinline__,__used__)) -#elif (ACC_CC_GNUC >= 0x030200ul) -# define __acc_noinline __attribute__((__noinline__)) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_MSC) -# define __acc_noinline __declspec(noinline) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC) -# define __acc_noinline __attribute__((__noinline__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_noinline __attribute__((__noinline__)) -#elif (ACC_CC_MSC && (_MSC_VER >= 1300)) -# define __acc_noinline __declspec(noinline) -#elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64)) -# if defined(__cplusplus) -# else -# define __acc_noinline __declspec(noinline) +#if (ACC_ARCH_ALPHA) +# define ACC_OPT_AVOID_UINT_INDEX 1 +#elif (ACC_ARCH_AMD64) +# define ACC_OPT_AVOID_INT_INDEX 1 +# define ACC_OPT_AVOID_UINT_INDEX 1 +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 # endif -#elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC >= 0x5100)) -# define __acc_noinline __attribute__((__noinline__)) -#endif -#endif -#if defined(__acc_noinline) -# define __acc_HAVE_noinline 1 -#else -# define __acc_noinline /*empty*/ -#endif -#if (__acc_HAVE_forceinline || __acc_HAVE_noinline) && !(__acc_HAVE_inline) -# error "this should not happen" -#endif -#if !defined(__acc_noreturn) -#if (ACC_CC_GNUC >= 0x020700ul) -# define __acc_noreturn __attribute__((__noreturn__)) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC) -# define __acc_noreturn __declspec(noreturn) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC) -# define __acc_noreturn __attribute__((__noreturn__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_noreturn __attribute__((__noreturn__)) -#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) -# define __acc_noreturn __declspec(noreturn) -#endif -#endif -#if defined(__acc_noreturn) -# define __acc_HAVE_noreturn 1 -#else -# define __acc_noreturn /*empty*/ -#endif -#if !defined(__acc_nothrow) -#if (ACC_CC_GNUC >= 0x030300ul) -# define __acc_nothrow __attribute__((__nothrow__)) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC) && defined(__cplusplus) -# define __acc_nothrow __declspec(nothrow) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 900) && ACC_CC_SYNTAX_GNUC) -# define __acc_nothrow __attribute__((__nothrow__)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_nothrow __attribute__((__nothrow__)) -#elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) -# define __acc_nothrow __declspec(nothrow) -#endif -#endif -#if defined(__acc_nothrow) -# define __acc_HAVE_nothrow 1 -#else -# define __acc_nothrow /*empty*/ -#endif -#if !defined(__acc_restrict) -#if (ACC_CC_GNUC >= 0x030400ul) -# define __acc_restrict __restrict__ -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC) -# define __acc_restrict __restrict__ -#elif (ACC_CC_CLANG || ACC_CC_LLVM) -# define __acc_restrict __restrict__ -#elif (ACC_CC_MSC && (_MSC_VER >= 1400)) -# define __acc_restrict __restrict -#endif -#endif -#if defined(__acc_restrict) -# define __acc_HAVE_restrict 1 -#else -# define __acc_restrict /*empty*/ -#endif -#if !defined(__acc_likely) && !defined(__acc_unlikely) -#if (ACC_CC_GNUC >= 0x030200ul) -# define __acc_likely(e) (__builtin_expect(!!(e),1)) -# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800)) -# define __acc_likely(e) (__builtin_expect(!!(e),1)) -# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) -#elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __acc_likely(e) (__builtin_expect(!!(e),1)) -# define __acc_unlikely(e) (__builtin_expect(!!(e),0)) -#endif -#endif -#if defined(__acc_likely) -# define __acc_HAVE_likely 1 -#else -# define __acc_likely(e) (e) -#endif -#if defined(__acc_unlikely) -# define __acc_HAVE_unlikely 1 -#else -# define __acc_unlikely(e) (e) -#endif -#if !defined(ACC_UNUSED) -# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define ACC_UNUSED(var) ((void) &var) -# elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC) -# define ACC_UNUSED(var) if (&var) ; else -# elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define ACC_UNUSED(var) ((void) var) -# elif (ACC_CC_MSC && (_MSC_VER < 900)) -# define ACC_UNUSED(var) if (&var) ; else -# elif (ACC_CC_KEILC) -# define ACC_UNUSED(var) {extern int __acc_unused[1-2*!(sizeof(var)>0)];} -# elif (ACC_CC_PACIFICC) -# define ACC_UNUSED(var) ((void) sizeof(var)) -# elif (ACC_CC_WATCOMC) && defined(__cplusplus) -# define ACC_UNUSED(var) ((void) var) -# else -# define ACC_UNUSED(var) ((void) &var) +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 # endif -#endif -#if !defined(ACC_UNUSED_FUNC) -# if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) -# define ACC_UNUSED_FUNC(func) ((void) func) -# elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC) -# define ACC_UNUSED_FUNC(func) if (func) ; else -# elif (ACC_CC_CLANG || ACC_CC_LLVM) -# define ACC_UNUSED_FUNC(func) ((void) &func) -# elif (ACC_CC_MSC && (_MSC_VER < 900)) -# define ACC_UNUSED_FUNC(func) if (func) ; else -# elif (ACC_CC_MSC) -# define ACC_UNUSED_FUNC(func) ((void) &func) -# elif (ACC_CC_KEILC || ACC_CC_PELLESC) -# define ACC_UNUSED_FUNC(func) {extern int __acc_unused[1-2*!(sizeof((int)func)>0)];} -# else -# define ACC_UNUSED_FUNC(func) ((void) func) +# ifndef ACC_OPT_UNALIGNED64 +# define ACC_OPT_UNALIGNED64 1 # endif -#endif -#if !defined(ACC_UNUSED_LABEL) -# if (ACC_CC_WATCOMC) && defined(__cplusplus) -# define ACC_UNUSED_LABEL(l) switch(0) case 1:goto l -# elif (ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC) -# define ACC_UNUSED_LABEL(l) if (0) goto l -# else -# define ACC_UNUSED_LABEL(l) switch(0) case 1:goto l +#elif (ACC_ARCH_ARM) +# if defined(__ARM_FEATURE_UNALIGNED) +# if ((__ARM_FEATURE_UNALIGNED)+0) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# endif +# elif 1 && (ACC_ARCH_ARM_THUMB2) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R)) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif # endif -#endif -#if !defined(ACC_DEFINE_UNINITIALIZED_VAR) -# if 0 -# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var -# elif 0 && (ACC_CC_GNUC) -# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var -# else -# define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +#elif (ACC_ARCH_ARM64) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 # endif -#endif -#if !defined(ACC_UNCONST_CAST) -# if 0 && defined(__cplusplus) -# define ACC_UNCONST_CAST(t,e) (const_cast<t> (e)) -# elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((acc_uintptr_t) ((const void *) (e)))))) -# else -# define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 # endif -#endif -#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) -# if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) -# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; -# elif (ACC_CC_DMC || ACC_CC_SYMANTECC) -# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1u-2*!(e)]; -# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; -# else -# define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-2*!(e)]; +# ifndef ACC_OPT_UNALIGNED64 +# define ACC_OPT_UNALIGNED64 1 # endif -#endif -#if !defined(ACC_COMPILE_TIME_ASSERT) -# if (ACC_CC_AZTECC) -# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];} -# elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) -# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (ACC_CC_MSC && (_MSC_VER < 900)) -# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) -# define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; -# else -# define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-2*!(e)];} +#elif (ACC_ARCH_CRIS) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 # endif -#endif -#if (ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) -# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC) -# elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) -# define __acc_cdecl __cdecl -# define __acc_cdecl_atexit /*empty*/ -# define __acc_cdecl_main __cdecl -# if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC)) -# define __acc_cdecl_qsort __pascal -# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC)) -# define __acc_cdecl_qsort _stdcall -# else -# define __acc_cdecl_qsort __cdecl -# endif -# elif (ACC_CC_WATCOMC) -# define __acc_cdecl __cdecl -# else -# define __acc_cdecl __cdecl -# define __acc_cdecl_atexit __cdecl -# define __acc_cdecl_main __cdecl -# define __acc_cdecl_qsort __cdecl +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 # endif -# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC) -# elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC)) -# define __acc_cdecl_sighandler __pascal -# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC)) -# define __acc_cdecl_sighandler _stdcall -# elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) -# define __acc_cdecl_sighandler __clrcall -# elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) -# if defined(_DLL) -# define __acc_cdecl_sighandler _far _cdecl _loadds -# elif defined(_MT) -# define __acc_cdecl_sighandler _far _cdecl -# else -# define __acc_cdecl_sighandler _cdecl -# endif -# else -# define __acc_cdecl_sighandler __cdecl +#elif (ACC_ARCH_I386) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 # endif -#elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC) -# define __acc_cdecl __cdecl -#elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) -# define __acc_cdecl cdecl -#endif -#if !defined(__acc_cdecl) -# define __acc_cdecl /*empty*/ -#endif -#if !defined(__acc_cdecl_atexit) -# define __acc_cdecl_atexit /*empty*/ -#endif -#if !defined(__acc_cdecl_main) -# define __acc_cdecl_main /*empty*/ -#endif -#if !defined(__acc_cdecl_qsort) -# define __acc_cdecl_qsort /*empty*/ -#endif -#if !defined(__acc_cdecl_sighandler) -# define __acc_cdecl_sighandler /*empty*/ -#endif -#if !defined(__acc_cdecl_va) -# define __acc_cdecl_va __acc_cdecl -#endif -#if !(ACC_CFG_NO_WINDOWS_H) -#if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64) -# if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000)) -# elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__) -# elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul))) -# else -# define ACC_HAVE_WINDOWS_H 1 +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 # endif -#endif -#endif -#if (ACC_ARCH_ALPHA) -# define ACC_OPT_AVOID_UINT_INDEX 1 -# define ACC_OPT_AVOID_SHORT 1 -# define ACC_OPT_AVOID_USHORT 1 -#elif (ACC_ARCH_AMD64) -# define ACC_OPT_AVOID_INT_INDEX 1 -# define ACC_OPT_AVOID_UINT_INDEX 1 -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 -# define ACC_OPT_UNALIGNED64 1 -#elif (ACC_ARCH_ARM && ACC_ARCH_ARM_THUMB) -#elif (ACC_ARCH_ARM) -# define ACC_OPT_AVOID_SHORT 1 -# define ACC_OPT_AVOID_USHORT 1 -#elif (ACC_ARCH_CRIS) -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 -#elif (ACC_ARCH_I386) -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 #elif (ACC_ARCH_IA64) -# define ACC_OPT_AVOID_INT_INDEX 1 -# define ACC_OPT_AVOID_UINT_INDEX 1 -# define ACC_OPT_PREFER_POSTINC 1 +# define ACC_OPT_AVOID_INT_INDEX 1 +# define ACC_OPT_AVOID_UINT_INDEX 1 +# define ACC_OPT_PREFER_POSTINC 1 #elif (ACC_ARCH_M68K) -# define ACC_OPT_PREFER_POSTINC 1 -# define ACC_OPT_PREFER_PREDEC 1 +# define ACC_OPT_PREFER_POSTINC 1 +# define ACC_OPT_PREFER_PREDEC 1 # if defined(__mc68020__) && !defined(__mcoldfire__) -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif # endif #elif (ACC_ARCH_MIPS) -# define ACC_OPT_AVOID_UINT_INDEX 1 +# define ACC_OPT_AVOID_UINT_INDEX 1 #elif (ACC_ARCH_POWERPC) -# define ACC_OPT_PREFER_PREINC 1 -# define ACC_OPT_PREFER_PREDEC 1 -# if (ACC_ABI_BIG_ENDIAN) -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 +# define ACC_OPT_PREFER_PREINC 1 +# define ACC_OPT_PREFER_PREDEC 1 +# if (ACC_ABI_BIG_ENDIAN) || (ACC_WORDSIZE == 8) +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# if (ACC_WORDSIZE == 8) +# ifndef ACC_OPT_UNALIGNED64 +# define ACC_OPT_UNALIGNED64 1 +# endif +# endif +# endif +#elif (ACC_ARCH_RISCV) +# define ACC_OPT_AVOID_UINT_INDEX 1 +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# if (ACC_WORDSIZE == 8) +# ifndef ACC_OPT_UNALIGNED64 +# define ACC_OPT_UNALIGNED64 1 +# endif # endif #elif (ACC_ARCH_S390) -# define ACC_OPT_UNALIGNED16 1 -# define ACC_OPT_UNALIGNED32 1 -# if (ACC_SIZEOF_SIZE_T == 8) -# define ACC_OPT_UNALIGNED64 1 +# ifndef ACC_OPT_UNALIGNED16 +# define ACC_OPT_UNALIGNED16 1 +# endif +# ifndef ACC_OPT_UNALIGNED32 +# define ACC_OPT_UNALIGNED32 1 +# endif +# if (ACC_WORDSIZE == 8) +# ifndef ACC_OPT_UNALIGNED64 +# define ACC_OPT_UNALIGNED64 1 +# endif # endif #elif (ACC_ARCH_SH) -# define ACC_OPT_PREFER_POSTINC 1 -# define ACC_OPT_PREFER_PREDEC 1 +# define ACC_OPT_PREFER_POSTINC 1 +# define ACC_OPT_PREFER_PREDEC 1 #endif #ifndef ACC_CFG_NO_INLINE_ASM -#if (ACC_CC_LLVM) +#if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC) +# define ACC_CFG_NO_INLINE_ASM 1 +#elif (ACC_CC_LLVM) # define ACC_CFG_NO_INLINE_ASM 1 #endif #endif +#if (ACC_CFG_NO_INLINE_ASM) +# undef ACC_ASM_SYNTAX_MSC +# undef ACC_ASM_SYNTAX_GNUC +# undef __ACC_ASM_CLOBBER +# undef __ACC_ASM_CLOBBER_LIST_CC +# undef __ACC_ASM_CLOBBER_LIST_CC_MEMORY +# undef __ACC_ASM_CLOBBER_LIST_EMPTY +#endif #ifndef ACC_CFG_NO_UNALIGNED #if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC) # define ACC_CFG_NO_UNALIGNED 1 @@ -1859,25 +2838,6 @@ extern "C" { # undef ACC_OPT_UNALIGNED32 # undef ACC_OPT_UNALIGNED64 #endif -#if (ACC_CFG_NO_INLINE_ASM) -#elif (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)) -# define ACC_ASM_SYNTAX_MSC 1 -#elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)) -#elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC == 0x011f00ul)) -#elif (ACC_ARCH_I386 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)) -# define ACC_ASM_SYNTAX_GNUC 1 -#elif (ACC_ARCH_AMD64 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)) -# define ACC_ASM_SYNTAX_GNUC 1 -#endif -#if (ACC_ASM_SYNTAX_GNUC) -#if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) -# define __ACC_ASM_CLOBBER "ax" -#elif (ACC_CC_INTELC) -# define __ACC_ASM_CLOBBER "memory" -#else -# define __ACC_ASM_CLOBBER "cc", "memory" -#endif -#endif #if defined(__ACC_INFOSTR_MM) #elif (ACC_MM_FLAT) && (defined(__ACC_INFOSTR_PM) || defined(ACC_INFO_ABI_PM)) # define __ACC_INFOSTR_MM "" @@ -1921,6 +2881,465 @@ extern "C" { #define ACC_INFO_STRING \ ACC_INFO_ARCH __ACC_INFOSTR_MM __ACC_INFOSTR_PM __ACC_INFOSTR_ENDIAN \ " " __ACC_INFOSTR_OSNAME __ACC_INFOSTR_LIBC " " ACC_INFO_CC __ACC_INFOSTR_CCVER +#if !(ACC_CFG_SKIP_ACC_TYPES) +#if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0)) +# error "missing defines for sizes" +#endif +#if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0)) +# error "missing defines for sizes" +#endif +#define ACC_TYPEOF_CHAR 1u +#define ACC_TYPEOF_SHORT 2u +#define ACC_TYPEOF_INT 3u +#define ACC_TYPEOF_LONG 4u +#define ACC_TYPEOF_LONG_LONG 5u +#define ACC_TYPEOF___INT8 17u +#define ACC_TYPEOF___INT16 18u +#define ACC_TYPEOF___INT32 19u +#define ACC_TYPEOF___INT64 20u +#define ACC_TYPEOF___INT128 21u +#define ACC_TYPEOF___INT256 22u +#define ACC_TYPEOF___MODE_QI 33u +#define ACC_TYPEOF___MODE_HI 34u +#define ACC_TYPEOF___MODE_SI 35u +#define ACC_TYPEOF___MODE_DI 36u +#define ACC_TYPEOF___MODE_TI 37u +#define ACC_TYPEOF_CHAR_P 129u +#if !defined(acc_llong_t) +#if (ACC_SIZEOF_LONG_LONG+0 > 0) +# if !(ACC_LANG_ASSEMBLER) + __acc_gnuc_extension__ typedef long long acc_llong_t__; + __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__; +# endif +# define acc_llong_t acc_llong_t__ +# define acc_ullong_t acc_ullong_t__ +#endif +#endif +#if !defined(acc_int16e_t) +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T +#endif +#if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) +# define acc_int16e_t long +# define acc_uint16e_t unsigned long +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) +# define acc_int16e_t int +# define acc_uint16e_t unsigned int +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_SHORT == 2) +# define acc_int16e_t short int +# define acc_uint16e_t unsigned short int +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT +#elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__))); + typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__))); +# endif +# define acc_int16e_t acc_int16e_hi_t__ +# define acc_uint16e_t acc_uint16e_hi_t__ +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI +#elif (ACC_SIZEOF___INT16 == 2) +# define acc_int16e_t __int16 +# define acc_uint16e_t unsigned __int16 +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16 +#else +#endif +#endif +#if defined(acc_int16e_t) +# define ACC_SIZEOF_ACC_INT16E_T 2 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T) +#endif +#if !defined(acc_int32e_t) +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T +#endif +#if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) +# define acc_int32e_t long int +# define acc_uint32e_t unsigned long int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_INT == 4) +# define acc_int32e_t int +# define acc_uint32e_t unsigned int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_SHORT == 4) +# define acc_int32e_t short int +# define acc_uint32e_t unsigned short int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT +#elif (ACC_SIZEOF_LONG_LONG == 4) +# define acc_int32e_t acc_llong_t +# define acc_uint32e_t acc_ullong_t +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG +#elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__))); + typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__))); +# endif +# define acc_int32e_t acc_int32e_si_t__ +# define acc_uint32e_t acc_uint32e_si_t__ +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI +#elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__))); + typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__))); +# endif +# define acc_int32e_t acc_int32e_si_t__ +# define acc_uint32e_t acc_uint32e_si_t__ +# define ACC_INT32_C(c) (c##LL) +# define ACC_UINT32_C(c) (c##ULL) +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI +#elif (ACC_SIZEOF___INT32 == 4) +# define acc_int32e_t __int32 +# define acc_uint32e_t unsigned __int32 +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32 +#else +#endif +#endif +#if defined(acc_int32e_t) +# define ACC_SIZEOF_ACC_INT32E_T 4 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T) +#endif +#if !defined(acc_int64e_t) +#if (ACC_SIZEOF___INT64 == 8) +# if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T) +# define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64 +# endif +#endif +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T +#endif +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T +#endif +#if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) +# define acc_int64e_t int +# define acc_uint64e_t unsigned int +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) +# define acc_int64e_t long int +# define acc_uint64e_t unsigned long int +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) +# define acc_int64e_t acc_llong_t +# define acc_uint64e_t acc_ullong_t +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG +# if (ACC_CC_BORLANDC) +# define ACC_INT64_C(c) ((c) + 0ll) +# define ACC_UINT64_C(c) ((c) + 0ull) +# elif 0 +# define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL)) +# define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL)) +# else +# define ACC_INT64_C(c) (c##LL) +# define ACC_UINT64_C(c) (c##ULL) +# endif +#elif (ACC_SIZEOF___INT64 == 8) +# define acc_int64e_t __int64 +# define acc_uint64e_t unsigned __int64 +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64 +# if (ACC_CC_BORLANDC) +# define ACC_INT64_C(c) ((c) + 0i64) +# define ACC_UINT64_C(c) ((c) + 0ui64) +# else +# define ACC_INT64_C(c) (c##i64) +# define ACC_UINT64_C(c) (c##ui64) +# endif +#else +#endif +#endif +#if defined(acc_int64e_t) +# define ACC_SIZEOF_ACC_INT64E_T 8 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T) +#endif +#if !defined(acc_int32l_t) +#if defined(acc_int32e_t) +# define acc_int32l_t acc_int32e_t +# define acc_uint32l_t acc_uint32e_t +# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T +# define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T +#elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) +# define acc_int32l_t int +# define acc_uint32l_t unsigned int +# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT +#elif (ACC_SIZEOF_LONG >= 4) +# define acc_int32l_t long int +# define acc_uint32l_t unsigned long int +# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG +#else +# error "acc_int32l_t" +#endif +#endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T) +#endif +#if !defined(acc_int64l_t) +#if defined(acc_int64e_t) +# define acc_int64l_t acc_int64e_t +# define acc_uint64l_t acc_uint64e_t +# define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T +# define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T +#else +#endif +#endif +#if defined(acc_int64l_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T) +#endif +#if !defined(acc_int32f_t) +#if (ACC_SIZEOF_SIZE_T >= 8) +# define acc_int32f_t acc_int64l_t +# define acc_uint32f_t acc_uint64l_t +# define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T +#else +# define acc_int32f_t acc_int32l_t +# define acc_uint32f_t acc_uint32l_t +# define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T +# define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T +#endif +#endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T) +#endif +#if !defined(acc_int64f_t) +#if defined(acc_int64l_t) +# define acc_int64f_t acc_int64l_t +# define acc_uint64f_t acc_uint64l_t +# define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T +#else +#endif +#endif +#if defined(acc_int64f_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T) +#endif +#if !defined(acc_intptr_t) +#if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16)) +# define __ACC_INTPTR_T_IS_POINTER 1 +# if !(ACC_LANG_ASSEMBLER) + typedef char * acc_intptr_t; + typedef char * acc_uintptr_t; +# endif +# define acc_intptr_t acc_intptr_t +# define acc_uintptr_t acc_uintptr_t +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P +#elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4)) +# if !(ACC_LANG_ASSEMBLER) + typedef __w64 int acc_intptr_t; + typedef __w64 unsigned int acc_uintptr_t; +# endif +# define acc_intptr_t acc_intptr_t +# define acc_uintptr_t acc_uintptr_t +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P) +# define acc_intptr_t short +# define acc_uintptr_t unsigned short +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT +#elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) +# define acc_intptr_t int +# define acc_uintptr_t unsigned int +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P) +# define acc_intptr_t long +# define acc_uintptr_t unsigned long +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P) +# define acc_intptr_t acc_int64l_t +# define acc_uintptr_t acc_uint64l_t +# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T +#else +# error "acc_intptr_t" +#endif +#endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *)) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t)) +#endif +#if !defined(acc_word_t) +#if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0) +#if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER) +# define acc_word_t acc_uintptr_t +# define acc_sword_t acc_intptr_t +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T +#elif (ACC_WORDSIZE == ACC_SIZEOF_LONG) +# define acc_word_t unsigned long +# define acc_sword_t long +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG +#elif (ACC_WORDSIZE == ACC_SIZEOF_INT) +# define acc_word_t unsigned int +# define acc_sword_t int +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT +#elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT) +# define acc_word_t unsigned short +# define acc_sword_t short +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT +#elif (ACC_WORDSIZE == 1) +# define acc_word_t unsigned char +# define acc_sword_t signed char +# define ACC_SIZEOF_ACC_WORD_T 1 +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR +#elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T) +# define acc_word_t acc_uint64l_t +# define acc_sword_t acc_int64l_t +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T +#elif (ACC_ARCH_SPU) && (ACC_CC_GNUC) +#if 0 +# if !(ACC_LANG_ASSEMBLER) + typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__))); + typedef int acc_sword_t __attribute__((__mode__(__V16QI__))); +# endif +# define acc_word_t acc_word_t +# define acc_sword_t acc_sword_t +# define ACC_SIZEOF_ACC_WORD_T 16 +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI +#endif +#else +# error "acc_word_t" +#endif +#endif +#endif +#if 1 && defined(acc_word_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE) +#endif +#if 1 +#define acc_int8_t signed char +#define acc_uint8_t unsigned char +#define ACC_SIZEOF_ACC_INT8_T 1 +#define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t)) +#endif +#if defined(acc_int16e_t) +#define acc_int16_t acc_int16e_t +#define acc_uint16_t acc_uint16e_t +#define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T +#define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t)) +#endif +#if defined(acc_int32e_t) +#define acc_int32_t acc_int32e_t +#define acc_uint32_t acc_uint32e_t +#define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T +#define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t)) +#endif +#if defined(acc_int64e_t) +#define acc_int64_t acc_int64e_t +#define acc_uint64_t acc_uint64e_t +#define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T +#define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t)) +#endif +#if 1 +#define acc_int_least32_t acc_int32l_t +#define acc_uint_least32_t acc_uint32l_t +#define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T +#define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t)) +#endif +#if defined(acc_int64l_t) +#define acc_int_least64_t acc_int64l_t +#define acc_uint_least64_t acc_uint64l_t +#define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T +#define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t)) +#endif +#if 1 +#define acc_int_fast32_t acc_int32f_t +#define acc_uint_fast32_t acc_uint32f_t +#define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T +#define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t)) +#endif +#if defined(acc_int64f_t) +#define acc_int_fast64_t acc_int64f_t +#define acc_uint_fast64_t acc_uint64f_t +#define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T +#define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t)) +#endif +#if !defined(ACC_INT16_C) +# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2) +# define ACC_INT16_C(c) ((c) + 0) +# define ACC_UINT16_C(c) ((c) + 0U) +# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2) +# define ACC_INT16_C(c) ((c) + 0L) +# define ACC_UINT16_C(c) ((c) + 0UL) +# elif (ACC_SIZEOF_INT >= 2) +# define ACC_INT16_C(c) (c) +# define ACC_UINT16_C(c) (c##U) +# elif (ACC_SIZEOF_LONG >= 2) +# define ACC_INT16_C(c) (c##L) +# define ACC_UINT16_C(c) (c##UL) +# else +# error "ACC_INT16_C" +# endif +#endif +#if !defined(ACC_INT32_C) +# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4) +# define ACC_INT32_C(c) ((c) + 0) +# define ACC_UINT32_C(c) ((c) + 0U) +# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4) +# define ACC_INT32_C(c) ((c) + 0L) +# define ACC_UINT32_C(c) ((c) + 0UL) +# elif (ACC_SIZEOF_INT >= 4) +# define ACC_INT32_C(c) (c) +# define ACC_UINT32_C(c) (c##U) +# elif (ACC_SIZEOF_LONG >= 4) +# define ACC_INT32_C(c) (c##L) +# define ACC_UINT32_C(c) (c##UL) +# elif (ACC_SIZEOF_LONG_LONG >= 4) +# define ACC_INT32_C(c) (c##LL) +# define ACC_UINT32_C(c) (c##ULL) +# else +# error "ACC_INT32_C" +# endif +#endif +#if !defined(ACC_INT64_C) && defined(acc_int64l_t) +# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8) +# define ACC_INT64_C(c) ((c) + 0) +# define ACC_UINT64_C(c) ((c) + 0U) +# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8) +# define ACC_INT64_C(c) ((c) + 0L) +# define ACC_UINT64_C(c) ((c) + 0UL) +# elif (ACC_SIZEOF_INT >= 8) +# define ACC_INT64_C(c) (c) +# define ACC_UINT64_C(c) (c##U) +# elif (ACC_SIZEOF_LONG >= 8) +# define ACC_INT64_C(c) (c##L) +# define ACC_UINT64_C(c) (c##UL) +# else +# error "ACC_INT64_C" +# endif +#endif +#endif #if (ACC_CFG_NO_CONFIG_HEADER) #elif defined(ACC_CFG_CONFIG_HEADER) #else @@ -1964,12 +3383,12 @@ extern "C" { #if (ACC_OS_POSIX) # if (ACC_OS_POSIX_AIX) # define HAVE_SYS_RESOURCE_H 1 -# elif (ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_MACOSX || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD) +# elif (ACC_OS_POSIX_DARWIN || ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD) # define HAVE_STRINGS_H 1 # undef HAVE_MALLOC_H # elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX) # define HAVE_ALLOCA_H 1 -# elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL) +# elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL) # undef HAVE_SYS_TIME_H # undef HAVE_SYS_TYPES_H # elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS) @@ -2047,7 +3466,7 @@ extern "C" { # undef HAVE_UTIME_H # undef HAVE_SYS_TIME_H # define HAVE_SYS_UTIME_H 1 -#elif (ACC_CC_INTELC || ACC_CC_MSC) +#elif (ACC_CC_CLANG_C2 || ACC_CC_CLANG_MSC || ACC_CC_GHS || ACC_CC_INTELC_MSC || ACC_CC_MSC) # undef HAVE_DIRENT_H # undef HAVE_UNISTD_H # undef HAVE_UTIME_H @@ -2245,7 +3664,7 @@ extern "C" { #if (ACC_OS_POSIX) # if (ACC_OS_POSIX_AIX) # define HAVE_GETRUSAGE 1 -# elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL) +# elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL) # undef HAVE_CHOWN # undef HAVE_LSTAT # elif (ACC_OS_POSIX_UNICOS) @@ -2330,10 +3749,18 @@ extern "C" { #elif (ACC_OS_DOS32 && ACC_CC_HIGHC) # undef HAVE_SNPRINTF # undef HAVE_VSNPRINTF +#elif (ACC_CC_GHS) +# undef HAVE_ALLOCA +# ifndef snprintf +# define snprintf _snprintf +# endif +# ifndef vsnprintf +# define vsnprintf _vsnprintf +# endif #elif (ACC_CC_IBMC) # undef HAVE_SNPRINTF # undef HAVE_VSNPRINTF -#elif (ACC_CC_INTELC) +#elif (ACC_CC_CLANG_MSC || ACC_CC_INTELC_MSC) # ifndef snprintf # define snprintf _snprintf # endif @@ -2342,7 +3769,7 @@ extern "C" { # endif #elif (ACC_CC_LCCWIN32) # define utime _utime -#elif (ACC_CC_MSC) +#elif (ACC_CC_CLANG_C2 || ACC_CC_MSC) # if (_MSC_VER < 600) # undef HAVE_STRFTIME # endif @@ -2356,7 +3783,7 @@ extern "C" { # ifndef vsnprintf # define vsnprintf _vsnprintf # endif -# else +# elif (_MSC_VER < 1900) # ifndef snprintf # define snprintf _snprintf # endif @@ -2477,6 +3904,7 @@ extern "C" { # undef HAVE_ACCESS # undef HAVE_CHMOD # undef HAVE_CHOWN +# undef HAVE_FILENO # undef HAVE_FSTAT # undef HAVE_GETTIMEOFDAY # undef HAVE_LSTAT @@ -2528,323 +3956,29 @@ extern "C" { # define RETSIGTYPE void #endif #endif -#if (ACC_CFG_NO_ACC_TYPE_H) -#else -#if (ACC_SIZEOF_LONG_LONG+0 > 0) -__acc_gnuc_extension__ typedef long long acc_llong_t; -__acc_gnuc_extension__ typedef unsigned long long acc_ullong_t; -#endif -#if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0)) -# error "missing defines for sizes" -#endif -#if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0)) -# error "missing defines for sizes" -#endif -#if !defined(acc_int16e_t) -#if (ACC_SIZEOF_LONG == 2) -# define acc_int16e_t long -# define acc_uint16e_t unsigned long -#elif (ACC_SIZEOF_INT == 2) -# define acc_int16e_t int -# define acc_uint16e_t unsigned int -#elif (ACC_SIZEOF_SHORT == 2) -# define acc_int16e_t short int -# define acc_uint16e_t unsigned short int -#elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) - typedef int __acc_int16e_hi_t __attribute__((__mode__(__HI__))); - typedef unsigned int __acc_uint16e_hi_t __attribute__((__mode__(__HI__))); -# define acc_int16e_t __acc_int16e_hi_t -# define acc_uint16e_t __acc_uint16e_hi_t -#elif (ACC_SIZEOF___INT16 == 2) -# define acc_int16e_t __int16 -# define acc_uint16e_t unsigned __int16 -#else -#endif -#endif -#if defined(acc_int16e_t) -# define ACC_SIZEOF_ACC_INT16E_T 2 -#endif -#if !defined(acc_int32e_t) -#if (ACC_SIZEOF_LONG == 4) -# define acc_int32e_t long int -# define acc_uint32e_t unsigned long int -#elif (ACC_SIZEOF_INT == 4) -# define acc_int32e_t int -# define acc_uint32e_t unsigned int -#elif (ACC_SIZEOF_SHORT == 4) -# define acc_int32e_t short int -# define acc_uint32e_t unsigned short int -#elif (ACC_SIZEOF_LONG_LONG == 4) -# define acc_int32e_t acc_llong_t -# define acc_uint32e_t acc_ullong_t -#elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) - typedef int __acc_int32e_si_t __attribute__((__mode__(__SI__))); - typedef unsigned int __acc_uint32e_si_t __attribute__((__mode__(__SI__))); -# define acc_int32e_t __acc_int32e_si_t -# define acc_uint32e_t __acc_uint32e_si_t -#elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) - typedef int __acc_int32e_si_t __attribute__((__mode__(__SI__))); - typedef unsigned int __acc_uint32e_si_t __attribute__((__mode__(__SI__))); -# define acc_int32e_t __acc_int32e_si_t -# define acc_uint32e_t __acc_uint32e_si_t -# define ACC_INT32_C(c) c##LL -# define ACC_UINT32_C(c) c##ULL -#elif (ACC_SIZEOF___INT32 == 4) -# define acc_int32e_t __int32 -# define acc_uint32e_t unsigned __int32 -#else -#endif -#endif -#if defined(acc_int32e_t) -# define ACC_SIZEOF_ACC_INT32E_T 4 -#endif -#if !defined(acc_int64e_t) -#if (ACC_SIZEOF___INT64 == 8) -# if (ACC_CC_BORLANDC) && !(ACC_CFG_TYPE_PREFER___INT64) -# define ACC_CFG_TYPE_PREFER___INT64 1 -# endif -#endif -#if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_int64e_t int -# define acc_uint64e_t unsigned int -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_INT -#elif (ACC_SIZEOF_LONG == 8) -# define acc_int64e_t long int -# define acc_uint64e_t unsigned long int -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG -#elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_TYPE_PREFER___INT64) -# define acc_int64e_t acc_llong_t -# define acc_uint64e_t acc_ullong_t -# if (ACC_CC_BORLANDC) -# define ACC_INT64_C(c) ((c) + 0ll) -# define ACC_UINT64_C(c) ((c) + 0ull) -# else -# define ACC_INT64_C(c) c##LL -# define ACC_UINT64_C(c) c##ULL -# endif -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG_LONG -#elif (ACC_SIZEOF___INT64 == 8) -# define acc_int64e_t __int64 -# define acc_uint64e_t unsigned __int64 -# if (ACC_CC_BORLANDC) -# define ACC_INT64_C(c) ((c) + 0i64) -# define ACC_UINT64_C(c) ((c) + 0ui64) -# else -# define ACC_INT64_C(c) c##i64 -# define ACC_UINT64_C(c) c##ui64 -# endif -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64 -#else -#endif -#endif -#if !defined(acc_int32l_t) -#if defined(acc_int32e_t) -# define acc_int32l_t acc_int32e_t -# define acc_uint32l_t acc_uint32e_t -# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T -#elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_int32l_t int -# define acc_uint32l_t unsigned int -# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT -#elif (ACC_SIZEOF_LONG >= 4) -# define acc_int32l_t long int -# define acc_uint32l_t unsigned long int -# define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG -#else -# error "acc_int32l_t" -#endif -#endif -#if !defined(acc_int64l_t) -#if defined(acc_int64e_t) -# define acc_int64l_t acc_int64e_t -# define acc_uint64l_t acc_uint64e_t -# define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T -#else -#endif -#endif -#if !defined(acc_int32f_t) -#if (ACC_SIZEOF_SIZE_T >= 8) -# define acc_int32f_t acc_int64l_t -# define acc_uint32f_t acc_uint64l_t -# define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T -#else -# define acc_int32f_t acc_int32l_t -# define acc_uint32f_t acc_uint32l_t -# define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T -#endif -#endif -#if !defined(acc_intptr_t) -#if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16)) -# define __ACC_INTPTR_T_IS_POINTER 1 - typedef char* acc_intptr_t; - typedef char* acc_uintptr_t; -# define acc_intptr_t acc_intptr_t -# define acc_uintptr_t acc_uintptr_t -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P -#elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4)) - typedef __w64 int acc_intptr_t; - typedef __w64 unsigned int acc_uintptr_t; -# define acc_intptr_t acc_intptr_t -# define acc_uintptr_t acc_uintptr_t -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT -#elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P) -# define acc_intptr_t short -# define acc_uintptr_t unsigned short -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT -#elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_intptr_t int -# define acc_uintptr_t unsigned int -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT -#elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P) -# define acc_intptr_t long -# define acc_uintptr_t unsigned long -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG -#elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P) -# define acc_intptr_t acc_int64l_t -# define acc_uintptr_t acc_uint64l_t -# define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T -#else -# error "acc_intptr_t" -#endif -#endif -#if !defined(acc_word_t) -#if defined(ACC_WORDSIZE) && (ACC_WORDSIZE > 0) -#if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !defined(__ACC_INTPTR_T_IS_POINTER) -# define acc_word_t acc_uintptr_t -# define acc_sword_t acc_intptr_t -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T -#elif (ACC_WORDSIZE == ACC_SIZEOF_LONG) -# define acc_word_t unsigned long -# define acc_sword_t long -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG -#elif (ACC_WORDSIZE == ACC_SIZEOF_INT) -# define acc_word_t unsigned int -# define acc_sword_t int -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT -#elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT) -# define acc_word_t unsigned short -# define acc_sword_t short -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT -#elif (ACC_WORDSIZE == 1) -# define acc_word_t unsigned char -# define acc_sword_t signed char -# define ACC_SIZEOF_ACC_WORD_T 1 -#elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T) -# define acc_word_t acc_uint64l_t -# define acc_sword_t acc_int64l_t -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T -#elif (ACC_ARCH_SPU) && (ACC_CC_GNUC) -#if 0 - typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__))); - typedef int acc_sword_t __attribute__((__mode__(__V16QI__))); -# define acc_word_t acc_word_t -# define acc_sword_t acc_sword_t -# define ACC_SIZEOF_ACC_WORD_T 16 -#endif -#else -# error "acc_word_t" -#endif -#endif -#endif -#if !defined(ACC_INT16_C) -# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2) -# define ACC_INT16_C(c) ((c) + 0) -# define ACC_UINT16_C(c) ((c) + 0U) -# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2) -# define ACC_INT16_C(c) ((c) + 0L) -# define ACC_UINT16_C(c) ((c) + 0UL) -# elif (ACC_SIZEOF_INT >= 2) -# define ACC_INT16_C(c) c -# define ACC_UINT16_C(c) c##U -# elif (ACC_SIZEOF_LONG >= 2) -# define ACC_INT16_C(c) c##L -# define ACC_UINT16_C(c) c##UL -# else -# error "ACC_INT16_C" -# endif -#endif -#if !defined(ACC_INT32_C) -# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4) -# define ACC_INT32_C(c) ((c) + 0) -# define ACC_UINT32_C(c) ((c) + 0U) -# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4) -# define ACC_INT32_C(c) ((c) + 0L) -# define ACC_UINT32_C(c) ((c) + 0UL) -# elif (ACC_SIZEOF_INT >= 4) -# define ACC_INT32_C(c) c -# define ACC_UINT32_C(c) c##U -# elif (ACC_SIZEOF_LONG >= 4) -# define ACC_INT32_C(c) c##L -# define ACC_UINT32_C(c) c##UL -# elif (ACC_SIZEOF_LONG_LONG >= 4) -# define ACC_INT32_C(c) c##LL -# define ACC_UINT32_C(c) c##ULL -# else -# error "ACC_INT32_C" -# endif -#endif -#if !defined(ACC_INT64_C) && defined(acc_int64l_t) -# if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8) -# define ACC_INT64_C(c) ((c) + 0) -# define ACC_UINT64_C(c) ((c) + 0U) -# elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8) -# define ACC_INT64_C(c) ((c) + 0L) -# define ACC_UINT64_C(c) ((c) + 0UL) -# elif (ACC_SIZEOF_INT >= 8) -# define ACC_INT64_C(c) c -# define ACC_UINT64_C(c) c##U -# elif (ACC_SIZEOF_LONG >= 8) -# define ACC_INT64_C(c) c##L -# define ACC_UINT64_C(c) c##UL -# else -# error "ACC_INT64_C" -# endif -#endif -#if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T) -# define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T -#endif -#if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T) -# define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T -#endif -#if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T) -# define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T -#endif -#if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T) -# define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T -#endif -#if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T) -# define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T -#endif -#if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T) -# define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T -#endif -#if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T) -# define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T -#endif -#if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T) -# define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T -#endif +#if !(ACC_LANG_ASSEMBLER) +#if !(ACC_CFG_SKIP_ACC_TYPES) #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4) -# define acc_signo_t acc_int32e_t +# define acc_signo_t acc_int32e_t #endif #if !defined(acc_signo_t) -# define acc_signo_t int +# define acc_signo_t int #endif #if defined(__cplusplus) extern "C" { #endif #if (ACC_BROKEN_CDECL_ALT_SYNTAX) typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t); -#elif defined(RETSIGTYPE) -typedef RETSIGTYPE (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #else typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #endif #if defined(__cplusplus) } #endif -# if (ACC_CFG_NO_ACC_UA_H) -# else +# if !(ACC_CFG_SKIP_ACC_UA) +#if !defined(__acc_ua_volatile) +# define __acc_ua_volatile volatile +#endif #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul)) #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus) #elif (ACC_CC_INTELC) && defined(_WIN32) @@ -2865,8 +3999,13 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #endif #endif #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t) +#if 0 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v)) +#else +#define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET16(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint16e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint16e_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p) # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v) @@ -2874,12 +4013,15 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p) # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v) #endif -#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline) -#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC) +#if (__acc_HAVE_forceinline) +#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC) #if !defined(ACC_UA_GET_LE16) -extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp); -extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) { - __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) { + __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp); unsigned long v; __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); return v; @@ -2887,9 +4029,12 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p) #endif #if !defined(ACC_UA_SET_LE16) -extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v); -extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) { - __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) { + __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp); __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v)); } #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v) @@ -2901,8 +4046,13 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi #endif #endif #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t) +#if 0 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v)) +#else +#define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET32(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint32e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint32e_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p) # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v) @@ -2910,12 +4060,15 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p) # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v) #endif -#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline) -#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC) +#if (__acc_HAVE_forceinline) +#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC) #if !defined(ACC_UA_GET_LE32) -extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp); -extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) { - __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) { + __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp); unsigned long v; __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); return v; @@ -2923,9 +4076,12 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p) #endif #if !defined(ACC_UA_SET_LE32) -extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v); -extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) { - __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) { + __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp); __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v)); } #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v) @@ -2937,8 +4093,13 @@ extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsi #endif #endif #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t) +#if 0 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v)) +#else +#define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET64(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint64l_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint64l_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p) # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v) @@ -2953,325 +4114,490 @@ extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsi # endif #endif #endif +#endif #if defined(ACC_WANT_ACC_TYPE_H) # undef ACC_WANT_ACC_TYPE_H -# if defined(ACC_CFG_NO_ACC_TYPE_H) -# error "ACC_WANT_ACC_TYPE_H with ACC_CFG_NO_ACC_TYPE_H" +# if (ACC_CFG_SKIP_ACC_TYPES) +# error "ACC_WANT_ACC_TYPE_H with ACC_CFG_SKIP_ACC_TYPES" # endif -#if (ACC_SIZEOF_LONG_LONG+0 > 0) -__acc_gnuc_extension__ typedef long long acc_llong_t; -__acc_gnuc_extension__ typedef unsigned long long acc_ullong_t; -#endif #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0)) # error "missing defines for sizes" #endif #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0)) # error "missing defines for sizes" #endif +#define ACC_TYPEOF_CHAR 1u +#define ACC_TYPEOF_SHORT 2u +#define ACC_TYPEOF_INT 3u +#define ACC_TYPEOF_LONG 4u +#define ACC_TYPEOF_LONG_LONG 5u +#define ACC_TYPEOF___INT8 17u +#define ACC_TYPEOF___INT16 18u +#define ACC_TYPEOF___INT32 19u +#define ACC_TYPEOF___INT64 20u +#define ACC_TYPEOF___INT128 21u +#define ACC_TYPEOF___INT256 22u +#define ACC_TYPEOF___MODE_QI 33u +#define ACC_TYPEOF___MODE_HI 34u +#define ACC_TYPEOF___MODE_SI 35u +#define ACC_TYPEOF___MODE_DI 36u +#define ACC_TYPEOF___MODE_TI 37u +#define ACC_TYPEOF_CHAR_P 129u +#if !defined(acc_llong_t) +#if (ACC_SIZEOF_LONG_LONG+0 > 0) +# if !(ACC_LANG_ASSEMBLER) + __acc_gnuc_extension__ typedef long long acc_llong_t__; + __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__; +# endif +# define acc_llong_t acc_llong_t__ +# define acc_ullong_t acc_ullong_t__ +#endif +#endif #if !defined(acc_int16e_t) -#if (ACC_SIZEOF_LONG == 2) -# define acc_int16e_t long -# define acc_uint16e_t unsigned long -#elif (ACC_SIZEOF_INT == 2) -# define acc_int16e_t int -# define acc_uint16e_t unsigned int +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T +#endif +#if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) +# define acc_int16e_t long +# define acc_uint16e_t unsigned long +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) +# define acc_int16e_t int +# define acc_uint16e_t unsigned int +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT #elif (ACC_SIZEOF_SHORT == 2) -# define acc_int16e_t short int -# define acc_uint16e_t unsigned short int +# define acc_int16e_t short int +# define acc_uint16e_t unsigned short int +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT #elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) - typedef int __acc_int16e_hi_t __attribute__((__mode__(__HI__))); - typedef unsigned int __acc_uint16e_hi_t __attribute__((__mode__(__HI__))); -# define acc_int16e_t __acc_int16e_hi_t -# define acc_uint16e_t __acc_uint16e_hi_t +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__))); + typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__))); +# endif +# define acc_int16e_t acc_int16e_hi_t__ +# define acc_uint16e_t acc_uint16e_hi_t__ +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI #elif (ACC_SIZEOF___INT16 == 2) -# define acc_int16e_t __int16 -# define acc_uint16e_t unsigned __int16 +# define acc_int16e_t __int16 +# define acc_uint16e_t unsigned __int16 +# define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16 #else #endif #endif #if defined(acc_int16e_t) # define ACC_SIZEOF_ACC_INT16E_T 2 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T) #endif #if !defined(acc_int32e_t) -#if (ACC_SIZEOF_LONG == 4) -# define acc_int32e_t long int -# define acc_uint32e_t unsigned long int +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T +#endif +#if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) +# define acc_int32e_t long int +# define acc_uint32e_t unsigned long int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG #elif (ACC_SIZEOF_INT == 4) -# define acc_int32e_t int -# define acc_uint32e_t unsigned int +# define acc_int32e_t int +# define acc_uint32e_t unsigned int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT #elif (ACC_SIZEOF_SHORT == 4) -# define acc_int32e_t short int -# define acc_uint32e_t unsigned short int +# define acc_int32e_t short int +# define acc_uint32e_t unsigned short int +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT #elif (ACC_SIZEOF_LONG_LONG == 4) -# define acc_int32e_t acc_llong_t -# define acc_uint32e_t acc_ullong_t +# define acc_int32e_t acc_llong_t +# define acc_uint32e_t acc_ullong_t +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L) - typedef int __acc_int32e_si_t __attribute__((__mode__(__SI__))); - typedef unsigned int __acc_uint32e_si_t __attribute__((__mode__(__SI__))); -# define acc_int32e_t __acc_int32e_si_t -# define acc_uint32e_t __acc_uint32e_si_t +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__))); + typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__))); +# endif +# define acc_int32e_t acc_int32e_si_t__ +# define acc_uint32e_t acc_uint32e_si_t__ +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L) - typedef int __acc_int32e_si_t __attribute__((__mode__(__SI__))); - typedef unsigned int __acc_uint32e_si_t __attribute__((__mode__(__SI__))); -# define acc_int32e_t __acc_int32e_si_t -# define acc_uint32e_t __acc_uint32e_si_t -# define ACC_INT32_C(c) c##LL -# define ACC_UINT32_C(c) c##ULL +# if !(ACC_LANG_ASSEMBLER) + typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__))); + typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__))); +# endif +# define acc_int32e_t acc_int32e_si_t__ +# define acc_uint32e_t acc_uint32e_si_t__ +# define ACC_INT32_C(c) (c##LL) +# define ACC_UINT32_C(c) (c##ULL) +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI #elif (ACC_SIZEOF___INT32 == 4) -# define acc_int32e_t __int32 -# define acc_uint32e_t unsigned __int32 +# define acc_int32e_t __int32 +# define acc_uint32e_t unsigned __int32 +# define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32 #else #endif #endif #if defined(acc_int32e_t) # define ACC_SIZEOF_ACC_INT32E_T 4 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T) #endif #if !defined(acc_int64e_t) #if (ACC_SIZEOF___INT64 == 8) -# if (ACC_CC_BORLANDC) && !(ACC_CFG_TYPE_PREFER___INT64) -# define ACC_CFG_TYPE_PREFER___INT64 1 +# if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T) +# define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64 # endif #endif +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T +#endif +#if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8) +# undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T +#endif #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_int64e_t int -# define acc_uint64e_t unsigned int -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_INT -#elif (ACC_SIZEOF_LONG == 8) -# define acc_int64e_t long int -# define acc_uint64e_t unsigned long int -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG -#elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_TYPE_PREFER___INT64) -# define acc_int64e_t acc_llong_t -# define acc_uint64e_t acc_ullong_t +# define acc_int64e_t int +# define acc_uint64e_t unsigned int +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT +#elif (ACC_SIZEOF_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) +# define acc_int64e_t long int +# define acc_uint64e_t unsigned long int +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG +#elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) +# define acc_int64e_t acc_llong_t +# define acc_uint64e_t acc_ullong_t +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG # if (ACC_CC_BORLANDC) -# define ACC_INT64_C(c) ((c) + 0ll) -# define ACC_UINT64_C(c) ((c) + 0ull) +# define ACC_INT64_C(c) ((c) + 0ll) +# define ACC_UINT64_C(c) ((c) + 0ull) +# elif 0 +# define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL)) +# define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL)) # else -# define ACC_INT64_C(c) c##LL -# define ACC_UINT64_C(c) c##ULL +# define ACC_INT64_C(c) (c##LL) +# define ACC_UINT64_C(c) (c##ULL) # endif -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG_LONG #elif (ACC_SIZEOF___INT64 == 8) -# define acc_int64e_t __int64 -# define acc_uint64e_t unsigned __int64 +# define acc_int64e_t __int64 +# define acc_uint64e_t unsigned __int64 +# define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64 # if (ACC_CC_BORLANDC) -# define ACC_INT64_C(c) ((c) + 0i64) -# define ACC_UINT64_C(c) ((c) + 0ui64) +# define ACC_INT64_C(c) ((c) + 0i64) +# define ACC_UINT64_C(c) ((c) + 0ui64) # else -# define ACC_INT64_C(c) c##i64 -# define ACC_UINT64_C(c) c##ui64 +# define ACC_INT64_C(c) (c##i64) +# define ACC_UINT64_C(c) (c##ui64) # endif -# define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64 #else #endif #endif +#if defined(acc_int64e_t) +# define ACC_SIZEOF_ACC_INT64E_T 8 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T) +#endif #if !defined(acc_int32l_t) #if defined(acc_int32e_t) -# define acc_int32l_t acc_int32e_t -# define acc_uint32l_t acc_uint32e_t +# define acc_int32l_t acc_int32e_t +# define acc_uint32l_t acc_uint32e_t # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T +# define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_int32l_t int -# define acc_uint32l_t unsigned int +# define acc_int32l_t int +# define acc_uint32l_t unsigned int # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT #elif (ACC_SIZEOF_LONG >= 4) -# define acc_int32l_t long int -# define acc_uint32l_t unsigned long int +# define acc_int32l_t long int +# define acc_uint32l_t unsigned long int # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG #else # error "acc_int32l_t" #endif #endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T) +#endif #if !defined(acc_int64l_t) #if defined(acc_int64e_t) -# define acc_int64l_t acc_int64e_t -# define acc_uint64l_t acc_uint64e_t +# define acc_int64l_t acc_int64e_t +# define acc_uint64l_t acc_uint64e_t # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T +# define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T #else #endif #endif +#if defined(acc_int64l_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T) +#endif #if !defined(acc_int32f_t) #if (ACC_SIZEOF_SIZE_T >= 8) -# define acc_int32f_t acc_int64l_t -# define acc_uint32f_t acc_uint64l_t +# define acc_int32f_t acc_int64l_t +# define acc_uint32f_t acc_uint64l_t # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T #else -# define acc_int32f_t acc_int32l_t -# define acc_uint32f_t acc_uint32l_t +# define acc_int32f_t acc_int32l_t +# define acc_uint32f_t acc_uint32l_t # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T +# define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T #endif #endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T) +#endif +#if !defined(acc_int64f_t) +#if defined(acc_int64l_t) +# define acc_int64f_t acc_int64l_t +# define acc_uint64f_t acc_uint64l_t +# define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T +#else +#endif +#endif +#if defined(acc_int64f_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T) +#endif #if !defined(acc_intptr_t) #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16)) # define __ACC_INTPTR_T_IS_POINTER 1 - typedef char* acc_intptr_t; - typedef char* acc_uintptr_t; -# define acc_intptr_t acc_intptr_t -# define acc_uintptr_t acc_uintptr_t +# if !(ACC_LANG_ASSEMBLER) + typedef char * acc_intptr_t; + typedef char * acc_uintptr_t; +# endif +# define acc_intptr_t acc_intptr_t +# define acc_uintptr_t acc_uintptr_t # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4)) - typedef __w64 int acc_intptr_t; - typedef __w64 unsigned int acc_uintptr_t; -# define acc_intptr_t acc_intptr_t -# define acc_uintptr_t acc_uintptr_t +# if !(ACC_LANG_ASSEMBLER) + typedef __w64 int acc_intptr_t; + typedef __w64 unsigned int acc_uintptr_t; +# endif +# define acc_intptr_t acc_intptr_t +# define acc_uintptr_t acc_uintptr_t # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P) -# define acc_intptr_t short -# define acc_uintptr_t unsigned short +# define acc_intptr_t short +# define acc_uintptr_t unsigned short # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG) -# define acc_intptr_t int -# define acc_uintptr_t unsigned int +# define acc_intptr_t int +# define acc_uintptr_t unsigned int # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P) -# define acc_intptr_t long -# define acc_uintptr_t unsigned long +# define acc_intptr_t long +# define acc_uintptr_t unsigned long # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P) -# define acc_intptr_t acc_int64l_t -# define acc_uintptr_t acc_uint64l_t +# define acc_intptr_t acc_int64l_t +# define acc_uintptr_t acc_uint64l_t # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T #else # error "acc_intptr_t" #endif #endif +#if 1 + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *)) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t)) +#endif #if !defined(acc_word_t) -#if defined(ACC_WORDSIZE) && (ACC_WORDSIZE > 0) -#if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !defined(__ACC_INTPTR_T_IS_POINTER) -# define acc_word_t acc_uintptr_t -# define acc_sword_t acc_intptr_t -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T +#if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0) +#if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER) +# define acc_word_t acc_uintptr_t +# define acc_sword_t acc_intptr_t +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG) -# define acc_word_t unsigned long -# define acc_sword_t long -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG +# define acc_word_t unsigned long +# define acc_sword_t long +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG #elif (ACC_WORDSIZE == ACC_SIZEOF_INT) -# define acc_word_t unsigned int -# define acc_sword_t int -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT +# define acc_word_t unsigned int +# define acc_sword_t int +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT) -# define acc_word_t unsigned short -# define acc_sword_t short -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT +# define acc_word_t unsigned short +# define acc_sword_t short +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT #elif (ACC_WORDSIZE == 1) -# define acc_word_t unsigned char -# define acc_sword_t signed char -# define ACC_SIZEOF_ACC_WORD_T 1 +# define acc_word_t unsigned char +# define acc_sword_t signed char +# define ACC_SIZEOF_ACC_WORD_T 1 +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T) -# define acc_word_t acc_uint64l_t -# define acc_sword_t acc_int64l_t -# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T +# define acc_word_t acc_uint64l_t +# define acc_sword_t acc_int64l_t +# define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T +# define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC) #if 0 +# if !(ACC_LANG_ASSEMBLER) typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__))); typedef int acc_sword_t __attribute__((__mode__(__V16QI__))); -# define acc_word_t acc_word_t -# define acc_sword_t acc_sword_t -# define ACC_SIZEOF_ACC_WORD_T 16 +# endif +# define acc_word_t acc_word_t +# define acc_sword_t acc_sword_t +# define ACC_SIZEOF_ACC_WORD_T 16 +# define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI #endif #else # error "acc_word_t" #endif #endif #endif +#if 1 && defined(acc_word_t) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE) + ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE) +#endif +#if 1 +#define acc_int8_t signed char +#define acc_uint8_t unsigned char +#define ACC_SIZEOF_ACC_INT8_T 1 +#define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t)) +#endif +#if defined(acc_int16e_t) +#define acc_int16_t acc_int16e_t +#define acc_uint16_t acc_uint16e_t +#define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T +#define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t)) +#endif +#if defined(acc_int32e_t) +#define acc_int32_t acc_int32e_t +#define acc_uint32_t acc_uint32e_t +#define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T +#define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t)) +#endif +#if defined(acc_int64e_t) +#define acc_int64_t acc_int64e_t +#define acc_uint64_t acc_uint64e_t +#define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T +#define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t)) +#endif +#if 1 +#define acc_int_least32_t acc_int32l_t +#define acc_uint_least32_t acc_uint32l_t +#define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T +#define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t)) +#endif +#if defined(acc_int64l_t) +#define acc_int_least64_t acc_int64l_t +#define acc_uint_least64_t acc_uint64l_t +#define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T +#define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t)) +#endif +#if 1 +#define acc_int_fast32_t acc_int32f_t +#define acc_uint_fast32_t acc_uint32f_t +#define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T +#define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t)) +#endif +#if defined(acc_int64f_t) +#define acc_int_fast64_t acc_int64f_t +#define acc_uint_fast64_t acc_uint64f_t +#define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T +#define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8) +ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t)) +#endif #if !defined(ACC_INT16_C) # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2) -# define ACC_INT16_C(c) ((c) + 0) -# define ACC_UINT16_C(c) ((c) + 0U) +# define ACC_INT16_C(c) ((c) + 0) +# define ACC_UINT16_C(c) ((c) + 0U) # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2) -# define ACC_INT16_C(c) ((c) + 0L) -# define ACC_UINT16_C(c) ((c) + 0UL) +# define ACC_INT16_C(c) ((c) + 0L) +# define ACC_UINT16_C(c) ((c) + 0UL) # elif (ACC_SIZEOF_INT >= 2) -# define ACC_INT16_C(c) c -# define ACC_UINT16_C(c) c##U +# define ACC_INT16_C(c) (c) +# define ACC_UINT16_C(c) (c##U) # elif (ACC_SIZEOF_LONG >= 2) -# define ACC_INT16_C(c) c##L -# define ACC_UINT16_C(c) c##UL +# define ACC_INT16_C(c) (c##L) +# define ACC_UINT16_C(c) (c##UL) # else # error "ACC_INT16_C" # endif #endif #if !defined(ACC_INT32_C) # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4) -# define ACC_INT32_C(c) ((c) + 0) -# define ACC_UINT32_C(c) ((c) + 0U) +# define ACC_INT32_C(c) ((c) + 0) +# define ACC_UINT32_C(c) ((c) + 0U) # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4) -# define ACC_INT32_C(c) ((c) + 0L) -# define ACC_UINT32_C(c) ((c) + 0UL) +# define ACC_INT32_C(c) ((c) + 0L) +# define ACC_UINT32_C(c) ((c) + 0UL) # elif (ACC_SIZEOF_INT >= 4) -# define ACC_INT32_C(c) c -# define ACC_UINT32_C(c) c##U +# define ACC_INT32_C(c) (c) +# define ACC_UINT32_C(c) (c##U) # elif (ACC_SIZEOF_LONG >= 4) -# define ACC_INT32_C(c) c##L -# define ACC_UINT32_C(c) c##UL +# define ACC_INT32_C(c) (c##L) +# define ACC_UINT32_C(c) (c##UL) # elif (ACC_SIZEOF_LONG_LONG >= 4) -# define ACC_INT32_C(c) c##LL -# define ACC_UINT32_C(c) c##ULL +# define ACC_INT32_C(c) (c##LL) +# define ACC_UINT32_C(c) (c##ULL) # else # error "ACC_INT32_C" # endif #endif #if !defined(ACC_INT64_C) && defined(acc_int64l_t) # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8) -# define ACC_INT64_C(c) ((c) + 0) -# define ACC_UINT64_C(c) ((c) + 0U) +# define ACC_INT64_C(c) ((c) + 0) +# define ACC_UINT64_C(c) ((c) + 0U) # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8) -# define ACC_INT64_C(c) ((c) + 0L) -# define ACC_UINT64_C(c) ((c) + 0UL) +# define ACC_INT64_C(c) ((c) + 0L) +# define ACC_UINT64_C(c) ((c) + 0UL) # elif (ACC_SIZEOF_INT >= 8) -# define ACC_INT64_C(c) c -# define ACC_UINT64_C(c) c##U +# define ACC_INT64_C(c) (c) +# define ACC_UINT64_C(c) (c##U) # elif (ACC_SIZEOF_LONG >= 8) -# define ACC_INT64_C(c) c##L -# define ACC_UINT64_C(c) c##UL +# define ACC_INT64_C(c) (c##L) +# define ACC_UINT64_C(c) (c##UL) # else # error "ACC_INT64_C" # endif #endif -#if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T) -# define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T -#endif -#if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T) -# define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T -#endif -#if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T) -# define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T -#endif -#if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T) -# define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T -#endif -#if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T) -# define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T -#endif -#if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T) -# define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T -#endif -#if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T) -# define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T -#endif -#if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T) -# define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T -#endif #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4) -# define acc_signo_t acc_int32e_t +# define acc_signo_t acc_int32e_t #endif #if !defined(acc_signo_t) -# define acc_signo_t int +# define acc_signo_t int #endif #if defined(__cplusplus) extern "C" { #endif #if (ACC_BROKEN_CDECL_ALT_SYNTAX) typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t); -#elif defined(RETSIGTYPE) -typedef RETSIGTYPE (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #else typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #endif #if defined(__cplusplus) } #endif -# if !defined(ACC_CFG_NO_ACC_UA_H) +# if !(ACC_CFG_SKIP_ACC_UA) +#if !defined(__acc_ua_volatile) +# define __acc_ua_volatile volatile +#endif #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul)) #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus) #elif (ACC_CC_INTELC) && defined(_WIN32) @@ -3292,8 +4618,13 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); #endif #endif #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t) +#if 0 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v)) +#else +#define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET16(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint16e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint16e_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p) # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v) @@ -3301,12 +4632,15 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p) # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v) #endif -#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline) -#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC) +#if (__acc_HAVE_forceinline) +#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC) #if !defined(ACC_UA_GET_LE16) -extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp); -extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) { - __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) { + __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp); unsigned long v; __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); return v; @@ -3314,9 +4648,12 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p) #endif #if !defined(ACC_UA_SET_LE16) -extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v); -extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) { - __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) { + __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp); __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v)); } #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v) @@ -3328,8 +4665,13 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi #endif #endif #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t) +#if 0 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v)) +#else +#define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET32(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint32e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint32e_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p) # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v) @@ -3337,12 +4679,15 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p) # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v) #endif -#if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline) -#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC) +#if (__acc_HAVE_forceinline) +#if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC) #if !defined(ACC_UA_GET_LE32) -extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp); -extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) { - __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) { + __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp); unsigned long v; __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); return v; @@ -3350,9 +4695,12 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p) #endif #if !defined(ACC_UA_SET_LE32) -extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v); -extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) { - __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp; +__acc_static_forceinline +#if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM) +__attribute__((__unused__)) +#endif +void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) { + __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp); __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v)); } #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v) @@ -3364,8 +4712,13 @@ extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsi #endif #endif #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t) +#if 0 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p)) #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v)) +#else +#define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p)) +#define ACC_UA_SET64(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint64l_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint64l_t, v)) +#endif #if (ACC_ABI_BIG_ENDIAN) # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p) # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v) @@ -3432,58 +4785,56 @@ typedef unsigned short wchar_t; #endif #endif #elif (ACC_LIBC_FREESTANDING) -# if HAVE_STDDEF_H +# if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0) # include <stddef.h> # endif -# if HAVE_STDINT_H +# if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) # include <stdint.h> # endif #elif (ACC_LIBC_MOSTLY_FREESTANDING) -# if HAVE_STDIO_H +# if defined(HAVE_STDIO_H) && (HAVE_STDIO_H+0) # include <stdio.h> # endif -# if HAVE_STDDEF_H +# if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0) # include <stddef.h> # endif -# if HAVE_STDINT_H +# if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) # include <stdint.h> # endif #else #include <stdio.h> -#if (HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus) +#if defined(HAVE_TIME_H) && (HAVE_TIME_H+0) && defined(__MSL__) && defined(__cplusplus) # include <time.h> #endif -#if HAVE_SYS_TYPES_H +#if defined(HAVE_SYS_TYPES_H) && (HAVE_SYS_TYPES_H+0) # include <sys/types.h> #endif -#if HAVE_SYS_STAT_H +#if defined(HAVE_SYS_STAT_H) && (HAVE_SYS_STAT_H+0) # include <sys/stat.h> #endif -#if STDC_HEADERS +#if defined(STDC_HEADERS) && (STDC_HEADERS+0) +# include <stdlib.h> +#elif defined(HAVE_STDLIB_H) && (HAVE_STDLIB_H+0) # include <stdlib.h> -# include <stddef.h> -#else -# if HAVE_STDLIB_H -# include <stdlib.h> -# endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#include <stddef.h> +#if defined(HAVE_STRING_H) && (HAVE_STRING_H+0) +# if defined(STDC_HEADERS) && (STDC_HEADERS+0) +# elif defined(HAVE_MEMORY_H) && (HAVE_MEMORY_H+0) # include <memory.h> # endif # include <string.h> #endif -#if HAVE_STRINGS_H +#if defined(HAVE_STRINGS_H) && (HAVE_STRINGS_H+0) # include <strings.h> #endif -#if HAVE_INTTYPES_H +#if defined(HAVE_INTTYPES_H) && (HAVE_INTTYPES_H+0) # include <inttypes.h> -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif #endif -#if HAVE_UNISTD_H +#if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0) +# include <stdint.h> +#endif +#if defined(HAVE_UNISTD_H) && (HAVE_UNISTD_H+0) # include <unistd.h> #endif #endif @@ -3527,7 +4878,7 @@ typedef unsigned short wchar_t; #if (HAVE_SIGNAL_H) # include <signal.h> #endif -#if (TIME_WITH_SYS_TIME) +#if (HAVE_SYS_TIME_H && HAVE_TIME_H) # include <sys/time.h> # include <time.h> #elif (HAVE_TIME_H) @@ -3658,27 +5009,10 @@ typedef unsigned short wchar_t; # define ACCLIB_EXTERN_NOINLINE(r,f) extern r __ACCLIB_FUNCNAME(f) # endif #endif -#if !defined(__ACCLIB_CONST_CAST_RETURN) -#if 1 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (acc_uintptr_t) (var); -#elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE) -# define __ACCLIB_CONST_CAST_RETURN(type,var) \ - { union { type a; const type b; } u; u.b = (var); return u.a; } -#else -# define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (var); -#endif -#endif -#if (ACC_OS_WIN64) -# define acclib_handle_t acc_int64l_t -# define acclib_uhandle_t acc_uint64l_t -#elif (ACC_ARCH_I386 && ACC_CC_MSC && (_MSC_VER >= 1300)) - typedef __w64 long acclib_handle_t; - typedef __w64 unsigned long acclib_uhandle_t; -# define acclib_handle_t acclib_handle_t -# define acclib_uhandle_t acclib_uhandle_t -#else +#if (ACC_SIZEOF_LONG > ACC_SIZEOF_VOID_P) # define acclib_handle_t long -# define acclib_uhandle_t unsigned long +#else +# define acclib_handle_t acc_intptr_t #endif #if 0 ACCLIB_EXTERN(int, acc_ascii_digit) (int); @@ -3689,13 +5023,13 @@ ACCLIB_EXTERN(int, acc_ascii_toupper) (int); ACCLIB_EXTERN(int, acc_ascii_utolower) (int); ACCLIB_EXTERN(int, acc_ascii_utoupper) (int); #endif -#define acc_ascii_isdigit(c) (((unsigned)(c) - 48) < 10) -#define acc_ascii_islower(c) (((unsigned)(c) - 97) < 26) -#define acc_ascii_isupper(c) (((unsigned)(c) - 65) < 26) -#define acc_ascii_tolower(c) ((int)(c) + (acc_ascii_isupper(c) << 5)) -#define acc_ascii_toupper(c) ((int)(c) - (acc_ascii_islower(c) << 5)) -#define acc_ascii_utolower(c) acc_ascii_tolower((unsigned char)(c)) -#define acc_ascii_utoupper(c) acc_ascii_toupper((unsigned char)(c)) +#define acc_ascii_isdigit(c) ((ACC_ICAST(unsigned, c) - 48) < 10) +#define acc_ascii_islower(c) ((ACC_ICAST(unsigned, c) - 97) < 26) +#define acc_ascii_isupper(c) ((ACC_ICAST(unsigned, c) - 65) < 26) +#define acc_ascii_tolower(c) (ACC_ICAST(int, c) + (acc_ascii_isupper(c) << 5)) +#define acc_ascii_toupper(c) (ACC_ICAST(int, c) - (acc_ascii_islower(c) << 5)) +#define acc_ascii_utolower(c) acc_ascii_tolower(ACC_ITRUNC(unsigned char, c)) +#define acc_ascii_utoupper(c) acc_ascii_toupper(ACC_ITRUNC(unsigned char, c)) #ifndef acc_hsize_t #if (ACC_HAVE_MM_HUGE_PTR) # define acc_hsize_t unsigned long @@ -3885,7 +5219,7 @@ ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p); # define acc_alloca(x) __builtin_alloca((x)) #elif (ACC_CC_BORLANDC || ACC_CC_LCC) && defined(__linux__) #elif (HAVE_ALLOCA) -# define acc_alloca(x) ((void *) (alloca((x)))) +# define acc_alloca(x) ACC_STATIC_CAST(void *, alloca((x))) #endif #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) # define acc_stackavail() stackavail() @@ -3912,7 +5246,7 @@ ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p); #elif (ACC_ARCH_I086 && ACC_CC_ZORTECHC) # define acc_stackavail() _chkstack() #endif -ACCLIB_EXTERN(acclib_handle_t, acc_get_osfhandle) (int); +ACCLIB_EXTERN(acc_intptr_t, acc_get_osfhandle) (int); ACCLIB_EXTERN(const char *, acc_getenv) (const char *); ACCLIB_EXTERN(int, acc_isatty) (int); ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned); @@ -3930,47 +5264,8 @@ ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_query) (void); ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_enable) (int); ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_qemu) (void); ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void); -#if !defined(acc_int64l_t) || (ACC_CFG_NO_DOUBLE) -# undef __ACCLIB_PCLOCK_USE_RDTSC -# undef __ACCLIB_PCLOCK_USE_PERFCTR -# undef __ACCLIB_UCLOCK_USE_RDTSC -# undef __ACCLIB_UCLOCK_USE_PERFCTR -#else -typedef struct { - void* h; - int mode; - double tsc_to_seconds; - unsigned cpu_type, cpu_features, cpu_khz, cpu_nrctrs; - const char* cpu_name; -} acc_perfctr_handle_t; -typedef struct { - acc_uint64l_t tsc; -#if (ACC_OS_POSIX_LINUX) - acc_uint64l_t pmc[18]; -#else - acc_uint64l_t pmc[1]; -#endif -} acc_perfctr_clock_t; -#ifndef acc_perfctr_handle_p -#define acc_perfctr_handle_p acc_perfctr_handle_t * -#endif -#ifndef acc_perfctr_clock_p -#define acc_perfctr_clock_p acc_perfctr_clock_t * -#endif -ACCLIB_EXTERN(int, acc_perfctr_open) (acc_perfctr_handle_p); -ACCLIB_EXTERN(int, acc_perfctr_close) (acc_perfctr_handle_p); -ACCLIB_EXTERN(void, acc_perfctr_read) (acc_perfctr_handle_p, acc_perfctr_clock_p); -#if !(ACC_CFG_NO_DOUBLE) -ACCLIB_EXTERN(double, acc_perfctr_get_elapsed) (acc_perfctr_handle_p, const acc_perfctr_clock_p, const acc_perfctr_clock_p); -ACCLIB_EXTERN(double, acc_perfctr_get_elapsed_tsc) (acc_perfctr_handle_p, acc_uint64l_t); -#endif -ACCLIB_EXTERN(int, acc_perfctr_flush_cpu_cache) (acc_perfctr_handle_p, unsigned); -#endif #if defined(acc_int32e_t) ACCLIB_EXTERN(int, acc_tsc_read) (acc_uint32e_t*); -#else -# undef __ACCLIB_PCLOCK_USE_RDTSC -# undef __ACCLIB_UCLOCK_USE_RDTSC #endif struct acc_pclock_handle_t; struct acc_pclock_t; @@ -3986,18 +5281,16 @@ typedef struct acc_pclock_t acc_pclock_t; #define ACC_PCLOCK_MONOTONIC 1 #define ACC_PCLOCK_PROCESS_CPUTIME_ID 2 #define ACC_PCLOCK_THREAD_CPUTIME_ID 3 +typedef int (*acc_pclock_gettime_t) (acc_pclock_handle_p, acc_pclock_p); struct acc_pclock_handle_t { acclib_handle_t h; int mode; int read_error; const char* name; - int (*gettime) (acc_pclock_handle_p, acc_pclock_p); + acc_pclock_gettime_t gettime; #if defined(acc_int64l_t) acc_uint64l_t ticks_base; #endif -#if (__ACCLIB_PCLOCK_USE_PERFCTR) - acc_perfctr_handle_t pch; -#endif }; struct acc_pclock_t { #if defined(acc_int64l_t) @@ -4016,60 +5309,6 @@ ACCLIB_EXTERN(void, acc_pclock_read) (acc_pclock_handle_p, acc_pclock_p); ACCLIB_EXTERN(double, acc_pclock_get_elapsed) (acc_pclock_handle_p, const acc_pclock_p, const acc_pclock_p); #endif ACCLIB_EXTERN(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p, unsigned); -#if !defined(acc_int64l_t) || (ACC_CFG_NO_DOUBLE) -# undef __ACCLIB_UCLOCK_USE_QPC -#elif (ACC_OS_CYGWIN || ACC_OS_EMX || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) -# define __ACCLIB_UCLOCK_USE_QPC 1 -#else -# undef __ACCLIB_UCLOCK_USE_QPC -#endif -typedef struct { - acclib_handle_t h; - int mode; - int read_error; - const char* name; -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - acc_perfctr_handle_t pch; -#endif -#if (__ACCLIB_UCLOCK_USE_QPC) - double qpf; -#endif -} acc_uclock_handle_t; -typedef struct { - union { - acc_uint32l_t t32; -#if !(ACC_OS_DOS16 || ACC_OS_WIN16) -# if !(ACC_CFG_NO_DOUBLE) - double td; -# endif -# if defined(acc_int64l_t) - acc_int64l_t t64; -# endif -#endif - } ticks; -#if (__ACCLIB_UCLOCK_USE_RDTSC) - acc_uint64l_t tsc; -#endif -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - acc_perfctr_clock_t pcc; -#endif -#if (__ACCLIB_UCLOCK_USE_QPC) - acc_int64l_t qpc; -#endif -} acc_uclock_t; -#ifndef acc_uclock_handle_p -#define acc_uclock_handle_p acc_uclock_handle_t * -#endif -#ifndef acc_uclock_p -#define acc_uclock_p acc_uclock_t * -#endif -ACCLIB_EXTERN(int, acc_uclock_open) (acc_uclock_handle_p); -ACCLIB_EXTERN(int, acc_uclock_close) (acc_uclock_handle_p); -ACCLIB_EXTERN(void, acc_uclock_read) (acc_uclock_handle_p, acc_uclock_p); -#if !(ACC_CFG_NO_DOUBLE) -ACCLIB_EXTERN(double, acc_uclock_get_elapsed) (acc_uclock_handle_p, const acc_uclock_p, const acc_uclock_p); -#endif -ACCLIB_EXTERN(int, acc_uclock_flush_cpu_cache) (acc_uclock_handle_p, unsigned); struct acc_getopt_t; typedef struct acc_getopt_t acc_getopt_t; #ifndef acc_getopt_p @@ -4086,12 +5325,13 @@ struct acc_getopt_longopt_t { int* flag; int val; }; +typedef void (*acc_getopt_opterr_t)(acc_getopt_p, const char*, void *); struct acc_getopt_t { void *user; const char *progname; int bad_option; char *optarg; - void (*opterr)(acc_getopt_p, const char*, void *); + acc_getopt_opterr_t opterr; int optind; int optopt; int errcount; @@ -4173,6 +5413,7 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #if defined(ACC_CXX_NOTHROW) #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) #elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450)) +#elif (ACC_CC_GHS && !defined(__EXCEPTIONS)) #elif (ACC_CC_HIGHC) #elif (ACC_CC_MSC && (_MSC_VER < 1100)) #elif (ACC_CC_NDPC) @@ -4180,13 +5421,13 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND)) #elif (ACC_CC_ZORTECHC) #else -# define ACC_CXX_NOTHROW throw() +# define ACC_CXX_NOTHROW throw() #endif #if !defined(ACC_CXX_NOTHROW) -# define ACC_CXX_NOTHROW /*empty*/ +# define ACC_CXX_NOTHROW /*empty*/ #endif #if defined(__ACC_CXX_DO_NEW) -#elif (ACC_CC_NDPC || ACC_CC_PGI) +#elif (ACC_CC_GHS || ACC_CC_NDPC || ACC_CC_PGI) # define __ACC_CXX_DO_NEW { return 0; } #elif ((ACC_CC_BORLANDC || ACC_CC_TURBOC) && ACC_ARCH_I086) # define __ACC_CXX_DO_NEW { return 0; } @@ -4254,7 +5495,7 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL) #else # define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \ - const void* klass::acc_cxx_trigger_function() const { return 0; } + const void* klass::acc_cxx_trigger_function() const { return ACC_STATIC_CAST(const void *, 0); } #endif #endif #endif @@ -4266,9 +5507,9 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #endif #if !defined(ACCCHK_ASSERT_SIGN_T) # define ACCCHK_ASSERT_SIGN_T(type,relop) \ - ACCCHK_ASSERT( (type) (-1) relop (type) 0 ) \ - ACCCHK_ASSERT( (type) (~(type)0) relop (type) 0 ) \ - ACCCHK_ASSERT( (type) (~(type)0) == (type) (-1) ) + ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) relop ACC_STATIC_CAST(type, 0)) \ + ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) relop ACC_STATIC_CAST(type, 0)) \ + ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) == ACC_STATIC_CAST(type, -1)) #endif #if !defined(ACCCHK_ASSERT_IS_SIGNED_T) # define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<) @@ -4276,21 +5517,35 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #if !defined(ACCCHK_ASSERT_IS_UNSIGNED_T) # if (ACC_BROKEN_INTEGRAL_PROMOTION) # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) \ - ACCCHK_ASSERT( (type) (-1) > (type) 0 ) + ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) > ACC_STATIC_CAST(type, 0) ) # else # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>) # endif #endif +#if defined(ACCCHK_CFG_PEDANTIC) #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560)) # pragma option push -w-8055 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0550)) # pragma option push -w-osh #endif +#endif #if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1) -# error "preprocessor error 1" +# error "preprocessor error" #endif #if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2) -# error "preprocessor error 2" +# error "preprocessor error" +#endif +#if +0 +# error "preprocessor error" +#endif +#if -0 +# error "preprocessor error" +#endif +#if +0 != 0 +# error "preprocessor error" +#endif +#if -0 != 0 +# error "preprocessor error" #endif #define ACCCHK_VAL 1 #define ACCCHK_TMP1 ACCCHK_VAL @@ -4324,44 +5579,77 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a # endif #endif ACCCHK_ASSERT(1 == 1) - ACCCHK_ASSERT(__ACC_MASK_GEN(1u,2) == 3) - ACCCHK_ASSERT(__ACC_MASK_GEN(1u,8) == 255) -#if (SIZEOF_INT >= 2) + ACCCHK_ASSERT(__ACC_MASK_GEN(1u,1) == 1u) + ACCCHK_ASSERT(__ACC_MASK_GEN(1u,2) == 3u) + ACCCHK_ASSERT(__ACC_MASK_GEN(1u,3) == 7u) + ACCCHK_ASSERT(__ACC_MASK_GEN(1u,8) == 255u) +#if (ACC_SIZEOF_INT >= 2) ACCCHK_ASSERT(__ACC_MASK_GEN(1,15) == 32767) ACCCHK_ASSERT(__ACC_MASK_GEN(1u,16) == 0xffffU) -#else - ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL) + ACCCHK_ASSERT(__ACC_MASK_GEN(0u,16) == 0u) #endif -#if (SIZEOF_INT >= 4) + ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL) + ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,16) == 0ul) +#if (ACC_SIZEOF_INT >= 4) ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647) ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU) + ACCCHK_ASSERT(__ACC_MASK_GEN(0u,32) == 0u) #endif -#if (SIZEOF_LONG >= 4) +#if (ACC_SIZEOF_LONG >= 4) ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL) + ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,32) == 0ul) #endif -#if (SIZEOF_LONG >= 8) +#if (ACC_SIZEOF_LONG >= 8) ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL) + ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,64) == 0ul) #endif #if !(ACC_BROKEN_INTEGRAL_PROMOTION) - ACCCHK_ASSERT(__ACC_MASK_GEN(1u,SIZEOF_INT*8) == ~0u) - ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,SIZEOF_LONG*8) == ~0ul) + ACCCHK_ASSERT(__ACC_MASK_GEN(1u,ACC_SIZEOF_INT*8) == ~0u) + ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,ACC_SIZEOF_LONG*8) == ~0ul) +#endif +#if 1 + ACCCHK_ASSERT(__ACC_MASK_GEN(0,0) == 0) + ACCCHK_ASSERT(__ACC_MASK_GEN(1,0) == 0) + ACCCHK_ASSERT(__ACC_MASK_GEN(2,0) == 0) + ACCCHK_ASSERT(__ACC_MASK_GEN(4,0) == 0) +#endif +#if 1 + ACCCHK_ASSERT(__ACC_MASK_GEN(2,1) == 2) + ACCCHK_ASSERT(__ACC_MASK_GEN(4,1) == 4) + ACCCHK_ASSERT(__ACC_MASK_GEN(8,1) == 8) + ACCCHK_ASSERT(__ACC_MASK_GEN(2,2) == 2+4) + ACCCHK_ASSERT(__ACC_MASK_GEN(4,2) == 4+8) + ACCCHK_ASSERT(__ACC_MASK_GEN(8,2) == 8+16) + ACCCHK_ASSERT(__ACC_MASK_GEN(2,3) == 2+4+8) + ACCCHK_ASSERT(__ACC_MASK_GEN(4,3) == 4+8+16) + ACCCHK_ASSERT(__ACC_MASK_GEN(8,3) == 8+16+32) + ACCCHK_ASSERT(__ACC_MASK_GEN(7,1) == 7) + ACCCHK_ASSERT(__ACC_MASK_GEN(7,2) == 7+14) + ACCCHK_ASSERT(__ACC_MASK_GEN(7,3) == 7+14+28) #endif #if !(ACC_BROKEN_SIGNED_RIGHT_SHIFT) ACCCHK_ASSERT(((-1) >> 7) == -1) #endif ACCCHK_ASSERT(((1) >> 7) == 0) +#if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900)) +# pragma warning(push) +# pragma warning(disable: 1025) +#endif ACCCHK_ASSERT((~0l & ~0) == ~0l) ACCCHK_ASSERT((~0l & ~0u) == ~0u) ACCCHK_ASSERT((~0ul & ~0) == ~0ul) ACCCHK_ASSERT((~0ul & ~0u) == ~0u) #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#elif (SIZEOF_INT == 2) +#elif (ACC_SIZEOF_INT == 2) ACCCHK_ASSERT((~0l & ~0u) == 0xffffU) ACCCHK_ASSERT((~0ul & ~0u) == 0xffffU) -#elif (SIZEOF_INT == 4) +#elif (ACC_SIZEOF_INT == 4) ACCCHK_ASSERT((~0l & ~0u) == 0xffffffffU) ACCCHK_ASSERT((~0ul & ~0u) == 0xffffffffU) #endif +#if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900)) +# pragma warning(pop) +#endif ACCCHK_ASSERT_IS_SIGNED_T(signed char) ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char) ACCCHK_ASSERT(sizeof(signed char) == sizeof(char)) @@ -4369,7 +5657,7 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(char) == 1) #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L)) #else - ACCCHK_ASSERT(sizeof(char) == sizeof((char)0)) + ACCCHK_ASSERT(sizeof(char) == sizeof(ACC_STATIC_CAST(char, 0))) #endif #if defined(__cplusplus) ACCCHK_ASSERT(sizeof('\0') == sizeof(char)) @@ -4401,10 +5689,10 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(short) >= sizeof(char)) #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L)) #else - ACCCHK_ASSERT(sizeof(short) == sizeof((short)0)) + ACCCHK_ASSERT(sizeof(short) == sizeof(ACC_STATIC_CAST(short, 0))) #endif -#if (SIZEOF_SHORT > 0) - ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT) +#if (ACC_SIZEOF_SHORT > 0) + ACCCHK_ASSERT(sizeof(short) == ACC_SIZEOF_SHORT) #endif ACCCHK_ASSERT_IS_SIGNED_T(int) ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int) @@ -4414,9 +5702,9 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #endif ACCCHK_ASSERT(sizeof(int) >= sizeof(short)) ACCCHK_ASSERT(sizeof(int) == sizeof(0)) - ACCCHK_ASSERT(sizeof(int) == sizeof((int)0)) -#if (SIZEOF_INT > 0) - ACCCHK_ASSERT(sizeof(int) == SIZEOF_INT) + ACCCHK_ASSERT(sizeof(int) == sizeof(ACC_STATIC_CAST(int, 0))) +#if (ACC_SIZEOF_INT > 0) + ACCCHK_ASSERT(sizeof(int) == ACC_SIZEOF_INT) #endif ACCCHK_ASSERT(sizeof(0) == sizeof(int)) ACCCHK_ASSERT_IS_SIGNED_T(long) @@ -4427,33 +5715,33 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a #endif ACCCHK_ASSERT(sizeof(long) >= sizeof(int)) ACCCHK_ASSERT(sizeof(long) == sizeof(0L)) - ACCCHK_ASSERT(sizeof(long) == sizeof((long)0)) -#if (SIZEOF_LONG > 0) - ACCCHK_ASSERT(sizeof(long) == SIZEOF_LONG) + ACCCHK_ASSERT(sizeof(long) == sizeof(ACC_STATIC_CAST(long, 0))) +#if (ACC_SIZEOF_LONG > 0) + ACCCHK_ASSERT(sizeof(long) == ACC_SIZEOF_LONG) #endif ACCCHK_ASSERT(sizeof(0L) == sizeof(long)) ACCCHK_ASSERT_IS_UNSIGNED_T(size_t) ACCCHK_ASSERT(sizeof(size_t) >= sizeof(int)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0))) -#if (SIZEOF_SIZE_T > 0) - ACCCHK_ASSERT(sizeof(size_t) == SIZEOF_SIZE_T) +#if (ACC_SIZEOF_SIZE_T > 0) + ACCCHK_ASSERT(sizeof(size_t) == ACC_SIZEOF_SIZE_T) #endif ACCCHK_ASSERT_IS_SIGNED_T(ptrdiff_t) ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int)) ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t)) #if !(ACC_BROKEN_SIZEOF) - ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof((char*)0 - (char*)0)) + ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(ACC_STATIC_CAST(char*, 0) - ACC_STATIC_CAST(char*, 0))) # if (ACC_HAVE_MM_HUGE_PTR) - ACCCHK_ASSERT(4 == sizeof((char __huge*)0 - (char __huge*)0)) + ACCCHK_ASSERT(4 == sizeof(ACC_STATIC_CAST(char __huge*, 0) - ACC_STATIC_CAST(char __huge*, 0))) # endif #endif -#if (SIZEOF_PTRDIFF_T > 0) - ACCCHK_ASSERT(sizeof(ptrdiff_t) == SIZEOF_PTRDIFF_T) +#if (ACC_SIZEOF_PTRDIFF_T > 0) + ACCCHK_ASSERT(sizeof(ptrdiff_t) == ACC_SIZEOF_PTRDIFF_T) #endif ACCCHK_ASSERT(sizeof(void*) >= sizeof(char*)) -#if (SIZEOF_VOID_P > 0) - ACCCHK_ASSERT(sizeof(void*) == SIZEOF_VOID_P) - ACCCHK_ASSERT(sizeof(char*) == SIZEOF_VOID_P) +#if (ACC_SIZEOF_VOID_P > 0) + ACCCHK_ASSERT(sizeof(void*) == ACC_SIZEOF_VOID_P) + ACCCHK_ASSERT(sizeof(char*) == ACC_SIZEOF_VOID_P) #endif #if (ACC_HAVE_MM_HUGE_PTR) ACCCHK_ASSERT(4 == sizeof(void __huge*)) @@ -4466,59 +5754,59 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1) ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1) #endif +#if defined(ACCCHK_CFG_PEDANTIC) #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) -#elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) #else - ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0) + ACCCHK_ASSERT((1 << (8*ACC_SIZEOF_INT-1)) < 0) #endif - ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0) -#if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) -#else - ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0) #endif - ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0) + ACCCHK_ASSERT((1u << (8*ACC_SIZEOF_INT-1)) > 0) +#if defined(ACCCHK_CFG_PEDANTIC) + ACCCHK_ASSERT((1l << (8*ACC_SIZEOF_LONG-1)) < 0) +#endif + ACCCHK_ASSERT((1ul << (8*ACC_SIZEOF_LONG-1)) > 0) #if defined(acc_int16e_t) ACCCHK_ASSERT(sizeof(acc_int16e_t) == 2) - ACCCHK_ASSERT(sizeof(acc_int16e_t) == SIZEOF_ACC_INT16E_T) + ACCCHK_ASSERT(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T) ACCCHK_ASSERT(sizeof(acc_uint16e_t) == 2) ACCCHK_ASSERT(sizeof(acc_int16e_t) == sizeof(acc_uint16e_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int16e_t) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint16e_t) #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) #else - ACCCHK_ASSERT(((acc_uint16e_t)(~(acc_uint16e_t)0ul) >> 15) == 1) + ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint16e_t, (~ACC_STATIC_CAST(acc_uint16e_t,0ul))) >> 15) == 1) #endif - ACCCHK_ASSERT( (acc_int16e_t) (1 + ~(acc_int16e_t)0) == 0) + ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int16e_t, (1 + ~ACC_STATIC_CAST(acc_int16e_t, 0))) == 0) #if defined(ACCCHK_CFG_PEDANTIC) - ACCCHK_ASSERT( (acc_uint16e_t)(1 + ~(acc_uint16e_t)0) == 0) + ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint16e_t, (1 + ~ACC_STATIC_CAST(acc_uint16e_t, 0))) == 0) #endif #endif #if defined(acc_int32e_t) ACCCHK_ASSERT(sizeof(acc_int32e_t) == 4) - ACCCHK_ASSERT(sizeof(acc_int32e_t) == SIZEOF_ACC_INT32E_T) + ACCCHK_ASSERT(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T) ACCCHK_ASSERT(sizeof(acc_uint32e_t) == 4) ACCCHK_ASSERT(sizeof(acc_int32e_t) == sizeof(acc_uint32e_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int32e_t) - ACCCHK_ASSERT(((( (acc_int32e_t)1 << 30) + 1) >> 30) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32e_t, 1) << 30) + 1) >> 30) == 1) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32e_t) - ACCCHK_ASSERT(((( (acc_uint32e_t)1 << 31) + 1) >> 31) == 1) - ACCCHK_ASSERT(((acc_uint32e_t)(~(acc_uint32e_t)0ul) >> 31) == 1) - ACCCHK_ASSERT( (acc_int32e_t) (1 + ~(acc_int32e_t)0) == 0) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32e_t, 1) << 31) + 1) >> 31) == 1) + ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint32e_t, (~ACC_STATIC_CAST(acc_uint32e_t, 0ul))) >> 31) == 1) + ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int32e_t, (1 + ~ACC_STATIC_CAST(acc_int32e_t, 0))) == 0) #if defined(ACCCHK_CFG_PEDANTIC) - ACCCHK_ASSERT( (acc_uint32e_t)(1 + ~(acc_uint32e_t)0) == 0) + ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint32e_t, (1 + ~ACC_STATIC_CAST(acc_uint32e_t, 0))) == 0) #endif #endif #if defined(acc_int32e_t) ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(acc_int32e_t)) #endif ACCCHK_ASSERT(sizeof(acc_int32l_t) >= 4) - ACCCHK_ASSERT(sizeof(acc_int32l_t) == SIZEOF_ACC_INT32L_T) + ACCCHK_ASSERT(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T) ACCCHK_ASSERT(sizeof(acc_uint32l_t) >= 4) ACCCHK_ASSERT(sizeof(acc_int32l_t) == sizeof(acc_uint32l_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int32l_t) - ACCCHK_ASSERT(((( (acc_int32l_t)1 << 30) + 1) >> 30) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32l_t, 1) << 30) + 1) >> 30) == 1) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32l_t) - ACCCHK_ASSERT(((( (acc_uint32l_t)1 << 31) + 1) >> 31) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32l_t, 1) << 31) + 1) >> 31) == 1) ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(int)) #if defined(acc_int32e_t) ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32e_t)) @@ -4526,17 +5814,17 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t)) ACCCHK_ASSERT(sizeof(acc_int32f_t) >= 4) ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t)) - ACCCHK_ASSERT(sizeof(acc_int32f_t) == SIZEOF_ACC_INT32F_T) + ACCCHK_ASSERT(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T) ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= 4) ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= sizeof(acc_uint32l_t)) ACCCHK_ASSERT(sizeof(acc_int32f_t) == sizeof(acc_uint32f_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int32f_t) - ACCCHK_ASSERT(((( (acc_int32f_t)1 << 30) + 1) >> 30) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32f_t, 1) << 30) + 1) >> 30) == 1) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32f_t) - ACCCHK_ASSERT(((( (acc_uint32f_t)1 << 31) + 1) >> 31) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32f_t, 1) << 31) + 1) >> 31) == 1) #if defined(acc_int64e_t) ACCCHK_ASSERT(sizeof(acc_int64e_t) == 8) - ACCCHK_ASSERT(sizeof(acc_int64e_t) == SIZEOF_ACC_INT64E_T) + ACCCHK_ASSERT(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T) ACCCHK_ASSERT(sizeof(acc_uint64e_t) == 8) ACCCHK_ASSERT(sizeof(acc_int64e_t) == sizeof(acc_uint64e_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int64e_t) @@ -4550,18 +5838,18 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(acc_int64l_t) >= sizeof(acc_int64e_t)) #endif ACCCHK_ASSERT(sizeof(acc_int64l_t) >= 8) - ACCCHK_ASSERT(sizeof(acc_int64l_t) == SIZEOF_ACC_INT64L_T) + ACCCHK_ASSERT(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T) ACCCHK_ASSERT(sizeof(acc_uint64l_t) >= 8) ACCCHK_ASSERT(sizeof(acc_int64l_t) == sizeof(acc_uint64l_t)) ACCCHK_ASSERT_IS_SIGNED_T(acc_int64l_t) - ACCCHK_ASSERT(((( (acc_int64l_t)1 << 62) + 1) >> 62) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int64l_t, 1) << 62) + 1) >> 62) == 1) ACCCHK_ASSERT(((( ACC_INT64_C(1) << 62) + 1) >> 62) == 1) #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530)) #else ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t) ACCCHK_ASSERT(ACC_UINT64_C(18446744073709551615) > 0) #endif - ACCCHK_ASSERT(((( (acc_uint64l_t)1 << 63) + 1) >> 63) == 1) + ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint64l_t, 1) << 63) + 1) >> 63) == 1) ACCCHK_ASSERT(((( ACC_UINT64_C(1) << 63) + 1) >> 63) == 1) #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020600ul)) ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > ACC_INT64_C(0)) @@ -4574,20 +5862,42 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483629) == 721) ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483647) == 1) #endif +#if defined(acc_int64f_t) +#if defined(acc_int64e_t) + ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64e_t)) +#endif + ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t)) + ACCCHK_ASSERT(sizeof(acc_int64f_t) >= 8) + ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t)) + ACCCHK_ASSERT(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T) + ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= 8) + ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= sizeof(acc_uint64l_t)) + ACCCHK_ASSERT(sizeof(acc_int64f_t) == sizeof(acc_uint64f_t)) + ACCCHK_ASSERT_IS_SIGNED_T(acc_int64f_t) +#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530)) +#else + ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64f_t) +#endif +#endif #if !defined(__ACC_INTPTR_T_IS_POINTER) ACCCHK_ASSERT_IS_SIGNED_T(acc_intptr_t) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uintptr_t) #endif ACCCHK_ASSERT(sizeof(acc_intptr_t) >= sizeof(void *)) - ACCCHK_ASSERT(sizeof(acc_intptr_t) == SIZEOF_ACC_INTPTR_T) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == ACC_SIZEOF_ACC_INTPTR_T) ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t)) #if defined(acc_word_t) - ACCCHK_ASSERT(ACC_WORDSIZE == SIZEOF_ACC_WORD_T) + ACCCHK_ASSERT(ACC_WORDSIZE == ACC_SIZEOF_ACC_WORD_T) ACCCHK_ASSERT_IS_UNSIGNED_T(acc_word_t) ACCCHK_ASSERT_IS_SIGNED_T(acc_sword_t) - ACCCHK_ASSERT(sizeof(acc_word_t) == SIZEOF_ACC_WORD_T) + ACCCHK_ASSERT(sizeof(acc_word_t) == ACC_SIZEOF_ACC_WORD_T) ACCCHK_ASSERT(sizeof(acc_word_t) == sizeof(acc_sword_t)) #endif + ACCCHK_ASSERT(sizeof(acc_int8_t) == 1) + ACCCHK_ASSERT(sizeof(acc_uint8_t) == 1) + ACCCHK_ASSERT(sizeof(acc_int8_t) == sizeof(acc_uint8_t)) + ACCCHK_ASSERT_IS_SIGNED_T(acc_int8_t) + ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint8_t) #if defined(ACC_INT16_C) ACCCHK_ASSERT(sizeof(ACC_INT16_C(0)) >= 2) ACCCHK_ASSERT(sizeof(ACC_UINT16_C(0)) >= 2) @@ -4607,16 +5917,16 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) >> 63) == 1) ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0) == ACC_UINT64_C(0xffffffffffffffff)) ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0l) == ACC_UINT64_C(0xffffffffffffffff)) -#if (SIZEOF_INT == 4) +#if (ACC_SIZEOF_INT == 4) # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) # else - ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0u) == 0xffffffffu) + ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0u+0u)) == 0xffffffffu) # endif #endif -#if (SIZEOF_LONG == 4) +#if (ACC_SIZEOF_LONG == 4) # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) # else - ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0ul) == 0xfffffffful) + ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0ul+0ul)) == 0xfffffffful) # endif #endif #endif @@ -4677,6 +5987,14 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif +#if (ACC_ABI_IP32W64) + ACCCHK_ASSERT(sizeof(int) == 4) + ACCCHK_ASSERT(sizeof(void*) == 4) + ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) + ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) + ACCCHK_ASSERT(ACC_WORDSIZE == 8) +#endif #if (ACC_ARCH_I086) ACCCHK_ASSERT(sizeof(size_t) == 2) ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) @@ -4695,20 +6013,22 @@ ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * a ACCCHK_ASSERT(sizeof(void (*)(void)) == 8) #endif #if (ACC_CC_NDPC) -#elif (SIZEOF_INT > 1) - ACCCHK_ASSERT( (int) ((unsigned char) ((signed char) -1)) == 255) +#elif (ACC_SIZEOF_INT > 1) + ACCCHK_ASSERT( ACC_STATIC_CAST(int, ACC_STATIC_CAST(unsigned char, ACC_STATIC_CAST(signed char, -1))) == 255) #endif +#if defined(ACCCHK_CFG_PEDANTIC) #if (ACC_CC_KEILC) #elif (ACC_CC_NDPC) -#elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC) -#elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) -#elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1) - ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0) +#elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (ACC_SIZEOF_INT > 1) + ACCCHK_ASSERT( ((ACC_STATIC_CAST(unsigned char, 128)) << ACC_STATIC_CAST(int, (8*sizeof(int)-8))) < 0) +#endif #endif +#if defined(ACCCHK_CFG_PEDANTIC) #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560)) # pragma option pop #endif #endif +#endif #if defined(ACC_WANT_ACCLIB_UA) # undef ACC_WANT_ACCLIB_UA #define __ACCLIB_UA_CH_INCLUDED 1 @@ -4720,22 +6040,22 @@ ACCLIB_PUBLIC(unsigned, acc_ua_get_be16) (const acc_hvoid_p p) #if defined(ACC_UA_GET_BE16) return ACC_UA_GET_BE16(p); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((unsigned)b[1]) | ((unsigned)b[0] << 8); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(unsigned, b[1]) | (ACC_ICONV(unsigned, b[0]) << 8); #endif } ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p p) { - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint32l_t)b[2]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[0] << 16); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(acc_uint32l_t, b[2]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[0]) << 16); } ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p p) { #if defined(ACC_UA_GET_BE32) return ACC_UA_GET_BE32(p); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24); #endif } ACCLIB_PUBLIC(void, acc_ua_set_be16) (acc_hvoid_p p, unsigned v) @@ -4743,28 +6063,28 @@ ACCLIB_PUBLIC(void, acc_ua_set_be16) (acc_hvoid_p p, unsigned v) #if defined(ACC_UA_SET_BE16) ACC_UA_SET_BE16(p, v); #else - acc_hbyte_p b = (acc_hbyte_p) p; - b[1] = (unsigned char) ((v >> 0) & 0xff); - b[0] = (unsigned char) ((v >> 8) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[1] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[0] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); #endif } ACCLIB_PUBLIC(void, acc_ua_set_be24) (acc_hvoid_p p, acc_uint32l_t v) { - acc_hbyte_p b = (acc_hbyte_p) p; - b[2] = (unsigned char) ((v >> 0) & 0xff); - b[1] = (unsigned char) ((v >> 8) & 0xff); - b[0] = (unsigned char) ((v >> 16) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[2] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); + b[0] = ACC_ICONV(unsigned char, (v >> 16) & 0xff); } ACCLIB_PUBLIC(void, acc_ua_set_be32) (acc_hvoid_p p, acc_uint32l_t v) { #if defined(ACC_UA_SET_BE32) ACC_UA_SET_BE32(p, v); #else - acc_hbyte_p b = (acc_hbyte_p) p; - b[3] = (unsigned char) ((v >> 0) & 0xff); - b[2] = (unsigned char) ((v >> 8) & 0xff); - b[1] = (unsigned char) ((v >> 16) & 0xff); - b[0] = (unsigned char) ((v >> 24) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[3] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[2] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); + b[1] = ACC_ICONV(unsigned char, (v >> 16) & 0xff); + b[0] = ACC_ICONV(unsigned char, (v >> 24) & 0xff); #endif } ACCLIB_PUBLIC(unsigned, acc_ua_get_le16) (const acc_hvoid_p p) @@ -4772,22 +6092,22 @@ ACCLIB_PUBLIC(unsigned, acc_ua_get_le16) (const acc_hvoid_p p) #if defined(ACC_UA_GET_LE16) return ACC_UA_GET_LE16(p); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((unsigned)b[0]) | ((unsigned)b[1] << 8); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(unsigned, b[0]) | (ACC_ICONV(unsigned, b[1]) << 8); #endif } ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p p) { - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16); } ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p p) { #if defined(ACC_UA_GET_LE32) return ACC_UA_GET_LE32(p); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24); + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24); #endif } ACCLIB_PUBLIC(void, acc_ua_set_le16) (acc_hvoid_p p, unsigned v) @@ -4795,28 +6115,28 @@ ACCLIB_PUBLIC(void, acc_ua_set_le16) (acc_hvoid_p p, unsigned v) #if defined(ACC_UA_SET_LE16) ACC_UA_SET_LE16(p, v); #else - acc_hbyte_p b = (acc_hbyte_p) p; - b[0] = (unsigned char) ((v >> 0) & 0xff); - b[1] = (unsigned char) ((v >> 8) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); #endif } ACCLIB_PUBLIC(void, acc_ua_set_le24) (acc_hvoid_p p, acc_uint32l_t v) { - acc_hbyte_p b = (acc_hbyte_p) p; - b[0] = (unsigned char) ((v >> 0) & 0xff); - b[1] = (unsigned char) ((v >> 8) & 0xff); - b[2] = (unsigned char) ((v >> 16) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); + b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff); } ACCLIB_PUBLIC(void, acc_ua_set_le32) (acc_hvoid_p p, acc_uint32l_t v) { #if defined(ACC_UA_SET_LE32) ACC_UA_SET_LE32(p, v); #else - acc_hbyte_p b = (acc_hbyte_p) p; - b[0] = (unsigned char) ((v >> 0) & 0xff); - b[1] = (unsigned char) ((v >> 8) & 0xff); - b[2] = (unsigned char) ((v >> 16) & 0xff); - b[3] = (unsigned char) ((v >> 24) & 0xff); + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff); + b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff); + b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff); + b[3] = ACC_ICONV(unsigned char, (v >> 24) & 0xff); #endif } #if defined(acc_int64l_t) @@ -4825,21 +6145,21 @@ ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p p) #if defined(ACC_UA_GET_BE64) return ACC_UA_GET_BE64(p); #elif defined(ACC_UA_GET_BE32) - const acc_hbyte_p b = (const acc_hbyte_p) p; + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); acc_uint32e_t v0, v1; v1 = ACC_UA_GET_BE32(b + 0); v0 = ACC_UA_GET_BE32(b + 4); - return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32); -#elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8) - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint64l_t)b[7]) | ((acc_uint64l_t)b[6] << 8) | ((acc_uint64l_t)b[5] << 16) | ((acc_uint64l_t)b[4] << 24) | ((acc_uint64l_t)b[3] << 32) | ((acc_uint64l_t)b[2] << 40) | ((acc_uint64l_t)b[1] << 48) | ((acc_uint64l_t)b[0] << 56); + return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32); +#elif (ACC_WORDSIZE >= 8) + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return (ACC_ICONV(acc_uint64l_t, b[7])) | (ACC_ICONV(acc_uint64l_t, b[6]) << 8) | (ACC_ICONV(acc_uint64l_t, b[5]) << 16) | (ACC_ICONV(acc_uint64l_t, b[4]) << 24) | (ACC_ICONV(acc_uint64l_t, b[3]) << 32) | (ACC_ICONV(acc_uint64l_t, b[2]) << 40) | (ACC_ICONV(acc_uint64l_t, b[1]) << 48) | (ACC_ICONV(acc_uint64l_t, b[0]) << 56); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); acc_uint32l_t v0, v1; - v1 = ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24); + v1 = ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24); b += 4; - v0 = ((acc_uint32l_t)b[3]) | ((acc_uint32l_t)b[2] << 8) | ((acc_uint32l_t)b[1] << 16) | ((acc_uint32l_t)b[0] << 24); - return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32); + v0 = ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24); + return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32); #endif } ACCLIB_PUBLIC(void, acc_ua_set_be64) (acc_hvoid_p p, acc_uint64l_t v) @@ -4847,32 +6167,34 @@ ACCLIB_PUBLIC(void, acc_ua_set_be64) (acc_hvoid_p p, acc_uint64l_t v) #if defined(ACC_UA_SET_BE64) ACC_UA_SET_BE64(p, v); #elif defined(ACC_UA_SET_BE32) - acc_hbyte_p b = (acc_hbyte_p) p; - ACC_UA_SET_BE32(b + 4, (v >> 0)); - ACC_UA_SET_BE32(b + 0, (v >> 32)); -#elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8) - acc_hbyte_p b = (acc_hbyte_p) p; - b[7] = (unsigned char) ((v >> 0) & 0xff); - b[6] = (unsigned char) ((v >> 8) & 0xff); - b[5] = (unsigned char) ((v >> 16) & 0xff); - b[4] = (unsigned char) ((v >> 24) & 0xff); - b[3] = (unsigned char) ((v >> 32) & 0xff); - b[2] = (unsigned char) ((v >> 40) & 0xff); - b[1] = (unsigned char) ((v >> 48) & 0xff); - b[0] = (unsigned char) ((v >> 56) & 0xff); -#else - acc_hbyte_p b = (acc_hbyte_p) p; + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + ACC_UA_SET_BE32(b + 4, v); + v >>= 32; + ACC_UA_SET_BE32(b + 0, v); +#elif (ACC_WORDSIZE >= 8) + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[7] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[0] = ACC_ITRUNC(unsigned char, v); +#else + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); acc_uint32l_t x; - x = (acc_uint32l_t) (v >> 0); - b[7] = (unsigned char) ((x >> 0) & 0xff); - b[6] = (unsigned char) ((x >> 8) & 0xff); - b[5] = (unsigned char) ((x >> 16) & 0xff); - b[4] = (unsigned char) ((x >> 24) & 0xff); - x = (acc_uint32l_t) (v >> 32); - b[3] = (unsigned char) ((x >> 0) & 0xff); - b[2] = (unsigned char) ((x >> 8) & 0xff); - b[1] = (unsigned char) ((x >> 16) & 0xff); - b[0] = (unsigned char) ((x >> 24) & 0xff); + x = ACC_ITRUNC(acc_uint32l_t, v); + b[7] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[4] = ACC_ITRUNC(unsigned char, x); + v >>= 32; + x = ACC_ITRUNC(acc_uint32l_t, v); + b[3] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[0] = ACC_ITRUNC(unsigned char, x); #endif } #endif @@ -4882,21 +6204,21 @@ ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p p) #if defined(ACC_UA_GET_LE64) return ACC_UA_GET_LE64(p); #elif defined(ACC_UA_GET_LE32) - const acc_hbyte_p b = (const acc_hbyte_p) p; + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); acc_uint32e_t v0, v1; v0 = ACC_UA_GET_LE32(b + 0); v1 = ACC_UA_GET_LE32(b + 4); - return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32); -#elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8) - const acc_hbyte_p b = (const acc_hbyte_p) p; - return ((acc_uint64l_t)b[0]) | ((acc_uint64l_t)b[1] << 8) | ((acc_uint64l_t)b[2] << 16) | ((acc_uint64l_t)b[3] << 24) | ((acc_uint64l_t)b[4] << 32) | ((acc_uint64l_t)b[5] << 40) | ((acc_uint64l_t)b[6] << 48) | ((acc_uint64l_t)b[7] << 56); + return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32); +#elif (ACC_WORDSIZE >= 8) + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); + return ACC_ICONV(acc_uint64l_t, b[0]) | (ACC_ICONV(acc_uint64l_t, b[1]) << 8) | (ACC_ICONV(acc_uint64l_t, b[2]) << 16) | (ACC_ICONV(acc_uint64l_t, b[3]) << 24) | (ACC_ICONV(acc_uint64l_t, b[4]) << 32) | (ACC_ICONV(acc_uint64l_t, b[5]) << 40) | (ACC_ICONV(acc_uint64l_t, b[6]) << 48) | (ACC_ICONV(acc_uint64l_t, b[7]) << 56); #else - const acc_hbyte_p b = (const acc_hbyte_p) p; + const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p); acc_uint32l_t v0, v1; - v0 = ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24); + v0 = ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24); b += 4; - v1 = ((acc_uint32l_t)b[0]) | ((acc_uint32l_t)b[1] << 8) | ((acc_uint32l_t)b[2] << 16) | ((acc_uint32l_t)b[3] << 24); - return ((acc_uint64l_t)v0) | ((acc_uint64l_t)v1 << 32); + v1 = ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24); + return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32); #endif } ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v) @@ -4904,32 +6226,34 @@ ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v) #if defined(ACC_UA_SET_LE64) ACC_UA_SET_LE64(p, v); #elif defined(ACC_UA_SET_LE32) - acc_hbyte_p b = (acc_hbyte_p) p; - ACC_UA_SET_LE32(b + 0, (v >> 0)); - ACC_UA_SET_LE32(b + 4, (v >> 32)); -#elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8) - acc_hbyte_p b = (acc_hbyte_p) p; - b[0] = (unsigned char) ((v >> 0) & 0xff); - b[1] = (unsigned char) ((v >> 8) & 0xff); - b[2] = (unsigned char) ((v >> 16) & 0xff); - b[3] = (unsigned char) ((v >> 24) & 0xff); - b[4] = (unsigned char) ((v >> 32) & 0xff); - b[5] = (unsigned char) ((v >> 40) & 0xff); - b[6] = (unsigned char) ((v >> 48) & 0xff); - b[7] = (unsigned char) ((v >> 56) & 0xff); -#else - acc_hbyte_p b = (acc_hbyte_p) p; + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + ACC_UA_SET_LE32(b + 0, v); + v >>= 32; + ACC_UA_SET_LE32(b + 4, v); +#elif (ACC_WORDSIZE >= 8) + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); + b[0] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8; + b[7] = ACC_ITRUNC(unsigned char, v); +#else + acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p); acc_uint32l_t x; - x = (acc_uint32l_t) (v >> 0); - b[0] = (unsigned char) ((x >> 0) & 0xff); - b[1] = (unsigned char) ((x >> 8) & 0xff); - b[2] = (unsigned char) ((x >> 16) & 0xff); - b[3] = (unsigned char) ((x >> 24) & 0xff); - x = (acc_uint32l_t) (v >> 32); - b[4] = (unsigned char) ((x >> 0) & 0xff); - b[5] = (unsigned char) ((x >> 8) & 0xff); - b[6] = (unsigned char) ((x >> 16) & 0xff); - b[7] = (unsigned char) ((x >> 24) & 0xff); + x = ACC_ITRUNC(acc_uint32l_t, v); + b[0] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[3] = ACC_ITRUNC(unsigned char, x); + v >>= 32; + x = ACC_ITRUNC(acc_uint32l_t, v); + b[4] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8; + b[7] = ACC_ITRUNC(unsigned char, x); #endif } #endif @@ -4949,19 +6273,20 @@ ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v) # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f) # endif #endif +extern void* volatile acc_vget_ptr__; #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM) -extern void* volatile __acc_vget_ptr; -void* volatile __attribute__((__used__)) __acc_vget_ptr = (void *) 0; +void* volatile __attribute__((__used__)) acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0); #else -extern void* volatile __acc_vget_ptr; -void* volatile __acc_vget_ptr = (void *) 0; +void* volatile acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0); #endif #ifndef __ACCLIB_VGET_BODY #define __ACCLIB_VGET_BODY(T) \ - if __acc_unlikely(__acc_vget_ptr) { \ - * (T *) __acc_vget_ptr = v; \ - * (int *) __acc_vget_ptr = expr; \ - v = * (T *) __acc_vget_ptr; \ + if __acc_unlikely(acc_vget_ptr__) { \ + typedef T __acc_may_alias TT; \ + unsigned char e; expr &= 255; e = ACC_STATIC_CAST(unsigned char, expr); \ + * ACC_STATIC_CAST(TT *, acc_vget_ptr__) = v; \ + * ACC_STATIC_CAST(unsigned char *, acc_vget_ptr__) = e; \ + v = * ACC_STATIC_CAST(TT *, acc_vget_ptr__); \ } \ return v; #endif @@ -4987,12 +6312,6 @@ ACCLIB_PUBLIC_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t v, int ex { __ACCLIB_VGET_BODY(acc_hsize_t) } -#if !(ACC_CFG_NO_FLOAT) -ACCLIB_PUBLIC_NOINLINE(float, acc_vget_float) (float v, int expr) -{ - __ACCLIB_VGET_BODY(float) -} -#endif #if !(ACC_CFG_NO_DOUBLE) ACCLIB_PUBLIC_NOINLINE(double, acc_vget_double) (double v, int expr) { @@ -5025,8 +6344,8 @@ ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoi ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc_hsize_t len) { #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP) - const acc_hbyte_p p1 = (const acc_hbyte_p) s1; - const acc_hbyte_p p2 = (const acc_hbyte_p) s2; + const acc_hbyte_p p1 = ACC_STATIC_CAST(const acc_hbyte_p, s1); + const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, s2); if __acc_likely(len > 0) do { int d = *p1 - *p2; @@ -5042,8 +6361,8 @@ ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len) { #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY) - acc_hbyte_p p1 = (acc_hbyte_p) dest; - const acc_hbyte_p p2 = (const acc_hbyte_p) src; + acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest); + const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src); if (!(len > 0) || p1 == p2) return dest; do @@ -5057,8 +6376,8 @@ ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len) { #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE) - acc_hbyte_p p1 = (acc_hbyte_p) dest; - const acc_hbyte_p p2 = (const acc_hbyte_p) src; + acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest); + const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src); if (!(len > 0) || p1 == p2) return dest; if (p1 < p2) @@ -5080,16 +6399,17 @@ ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p sr return memmove(dest, src, len); #endif } -ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int c, acc_hsize_t len) +ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int cc, acc_hsize_t len) { #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET) - acc_hbyte_p p = (acc_hbyte_p) s; + acc_hbyte_p p = ACC_STATIC_CAST(acc_hbyte_p, s); + unsigned char c = ACC_ITRUNC(unsigned char, cc); if __acc_likely(len > 0) do - *p++ = (unsigned char) c; + *p++ = c; while __acc_likely(--len > 0); return s; #else - return memset(s, c, len); + return memset(s, cc, len); #endif } #endif @@ -5117,15 +6437,19 @@ ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed) } ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r) { + acc_uint64l_t a; r->seed = r->seed * ACC_UINT64_C(25214903917) + 11; r->seed &= ACC_UINT64_C(0xffffffffffff); - return (acc_uint32l_t) (r->seed >> 17); + a = r->seed >> 17; + return ACC_STATIC_CAST(acc_uint32l_t, a); } ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r) { + acc_uint64l_t a; r->seed = r->seed * ACC_UINT64_C(25214903917) + 11; r->seed &= ACC_UINT64_C(0xffffffffffff); - return (acc_uint32l_t) (r->seed >> 16); + a = r->seed >> 16; + return ACC_STATIC_CAST(acc_uint32l_t, a); } #endif #if defined(acc_int64l_t) @@ -5135,19 +6459,23 @@ ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed) } ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r) { + acc_uint64l_t a; r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1; #if (ACC_SIZEOF_ACC_INT64L_T > 8) r->seed &= ACC_UINT64_C(0xffffffffffffffff); #endif - return (acc_uint32l_t) (r->seed >> 33); + a = r->seed >> 33; + return ACC_STATIC_CAST(acc_uint32l_t, a); } ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r) { + acc_uint64l_t a; r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1; #if (ACC_SIZEOF_ACC_INT64L_T > 8) r->seed &= ACC_UINT64_C(0xffffffffffffffff); #endif - return (acc_uint32l_t) (r->seed >> 32); + a = r->seed >> 32; + return ACC_STATIC_CAST(acc_uint32l_t, a); } #endif ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed) @@ -5171,14 +6499,14 @@ ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r) unsigned i = 0, j; r->n = 0; do { - j = i - 623; if ((int) j < 0) j += 624; + j = i - 623; if (ACC_STATIC_CAST(int, j) < 0) j += 624; v = (r->s[i] & ACC_UINT32_C(0x80000000)) ^ (r->s[j] & ACC_UINT32_C(0x7fffffff)); - j = i - 227; if ((int) j < 0) j += 624; + j = i - 227; if (ACC_STATIC_CAST(int, j) < 0) j += 624; r->s[i] = r->s[j] ^ (v >> 1); if (v & 1) r->s[i] ^= ACC_UINT32_C(0x9908b0df); } while (++i != 624); } - v = r->s[r->n++]; + { unsigned i = r->n++; v = r->s[i]; } v ^= v >> 11; v ^= (v & ACC_UINT32_C(0x013a58ad)) << 7; v ^= (v & ACC_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18; return v; @@ -5199,7 +6527,7 @@ ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt64) (acc_randmt64_p r) { acc_uint64l_t v; v = (__ACCLIB_FUNCNAME(acc_randmt64_r64)(r)) >> 33; - return (acc_uint32l_t) v; + return ACC_STATIC_CAST(acc_uint32l_t, v); } #endif ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r) @@ -5209,14 +6537,14 @@ ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r) unsigned i = 0, j; r->n = 0; do { - j = i - 311; if ((int) j < 0) j += 312; + j = i - 311; if (ACC_STATIC_CAST(int, j) < 0) j += 312; v = (r->s[i] & ACC_UINT64_C(0xffffffff80000000)) ^ (r->s[j] & ACC_UINT64_C(0x7fffffff)); - j = i - 156; if ((int) j < 0) j += 312; + j = i - 156; if (ACC_STATIC_CAST(int, j) < 0) j += 312; r->s[i] = r->s[j] ^ (v >> 1); if (v & 1) r->s[i] ^= ACC_UINT64_C(0xb5026f5aa96619e9); } while (++i != 312); } - v = r->s[r->n++]; + { unsigned i = r->n++; v = r->s[i]; } v ^= (v & ACC_UINT64_C(0xaaaaaaaaa0000000)) >> 29; v ^= (v & ACC_UINT64_C(0x38eb3ffff6d3)) << 17; v ^= (v & ACC_UINT64_C(0x7ffbf77)) << 37; @@ -5236,20 +6564,16 @@ ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r) # pragma warn(disable:2007) #endif #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) -#if (ACC_ARCH_AMD64 && ACC_CC_PATHSCALE) -# define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx" -#elif (ACC_ARCH_AMD64 && ACC_CC_INTELC) -# define __ACCLIB_RDTSC_REGS : : "r" (t) : "memory", "rax", "rdx" +#if (ACC_ARCH_AMD64 && ACC_CC_INTELC) +# define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "rax", "rdx" #elif (ACC_ARCH_AMD64) -# define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "rax", "rdx" +# define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx" #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) -# define __ACCLIB_RDTSC_REGS : : "r" (t) : "ax", "dx" +# define __ACCLIB_RDTSC_REGS : : "c" (t) : "ax", "dx" #elif (ACC_ARCH_I386 && ACC_CC_INTELC) -# define __ACCLIB_RDTSC_REGS : : "r" (t) : "memory", "eax", "edx" -#elif (ACC_ARCH_I386 && ACC_CC_PATHSCALE) # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "eax", "edx" #else -# define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "eax", "edx" +# define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "eax", "edx" #endif #endif ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t) @@ -5515,7 +6839,7 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g, if (!s || s[1] != ':') { if (!a[0]) - ++g->optind, g->shortpos = 0; + { ++g->optind; g->shortpos = 0; } if (!s) { g->optopt = c; @@ -5524,7 +6848,7 @@ ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g, } else { - ++g->optind, g->shortpos = 0; + ++g->optind; g->shortpos = 0; if (a[0]) g->optarg = a; else if (s[2] != ':') @@ -5595,16 +6919,16 @@ ACC_EXTERN_C int __far __pascal GlobalUnlock(const void __near*); #endif ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size) { - acc_hvoid_p p = 0; + acc_hvoid_p p = ACC_STATIC_CAST(acc_hvoid_p, 0); if (!(size > 0)) return p; #if 0 && defined(__palmos__) p = MemPtrNew(size); #elif !(ACC_HAVE_MM_HUGE_PTR) - if (size < (size_t) -1) - p = malloc((size_t) size); + if (size < ACC_STATIC_CAST(size_t, -1)) + p = malloc(ACC_STATIC_CAST(size_t, size)); #else - if ((long)size <= 0) + if (ACC_STATIC_CAST(long, size) <= 0) return p; { #if (__ACCLIB_HALLOC_USE_DAH) @@ -5633,8 +6957,8 @@ ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size) #elif (ACC_CC_AZTECC) p = lmalloc(size); #else - if (size < (size_t) -1) - p = malloc((size_t) size); + if (size < ACC_STATIC_CAST(size_t, -1)) + p = malloc(ACC_STATIC_CAST(size_t, size)); #endif } #endif @@ -5684,7 +7008,7 @@ ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p) #endif ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t size) { - FILE* fp = (FILE *) vfp; + FILE* fp = ACC_STATIC_CAST(FILE *, vfp); #if (ACC_HAVE_MM_HUGE_PTR) #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM) #define __ACCLIB_REQUIRE_HMEMCPY_CH 1 @@ -5724,7 +7048,7 @@ ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t } ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (void* vfp, const acc_hvoid_p buf, acc_hsize_t size) { - FILE* fp = (FILE *) vfp; + FILE* fp = ACC_STATIC_CAST(FILE *, vfp); #if (ACC_HAVE_MM_HUGE_PTR) #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM) #define __ACCLIB_REQUIRE_HMEMCPY_CH 1 @@ -5844,26 +7168,26 @@ ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size) #if !defined(ACCLIB_PUBLIC) # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f) #endif -#if 0 && (ACC_OS_POSIX_LINUX && ACC_ARCH_AMD64 && ACC_ASM_SYNTAX_GNUC) +#if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_AMD64 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL) #ifndef acc_pclock_syscall_clock_gettime #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime #endif -static __acc_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) +__acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) { - long r; - __asm__ __volatile__("syscall\n" : "=a" (r) : "0" (228), "D" (clockid), "S" (ts) : __ACC_ASM_CLOBBER); - return r; + unsigned long r = 228; + __asm__ __volatile__("syscall\n" : "=a" (r), "=m" (*ts) : "0" (r), "D" (clockid), "S" (ts) __ACC_ASM_CLOBBER_LIST_CC); + return ACC_ICAST(long, r); } #endif -#if 0 && (ACC_OS_POSIX_LINUX && ACC_ARCH_I386 && ACC_ASM_SYNTAX_GNUC) +#if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_I386 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL) && defined(acc_int64l_t) #ifndef acc_pclock_syscall_clock_gettime #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime #endif -static __acc_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) +__acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) { - long r; - __asm__ __volatile__("int $0x80\n" : "=a" (r) : "0" (265), "b" (clockid), "c" (ts) : __ACC_ASM_CLOBBER); - return r; + unsigned long r = 265; + __asm__ __volatile__("pushl %%ebx\n pushl %%edx\n popl %%ebx\n int $0x80\n popl %%ebx\n": "=a" (r), "=m" (*ts) : "0" (r), "d" (clockid), "c" (ts) __ACC_ASM_CLOBBER_LIST_CC); + return ACC_ICAST(long, r); } #endif #if 0 && defined(acc_pclock_syscall_clock_gettime) @@ -5876,7 +7200,7 @@ static int acc_pclock_read_clock_gettime_r_syscall(acc_pclock_handle_p h, acc_pc if (acc_pclock_syscall_clock_gettime(0, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec); ACC_UNUSED(h); return 0; } #endif @@ -5887,7 +7211,7 @@ static int acc_pclock_read_clock_gettime_r_syscall(acc_pclock_handle_p h, acc_pc static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c) { struct timeval tv; - if (gettimeofday(&tv, 0) != 0) + if (gettimeofday(&tv, NULL) != 0) return -1; #if defined(acc_int64l_t) c->tv_sec = tv.tv_sec; @@ -5895,11 +7219,11 @@ static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c) c->tv_sec_high = 0; c->tv_sec_low = tv.tv_sec; #endif - c->tv_nsec = (acc_uint32l_t) (tv.tv_usec * 1000u); + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (tv.tv_usec * 1000u)); ACC_UNUSED(h); return 0; } #endif -#if defined(CLOCKS_PER_SEC) +#if defined(CLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE) #ifndef acc_pclock_read_clock #define acc_pclock_read_clock acc_pclock_read_clock #endif @@ -5910,15 +7234,16 @@ static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c) #if defined(acc_int64l_t) acc_uint64l_t nsecs; ticks = clock(); - secs = (double)ticks / (CLOCKS_PER_SEC); - nsecs = (acc_uint64l_t) (secs * 1000000000.0); - c->tv_sec = (acc_int64l_t) (nsecs / 1000000000ul); - c->tv_nsec = (acc_uint32l_t) (nsecs % 1000000000ul); + secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC); + nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0)); + c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (nsecs / 1000000000ul)); + nsecs = (nsecs % 1000000000ul); + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, nsecs); #else ticks = clock(); - secs = (double)ticks / (CLOCKS_PER_SEC); + secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC); c->tv_sec_high = 0; - c->tv_sec_low = (acc_uint32l_t) (secs + 0.5); + c->tv_sec_low = ACC_STATIC_CAST(acc_uint32l_t, (secs + 0.5)); c->tv_nsec = 0; #endif ACC_UNUSED(h); return 0; @@ -5934,11 +7259,11 @@ static int acc_pclock_read_clock_gettime_m_syscall(acc_pclock_handle_p h, acc_pc if (acc_pclock_syscall_clock_gettime(1, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec); ACC_UNUSED(h); return 0; } #endif -#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC) +#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE) #ifndef acc_pclock_read_uclock #define acc_pclock_read_uclock acc_pclock_read_uclock #endif @@ -5948,14 +7273,14 @@ static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c) double secs; acc_uint64l_t nsecs; ticks = uclock(); - secs = (double)ticks / (UCLOCKS_PER_SEC); - nsecs = (acc_uint64l_t) (secs * 1000000000.0); + secs = ACC_STATIC_CAST(double, ticks) / (UCLOCKS_PER_SEC); + nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0)); c->tv_sec = nsecs / 1000000000ul; - c->tv_nsec = (acc_uint32l_t) (nsecs % 1000000000ul); + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (nsecs % 1000000000ul)); ACC_UNUSED(h); return 0; } #endif -#if 0 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(acc_int64l_t) +#if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(acc_int64l_t) #ifndef acc_pclock_read_clock_gettime_p_libc #define acc_pclock_read_clock_gettime_p_libc acc_pclock_read_clock_gettime_p_libc #endif @@ -5965,7 +7290,7 @@ static int acc_pclock_read_clock_gettime_p_libc(acc_pclock_handle_p h, acc_pcloc if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec); ACC_UNUSED(h); return 0; } #endif @@ -5979,7 +7304,7 @@ static int acc_pclock_read_clock_gettime_p_syscall(acc_pclock_handle_p h, acc_pc if (acc_pclock_syscall_clock_gettime(2, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec); ACC_UNUSED(h); return 0; } #endif @@ -5993,13 +7318,14 @@ static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pclock_p c acc_uint64l_t ticks; if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0) return -1; - ticks = ((acc_uint64l_t)ut.dwHighDateTime << 32) | ut.dwLowDateTime; + ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime; if __acc_unlikely(h->ticks_base == 0) h->ticks_base = ticks; else ticks -= h->ticks_base; - c->tv_sec = (acc_int64l_t) (ticks / 10000000ul); - c->tv_nsec = (acc_uint32l_t)(ticks % 10000000ul) * 100u; + c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul)); + ticks = (ticks % 10000000ul) * 100u; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks); ACC_UNUSED(h); return 0; } #endif @@ -6018,32 +7344,11 @@ static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p c) c->tv_sec_high = 0; c->tv_sec_low = ru.ru_utime.tv_sec; #endif - c->tv_nsec = (acc_uint32l_t) (ru.ru_utime.tv_usec * 1000u); + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (ru.ru_utime.tv_usec * 1000u)); ACC_UNUSED(h); return 0; } #endif -#if (__ACCLIB_PCLOCK_USE_PERFCTR) -#ifndef acc_pclock_read_perfctr -#define acc_pclock_read_perfctr acc_pclock_read_perfctr -#endif -static int acc_pclock_read_perfctr(acc_pclock_handle_p h, acc_pclock_p c) -{ - acc_perfctr_clock_t pcc; - double secs; - acc_uint64l_t nsecs; - __ACCLIB_FUNCNAME(acc_perfctr_read)(&h->pch, &pcc); - if __acc_unlikely(h->ticks_base == 0) - h->ticks_base = pcc.tsc; - else - pcc.tsc -= h->ticks_base; - secs = pcc.tsc * h->pch.tsc_to_seconds; - nsecs = (acc_uint64l_t) (secs * 1000000000.0); - c->tv_sec = nsecs / 1000000000ul; - c->tv_nsec = (acc_uint32l_t) (nsecs % 1000000000ul); - ACC_UNUSED(h); return 0; -} -#endif -#if 0 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(acc_int64l_t) +#if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(acc_int64l_t) #ifndef acc_pclock_read_clock_gettime_t_libc #define acc_pclock_read_clock_gettime_t_libc acc_pclock_read_clock_gettime_t_libc #endif @@ -6053,7 +7358,7 @@ static int acc_pclock_read_clock_gettime_t_libc(acc_pclock_handle_p h, acc_pcloc if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = (acc_uint32l_t) ts.tv_nsec; ACC_UNUSED(h); return 0; } #endif @@ -6067,7 +7372,7 @@ static int acc_pclock_read_clock_gettime_t_syscall(acc_pclock_handle_p h, acc_pc if (acc_pclock_syscall_clock_gettime(3, &ts) != 0) return -1; c->tv_sec = ts.tv_sec; - c->tv_nsec = ts.tv_nsec; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec); ACC_UNUSED(h); return 0; } #endif @@ -6081,13 +7386,14 @@ static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pclock_p c) acc_uint64l_t ticks; if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0) return -1; - ticks = ((acc_uint64l_t)ut.dwHighDateTime << 32) | ut.dwLowDateTime; + ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime; if __acc_unlikely(h->ticks_base == 0) h->ticks_base = ticks; else ticks -= h->ticks_base; - c->tv_sec = (acc_int64l_t) (ticks / 10000000ul); - c->tv_nsec = (acc_uint32l_t)(ticks % 10000000ul) * 100; + c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul)); + ticks = (ticks % 10000000ul) * 100u; + c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks); ACC_UNUSED(h); return 0; } #endif @@ -6095,11 +7401,11 @@ ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode) { acc_pclock_t c; int i; - h->h = (acclib_handle_t) 0; + h->h = ACC_STATIC_CAST(acclib_handle_t, 0); h->mode = -1; h->read_error = 2; h->name = NULL; - h->gettime = 0; + h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0); #if defined(acc_int64l_t) h->ticks_base = 0; #endif @@ -6145,13 +7451,6 @@ ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode) # endif break; case ACC_PCLOCK_PROCESS_CPUTIME_ID: -# if defined(acc_pclock_read_perfctr) - if (__ACCLIB_FUNCNAME(acc_perfctr_open)(&h->pch) == 0) { - h->gettime = acc_pclock_read_perfctr; - h->name = "perfctr"; - break; - } -# endif # if defined(acc_pclock_read_getprocesstimes) if (acc_pclock_read_getprocesstimes(h, &c) == 0) { h->gettime = acc_pclock_read_getprocesstimes; @@ -6207,7 +7506,7 @@ ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode) if (!h->gettime) return -1; if (!h->h) - h->h = (acclib_handle_t) 1; + h->h = ACC_STATIC_CAST(acclib_handle_t, 1); h->mode = mode; h->read_error = 0; if (!h->name) @@ -6231,13 +7530,10 @@ ACCLIB_PUBLIC(int, acc_pclock_open_default) (acc_pclock_handle_p h) } ACCLIB_PUBLIC(int, acc_pclock_close) (acc_pclock_handle_p h) { - h->h = (acclib_handle_t) 0; + h->h = ACC_STATIC_CAST(acclib_handle_t, 0); h->mode = -1; h->name = NULL; - h->gettime = 0; -#if (__ACCLIB_PCLOCK_USE_PERFCTR) - __ACCLIB_FUNCNAME(acc_perfctr_close)(&h->pch); -#endif + h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0); return 0; } ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c) @@ -6258,285 +7554,37 @@ ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c) #if !(ACC_CFG_NO_DOUBLE) ACCLIB_PUBLIC(double, acc_pclock_get_elapsed) (acc_pclock_handle_p h, const acc_pclock_p start, const acc_pclock_p stop) { + if (!h->h) { h->mode = -1; return 0.0; } + { +#if 1 && (ACC_ARCH_I386 && ACC_CC_GNUC) && defined(__STRICT_ALIGNMENT__) + float tstop, tstart; + tstop = ACC_STATIC_CAST(float, (stop->tv_sec + stop->tv_nsec / 1000000000.0)); + tstart = ACC_STATIC_CAST(float, (start->tv_sec + start->tv_nsec / 1000000000.0)); +#elif defined(acc_int64l_t) double tstop, tstart; - if (!h->h) { - h->mode = -1; - return 0.0; - } -#if defined(acc_int64l_t) +#if 1 && (ACC_CC_INTELC) + { acc_int64l_t a = stop->tv_sec; acc_uint32l_t b = stop->tv_nsec; + tstop = a + b / 1000000000.0; } + { acc_int64l_t a = start->tv_sec; acc_uint32l_t b = start->tv_nsec; + tstart = a + b / 1000000000.0; } +#else tstop = stop->tv_sec + stop->tv_nsec / 1000000000.0; tstart = start->tv_sec + start->tv_nsec / 1000000000.0; +#endif #else + double tstop, tstart; tstop = stop->tv_sec_low + stop->tv_nsec / 1000000000.0; tstart = start->tv_sec_low + start->tv_nsec / 1000000000.0; #endif return tstop - tstart; -} -#endif -ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p h, unsigned flags) -{ - if (h->h) { -#if (__ACCLIB_PCLOCK_USE_PERFCTR) - return __ACCLIB_FUNCNAME(acc_perfctr_flush_cpu_cache)(&h->pch, flags); -#endif - } - ACC_UNUSED(h); ACC_UNUSED(flags); - return -1; -} -#if defined(__ACCLIB_PCLOCK_NEED_WARN_POP) -# if (ACC_CC_MSC && (_MSC_VER >= 1200)) -# pragma warning(pop) -# else -# error "__ACCLIB_PCLOCK_NEED_WARN_POP" -# endif -# undef __ACCLIB_PCLOCK_NEED_WARN_POP -#endif -#endif -#if defined(ACC_WANT_ACCLIB_UCLOCK) -# undef ACC_WANT_ACCLIB_UCLOCK -#define __ACCLIB_UCLOCK_CH_INCLUDED 1 -#if !defined(ACCLIB_PUBLIC) -# define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f) -#endif -#if (ACC_OS_DOS16 || ACC_OS_WIN16) -#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) -#elif (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) -# if ((ACC_CC_DMC && (__DMC__ < 0x838)) || ACC_CC_LCCWIN32) -# define __ACCLIB_UCLOCK_USE_CLOCK 1 -# else -# define __ACCLIB_UCLOCK_USE_WINMM 1 -# if (ACC_CC_MSC && (_MSC_VER >= 1200)) -# pragma warning(push) -# define __ACCLIB_UCLOCK_NEED_WARN_POP 1 -# endif -# if (ACC_CC_MSC && (_MSC_VER >= 900)) -# pragma warning(disable: 4201) -# elif (ACC_CC_MWERKS) -# define LPUINT __ACC_MMSYSTEM_H_LPUINT -# endif -# if 1 -# include <mmsystem.h> -# else -# if (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC) - ACC_EXTERN_C __declspec(dllimport) unsigned long __stdcall timeGetTime(void); -# else - ACC_EXTERN_C unsigned long __stdcall timeGetTime(void); -# endif -# endif -# if (ACC_CC_DMC) -# pragma DMC includelib "winmm.lib" -# elif (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC) -# pragma comment(lib, "winmm.lib") -# elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3000)) -# pragma comment(lib, "winmm.lib") -# elif (ACC_CC_SYMANTECC) -# pragma SC includelib "winmm.lib" -# elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 1050)) -# pragma library("winmm.lib") -# endif -# endif -#elif (ACC_OS_CYGWIN || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN32 || ACC_OS_WIN64) -# define __ACCLIB_UCLOCK_USE_CLOCK 1 -#elif (ACC_OS_CONSOLE) && defined(CLOCKS_PER_SEC) -# define __ACCLIB_UCLOCK_USE_CLOCK 1 -#elif (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99) && defined(CLOCKS_PER_SEC) -# define __ACCLIB_UCLOCK_USE_CLOCK 1 -#endif -#if (__ACCLIB_UCLOCK_USE_CLOCK) && !defined(CLOCKS_PER_SEC) -# if defined(CLK_TCK) -# define CLOCKS_PER_SEC CLK_TCK -# else -# undef __ACCLIB_UCLOCK_USE_CLOCK -# endif -#endif -#if (__ACCLIB_UCLOCK_USE_GETRUSAGE) -# if !defined(RUSAGE_SELF) -# undef __ACCLIB_UCLOCK_USE_GETRUSAGE -# endif -#endif -ACCLIB_PUBLIC(int, acc_uclock_open) (acc_uclock_handle_p h) -{ - int i; -#if (__ACCLIB_UCLOCK_USE_QPC) - LARGE_INTEGER li; -#endif - h->h = (acclib_handle_t) 1; - h->mode = 0; - h->read_error = 0; - h->name = NULL; -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - h->pch.h = 0; - if (h->mode == 0 && __ACCLIB_FUNCNAME(acc_perfctr_open)(&h->pch) == 0) - h->mode = 2; -#endif -#if (__ACCLIB_UCLOCK_USE_QPC) - h->qpf = 0.0; - if (h->mode == 0 && QueryPerformanceFrequency(&li) != 0) { - double d = (double) li.QuadPart; - if (d > 0.0 && QueryPerformanceCounter(&li) != 0) { - h->mode = 3; - h->qpf = d; - } - } -#endif - for (i = 0; i < 10; i++) { - acc_uclock_t c; - __ACCLIB_FUNCNAME(acc_uclock_read)(h, &c); - } - return 0; -} -ACCLIB_PUBLIC(int, acc_uclock_close) (acc_uclock_handle_p h) -{ - h->h = (acclib_handle_t) 0; - h->mode = -1; - h->name = NULL; -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - __ACCLIB_FUNCNAME(acc_perfctr_close)(&h->pch); -#endif - return 0; -} -ACCLIB_PUBLIC(void, acc_uclock_read) (acc_uclock_handle_p h, acc_uclock_p c) -{ -#if (__ACCLIB_UCLOCK_USE_RDTSC) - __ACCLIB_FUNCNAME(acc_tsc_read)((acc_uint32e_t*) (void*) &c->tsc); -#endif -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - if (h->pch.h) { - __ACCLIB_FUNCNAME(acc_perfctr_read)(&h->pch, &c->pcc); - if (h->mode > 0 && h->mode <= 2) - return; - } -#endif -#if (__ACCLIB_UCLOCK_USE_QPC) - if (h->qpf > 0.0) { - LARGE_INTEGER li; - if (QueryPerformanceCounter(&li) != 0) { - c->qpc = (acc_int64l_t) li.QuadPart; - if (h->mode > 0 && h->mode <= 3) - return; - } else { - h->mode = 0; h->qpf = 0.0; c->qpc = 0; - h->read_error = 1; - } - } -#endif - { -#if (ACC_OS_DOS16 || ACC_OS_WIN16) -# if (ACC_CC_AZTECC) - c->ticks.t32 = 0; -# else - union REGS ri, ro; - ri.x.ax = 0x2c00; int86(0x21, &ri, &ro); - c->ticks.t32 = ro.h.ch*60UL*60UL*100UL + ro.h.cl*60UL*100UL + ro.h.dh*100UL + ro.h.dl; -# endif -#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) - c->ticks.t64 = uclock(); -#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t) - c->ticks.t64 = clock(); -#elif (__ACCLIB_UCLOCK_USE_CLOCK) - c->ticks.t32 = clock(); -#elif (__ACCLIB_UCLOCK_USE_WINMM) - c->ticks.t32 = timeGetTime(); -#elif (__ACCLIB_UCLOCK_USE_GETRUSAGE) - struct rusage ru; - if (getrusage(RUSAGE_SELF, &ru) != 0) c->ticks.td = 0; - else c->ticks.td = ru.ru_utime.tv_sec + ru.ru_utime.tv_usec / 1000000.0; -#elif (HAVE_GETTIMEOFDAY) - struct timeval tv; - if (gettimeofday(&tv, 0) != 0) c->ticks.td = 0; - else c->ticks.td = tv.tv_sec + tv.tv_usec / 1000000.0; -#else - ACC_UNUSED(c); -#endif } - ACC_UNUSED(h); } -ACCLIB_PUBLIC(double, acc_uclock_get_elapsed) (acc_uclock_handle_p h, const acc_uclock_p start, const acc_uclock_p stop) -{ - double d; - if (!h->h) { - h->mode = -1; - return 0.0; - } -#if (__ACCLIB_UCLOCK_USE_RDTSC) - if (h->mode == 1) { - if (!h->name) h->name = "rdtsc"; - d = (double) ((acc_int64l_t)stop->tsc - (acc_int64l_t)start->tsc); - return d / 1000000000.0; - } -#endif -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - if (h->pch.h && h->mode == 2) { - if (!h->name) h->name = "perfctr"; - return __ACCLIB_FUNCNAME(acc_perfctr_get_elapsed)(&h->pch, &start->pcc, &stop->pcc); - } -#endif -#if (__ACCLIB_UCLOCK_USE_QPC) - if (h->qpf > 0.0 && h->mode == 3) { - if (!h->name) h->name = "qpc"; - if (start->qpc == 0 || stop->qpc == 0) return 0.0; - return (double) (stop->qpc - start->qpc) / h->qpf; - } #endif -#if (ACC_OS_DOS16 || ACC_OS_WIN16) - h->mode = 11; - if (!h->name) h->name = "uclock"; - d = (double) (stop->ticks.t32 - start->ticks.t32) / 100.0; - if (d < 0.0) d += 86400.0; -#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) - h->mode = 12; - if (!h->name) h->name = "uclock"; - d = (double) (stop->ticks.t64 - start->ticks.t64) / (UCLOCKS_PER_SEC); -#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t) - h->mode = 13; - if (!h->name) h->name = "clock"; - { - acc_int64l_t t; - t = stop->ticks.t64 - start->ticks.t64; - if (t < 0) - t += sizeof(clock_t) == 4 ? ACC_INT64_C(0x100000000) : ACC_INT64_C(0); - d = (double) t / (CLOCKS_PER_SEC); - } -#elif (__ACCLIB_UCLOCK_USE_CLOCK) - h->mode = 14; - if (!h->name) h->name = "clock"; - d = (double) (stop->ticks.t32 - start->ticks.t32) / (CLOCKS_PER_SEC); -#elif (__ACCLIB_UCLOCK_USE_WINMM) - h->mode = 15; - if (!h->name) h->name = "timeGetTime"; - d = (double) (stop->ticks.t32 - start->ticks.t32) / 1000.0; -#elif (__ACCLIB_UCLOCK_USE_GETRUSAGE) - h->mode = 16; - if (!h->name) h->name = "getrusage"; - d = stop->ticks.td - start->ticks.td; -#elif (HAVE_GETTIMEOFDAY) - h->mode = 17; - if (!h->name) h->name = "gettimeofday"; - d = stop->ticks.td - start->ticks.td; -#else - h->mode = 0; - d = 0.0; -#endif - return d; -} -ACCLIB_PUBLIC(int, acc_uclock_flush_cpu_cache) (acc_uclock_handle_p h, unsigned flags) +ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p h, unsigned flags) { - if (h->h) { -#if (__ACCLIB_UCLOCK_USE_PERFCTR) - return __ACCLIB_FUNCNAME(acc_perfctr_flush_cpu_cache)(&h->pch, flags); -#endif - } ACC_UNUSED(h); ACC_UNUSED(flags); return -1; } -#if defined(__ACCLIB_UCLOCK_NEED_WARN_POP) -# if (ACC_CC_MSC && (_MSC_VER >= 1200)) -# pragma warning(pop) -# else -# error "__ACCLIB_UCLOCK_NEED_WARN_POP" -# endif -# undef __ACCLIB_UCLOCK_NEED_WARN_POP -#endif #endif #if defined(ACC_WANT_ACCLIB_MISC) # undef ACC_WANT_ACCLIB_MISC @@ -6562,10 +7610,10 @@ ACCLIB_PUBLIC(const char *, acc_getenv) (const char *s) #if (HAVE_GETENV) return getenv(s); #else - ACC_UNUSED(s); return (const char *) 0; + ACC_UNUSED(s); return ACC_STATIC_CAST(const char *, 0); #endif } -ACCLIB_PUBLIC(acclib_handle_t, acc_get_osfhandle) (int fd) +ACCLIB_PUBLIC(acc_intptr_t, acc_get_osfhandle) (int fd) { if (fd < 0) return -1; @@ -6667,7 +7715,7 @@ ACCLIB_PUBLIC(int, acc_isatty) (int fd) #elif (ACC_OS_DOS32 && ACC_CC_WATCOMC) { union REGS ri, ro; - ri.w.ax = 0x4400; ri.w.bx = (unsigned short) fd; + ri.w.ax = 0x4400; ri.w.bx = ACC_STATIC_CAST(unsigned short, fd); int386(0x21, &ri, &ro); if ((ro.w.cflag & 1) == 0) if ((ro.w.ax & 0x83) != 0x83) @@ -6675,11 +7723,12 @@ ACCLIB_PUBLIC(int, acc_isatty) (int fd) } #elif (ACC_HAVE_WINDOWS_H) { - acclib_handle_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd); - if ((HANDLE)h != INVALID_HANDLE_VALUE) + acc_intptr_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd); + ACC_COMPILE_TIME_ASSERT(sizeof(h) == sizeof(HANDLE)) + if (h != -1) { DWORD d = 0; - if (GetConsoleMode((HANDLE)h, &d) == 0) + if (GetConsoleMode(ACC_REINTERPRET_CAST(HANDLE, h), &d) == 0) return 0; } } @@ -6702,15 +7751,14 @@ ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode) return mkdir(name, mode); #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__) return mkdir(name, mode); +#elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC)) + ACC_UNUSED(mode); + return mkdir(ACC_UNCONST_CAST(char *, name)); #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) ACC_UNUSED(mode); -# if (ACC_CC_HIGHC || ACC_CC_PACIFICC) - return mkdir((char*) name); -# else return mkdir(name); -# endif #elif (ACC_CC_WATCOMC) - return mkdir(name, (mode_t) mode); + return mkdir(name, ACC_STATIC_CAST(mode_t, mode)); #else return mkdir(name, mode); #endif @@ -6721,7 +7769,7 @@ ACCLIB_PUBLIC(int, acc_rmdir) (const char* name) ACC_UNUSED(name); return -1; #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC)) - return rmdir((char *) name); + return rmdir(ACC_UNCONST_CAST(char *, name)); #else return rmdir(name); #endif @@ -6733,7 +7781,8 @@ ACCLIB_PUBLIC(acc_int32e_t, acc_muldiv32s) (acc_int32e_t a, acc_int32e_t b, acc_ if __acc_likely(x != 0) { #if defined(acc_int64l_t) - r = (acc_int32e_t) (((acc_int64l_t) a * b) / x); + acc_int64l_t rr = (ACC_ICONV(acc_int64l_t, a) * b) / x; + r = ACC_ITRUNC(acc_int32e_t, rr); #else ACC_UNUSED(a); ACC_UNUSED(b); #endif @@ -6746,7 +7795,8 @@ ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, a if __acc_likely(x != 0) { #if defined(acc_int64l_t) - r = (acc_uint32e_t) (((acc_uint64l_t) a * b) / x); + acc_uint64l_t rr = (ACC_ICONV(acc_uint64l_t, a) * b) / x; + r = ACC_ITRUNC(acc_uint32e_t, rr); #else ACC_UNUSED(a); ACC_UNUSED(b); #endif @@ -6754,11 +7804,6 @@ ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, a return r; } #endif -#if 0 -ACCLIB_PUBLIC_NOINLINE(int, acc_syscall_clock_gettime) (int c) -{ -} -#endif #if (ACC_OS_WIN16) ACC_EXTERN_C void __far __pascal DebugBreak(void); #endif @@ -6769,16 +7814,15 @@ ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break) (void) #elif (ACC_ARCH_I086) #elif (ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) DebugBreak(); -#elif (ACC_CFG_NO_INLINE_ASM) && (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H) - DebugBreak(); #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) - __asm__ __volatile__("int $3\n" : : : __ACC_ASM_CLOBBER); + __asm__ __volatile__("int $3\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) __asm { int 3 } #elif (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H) DebugBreak(); #else - * (volatile int *) 0x1 = -1; + volatile acc_intptr_t a = -1; + * ACC_STATIC_CAST(volatile unsigned long *, ACC_REINTERPRET_CAST(volatile void *, a)) = ~0ul; #endif } ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop) (void) @@ -6787,9 +7831,13 @@ ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop) (void) ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void) { #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) - size_t r; - __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : : __ACC_ASM_CLOBBER); - return (int)(r >> 18) & 1; +# if (ACC_ARCH_AMD64) + acc_uint64e_t r = 0; +# else + size_t r = 0; +# endif + __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); + return ACC_ICONV(int, (r >> 18) & 1); #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) unsigned long r; __asm { @@ -6797,28 +7845,27 @@ ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void) pop eax mov r,eax } - return (int)(r >> 18) & 1; + return ACC_ICONV(int, (r >> 18) & 1); #else return -1; #endif } ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable) (int v) { - int r; #if (ACC_ARCH_AMD64) && (ACC_ASM_SYNTAX_GNUC) if (v) { - __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER); + __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); } else { - __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER); + __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); } - r = 0; + return 0; #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) if (v) { - __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER); + __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); } else { - __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER); + __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY); } - r = 0; + return 0; #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) if (v) { __asm { pushf @@ -6829,21 +7876,20 @@ ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable) (int v) and dword ptr [esp],-262145 popf }} - r = 0; + return 0; #else - r = -1; + ACC_UNUSED(v); return -1; #endif - ACC_UNUSED(v); return r; } ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu) (void) { unsigned r = 0; #if (ACC_OS_POSIX_LINUX || ACC_OS_WIN32 || ACC_OS_WIN64) const char* p; - p = __ACCLIB_FUNCNAME(acc_getenv)("ACC_ENV_RUNNING_ON_QEMU"); + p = __ACCLIB_FUNCNAME(acc_getenv)(ACC_PP_STRINGIZE(ACC_ENV_RUNNING_ON_QEMU)); if (p) { if (p[0] == 0) r = 0; - else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = p[0] - '0'; + else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = ACC_ICAST(unsigned, p[0]) - '0'; else r = 1; } #endif @@ -6851,11 +7897,18 @@ ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu) (void) } ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void) { -#if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) - volatile unsigned long args[5] = { 0x1001, 0, 0, 0, 0 }; - unsigned long r = 0; - __asm__ __volatile__(".byte 0xc1,0xc0,0x1d,0xc1,0xc0,0x03,0xc1,0xc8,0x1b,0xc1,0xc8,0x05,0xc1,0xc0,0x0d,0xc1,0xc0,0x13\n" : "=d" (r) : "a" (&args[0]), "d" (r) : __ACC_ASM_CLOBBER); - return (unsigned) r; +#if (ACC_ARCH_AMD64 && ACC_ABI_ILP32) + return 0; +#elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) + volatile size_t a[6]; + size_t r = 0; + a[0] = 0x1001; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 0; a[5] = 0; +# if (ACC_ARCH_AMD64) + __asm__ __volatile__(".byte 0x48,0xc1,0xc7,0x03,0x48,0xc1,0xc7,0x0d,0x48,0xc1,0xc7,0x3d,0x48,0xc1,0xc7,0x33,0x48,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __ACC_ASM_CLOBBER_LIST_CC_MEMORY); +# elif (ACC_ARCH_I386) + __asm__ __volatile__(".byte 0xc1,0xc7,0x03,0xc1,0xc7,0x0d,0xc1,0xc7,0x1d,0xc1,0xc7,0x13,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __ACC_ASM_CLOBBER_LIST_CC_MEMORY); +# endif + return ACC_ITRUNC(unsigned, r); #else return 0; #endif @@ -6870,7 +7923,7 @@ ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void) #if !defined(ACCLIB_PUBLIC) # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f) #endif -#if (ACC_OS_DOS16 || ACC_OS216 || ACC_OS_WIN16) +#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) #if 0 && (ACC_CC_MSC) ACC_EXTERN_C int __acc_cdecl __setargv(void); ACC_EXTERN_C int __acc_cdecl _setargv(void); @@ -6878,7 +7931,8 @@ ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); } #endif #endif #if (ACC_OS_WIN32 || ACC_OS_WIN64) -#if (ACC_CC_INTELC || ACC_CC_MSC) +#if (ACC_CC_MSC && (_MSC_VER >= 1900)) +#elif (ACC_CC_INTELC || ACC_CC_MSC) ACC_EXTERN_C int __acc_cdecl __setargv(void); ACC_EXTERN_C int __acc_cdecl _setargv(void); ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); } @@ -6918,4 +7972,4 @@ ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv) #endif #endif -/* vim:set ts=4 et: */ +/* vim:set ts=4 sw=4 et: */ diff --git a/src/p_lzo.c b/src/p_lzo.c index bacb28d..36716a2 100644 --- a/src/p_lzo.c +++ b/src/p_lzo.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -158,7 +158,7 @@ void lzo_init_compress_header(header_t *h) # define ALIGN_SIZE 1 #endif -/* LZO may expand uncompressible data by a small amount */ +/* LZO may expand incompressible data by a small amount */ #define MAX_COMPRESSED_SIZE(x) ((x) + (x) / 16 + 64 + 3) @@ -192,7 +192,7 @@ static lzo_bool alloc_mem(lzo_uint32 s1, lzo_uint32 s2, lzo_uint32 w) **************************************************************************/ /* maybe make this an option ? */ -static const lzo_uint block_size = BLOCK_SIZE; +static const lzo_uint32 block_size = BLOCK_SIZE; lzo_bool lzo_enter(const header_t *h) { @@ -300,7 +300,7 @@ lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h) { /* read a block */ l = read_buf(fip, b1, block_size); - src_len = (l > 0 ? l : 0); + src_len = (lzo_uint32) (l > 0 ? l : 0); /* write uncompressed block size */ write32(fop,src_len); @@ -352,9 +352,9 @@ lzo_bool lzo_compress(file_t *fip, file_t *fop, const header_t *h) /* write compressed block size */ if (dst_len < src_len) - write32(fop,dst_len); + write32(fop, (lzo_uint32) dst_len); else - write32(fop,src_len); + write32(fop, src_len); /* write checksum of uncompressed block */ if (h->flags & F_ADLER32_D) @@ -589,7 +589,4 @@ lzo_bool lzo_decompress(file_t *fip, file_t *fop, #endif /* WITH_LZO */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/s_curses.c b/src/s_curses.c index 0809b8a..ffbd2e0 100644 --- a/src/s_curses.c +++ b/src/s_curses.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -406,7 +406,4 @@ screen_t *screen_curses_construct(void) #endif /* defined(USE_SCREEN) && defined(USE_SCREEN_CURSES) */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/s_djgpp2.c b/src/s_djgpp2.c index 328d7d7..74c67b6 100644 --- a/src/s_djgpp2.c +++ b/src/s_djgpp2.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -372,7 +372,4 @@ screen_t *screen_djgpp2_construct(void) #endif /* defined(USE_SCREEN) && defined(__DJGPP__) */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/s_object.c b/src/s_object.c index 4970cf0..e23831f 100644 --- a/src/s_object.c +++ b/src/s_object.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -81,7 +81,4 @@ screen_t *sobject_construct(const screen_t *c, size_t data_size) #endif /* defined(USE_SCREEN) */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/s_vcsa.c b/src/s_vcsa.c index b04dfe1..d1a6ed2 100644 --- a/src/s_vcsa.c +++ b/src/s_vcsa.c @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -482,7 +482,4 @@ screen_t *screen_vcsa_construct(void) #endif /* defined(USE_SCREEN) && defined(USE_SCREEN_VCSA) */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/screen.h b/src/screen.h index 3813c5a..68cb8ff 100644 --- a/src/screen.h +++ b/src/screen.h @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -100,7 +100,4 @@ void screen_show_frames(screen_t *); #endif /* already included */ -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ @@ -2,7 +2,7 @@ This file is part of the lzop file compressor. - Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer All Rights Reserved. lzop and the LZO library are free software; you can redistribute them @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Markus F.X.J. Oberhumer <markus@oberhumer.com> @@ -233,12 +233,15 @@ void tm2str(char *s, size_t size, const struct tm *tmp) assert(size >= 18); #if defined(HAVE_SNPRINTF) snprintf(s, size, "%04d-%02d-%02d %02d:%02d:%02d", + (int) tmp->tm_year + 1900, (int) tmp->tm_mon + 1, + (int) tmp->tm_mday, + (int) tmp->tm_hour, (int) tmp->tm_min, (int) tmp->tm_sec); #else sprintf(s, "%04d-%02d-%02d %02d:%02d:%02d", -#endif (int) tmp->tm_year + 1900, (int) tmp->tm_mon + 1, (int) tmp->tm_mday, (int) tmp->tm_hour, (int) tmp->tm_min, (int) tmp->tm_sec); +#endif } #endif @@ -675,7 +678,4 @@ char *maybe_rename_file(const char *original_name) #endif -/* -vi:ts=4:et -*/ - +/* vim:set ts=4 sw=4 et: */ diff --git a/src/version.h b/src/version.h index d8457b0..d3d2df0 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,5 @@ -#define LZOP_VERSION 0x1030 -#define LZOP_VERSION_STRING "1.03" -#define LZOP_VERSION_DATE "Nov 1st 2010" +#define LZOP_VERSION 0x1040 +#define LZOP_VERSION_STRING "1.04" +#define LZOP_VERSION_DATE "Aug 10th 2017" + +/* vim:set ts=4 sw=4 et: */ |